Skip to content

Commit

Permalink
Changed elements to match current understanding of TX_CURR
Browse files Browse the repository at this point in the history
  • Loading branch information
Pprado23 committed Oct 15, 2024
1 parent 6bb2c66 commit c9eb0ad
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions input/cql/HIVIndicatorElements.cql
Original file line number Diff line number Diff line change
Expand Up @@ -6278,15 +6278,14 @@ define "HIV treatment outcome":
@activity: HIV.H3 Record outreach and result
@description: Twenty-eight days or more since last missed appointment
*/
define "Lost to follow-up":
define "Not Lost to follow-up":
Elements."On ART H.DE47" H
where H.effective starts before end of "Measurement Period"
and H.effective ends after start of "Measurement Period"
and not (H.effective ends after (end of "Measurement Period" - Config."LTFU Days"))
where H.effective.toInterval() starts before end of "Measurement Period"
and H.effective ends after (end of "Measurement Period" - Config."LTFU Days")


define "Is lost to follow-up":
exists("Lost to follow-up")
"On ART H.DE47" and not exists("Not Lost to follow-up")

/* End of Lost to follow-up */

Expand All @@ -6296,8 +6295,22 @@ define "Is lost to follow-up":
@description: The client transferred to another facility
*/

define "Not Transferred Out":
Elements."On ART H.DE47" ART
with [EpisodeOfCare] EOC
such that ART.context.references(EOC) and
not exists (
EOC.statusHistory H
where H.status = 'finished' and H.period overlaps "Measurement Period"
)
and not (
EOC.status = 'finished' and EOC.period overlaps "Measurement Period"
)
where ART.effective.toInterval() starts before end of "Measurement Period"
and ART.effective.toInterval() ends after start of "Measurement Period"

define "Has transferred out":
exists(Elements."Transferred out" t where t ends during "Measurement Period")
"On ART H.DE47" and not exists("Not Transferred Out")
/* End of Transferred out */

/*
Expand Down

0 comments on commit c9eb0ad

Please sign in to comment.