From fa0d7485dd42ef6d7aef98121c9561da450e4f81 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Sun, 4 Aug 2024 16:21:31 -0700 Subject: [PATCH 01/13] IND 44 --- input/cql/HIVCommon.cql | 2 +- input/cql/HIVElements.cql | 104 +++----------------------- input/cql/HIVIND44Logic.cql | 8 +- input/cql/HIVIndicatorElements.cql | 113 +++-------------------------- 4 files changed, 25 insertions(+), 202 deletions(-) diff --git a/input/cql/HIVCommon.cql b/input/cql/HIVCommon.cql index 831bca5e07..437d550d2c 100644 --- a/input/cql/HIVCommon.cql +++ b/input/cql/HIVCommon.cql @@ -45,7 +45,7 @@ define "Elevated Viral load test during Measurement Period": HE."Viral load test result D.DE387" VL with "viral load sample collection" P such that VL.partOf.references(P) and P.performed.toInterval() during "Measurement Period" - where VL.value > 1000 'copies/ml' + where VL.value > 1000 sort by start of effective.toInterval() diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 5ea2fa9e03..e4f85af4eb 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -11564,11 +11564,9 @@ define "Date of TB diagnosis Value": */ // TODO: Replace placeholder with relevant CQL logic define "TB preventive treatment TPT start date": - [Observation: Concepts."TB preventive treatment TPT start date"] O - where O.status in { 'final', 'amended', 'corrected' } -define "TB preventive treatment TPT start date Value": - "TB preventive treatment TPT start date" O - return O.value + "TPT regimen" MS + return start of MS.effective.toInterval() + /* End of TB preventive treatment TPT start date */ /* @@ -12270,99 +12268,15 @@ define "C reactive protein test result Value": @activity: HIV.D4 Screen for TB @description: Type of TPT regimen the client is currently on */ -// TODO: Replace placeholder with relevant CQL logic +define "TPT regimen": + [MedicationStatement: Concepts."TPT regimen type Choices"] MS + where MS.status in { 'active', 'completed' } + define "TPT regimen type": - exists "TPT regimen type Observation" -define "TPT regimen type Observation": - [Observation: Concepts."TPT regimen type"] O - where O.status in { 'final', 'amended', 'corrected' } + "TPT regimen" MS + return MS.medication /* End of TPT regimen type */ -/* -@dataElement: HIV.D.DE1029 - 3HP -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is 3HP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "3HP": - exists "3HP Condition" - or exists "3HP Observation" -define "3HP Condition": - [Condition: Concepts."3HP"] -define "3HP Observation": - "TPT regimen type Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."3HP" -/* End of 3HP */ - -/* -@dataElement: HIV.D.DE1030 - 1HP -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is 1HP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "1HP": - exists "1HP Condition" - or exists "1HP Observation" -define "1HP Condition": - [Condition: Concepts."1HP"] -define "1HP Observation": - "TPT regimen type Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."1HP" -/* End of 1HP */ - -/* -@dataElement: HIV.D.DE1031 - 6H -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is 6H -*/ -// TODO: Replace placeholder with relevant CQL logic -define "6H": - exists "6H Condition" - or exists "6H Observation" -define "6H Condition": - [Condition: Concepts."6H"] -define "6H Observation": - "TPT regimen type Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."6H" -/* End of 6H */ - -/* -@dataElement: HIV.D.DE1032 - Six months of levofloxacin daily -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is six months of levofloxacin daily -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Six months of levofloxacin daily": - exists "Six months of levofloxacin daily Condition" - or exists "Six months of levofloxacin daily Observation" -define "Six months of levofloxacin daily Condition": - [Condition: Concepts."Six months of levofloxacin daily"] -define "Six months of levofloxacin daily Observation": - "TPT regimen type Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Six months of levofloxacin daily" -/* End of Six months of levofloxacin daily */ - -/* -@dataElement: HIV.D.DE1033 - Other TB preventive treatment TPT regimen -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is another regimen than those listed above -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Other TB preventive treatment TPT regimen": - exists "Other TB preventive treatment TPT regimen Condition" - or exists "Other TB preventive treatment TPT regimen Observation" -define "Other TB preventive treatment TPT regimen Condition": - [Condition: Concepts."Other TB preventive treatment TPT regimen"] -define "Other TB preventive treatment TPT regimen Observation": - "TPT regimen type Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Other TB preventive treatment TPT regimen" -/* End of Other TB preventive treatment TPT regimen */ - /* @dataElement: HIV.D.DE1034 - TB preventive treatment TPT status @activity: HIV.D4 Screen for TB diff --git a/input/cql/HIVIND44Logic.cql b/input/cql/HIVIND44Logic.cql index b842bcf4dc..e2392c5f41 100644 --- a/input/cql/HIVIND44Logic.cql +++ b/input/cql/HIVIND44Logic.cql @@ -70,6 +70,9 @@ include FHIRHelpers version '4.0.1' include FHIRCommon called FC include WHOCommon called WCom +include HIVElements called HE +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -91,8 +94,7 @@ define "Initial Population": */ define "Numerator": - true - + HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and exists(HIE."TB preventive treatment TPT start date in measurement period") /** * Denominator @@ -102,7 +104,7 @@ define "Numerator": */ define "Denominator": - true + HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and HE."Eligible for TB preventive treatment" /* end Populations */ diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index dd788582cc..6533bc1a30 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -5056,13 +5056,10 @@ define "Date of TB diagnosis Value": @activity: HIV.D8 Capture or update client history @description: The date on which the client began taking TPT */ -// TODO: Replace placeholder with relevant CQL logic -define "TB preventive treatment TPT start date": - Elements."TB preventive treatment TPT start date" O - where O.effective.toInterval() during "Measurement Period" -define "TB preventive treatment TPT start date Value": - "TB preventive treatment TPT start date" O - return O.value +define "TB preventive treatment TPT start date in measurement period": + Elements."TB preventive treatment TPT start date" D + where D in "Measurement Period" + /* End of TB preventive treatment TPT start date */ /* @@ -5277,103 +5274,13 @@ define "Eligible for TB preventive treatment Observation": @activity: HIV.D4 Screen for TB @description: Type of TPT regimen the client is currently on */ -// TODO: Replace placeholder with relevant CQL logic -define "TPT regimen type": - exists "TPT regimen type Observation" -define "TPT regimen type Observation": - Elements."TPT regimen type Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of TPT regimen type */ - -/* -@dataElement: HIV.D.DE1029 - 3HP -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is 3HP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "3HP": - exists "3HP Condition" - or exists "3HP Observation" -define "3HP Condition": - Elements."3HP Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "3HP Observation": - Elements."3HP Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of 3HP */ - -/* -@dataElement: HIV.D.DE1030 - 1HP -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is 1HP -*/ -// TODO: Replace placeholder with relevant CQL logic -define "1HP": - exists "1HP Condition" - or exists "1HP Observation" -define "1HP Condition": - Elements."1HP Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "1HP Observation": - Elements."1HP Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of 1HP */ +define "On TPT regimen": + exists "TPT regimen" -/* -@dataElement: HIV.D.DE1031 - 6H -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is 6H -*/ -// TODO: Replace placeholder with relevant CQL logic -define "6H": - exists "6H Condition" - or exists "6H Observation" -define "6H Condition": - Elements."6H Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "6H Observation": - Elements."6H Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of 6H */ - -/* -@dataElement: HIV.D.DE1032 - Six months of levofloxacin daily -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is six months of levofloxacin daily -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Six months of levofloxacin daily": - exists "Six months of levofloxacin daily Condition" - or exists "Six months of levofloxacin daily Observation" -define "Six months of levofloxacin daily Condition": - Elements."Six months of levofloxacin daily Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Six months of levofloxacin daily Observation": - Elements."Six months of levofloxacin daily Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Six months of levofloxacin daily */ - -/* -@dataElement: HIV.D.DE1033 - Other TB preventive treatment TPT regimen -@activity: HIV.D4 Screen for TB -@description: The client's current TPT regimen is another regimen than those listed above -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Other TB preventive treatment TPT regimen": - exists "Other TB preventive treatment TPT regimen Condition" - or exists "Other TB preventive treatment TPT regimen Observation" -define "Other TB preventive treatment TPT regimen Condition": - Elements."Other TB preventive treatment TPT regimen Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Other TB preventive treatment TPT regimen Observation": - Elements."Other TB preventive treatment TPT regimen Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Other TB preventive treatment TPT regimen */ +define "TPT regimen": + Elements."TPT regimen" MS + where MS.effective.toInterval() during "Measurement Period" +/* End of TPT regimen type */ /* @dataElement: HIV.D.DE1034 - TB preventive treatment TPT status From 8a5a95b2379cc334d92021e7fb4612123464d427 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Sun, 4 Aug 2024 16:31:05 -0700 Subject: [PATCH 02/13] IND 45 --- input/cql/HIVIND45Logic.cql | 7 ++++--- input/cql/HIVIndicatorElements.cql | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/input/cql/HIVIND45Logic.cql b/input/cql/HIVIND45Logic.cql index bc76e408e9..9db3d9da01 100644 --- a/input/cql/HIVIND45Logic.cql +++ b/input/cql/HIVIND45Logic.cql @@ -79,6 +79,8 @@ include FHIRHelpers version '4.0.1' include FHIRCommon called FC include WHOCommon called WCom +include HIVElements called HE +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -100,8 +102,7 @@ define "Initial Population": */ define "Numerator": - true - + HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and exists(HIE."TB preventive treatment TPT completed in measurement period") /** * Denominator @@ -111,7 +112,7 @@ define "Numerator": */ define "Denominator": - true + HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and exists(HIE."TB preventive treatment TPT start date in measurement period") /* end Populations */ diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index 6533bc1a30..2fe5250d05 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -5060,6 +5060,10 @@ define "TB preventive treatment TPT start date in measurement period": Elements."TB preventive treatment TPT start date" D where D in "Measurement Period" +define "TB preventive treatment TPT completed in measurement period": + Elements."TPT regimen" MS + where start of MS.effective.toInterval() in "Measurement Period" + and MS.status = 'completed' /* End of TB preventive treatment TPT start date */ /* From 78bfb59f251ebf1ab73dd264faf778d246520910 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Sun, 4 Aug 2024 22:09:31 -0700 Subject: [PATCH 03/13] Refactoring and updates to IND44 and IND45 --- input/cql/HIVCommon.cql | 18 --- input/cql/HIVConcepts.cql | 143 +++++++++++++++++++++- input/cql/HIVElements.cql | 22 +++- input/cql/HIVIND13Logic.cql | 12 +- input/cql/HIVIND15Logic.cql | 12 +- input/cql/HIVIND16Logic.cql | 12 +- input/cql/HIVIND18Logic.cql | 12 +- input/cql/HIVIND19Logic.cql | 12 +- input/cql/HIVIND20Logic.cql | 12 +- input/cql/HIVIND21Logic.cql | 12 +- input/cql/HIVIND22Logic.cql | 12 +- input/cql/HIVIND24Logic.cql | 12 +- input/cql/HIVIND25Logic.cql | 12 +- input/cql/HIVIND27Logic.cql | 12 +- input/cql/HIVIND28Logic.cql | 12 +- input/cql/HIVIND29Logic.cql | 12 +- input/cql/HIVIND2Logic.cql | 12 +- input/cql/HIVIND30Logic.cql | 12 +- input/cql/HIVIND31Logic.cql | 12 +- input/cql/HIVIND32Logic.cql | 12 +- input/cql/HIVIND33Logic.cql | 12 +- input/cql/HIVIND34Logic.cql | 12 +- input/cql/HIVIND35Logic.cql | 12 +- input/cql/HIVIND3Logic.cql | 12 +- input/cql/HIVIND44Logic.cql | 25 +++- input/cql/HIVIND45Logic.cql | 37 +++++- input/cql/HIVIND4Logic.cql | 12 +- input/cql/HIVIND5Logic.cql | 12 +- input/cql/HIVIND6Logic.cql | 12 +- input/cql/HIVIND7Logic.cql | 12 +- input/cql/HIVIND8Logic.cql | 12 +- input/cql/HIVIndicatorElements.cql | 185 ++++++++++++++--------------- 32 files changed, 458 insertions(+), 284 deletions(-) diff --git a/input/cql/HIVCommon.cql b/input/cql/HIVCommon.cql index 437d550d2c..17ca096ac2 100644 --- a/input/cql/HIVCommon.cql +++ b/input/cql/HIVCommon.cql @@ -137,24 +137,6 @@ define "By Age Stratifier 3": * By state stratifier */ -define "By Geographic Region Stratifier": - First(Patient.address A where A.use in { 'home' }).state - -/* - * By Administrative Gender of Patient Stratifier - * Need to expand codes - */ - -define "By Administrative Gender Stratifier": - case - when Patient.gender = 'male' then HC."Male" - when Patient.gender = 'female' then HC."Female" - when Patient.gender = 'transgender female' then HC."Transgender female" - when Patient.gender = 'transgender male' then HC."Transgender male" - else HC."Other - HIV.A.DE23" - end - - define "HIV status of partner or contact": case when HIE."Already knew positive" then HC."Already knew positive" diff --git a/input/cql/HIVConcepts.cql b/input/cql/HIVConcepts.cql index e5e73babe3..9d68baf5a4 100644 --- a/input/cql/HIVConcepts.cql +++ b/input/cql/HIVConcepts.cql @@ -10,14 +10,27 @@ library HIVConcepts codesystem "HIVConcepts": 'http://smart.who.int/hiv/CodeSystem/HIVConcepts' +valueset "Referred by Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE5' +valueset "Country of birth Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE13' valueset "Gender Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE18' +valueset "Sex Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE25' +valueset "Marital Status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE30' +valueset "[Administrative Area] Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE43' +valueset "Communication preferences Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE46' valueset "Reason for visit - HIV.B.DE1 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE1' valueset "Referred through partner services Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE5' valueset "Type of contact or partner for partner services Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE8' valueset "Testing entry point Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE15' +valueset "Entry point for community-level testing Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE18' +valueset "Entry point for facility-level testing - HIV.B.DE22 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE22' valueset "Partner HIV status reported Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE33' +valueset "Partner is from a key population Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE37' +valueset "HIV self-test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE44' valueset "Key population member type - HIV.B.DE50 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE50' valueset "HIV exposure type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE61' +valueset "HIV diagnosing facility Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE66' +valueset "HIV serotype Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE68' +valueset "Type of contact elicited Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE74' valueset "HIV test type - HIV.B.DE81 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE81' valueset "Assay number in testing strategy - HIV.B.DE88 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE88' valueset "Test result of HIV assay 1 - HIV.B.DE94 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE94' @@ -26,35 +39,53 @@ valueset "Test result of HIV assay 3 - HIV.B.DE102 Choices": 'http://smart.who.i valueset "Test result of HIV assay 1 repeated - HIV.B.DE106 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE106' valueset "HIV test result - HIV.B.DE111 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE111' valueset "HIV status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE115' +valueset "Site where positive HIV test confirmed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE120' valueset "Probable route of transmission Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE121' +valueset "Partner HIV test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE132' +valueset "Partner HIV status confirmed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE136' valueset "Counselling provided Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE142' valueset "Prevention services offered and referrals - HIV.B.DE149 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE149' valueset "Sexual and reproductive health integrated services - HIV.B.DE158 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE158' valueset "Offer other clinical services - HIV.B.DE165 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE165' valueset "Other support services - HIV.B.DE172 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE172' +valueset "Intimate partner violence enquiry results Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE179' valueset "Type of follow-up appointment - HIV.B.DE191 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE191' valueset "Adverse event severity Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE201' valueset "Timing of adverse event Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE204' valueset "Type of adverse VMMC event Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE207' valueset "Syndrome/STI diagnosed - HIV.B.DE226 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE226' +valueset "STI tested for - HIV.B.DE237 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE237' valueset "Syphilis test result - HIV.B.DE250 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE250' valueset "Gonorrhoea test result - HIV.B.DE256 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE256' valueset "Type of specimen - HIV.B.DE261 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE261' +valueset "Syphilis test type - HIV.B.DE269 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE269' valueset "Neisseria gonorrhoeae test type - HIV.B.DE276 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE276' +valueset "Chlamydia trachomatis test type - HIV.B.DE284 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE284' +valueset "Trichomonas vaginalis test type - HIV.B.DE293 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE293' +valueset "Herpes simplex virus HSV test type - HIV.B.DE301 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE301' +valueset "Mycoplasma genitalium test type - HIV.B.DE306 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE306' +valueset "STI test result - HIV.B.DE312 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE312' +valueset "Confirmatory syphilis test type - HIV.B.DE317 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE317' +valueset "Confirmatory STI test result - HIV.B.DE325 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE325' +valueset "Reason for PrEP visit Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE1' valueset "PrEP dosing type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE11' valueset "Current PrEP regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE17' valueset "Experience with PrEP Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE24' valueset "PEP history Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE31' valueset "Signs of substantial risk of HIV infection - HIV.C.DE36 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE36' +valueset "Pregnancy intention in serodiscordant partnerships Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE41' valueset "Acute HIV infection symptoms - HIV.C.DE46 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE46' valueset "Sex partners HIV treatment status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE55' +valueset "Screenings and diagnostics for PrEP users Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE63' valueset "Medications prescribed - HIV.C.DE75 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE75' valueset "PrEP product prescribed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE80' valueset "Preferred PEP backbone regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE91' valueset "Alternative PEP backbone regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE95' valueset "Preferred third PEP drug Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE99' valueset "Alternative third PEP drug Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE101' +valueset "Sex factor for estimating creatinine clearance Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE107' valueset "Contraindications to PrEP usage Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE112' +valueset "PrEP regimen prescribed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE122' valueset "Type of follow-up appointment - HIV.C.DE125 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE125' valueset "Prevention services offered and referrals - HIV.C.DE131 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE131' valueset "Condom type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.C.DE138' @@ -65,6 +96,13 @@ valueset "Other support services - HIV.C.DE164 Choices": 'http://smart.who.int/h valueset "Reason for visit - HIV.D.DE1 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE1' valueset "Signs of serious illness Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE17' valueset "ART start type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE43' +valueset "Facility transferred from Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE52' +valueset "Facility where client first enrolled in HIV care Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE55' +valueset "Antiretroviral ARV drugs received prior to enrolment Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE56' +valueset "Location ARV drugs received prior to enrolment Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE63' +valueset "ARV drug regimen received prior to enrolment Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE64' +valueset "Existing chronic health conditions Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE65' +valueset "Original first-line ART regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE74' valueset "Current ART regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE75' valueset "Preferred first-line ART regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE77' valueset "Alternative first-line ART regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE78' @@ -73,51 +111,125 @@ valueset "Preferred second-line ART regimen Choices": 'http://smart.who.int/hiv/ valueset "Alternative second-line ART regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE81' valueset "Optimal regimen for transition Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE82' valueset "Current ART regimen first-, second-, or third-line Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE83' +valueset "ART regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE90' valueset "ART regimen composition Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE128' +valueset "ART regimen drug class Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE146' valueset "Prevention services offered and referrals - HIV.D.DE152 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE152' valueset "Sexual and reproductive health integrated services - HIV.D.DE156 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE156' valueset "HBsAg test result - HIV.D.DE162 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE162' +valueset "HBV treatment regimen prescribed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE168' valueset "HCV test result - HIV.D.DE170 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE170' +valueset "HCV treatment regimen prescribed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE177' valueset "HCV viral load test result - HIV.D.DE179 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE179' valueset "HCV medicine type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE182' valueset "HIV clinical stage - HIV.D.DE186 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE186' +valueset "Reasons for adherence problem - HIV.D.DE197 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE197' valueset "Reason ART stopped - HIV.D.DE217 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE217' valueset "Treatment failure Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE225' +valueset "General care activities recommended Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE229' +valueset "Preventing and treating coinfections Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE247' valueset "Risk factors, comorbidities and coinfections signs and symptoms Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE259' valueset "WHO HIV clinical stage condition or symptom - HIV.D.DE289 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE289' +valueset "Clinical stage at start of ART Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE358' +valueset "Reasons for delayed ART initiation Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE370' valueset "Time to start ART Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE383' valueset "Reason for HIV viral load test Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE391' valueset "Monitoring examinations Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE399' valueset "Reason for ARV drug regimen substitution Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE418' +valueset "Reason for regimen switch Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE430' +valueset "ART regimen prescribed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE444' +valueset "Coinfection status at ART start Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE446' +valueset "Pregnant and breastfeeding status at ART start Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE449' valueset "Medications prescribed - HIV.D.DE457 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE457' +valueset "Medications dispensed Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE461' valueset "Type of treatment-limiting toxicity Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE466' +valueset "Reasons for substitution within first-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE482' +valueset "New antiretroviral regimen after substitution within first-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE483' +valueset "New regimen after switch to second-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE485' +valueset "Reason for switch to second-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE486' +valueset "Reasons for substitution within second-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE488' +valueset "New regimens after substitution within second-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE489' +valueset "New regimen after switch to third-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE491' +valueset "Reason for switch to third-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE492' +valueset "Reasons for substitution within third-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE494' +valueset "New regimens after substitution within third-line regimen Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE495' +valueset "HIV status of family member Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE514' valueset "Other support services - HIV.D.DE519 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE519' valueset "Type of follow-up appointment - HIV.D.DE525 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE525' +valueset "Reason blood pressure reading not done Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE532' valueset "Current medications Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE537' +valueset "Allergies Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE560' +valueset "Family planning method used Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE569' +valueset "Medication status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE593' +valueset "Vaccine brand Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE603' +valueset "Vaccine type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE604' +valueset "Vaccination location Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE606' +valueset "Disease targeted Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE610' +valueset "Reason immunization was not provided Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE636' +valueset "Reason malaria prophylaxis not provided Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE646' valueset "Cervical cancer primary screening test type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE658' +valueset "HPV-DNA cervical cancer screening test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE664' +valueset "VIA cervical cancer screening test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE668' +valueset "Cervical cytology screening test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE673' +valueset "Cervical cancer triage test type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE681' +valueset "HPV16/18 test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE688' +valueset "Cervical cancer colposcopy result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE691' +valueset "Cervical cancer histopathology result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE697' valueset "Cervical cancer screening outcome Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE706' valueset "Cervical cancer diagnosis Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE709' valueset "Cervical cancer stage at diagnosis Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE712' +valueset "Treatment method for cervical precancer lesions Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE719' valueset "Invasive cervical cancer treatment method Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE731' +valueset "Entry point for facility-level testing - HIV.D.DE746 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE746' valueset "Offer other clinical services - HIV.D.DE753 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE753' valueset "DSD ART models Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE764' valueset "Syndrome/STI diagnosed - HIV.D.DE778 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE778' +valueset "STI tested for - HIV.D.DE789 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE789' valueset "Syphilis test result - HIV.D.DE802 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE802' valueset "Gonorrhoea test result - HIV.D.DE808 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE808' valueset "Type of specimen - HIV.D.DE813 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE813' +valueset "Syphilis test type - HIV.D.DE821 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE821' valueset "Neisseria gonorrhoeae test type - HIV.D.DE828 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE828' +valueset "Chlamydia trachomatis test type - HIV.D.DE836 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE836' +valueset "Trichomonas vaginalis test type - HIV.D.DE845 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE845' +valueset "Herpes simplex virus HSV test type - HIV.D.DE853 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE853' +valueset "Mycoplasma genitalium test type - HIV.D.DE858 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE858' +valueset "STI test result - HIV.D.DE864 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE864' +valueset "Confirmatory syphilis test type - HIV.D.DE869 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE869' +valueset "Confirmatory STI test result - HIV.D.DE877 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE877' +valueset "Staging of liver disease Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE893' +valueset "WHO functional status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE897' valueset "Medication/drug Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE903' valueset "WHO HIV clinical stage condition or symptom - HIV.D.DE934 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE934' valueset "TB diagnosis result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE939' +valueset "Method of TB diagnosis Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE942' +valueset "TB treatment history Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE947' valueset "TB screening algorithm Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE956' valueset "Symptoms of TB Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE973' valueset "TB screening result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE986' valueset "TB diagnostic test category Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE992' +valueset "TB treatment outcome Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE1002' +valueset "TB treatment regimen composition Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE1010' +valueset "TB status at ART start Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE1019' valueset "TPT regimen type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE1028' valueset "TB preventive treatment TPT status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.D.DE1034' +valueset "Source of gestational age Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE6' +valueset "Past pregnancy complications Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE17' valueset "Timing of ART initiation Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE41' +valueset "Pregnancy outcome Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE47' +valueset "Delivery mode Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE52' +valueset "Preterm birth status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE62' valueset "Place of delivery Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE67' +valueset "Cause of death of mother Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE75' +valueset "Gender of infant Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE91' +valueset "Maternal HIV test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE104' +valueset "Infant or child exposure to HIV Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE108' valueset "Key population member type - HIV.E.DE114 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE114' +valueset "Infant feeding practice Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE127' +valueset "Type of iron supplement dosage provided Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE136' +valueset "Maternal HIV status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE141' +valueset "Maternal HIV status at first ANC visit - HIV.E.DE145 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE145' +valueset "Maternal syphilis test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE149' valueset "Signs of substantial risk of HIV infection - HIV.E.DE155 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE155' valueset "HIV test type - HIV.E.DE168 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE168' valueset "Maternal and child health service visit Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE173' @@ -134,17 +246,39 @@ valueset "Test result of syphilis assay 1 Choices": 'http://smart.who.int/hiv/Va valueset "Test result of syphilis assay 1 repeated Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE220' valueset "Infant HIV status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE225' valueset "Final diagnosis of HIV-exposed infant - HIV.E.DE230 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE230' +valueset "HIV-exposed infant reason for unknown final status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE234' +valueset "Cause of death of infant Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE240' +valueset "Blood group and Rh factor Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE246' +valueset "Asymptomatic bacteriuria ASB test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE255' +valueset "Urine protein test result Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE259' +valueset "Type of hypertensive disorder Choices": 'http://smart.who.int/hiv/ValueSet/HIV.E.DE264' +valueset "HIV viral load specimen type Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE13' valueset "HBsAg test result - HIV.G.DE18 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE18' +valueset "Reason Hepatitis B test not conducted Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE22' +valueset "Hepatitis B diagnosis Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE29' +valueset "Reason Hepatitis C test not done Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE35' valueset "HCV test result - HIV.G.DE43 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE43' valueset "HCV viral load test result - HIV.G.DE48 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE48' +valueset "Hepatitis C diagnosis Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE51' +valueset "Syphilis test type - HIV.G.DE55 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE55' +valueset "Reason syphilis test not done Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE62' valueset "Syphilis test result - HIV.G.DE70 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE70' +valueset "Syphilis diagnosis Choices": 'http://smart.who.int/hiv/ValueSet/HIV.G.DE74' +valueset "Reason for follow-up Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE1' +valueset "Contact method Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE13' +valueset "Source of information Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE17' +valueset "Outcome from outreach attempt Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE23' valueset "HIV status of partner or contact Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE34' valueset "HIV treatment outcome Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE41' +valueset "Transfer to facility Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE50' +valueset "Reasons for adherence problem - HIV.H.DE53 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE53' valueset "Reason ART stopped - HIV.H.DE74 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.H.DE74' +valueset "Reason for referral Choices": 'http://smart.who.int/hiv/ValueSet/HIV.I.DE2' valueset "HIV prevention intervention Choices": 'http://smart.who.int/hiv/ValueSet/HIV.PRV.DE2' valueset "HIV status of contact Choices": 'http://smart.who.int/hiv/ValueSet/HIV.PRV.DE11' valueset "HIV test result - HIV.SRV.DE2 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.SRV.DE2' valueset "HIV clinical stage - HIV.SRV.DE5 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.SRV.DE5' +valueset "Maternal HIV status at first ANC visit - HIV.SRV.DE19 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.SRV.DE19' valueset "Test result of HIV assay 1 - HIV.SRV.DE21 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.SRV.DE21' valueset "Final diagnosis of HIV-exposed infant - HIV.SRV.DE22 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.SRV.DE22' valueset "HIV burden of the setting Choices": 'http://smart.who.int/hiv/ValueSet/HIV.Config.DE12' @@ -704,10 +838,7 @@ code "Bone dysfunction": 'HIV.D.DE476' from "HIVConcepts" display 'Bone dysfunct code "Metabolic symptoms": 'HIV.D.DE477' from "HIVConcepts" display 'Metabolic symptoms' code "Kidney dysfunction": 'HIV.D.DE478' from "HIVConcepts" display 'Kidney dysfunction' code "Unexpected adverse drug reaction": 'HIV.D.DE479' from "HIVConcepts" display 'Unexpected adverse drug reaction' -code "New regimen after switch to second-line regimen": 'HIV.D.DE485' from "HIVConcepts" -code "New regimen after switch to third-line regimen": 'HIV.D.DE491' from "HIVConcepts" -code "New regimen after substitution within second-line regimen": 'HIV.D.DE489' from "HIVConcepts" -code "New regimen after substitution within third-line regimen": 'HIV.D.DE495' from "HIVConcepts" + code "Dates of substitution within second-line regimen": 'HIV.D.DE487' from "HIVConcepts" display 'Dates of substitution within second-line regimen' code "Dates of substitution within third-line regimen": 'HIV.D.DE493' from "HIVConcepts" display 'Dates of substitution within third-line regimen' code "Enhanced adherence counselling provided": 'HIV.D.DE496' from "HIVConcepts" display 'Enhanced adherence counselling provided' @@ -752,6 +883,10 @@ code "Lifetime screening test number": 'HIV.D.DE657' from "HIVConcepts" display code "Cervical cancer primary screening test type": 'HIV.D.DE658' from "HIVConcepts" display 'Cervical cancer primary screening test type' code "HPV-DNA": 'HIV.D.DE659' from "HIVConcepts" display 'HPV-DNA' code "VIA": 'HIV.D.DE660' from "HIVConcepts" display 'VIA' +code "New regimen after switch to second-line regimen": 'HIV.D.DE485' from "HIVConcepts" +code "New regimen after switch to third-line regimen": 'HIV.D.DE491' from "HIVConcepts" +code "New regimen after substitution within second-line regimen": 'HIV.D.DE489' from "HIVConcepts" +code "New regimen after substitution within third-line regimen": 'HIV.D.DE495' from "HIVConcepts" code "Cervical cytology": 'HIV.D.DE661' from "HIVConcepts" display 'Cervical cytology' code "Other - HIV.D.DE662": 'HIV.D.DE662' from "HIVConcepts" display 'Other' code "Date of diagnosis of cervical precancer lesions or invasive cervical cancer": 'HIV.D.DE705' from "HIVConcepts" display 'Date of diagnosis of cervical precancer lesions or invasive cervical cancer' diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index e4f85af4eb..7753508269 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -25,6 +25,20 @@ context Patient * HIV Elements */ +// Umbrella Element Definitions + +/* On ART - includes "On ART - HIV.B.DE47" and "On ART - HIV.B.DE48" */ +define "ART Medication Statement": + [MedicationStatement: Concepts."ART regimen Choices"] MS + sort by start of effective.toInterval() + +define "On ART": + exists "ART Medication Statement" + +define "ART start date": + "ART Medication Statement" MS + return start of MS.effective.toInterval() + // Auto-generated Elements from DAK Data Dictionary // Entries based on DAK Data Dictionary for Data Elements marked as used // in at least one Decision Support Table or Aggregate Indicator @@ -5402,13 +5416,9 @@ define "On ART D.DE38": @activity: HIV.D8 Capture or update client history @description: The date on which the client started or restarted ART */ -// TODO: Replace placeholder with relevant CQL logic define "ART start date D.DE39": - [Observation: Concepts."ART start date - HIV.D.DE39"] O - where O.status in { 'final', 'amended', 'corrected' } -define "ART start date D.DE39 Value": - "ART start date D.DE39" O - return O.value + "On ART D.DE38" MS + return start of MS.effective.toInterval() /* End of ART start date D.DE39 */ /* diff --git a/input/cql/HIVIND13Logic.cql b/input/cql/HIVIND13Logic.cql index 9600cb945b..f977f44699 100644 --- a/input/cql/HIVIND13Logic.cql +++ b/input/cql/HIVIND13Logic.cql @@ -98,13 +98,13 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -115,8 +115,8 @@ define "Setting": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') diff --git a/input/cql/HIVIND15Logic.cql b/input/cql/HIVIND15Logic.cql index f85e1909fe..c9cd2a438a 100644 --- a/input/cql/HIVIND15Logic.cql +++ b/input/cql/HIVIND15Logic.cql @@ -94,13 +94,13 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "Setting": HIC."setting" @@ -111,8 +111,8 @@ define "HIV Status": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.setting, ':') + ':' + HIC."HIV Status".code \ No newline at end of file diff --git a/input/cql/HIVIND16Logic.cql b/input/cql/HIVIND16Logic.cql index 0235530324..065497620d 100644 --- a/input/cql/HIVIND16Logic.cql +++ b/input/cql/HIVIND16Logic.cql @@ -125,13 +125,13 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "Setting": HIC."setting" @@ -147,9 +147,9 @@ define "VMMC_adverse_event_timing": //service site not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.setting, ':') + ':' + HIC."VMMC_adverse_event_type".code + ':' + HIC."VMMC_adverse_event_timing".code \ No newline at end of file diff --git a/input/cql/HIVIND18Logic.cql b/input/cql/HIVIND18Logic.cql index 87a6df7339..e884a706a1 100644 --- a/input/cql/HIVIND18Logic.cql +++ b/input/cql/HIVIND18Logic.cql @@ -106,13 +106,13 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -122,8 +122,8 @@ define "ANC Stratifier": define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 2" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 2" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC."anc", ':') diff --git a/input/cql/HIVIND19Logic.cql b/input/cql/HIVIND19Logic.cql index 6633197299..6f633caaac 100644 --- a/input/cql/HIVIND19Logic.cql +++ b/input/cql/HIVIND19Logic.cql @@ -128,13 +128,13 @@ define "denominatorExclusion": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -146,9 +146,9 @@ define "TB Stratifier": HIC."tb" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.tb, ':') diff --git a/input/cql/HIVIND20Logic.cql b/input/cql/HIVIND20Logic.cql index 1c7774d9aa..705a220c43 100644 --- a/input/cql/HIVIND20Logic.cql +++ b/input/cql/HIVIND20Logic.cql @@ -127,13 +127,13 @@ define "denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -145,9 +145,9 @@ define "TB Stratifier": HIC."tb" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.tb, ':') \ No newline at end of file diff --git a/input/cql/HIVIND21Logic.cql b/input/cql/HIVIND21Logic.cql index 9f3db38b7e..efa7817ef8 100644 --- a/input/cql/HIVIND21Logic.cql +++ b/input/cql/HIVIND21Logic.cql @@ -122,13 +122,13 @@ define "denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -140,10 +140,10 @@ define "Time to start ART": HIC."Time to start ART" define "Stratification": - HIC."By Administrative Gender Stratifier".code + HIE."By Administrative Gender Stratifier".code //not working //+ ':' + HIC."Time to start ART".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.tb, ':') diff --git a/input/cql/HIVIND22Logic.cql b/input/cql/HIVIND22Logic.cql index 53a01cd792..c79f9a24e8 100644 --- a/input/cql/HIVIND22Logic.cql +++ b/input/cql/HIVIND22Logic.cql @@ -135,13 +135,13 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -150,8 +150,8 @@ define "HIV status of partner or contact": HIC."HIV status of partner or contact" define "Stratification": - HIC."By Administrative Gender Stratifier".code + HIE."By Administrative Gender Stratifier".code + ':' + HIC."HIV status of partner or contact".code - + ':' + HIC."By Age Stratifier 2" -+ ':' + HIC."By Geographic Region Stratifier" + + ':' + HIE."By Age Stratifier 2" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') diff --git a/input/cql/HIVIND24Logic.cql b/input/cql/HIVIND24Logic.cql index a59b8c5c9b..5d2dd12bbd 100644 --- a/input/cql/HIVIND24Logic.cql +++ b/input/cql/HIVIND24Logic.cql @@ -156,13 +156,13 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -171,8 +171,8 @@ define "HIV prevention intervention": HIC."HIV prevention intervention" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 2" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 2" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC."HIV prevention intervention", ':') \ No newline at end of file diff --git a/input/cql/HIVIND25Logic.cql b/input/cql/HIVIND25Logic.cql index 64444d3003..7acd4be05a 100644 --- a/input/cql/HIVIND25Logic.cql +++ b/input/cql/HIVIND25Logic.cql @@ -124,20 +124,20 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code + HIE."By Administrative Gender Stratifier".code + ':' + HIC."HIV status of partner or contact".code - + ':' + HIC."By Age Stratifier 2" -+ ':' + HIC."By Geographic Region Stratifier" + + ':' + HIE."By Age Stratifier 2" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND27Logic.cql b/input/cql/HIVIND27Logic.cql index 8342d4a1fb..8b619eca4d 100644 --- a/input/cql/HIVIND27Logic.cql +++ b/input/cql/HIVIND27Logic.cql @@ -107,19 +107,19 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND28Logic.cql b/input/cql/HIVIND28Logic.cql index 6628066bff..f190dc9347 100644 --- a/input/cql/HIVIND28Logic.cql +++ b/input/cql/HIVIND28Logic.cql @@ -142,13 +142,13 @@ define "numerator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -157,8 +157,8 @@ define "Treatment outcome category Stratifier": HIC."Treatment outcome category" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC."Treatment outcome category", ':') \ No newline at end of file diff --git a/input/cql/HIVIND29Logic.cql b/input/cql/HIVIND29Logic.cql index 3a7daeb24d..4ead60fd67 100644 --- a/input/cql/HIVIND29Logic.cql +++ b/input/cql/HIVIND29Logic.cql @@ -151,20 +151,20 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND2Logic.cql b/input/cql/HIVIND2Logic.cql index 2daed18b97..fbb3fe78ea 100644 --- a/input/cql/HIVIND2Logic.cql +++ b/input/cql/HIVIND2Logic.cql @@ -120,13 +120,13 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -146,9 +146,9 @@ define "prep_dosing": // Provider type concepts are not found in DD define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND30Logic.cql b/input/cql/HIVIND30Logic.cql index 75085e6a32..f4fa67f7b4 100644 --- a/input/cql/HIVIND30Logic.cql +++ b/input/cql/HIVIND30Logic.cql @@ -106,19 +106,19 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND31Logic.cql b/input/cql/HIVIND31Logic.cql index 24383c99f6..ae2c0b9cd0 100644 --- a/input/cql/HIVIND31Logic.cql +++ b/input/cql/HIVIND31Logic.cql @@ -132,19 +132,19 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND32Logic.cql b/input/cql/HIVIND32Logic.cql index a8b921039c..730c5056e1 100644 --- a/input/cql/HIVIND32Logic.cql +++ b/input/cql/HIVIND32Logic.cql @@ -162,19 +162,19 @@ define "Denominator Exclusions": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') diff --git a/input/cql/HIVIND33Logic.cql b/input/cql/HIVIND33Logic.cql index a6ceb8ecaf..f32a83d881 100644 --- a/input/cql/HIVIND33Logic.cql +++ b/input/cql/HIVIND33Logic.cql @@ -128,19 +128,19 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND34Logic.cql b/input/cql/HIVIND34Logic.cql index 67d34ccb40..3edf423182 100644 --- a/input/cql/HIVIND34Logic.cql +++ b/input/cql/HIVIND34Logic.cql @@ -140,21 +140,21 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') //Need to add diff --git a/input/cql/HIVIND35Logic.cql b/input/cql/HIVIND35Logic.cql index b37a0db231..63d2b3d252 100644 --- a/input/cql/HIVIND35Logic.cql +++ b/input/cql/HIVIND35Logic.cql @@ -212,21 +212,21 @@ define "Denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier" + HIE."By Age Stratifier" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') /* diff --git a/input/cql/HIVIND3Logic.cql b/input/cql/HIVIND3Logic.cql index 2b1bd88564..3946a34451 100644 --- a/input/cql/HIVIND3Logic.cql +++ b/input/cql/HIVIND3Logic.cql @@ -131,13 +131,13 @@ define "denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -157,9 +157,9 @@ define "prep_dosing": // Provider type concepts are not found in DD define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 3" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 3" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND44Logic.cql b/input/cql/HIVIND44Logic.cql index e2392c5f41..75587e0603 100644 --- a/input/cql/HIVIND44Logic.cql +++ b/input/cql/HIVIND44Logic.cql @@ -14,7 +14,7 @@ * Denominator Exclusions: * * Disaggregations: - * • Gender (female, male, other*) + * • Gender (female, male, other*) * • Age (0–4, 5–9, 10–14, 15–19, 20–24, 25–29, 30–34, 35–39, 40–44, 45–49, 50+ years)** * • Type of TPT regimen * • Cities and other administrative regions of epidemiologic importance @@ -94,7 +94,7 @@ define "Initial Population": */ define "Numerator": - HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and exists(HIE."TB preventive treatment TPT start date in measurement period") + HIE."HIV-positive B.DE116" and HIE."On ART" and exists(HIE."TB preventive treatment TPT start date in measurement period") /** * Denominator @@ -104,8 +104,27 @@ define "Numerator": */ define "Denominator": - HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and HE."Eligible for TB preventive treatment" + HIE."HIV-positive B.DE116" and HIE."On ART" and HIE."Eligible for TB preventive treatment" /* end Populations */ +/* + * Disaggregations: + * • Gender (female, male, other*) + * • Age (0–4, 5–9, 10–14, 15–19, 20–24, 25–29, 30–34, 35–39, 40–44, 45–49, 50+ years)** + * • Type of TPT regimen + * • Cities and other administrative regions of epidemiologic importance + */ + + define "Administrative Gender Stratifier": + HIE."By Administrative Gender Stratifier" + +define "Age Stratifier": + HIE."By Age Stratifier" + +define "TPT Regimen Type Stratifier": + HE."TPT regimen type" + +define "Geographic Region Stratifier": + HIE."By Geographic Region Stratifier" \ No newline at end of file diff --git a/input/cql/HIVIND45Logic.cql b/input/cql/HIVIND45Logic.cql index 9db3d9da01..b88c08b8fe 100644 --- a/input/cql/HIVIND45Logic.cql +++ b/input/cql/HIVIND45Logic.cql @@ -81,10 +81,15 @@ include WHOCommon called WCom include HIVElements called HE include HIVIndicatorElements called HIE -// Indicator Definition + parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] context Patient + +/** + * Indicator Definition + */ + /* Populations */ /* @@ -102,7 +107,7 @@ define "Initial Population": */ define "Numerator": - HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and exists(HIE."TB preventive treatment TPT completed in measurement period") + HIE."HIV-positive B.DE116" and HIE."On ART" and exists(HIE."TB preventive treatment TPT completed in measurement period") /** * Denominator @@ -112,8 +117,32 @@ define "Numerator": */ define "Denominator": - HIE."HIV-positive B.DE116" and (HIE."On ART D.DE38" or HIE."On ART H.DE47") and exists(HIE."TB preventive treatment TPT start date in measurement period") + HIE."HIV-positive B.DE116" and HIE."On ART" and exists(HIE."TB preventive treatment TPT start date in measurement period") - /* end Populations */ +/* + * Disaggregation + * + * • Gender (female, male, other*) + * • Age (0–4, 5–9, 10–14, 15–19, 20–24, 25–29, 30–34, 35–39, 40–44, 45–49, 50+ years)** + * • Type of TPT regimen + * • ART initiation (<12 months on ART, 12+ months on ART) + * • Cities and other administrative regions of epidemiologic importance + * + */ + +define "Administrative Gender Stratifier": + HIE."By Administrative Gender Stratifier" + +define "Age Stratifier": + HIE."By Age Stratifier" + +define "TPT Regimen Type Stratifier": + HE."TPT regimen type" + +define "ART Initiation Stratifier": + HIE."By ART initiation" + +define "Geographic Region Stratifier": + HIE."By Geographic Region Stratifier" \ No newline at end of file diff --git a/input/cql/HIVIND4Logic.cql b/input/cql/HIVIND4Logic.cql index 446231423c..d100f47345 100644 --- a/input/cql/HIVIND4Logic.cql +++ b/input/cql/HIVIND4Logic.cql @@ -112,13 +112,13 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -132,9 +132,9 @@ define "Setting": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 3" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 3" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND5Logic.cql b/input/cql/HIVIND5Logic.cql index 6d979a9cdb..f36cac8150 100644 --- a/input/cql/HIVIND5Logic.cql +++ b/input/cql/HIVIND5Logic.cql @@ -106,13 +106,13 @@ define function "Measure Observation"(Patient "Patient"): */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -129,9 +129,9 @@ define "hiv_exposure_type": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 3" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 3" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND6Logic.cql b/input/cql/HIVIND6Logic.cql index 93c837ba4c..b2ce183149 100644 --- a/input/cql/HIVIND6Logic.cql +++ b/input/cql/HIVIND6Logic.cql @@ -108,13 +108,13 @@ define "denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -131,9 +131,9 @@ define "hiv_exposure_type": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 3" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 3" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND7Logic.cql b/input/cql/HIVIND7Logic.cql index 221e86a111..2f6841f026 100644 --- a/input/cql/HIVIND7Logic.cql +++ b/input/cql/HIVIND7Logic.cql @@ -121,13 +121,13 @@ define "denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -144,9 +144,9 @@ define "hiv_exposure_type": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier 3" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier 3" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND8Logic.cql b/input/cql/HIVIND8Logic.cql index 50996a6875..b2c338e7ae 100644 --- a/input/cql/HIVIND8Logic.cql +++ b/input/cql/HIVIND8Logic.cql @@ -94,13 +94,13 @@ define "denominator": */ define "Administrative Gender Stratifier": - HIC."By Administrative Gender Stratifier" + HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIC."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": - HIC."By Geographic Region Stratifier" + HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": HIC."patientGroups" @@ -111,8 +111,8 @@ define "Setting": //provider type not provided? define "Stratification": - HIC."By Administrative Gender Stratifier".code - + ':' + HIC."By Age Stratifier" -+ ':' + HIC."By Geographic Region Stratifier" + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" ++ ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.patientGroups, ':') + Combine(HIC.setting, ':') \ No newline at end of file diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index 2fe5250d05..ce67780208 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -20,6 +20,39 @@ context Patient * HIV Elements */ +/* + * Umbrella Data Elements + */ + +// ART Status + +define "ART Medication Statement": + Elements."ART Medication Statement" MS + where MS.effective.toInterval() overlaps "Measurement Period" + sort by start of effective.toInterval() + +define "On ART": + exists "ART Medication Statement" + +define "ART Start Date": + "ART Medication Statement" MS + return start of MS.effective.toInterval() + +define "ART Duration in Months": + "ART Medication Statement" MS + return duration in months of MS.effective.toInterval() + +define "By ART initiation": + case + when Sum("ART Duration in Months") < 12 then '<12 months on ART' + when Sum("ART Duration in Months") >= 12 then '12+ months on ART' + else 'Unknown' + end + +// Geographic Region +define "By Geographic Region Stratifier": + First(Patient.address A where A.use in { 'home' }).state + // Auto-generated Elements from DAK Data Dictionary // Entries based on DAK Data Dictionary for Data Elements marked as used // in at least one Decision Support Table or Aggregate Indicator @@ -52,110 +85,76 @@ define "Age In Months": define "Age In Days": AgeInDaysAt(start of "Measurement Period") -/* End of Age */ -/* -@dataElement: HIV.A.DE18 - Gender -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Gender of the client -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Gender": - exists "Gender Observation" -define "Gender Observation": - Elements."Gender Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Gender */ /* -@dataElement: HIV.A.DE19 - Female -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Client identifies as female -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Female": - exists "Female Condition" - or exists "Female Observation" -define "Female Condition": - Elements."Female Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Female Observation": - Elements."Female Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Female */ + * By Age Stratifiers + * (0–4, 5–9, 10–14, 15–19, 20–24, 25–29, 30–34, 35–39, 40–44, 45–49, 50+ years) + * + */ +define "By Age Stratifier": + case + when "Age In Years" <= 4 then '0-4' + when "Age In Years" <= 9 then '5-9' + when "Age In Years" <= 14 then '10–14' + when "Age In Years" <= 19 then '15–19' + when "Age In Years" <= 24 then '20–24' + when "Age In Years" <= 29 then '25–29' + when "Age In Years" <= 34 then '30–34' + when "Age In Years" <= 39 then '35–39' + when "Age In Years" <= 44 then '40–44' + when "Age In Years" <= 49 then '45–49' + when "Age In Years" >= 50 then '50+' + else null + end + + /* + * By Age Stratifiers + * Age (0–4, 5–9, 10–14, 15–19, 20–24, 25–49, 50+ years) + * + */ +define "By Age Stratifier 2": + case + when "Age In Years" <= 4 then '0-4' + when "Age In Years" <= 9 then '5-9' + when "Age In Years" <= 14 then '10–14' + when "Age In Years" <= 19 then '15–19' + when "Age In Years" <= 24 then '20–24' + when "Age In Years" <= 49 then '25–49' + when "Age In Years" >= 50 then '50+' + else null + end + +define "By Age Stratifier 3": + case + when "Age In Years" >= 15 and "Age In Years"<= 19 then '15-19' + when "Age In Years" <= 24 then '20-24' + when "Age In Years" <= 49 then '25–49' + when "Age In Years" >= 50 then '50+' + else null + end -/* -@dataElement: HIV.A.DE20 - Male -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Client identifies as male -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Male": - exists "Male Condition" - or exists "Male Observation" -define "Male Condition": - Elements."Male Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Male Observation": - Elements."Male Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Male */ +/* End of Age */ /* -@dataElement: HIV.A.DE21 - Transgender male +@dataElement: HIV.A.DE18 - Gender @activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Client identifies as transgender male +@description: Gender of the client */ -// TODO: Replace placeholder with relevant CQL logic -define "Transgender male": - exists "Transgender male Condition" - or exists "Transgender male Observation" -define "Transgender male Condition": - Elements."Transgender male Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Transgender male Observation": - Elements."Transgender male Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Transgender male */ /* -@dataElement: HIV.A.DE22 - Transgender female -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Client identifies as transgender female -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Transgender female": - exists "Transgender female Condition" - or exists "Transgender female Observation" -define "Transgender female Condition": - Elements."Transgender female Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Transgender female Observation": - Elements."Transgender female Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Transgender female */ + * By Administrative Gender of Patient Stratifier + * Need to expand codes + */ -/* -@dataElement: HIV.A.DE23 - Other -@activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record -@description: Additional category -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Other A.DE23": - exists "Other A.DE23 Condition" - or exists "Other A.DE23 Observation" -define "Other A.DE23 Condition": - Elements."Other A.DE23 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Other A.DE23 Observation": - Elements."Other A.DE23 Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Other A.DE23 */ +define "By Administrative Gender Stratifier": + case + when Patient.gender = 'male' then Concepts."Male" + when Patient.gender = 'female' then Concepts."Female" + when Patient.gender = 'transgender female' then Concepts."Transgender female" + when Patient.gender = 'transgender male' then Concepts."Transgender male" + else Concepts."Other - HIV.A.DE23" + end /* @dataElement: HIV.B.DE5 - Referred through partner services From 6c12468965edd91c1daa0986345386ca0270b8a2 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Sun, 4 Aug 2024 22:10:58 -0700 Subject: [PATCH 04/13] Fixes --- input/cql/HIVIND21Logic.cql | 1 + input/cql/HIVIndicatorElements.cql | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/input/cql/HIVIND21Logic.cql b/input/cql/HIVIND21Logic.cql index efa7817ef8..69608bc3b5 100644 --- a/input/cql/HIVIND21Logic.cql +++ b/input/cql/HIVIND21Logic.cql @@ -81,6 +81,7 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom include HIVElements called HE +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index ce67780208..b265b649a1 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -2507,13 +2507,6 @@ define "On ART D.DE38": @activity: HIV.D8 Capture or update client history @description: The date on which the client started or restarted ART */ -// TODO: Replace placeholder with relevant CQL logic -define "ART start date D.DE39": - Elements."ART start date D.DE39" O - where O.effective.toInterval() during "Measurement Period" -define "ART start date D.DE39 Value": - "ART start date D.DE39" O - return O.value /* End of ART start date D.DE39 */ /* From 1bdf73a2b28b962641a87128ebcc71bcda1c2dfe Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Sun, 4 Aug 2024 23:55:22 -0700 Subject: [PATCH 05/13] Major refactorings and error fixes --- input/cql/HIVCommon.cql | 183 ++--------------------- input/cql/HIVElements.cql | 139 ++++------------- input/cql/HIVEncounterElements.cql | 9 +- input/cql/HIVIND13Logic.cql | 7 +- input/cql/HIVIND15Logic.cql | 7 +- input/cql/HIVIND16Logic.cql | 4 +- input/cql/HIVIND18Logic.cql | 13 +- input/cql/HIVIND19Logic.cql | 9 +- input/cql/HIVIND20Logic.cql | 8 +- input/cql/HIVIND21Logic.cql | 11 +- input/cql/HIVIND22Logic.cql | 13 +- input/cql/HIVIND24Logic.cql | 38 ++--- input/cql/HIVIND25Logic.cql | 15 +- input/cql/HIVIND27Logic.cql | 4 +- input/cql/HIVIND28Logic.cql | 8 +- input/cql/HIVIND29Logic.cql | 10 +- input/cql/HIVIND2Logic.cql | 8 +- input/cql/HIVIND30Logic.cql | 6 +- input/cql/HIVIND31Logic.cql | 10 +- input/cql/HIVIND32Logic.cql | 8 +- input/cql/HIVIND33Logic.cql | 10 +- input/cql/HIVIND34Logic.cql | 10 +- input/cql/HIVIND35Logic.cql | 4 +- input/cql/HIVIND3Logic.cql | 9 +- input/cql/HIVIND44Logic.cql | 17 ++- input/cql/HIVIND45Logic.cql | 14 +- input/cql/HIVIND4Logic.cql | 10 +- input/cql/HIVIND5Logic.cql | 10 +- input/cql/HIVIND6Logic.cql | 12 +- input/cql/HIVIND7Logic.cql | 10 +- input/cql/HIVIND8Logic.cql | 8 +- input/cql/HIVIndicatorElements.cql | 232 ++++++++++++++--------------- 32 files changed, 332 insertions(+), 524 deletions(-) diff --git a/input/cql/HIVCommon.cql b/input/cql/HIVCommon.cql index 17ca096ac2..eae8877c64 100644 --- a/input/cql/HIVCommon.cql +++ b/input/cql/HIVCommon.cql @@ -7,9 +7,6 @@ include WHOCommon called WCom //include FHIRCommon called FC include HIVConcepts called HC include HIVConceptsCustom called HCC -include HIVElements called HE -include HIVIndicatorElements called HIE - parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] parameter "Measurement Date" Date default @2020-01-01 @@ -18,7 +15,6 @@ parameter "Intervention Interval" System.Quantity default 7 days context Patient - //VERIFIED define "routine viral load sample collection": @@ -32,130 +28,6 @@ define "viral load sample collection": where P.status = 'completed' and P.code ~ HCC."viral load test" - -define "First On ART": - (First(HE."On ART D.DE38")) - -define "Viral load tests received after ART intitiation": - HE."Viral load test result D.DE387" O - where start of O.issued.toInterval() after start of "First On ART".effective.toInterval() - sort by start of issued.toInterval() - -define "Elevated Viral load test during Measurement Period": - HE."Viral load test result D.DE387" VL - with "viral load sample collection" P - such that VL.partOf.references(P) and P.performed.toInterval() during "Measurement Period" - where VL.value > 1000 - sort by start of effective.toInterval() - - -define "Negative Tests within Measurement Period": -HE."HIV-negative B.DE113" O - with HE."At elevated risk for HIV acquisition B.DE225" HIV - such that O.hasMember.references(HIV) - where O.effective.toInterval() starts during "Measurement Period" - sort by start of effective.toInterval() - -define "First Negative Test within Measurement Period": - (First("Negative Tests within Measurement Period")) - -define "Negative Tests after First Negative Test": -HE."HIV-negative B.DE113" O - with HE."At elevated risk for HIV acquisition B.DE225" HIV - such that O.hasMember.references(HIV) - where O.effective.toInterval() starts after start of "First Negative Test within Measurement Period".effective.toInterval() - and O.effective.toInterval() starts before (start of "First Negative Test within Measurement Period".effective.toInterval() + "Testing Interval") - sort by start of effective.toInterval() - - define patientGroups: - List{ - if HIE."Sex worker B.DE51" then 'SW' else null, - if HIE."Men who have sex with men" then 'MSM' else null, - if HIE."Trans and gender-diverse people B.DE53" then 'Trans' else null, - if HIE."People who inject drugs B.DE54" then 'PWID' else null, - if HIE."People living in prisons and other closed settings" then 'Prisoner' else null - } - - define "Treatment outcome category": - List{ - if HIE."Lost to follow-up" then 'LTFU' else null, - if HIE."Transferred out" then 'Transfer Out' else null, - if HIE."Death documented" then 'Death' else null, - if HIE."Refused stopped treatment" then 'Stopped' else null, - if HIE."On ART H.DE47" then 'On ART' else null - } - - -/* - * By Age Stratifiers - * (0–4, 5–9, 10–14, 15–19, 20–24, 25–29, 30–34, 35–39, 40–44, 45–49, 50+ years) - * - */ -define "By Age Stratifier": - case - when HIE."Age In Years" <= 4 then '0-4' - when HIE."Age In Years" <= 9 then '5-9' - when HIE."Age In Years" <= 14 then '10–14' - when HIE."Age In Years" <= 19 then '15–19' - when HIE."Age In Years" <= 24 then '20–24' - when HIE."Age In Years" <= 29 then '25–29' - when HIE."Age In Years" <= 34 then '30–34' - when HIE."Age In Years" <= 39 then '35–39' - when HIE."Age In Years" <= 44 then '40–44' - when HIE."Age In Years" <= 49 then '45–49' - when HIE."Age In Years" >= 50 then '50+' - else null - end - - /* - * By Age Stratifiers - * Age (0–4, 5–9, 10–14, 15–19, 20–24, 25–49, 50+ years) - * - */ -define "By Age Stratifier 2": - case - when HIE."Age In Years" <= 4 then '0-4' - when HIE."Age In Years" <= 9 then '5-9' - when HIE."Age In Years" <= 14 then '10–14' - when HIE."Age In Years" <= 19 then '15–19' - when HIE."Age In Years" <= 24 then '20–24' - when HIE."Age In Years" <= 49 then '25–49' - when HIE."Age In Years" >= 50 then '50+' - else null - end - -define "By Age Stratifier 3": - case - when HIE."Age In Years" >= 15 and HIE."Age In Years"<= 19 then '15-19' - when HIE."Age In Years" <= 24 then '20-24' - when HIE."Age In Years" <= 49 then '25–49' - when HIE."Age In Years" >= 50 then '50+' - else null - end - -/* - * By state stratifier - */ - - define "HIV status of partner or contact": - case - when HIE."Already knew positive" then HC."Already knew positive" - when HIE."Newly diagnosed" then HC."Newly diagnosed" - when HIE."Negative H.DE37" then HC."Negative - HIV.H.DE37" - else null - end - -//(including PrEP, OAMT, NSP, STI services, VMMC) - define "HIV prevention intervention": - List{ - if HIE."PrEP service" then 'PrEP' else null, - if HIE."OAMT" then 'OAMT' else null, - if HIE."NSP" then 'NSP' else null, - if HIE."STI services" then 'STI services' else null, - if HIE."VMMC" then 'VMMC' else null, - if HIE."Other PRV.DE8" then 'other prevention' else null - } - //DRAFT define "Patient Deceased during Measurement Period": case @@ -164,16 +36,6 @@ define "Patient Deceased during Measurement Period": else false end -define "HIV Positive Condition": -[Condition] C - where C.clinicalStatus ~ HCC."active" - and exists(C.category CC where CC ~ HCC."encounter-diagnosis") - and C.code ~ HC."HIV-positive - HIV.B.DE116" - sort by start of onset.toInterval() - -define "First HIV Positive Condition": - First("HIV Positive Condition") - define "HIV Positive Observation": [Observation] O where O.status in {'final', 'amended'} @@ -317,24 +179,6 @@ define "buprenorphine_prescribed": where MR.status = 'completed' and MR.intent = 'order' and MR.medication ~ HCC."buprenorphine" - - - - - -define "Lost to Follow Up during the measurement period": - exists(HE."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" - 28 days)) - ) - -define "HIV Status": - case - when exists("HIV Positive Condition" C where C.onset before end of "Measurement Period") then HC."HIV-positive - HIV.B.DE116" - when not exists("HIV Positive Condition" C where C.onset before end of "Measurement Period") and exists("HIV Negative Observation" O where O.issued before end of "Measurement Period") then HC."HIV-negative - HIV.B.DE117" - else HC."Unknown - HIV.B.DE118" - end /* * Key populations (men who have sex with men, people living in prisons and other closed settings, people who inject drugs, sex workers, trans and gender diverse people) @@ -860,19 +704,6 @@ define "VMMC_adverse_event_Postoperative": and exists(O.category OC where OC ~ HCC."social-history") and O.code ~ HC."Sexual partner - HIV.B.DE11" - - define "First HIV Treatment": - First(HE."On ART H.DE47") - - - define "Time to start ART": - case - when difference in days between start of "First HIV Treatment".effective.toInterval() and start of "First HIV Positive Condition".onset.toInterval() <= 7 then HC."Within 7 days of HIV diagnosis" - when difference in days between start of "First HIV Treatment".effective.toInterval() and start of "First HIV Positive Condition".onset.toInterval() <= 30 then HC."Within 30 days of HIV diagnosis" - when difference in days between start of "First HIV Treatment".effective.toInterval() and start of "First HIV Positive Condition".onset.toInterval() <= 90 then HC."Within 90 days of HIV diagnosis" - else null - end - //HIV status of partner or contact (already known positive, newly diagnosed positive, negative) define "already known positive": @@ -902,5 +733,19 @@ define "VMMC_adverse_event_Postoperative": and P.code ~ HC."STI testing and treatment services" +/** + * @description Takes a choice between a Medication and a CodeableConcept and returns just the code of the medication + */ +define function ExtractMedicationCode(choice Choice): + case + when choice is FHIR.CodeableConcept then + choice as FHIR.CodeableConcept + when choice is FHIR.Reference then + First([Medication] M + where M.id = Last(Split(choice.reference, '/')) + return M.code as FHIR.CodeableConcept) + else + Message(null as FHIR.CodeableConcept, true, '1', 'Error', 'Cannot compute a medication code') // TODO: I'm sure that this is supported somehow? + end diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 7753508269..c2c44b0fad 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -11,9 +11,9 @@ include WHOElements called WE include HIVConcepts called Concepts include HIVConceptsCustom called CustomConcepts -//include HIVCommon called Common +include HIVCommon called Common -parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] +// parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] parameter "Measurement Date" Date default @2020-01-01 parameter "Testing Interval" System.Quantity default 3 months parameter "Intervention Interval" System.Quantity default 7 days @@ -25,7 +25,20 @@ context Patient * HIV Elements */ -// Umbrella Element Definitions +/* Umbrella Element Definitions */ +define "HIV Positive Condition": +[Condition] C + where C.clinicalStatus ~ CustomConcepts."active" + and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") + and C.code ~ Concepts."HIV-positive - HIV.B.DE116" + sort by start of onset.toInterval() + +define "First HIV Treatment": + First("On ART H.DE47") + +define "First HIV Positive Condition": + First("HIV Positive Condition") + /* On ART - includes "On ART - HIV.B.DE47" and "On ART - HIV.B.DE48" */ define "ART Medication Statement": @@ -39,6 +52,15 @@ define "ART start date": "ART Medication Statement" MS return start of MS.effective.toInterval() + +define "First On ART": + (First("On ART D.DE38")) + +define "Viral load tests received after ART intitiation": + "Viral load test result D.DE387" O + where start of O.issued.toInterval() after start of "First On ART".effective.toInterval() + sort by start of issued.toInterval() + // Auto-generated Elements from DAK Data Dictionary // Entries based on DAK Data Dictionary for Data Elements marked as used // in at least one Decision Support Table or Aggregate Indicator @@ -1295,12 +1317,7 @@ define "HIV-inconclusive Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis. */ -// TODO: Replace placeholder with relevant CQL logic -define "HIV status": - exists "HIV status Observation" -define "HIV status Observation": - [Observation: Concepts."HIV status"] O - where O.status in { 'final', 'amended', 'corrected' } + /* End of HIV status */ /* @@ -1327,40 +1344,6 @@ define "HIV-positive B.DE116 Observation": sort by start of effective.toInterval() /* End of HIV-positive B.DE116 */ -/* -@dataElement: HIV.B.DE117 - HIV-negative -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client is HIV-negative -*/ -// TODO: Replace placeholder with relevant CQL logic -define "HIV-negative B.DE117": - exists "HIV-negative B.DE117 Condition" - or exists "HIV-negative B.DE117 Observation" -define "HIV-negative B.DE117 Condition": - [Condition: Concepts."HIV-negative - HIV.B.DE117"] -define "HIV-negative B.DE117 Observation": - "HIV status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."HIV-negative - HIV.B.DE117" -/* End of HIV-negative B.DE117 */ - -/* -@dataElement: HIV.B.DE118 - Unknown -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client has unknown HIV status -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unknown B.DE118": - exists "Unknown B.DE118 Condition" - or exists "Unknown B.DE118 Observation" -define "Unknown B.DE118 Condition": - [Condition: Concepts."Unknown - HIV.B.DE118"] -define "Unknown B.DE118 Observation": - "HIV status Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Unknown - HIV.B.DE118" -/* End of Unknown B.DE118 */ - /* @dataElement: HIV.B.DE121 - Probable route of transmission @activity: HIV.B8 Provide post-test counselling @@ -8012,65 +7995,15 @@ define "Date of baseline CD4 count test D.DE368 Value": @activity: HIV.D8 Capture or update client history @description: Time from HIV diagnosis to when client started ART */ -// TODO: Replace placeholder with relevant CQL logic define "Time to start ART": - exists "Time to start ART Observation" -define "Time to start ART Observation": - [Observation: Concepts."Time to start ART"] O - where O.status in { 'final', 'amended', 'corrected' } + case + when difference in days between start of "First HIV Treatment".effective.toInterval() and start of "First HIV Positive Condition".onset.toInterval() <= 7 then Concepts."Within 7 days of HIV diagnosis" + when difference in days between start of "First HIV Treatment".effective.toInterval() and start of "First HIV Positive Condition".onset.toInterval() <= 30 then Concepts."Within 30 days of HIV diagnosis" + when difference in days between start of "First HIV Treatment".effective.toInterval() and start of "First HIV Positive Condition".onset.toInterval() <= 90 then Concepts."Within 90 days of HIV diagnosis" + else null + end /* End of Time to start ART */ -/* -@dataElement: HIV.D.DE384 - Within 7 days of HIV diagnosis -@activity: HIV.D8 Capture or update client history -@description: Client started ART within 7 days -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Within 7 days of HIV diagnosis": - exists "Within 7 days of HIV diagnosis Condition" - or exists "Within 7 days of HIV diagnosis Observation" -define "Within 7 days of HIV diagnosis Condition": - [Condition: Concepts."Within 7 days of HIV diagnosis"] -define "Within 7 days of HIV diagnosis Observation": - "Time to start ART Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Within 7 days of HIV diagnosis" -/* End of Within 7 days of HIV diagnosis */ - -/* -@dataElement: HIV.D.DE385 - Within 30 days of HIV diagnosis -@activity: HIV.D8 Capture or update client history -@description: Client started ART within 30 days of ART initiation (but over 7 days) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Within 30 days of HIV diagnosis": - exists "Within 30 days of HIV diagnosis Condition" - or exists "Within 30 days of HIV diagnosis Observation" -define "Within 30 days of HIV diagnosis Condition": - [Condition: Concepts."Within 30 days of HIV diagnosis"] -define "Within 30 days of HIV diagnosis Observation": - "Time to start ART Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Within 30 days of HIV diagnosis" -/* End of Within 30 days of HIV diagnosis */ - -/* -@dataElement: HIV.D.DE386 - Within 90 days of HIV diagnosis -@activity: HIV.D8 Capture or update client history -@description: Client started ART within 90 days of ART initiation (but over 30 days) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Within 90 days of HIV diagnosis": - exists "Within 90 days of HIV diagnosis Condition" - or exists "Within 90 days of HIV diagnosis Observation" -define "Within 90 days of HIV diagnosis Condition": - [Condition: Concepts."Within 90 days of HIV diagnosis"] -define "Within 90 days of HIV diagnosis Observation": - "Time to start ART Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Within 90 days of HIV diagnosis" -/* End of Within 90 days of HIV diagnosis */ - /* @dataElement: HIV.D.DE387 - Viral load test result @activity: HIV.D20 Diagnostics @@ -12284,7 +12217,7 @@ define "TPT regimen": define "TPT regimen type": "TPT regimen" MS - return MS.medication + return Common.ExtractMedicationCode(MS.medication) /* End of TPT regimen type */ /* @@ -14204,12 +14137,6 @@ 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": - "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" - "LTFU Days")) /* End of Lost to follow-up */ diff --git a/input/cql/HIVEncounterElements.cql b/input/cql/HIVEncounterElements.cql index 7902b1acd9..dc923a5b33 100644 --- a/input/cql/HIVEncounterElements.cql +++ b/input/cql/HIVEncounterElements.cql @@ -3833,14 +3833,9 @@ define "On ART D.DE38": @activity: HIV.D8 Capture or update client history @description: The date on which the client started or restarted ART */ -// TODO: Replace placeholder with relevant CQL logic define "ART start date D.DE39": - Elements."ART start date D.DE39" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -define "ART start date D.DE39 Value": - "ART start date D.DE39" O - return O.value + "On ART D.DE38" MS + return start of MS.effective.toInterval() /* End of ART start date D.DE39 */ /* diff --git a/input/cql/HIVIND13Logic.cql b/input/cql/HIVIND13Logic.cql index f977f44699..8b47c610ac 100644 --- a/input/cql/HIVIND13Logic.cql +++ b/input/cql/HIVIND13Logic.cql @@ -56,6 +56,7 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -101,13 +102,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Setting": HIC."setting" @@ -118,5 +119,5 @@ define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') diff --git a/input/cql/HIVIND15Logic.cql b/input/cql/HIVIND15Logic.cql index c9cd2a438a..f407de50b3 100644 --- a/input/cql/HIVIND15Logic.cql +++ b/input/cql/HIVIND15Logic.cql @@ -52,6 +52,7 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -97,7 +98,7 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" @@ -106,7 +107,7 @@ define "Setting": HIC."setting" define "HIV Status": - HIC."HIV Status" + HIE."HIV Status" //provider type not provided? @@ -115,4 +116,4 @@ define "Stratification": + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" + Combine(HIC.setting, ':') -+ ':' + HIC."HIV Status".code \ No newline at end of file ++ ':' + HIE."HIV Status".code \ No newline at end of file diff --git a/input/cql/HIVIND16Logic.cql b/input/cql/HIVIND16Logic.cql index 065497620d..3259042c8e 100644 --- a/input/cql/HIVIND16Logic.cql +++ b/input/cql/HIVIND16Logic.cql @@ -76,6 +76,8 @@ include FHIRHelpers version '4.0.1' include WHOCommon called WCom include HIVConceptsCustom called HCC +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -128,7 +130,7 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" diff --git a/input/cql/HIVIND18Logic.cql b/input/cql/HIVIND18Logic.cql index e884a706a1..b3648174eb 100644 --- a/input/cql/HIVIND18Logic.cql +++ b/input/cql/HIVIND18Logic.cql @@ -73,12 +73,15 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVElements called HE +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] context Patient define "Measure Population": - exists(HIC."HIV Positive Condition" C + exists(HE."HIV Positive Condition" C where C.onset before end of "Measurement Period") or exists(HIC."HIV Positive Observation" O @@ -109,13 +112,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "ANC Stratifier": HIC."anc" @@ -123,7 +126,7 @@ define "ANC Stratifier": define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 2" + + ':' + HIE."By Age Stratifier 2" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC."anc", ':') diff --git a/input/cql/HIVIND19Logic.cql b/input/cql/HIVIND19Logic.cql index 6f633caaac..4aea43a020 100644 --- a/input/cql/HIVIND19Logic.cql +++ b/input/cql/HIVIND19Logic.cql @@ -85,6 +85,9 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVElements called HE +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -98,7 +101,7 @@ define "Initial Population": define "numerator": - exists(HIC."HIV Positive Condition" C + exists(HE."HIV Positive Condition" C where C.onset during "Measurement Period") or exists(HIC."HIV Positive Observation" O @@ -137,7 +140,7 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Setting": HIC."setting" @@ -149,6 +152,6 @@ define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.tb, ':') diff --git a/input/cql/HIVIND20Logic.cql b/input/cql/HIVIND20Logic.cql index 705a220c43..f170e71c57 100644 --- a/input/cql/HIVIND20Logic.cql +++ b/input/cql/HIVIND20Logic.cql @@ -88,6 +88,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -108,7 +110,7 @@ define "Initial Population": //Does this also filter out self HIV tests //right now using HIVIND19 definition which does define "numerator": - exists(HIC."HIV Positive Condition" C + exists(HIE."HIV Positive Condition" C where C.onset during "Measurement Period") or exists(HIC."HIV Positive Observation" O @@ -136,7 +138,7 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Setting": HIC."setting" @@ -148,6 +150,6 @@ define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.tb, ':') \ No newline at end of file diff --git a/input/cql/HIVIND21Logic.cql b/input/cql/HIVIND21Logic.cql index 69608bc3b5..f0c16bb659 100644 --- a/input/cql/HIVIND21Logic.cql +++ b/input/cql/HIVIND21Logic.cql @@ -95,8 +95,7 @@ define "Initial Population": define "numerator": - (exists(HIC."HIV Positive Condition" C - where C.onset during "Measurement Period") + (exists(HIE."HIV Positive Condition" C) or exists(HIC."HIV Positive Observation" O //during doesn't work @@ -110,7 +109,7 @@ define "numerator": ) define "denominator": - (exists(HIC."HIV Positive Condition" C + (exists(HE."HIV Positive Condition" C where C.onset before end of "Measurement Period") or exists(HIC."HIV Positive Observation" O @@ -132,13 +131,13 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "TB Stratifier": HIC."tb" define "Time to start ART": - HIC."Time to start ART" + HE."Time to start ART" define "Stratification": HIE."By Administrative Gender Stratifier".code @@ -146,5 +145,5 @@ define "Stratification": //+ ':' + HIC."Time to start ART".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.tb, ':') diff --git a/input/cql/HIVIND22Logic.cql b/input/cql/HIVIND22Logic.cql index c79f9a24e8..d5dcb3c502 100644 --- a/input/cql/HIVIND22Logic.cql +++ b/input/cql/HIVIND22Logic.cql @@ -80,6 +80,7 @@ using FHIR version '4.0.1' include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -138,20 +139,20 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "HIV status of partner or contact": - HIC."HIV status of partner or contact" + HIE."HIV status of partner or contact" define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIC."HIV status of partner or contact".code - + ':' + HIE."By Age Stratifier 2" + + ':' + HIE."HIV status of partner or contact".code + + ':' + HIE."By Age Stratifier 2" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') diff --git a/input/cql/HIVIND24Logic.cql b/input/cql/HIVIND24Logic.cql index 5d2dd12bbd..4be77da1dc 100644 --- a/input/cql/HIVIND24Logic.cql +++ b/input/cql/HIVIND24Logic.cql @@ -112,25 +112,25 @@ define "Initial Population": define "Numerator": (exists(HE."PrEP service" prep - where prep.effective.toInterval() starts before (start of HIC."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") - and prep.effective.toInterval() starts after (start of HIC."First Negative Test within Measurement Period".effective.toInterval()) + where prep.effective.toInterval() starts before (start of HIE."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") + and prep.effective.toInterval() starts after (start of HIE."First Negative Test within Measurement Period".effective.toInterval()) ) or - exists(HE."OAMT" t where t starts before (start of HIC."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") - and t starts after (start of HIC."First Negative Test within Measurement Period".effective.toInterval())) + exists(HE."OAMT" t where t starts before (start of HIE."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") + and t starts after (start of HIE."First Negative Test within Measurement Period".effective.toInterval())) or - exists(HE."NSP" DUS where DUS.timing.toInterval() starts before (start of HIC."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") - and DUS.timing.toInterval() starts after (start of HIC."First Negative Test within Measurement Period".effective.toInterval())) + exists(HE."NSP" DUS where DUS.timing.toInterval() starts before (start of HIE."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") + and DUS.timing.toInterval() starts after (start of HIE."First Negative Test within Measurement Period".effective.toInterval())) or - exists(HE."STI services" STI where STI.performed.toInterval() starts before (start of HIC."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") - and STI.performed.toInterval() starts after (start of HIC."First Negative Test within Measurement Period".effective.toInterval())) + exists(HE."STI services" STI where STI.performed.toInterval() starts before (start of HIE."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") + and STI.performed.toInterval() starts after (start of HIE."First Negative Test within Measurement Period".effective.toInterval())) or - exists(HE."VMMC" V where V.performed.toInterval() starts before (start of HIC."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") - and V.performed.toInterval() starts after (start of HIC."First Negative Test within Measurement Period".effective.toInterval())) + exists(HE."VMMC" V where V.performed.toInterval() starts before (start of HIE."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") + and V.performed.toInterval() starts after (start of HIE."First Negative Test within Measurement Period".effective.toInterval())) or exists(HE."Other PRV.DE8" O - where O.effective.toInterval() starts before (start of HIC."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") - and O.effective.toInterval() starts after (start of HIC."First Negative Test within Measurement Period".effective.toInterval()))) + where O.effective.toInterval() starts before (start of HIE."First Negative Test within Measurement Period".effective.toInterval() + "Intervention Interval") + and O.effective.toInterval() starts after (start of HIE."First Negative Test within Measurement Period".effective.toInterval()))) and HIE."At elevated risk for HIV acquisition B.DE225" @@ -144,7 +144,7 @@ define "Numerator": */ define "Denominator": - exists(HIC."Negative Tests within Measurement Period") + exists(HIE."Negative Tests within Measurement Period") and HIE."At elevated risk for HIV acquisition B.DE225" @@ -159,20 +159,20 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "HIV prevention intervention": - HIC."HIV prevention intervention" + HIE."HIV prevention intervention" define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 2" + + ':' + HIE."By Age Stratifier 2" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') -+ Combine(HIC."HIV prevention intervention", ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') ++ Combine(HIE."HIV prevention intervention", ':') \ No newline at end of file diff --git a/input/cql/HIVIND25Logic.cql b/input/cql/HIVIND25Logic.cql index 7acd4be05a..0c7cf3d212 100644 --- a/input/cql/HIVIND25Logic.cql +++ b/input/cql/HIVIND25Logic.cql @@ -76,6 +76,7 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom include HIVElements called HE +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -102,7 +103,7 @@ define "Initial Population": define "Numerator": - exists(HIC."Negative Tests after First Negative Test") + exists(HIE."Negative Tests after First Negative Test") /** @@ -113,7 +114,7 @@ define "Numerator": */ define "Denominator": - exists(HIC."Negative Tests within Measurement Period") + exists(HIE."Negative Tests within Measurement Period") /* end Populations */ @@ -127,17 +128,17 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 2" + HIE."By Age Stratifier 2" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIC."HIV status of partner or contact".code - + ':' + HIE."By Age Stratifier 2" + + ':' + HIE."HIV status of partner or contact".code + + ':' + HIE."By Age Stratifier 2" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND27Logic.cql b/input/cql/HIVIND27Logic.cql index 8b619eca4d..3ee58672f2 100644 --- a/input/cql/HIVIND27Logic.cql +++ b/input/cql/HIVIND27Logic.cql @@ -116,10 +116,10 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND28Logic.cql b/input/cql/HIVIND28Logic.cql index f190dc9347..aa7d5be5ec 100644 --- a/input/cql/HIVIND28Logic.cql +++ b/input/cql/HIVIND28Logic.cql @@ -151,14 +151,14 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Treatment outcome category Stratifier": - HIC."Treatment outcome category" + HIE."Treatment outcome category" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') -+ Combine(HIC."Treatment outcome category", ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') ++ Combine(HIE."Treatment outcome category", ':') \ No newline at end of file diff --git a/input/cql/HIVIND29Logic.cql b/input/cql/HIVIND29Logic.cql index 4ead60fd67..b7770b3e92 100644 --- a/input/cql/HIVIND29Logic.cql +++ b/input/cql/HIVIND29Logic.cql @@ -114,13 +114,13 @@ define "Numerator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" and - (months between (end of "Measurement Period") and (date from start of HIC."First On ART".effective.toInterval()) > 6 months) + (months between (end of "Measurement Period") and (date from start of HE."First On ART".effective.toInterval()) > 6 months) and exists( HIE."Viral load test result D.DE387" VL with HIC."routine viral load sample collection" P such that VL.partOf.references(P) and P.performed.toInterval() during "Measurement Period" - where VL.value < 1000 'copies/ml' + where VL.value < 1000 ) @@ -135,7 +135,7 @@ define "Denominator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" and - (months between (end of "Measurement Period") and (date from start of HIC."First On ART".effective.toInterval()) > 6 months) + (months between (end of "Measurement Period") and (date from start of HE."First On ART".effective.toInterval()) > 6 months) and exists( HIE."Viral load test result D.DE387" VL @@ -160,11 +160,11 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND2Logic.cql b/input/cql/HIVIND2Logic.cql index fbb3fe78ea..07e342e3a2 100644 --- a/input/cql/HIVIND2Logic.cql +++ b/input/cql/HIVIND2Logic.cql @@ -90,6 +90,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -123,13 +125,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Setting": HIC."setting" @@ -149,7 +151,7 @@ define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') + Combine(HIC.prep_experience, ':') diff --git a/input/cql/HIVIND30Logic.cql b/input/cql/HIVIND30Logic.cql index f4fa67f7b4..af66f1adae 100644 --- a/input/cql/HIVIND30Logic.cql +++ b/input/cql/HIVIND30Logic.cql @@ -85,7 +85,7 @@ context Patient define "Measure Population": HIE."HIV-positive B.DE116" - and (date from start of HIC."First On ART".effective.toInterval() during "Measurement Period") + and (date from start of HE."First On ART".effective.toInterval() during "Measurement Period") /* * As defined by Member States @@ -115,10 +115,10 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND31Logic.cql b/input/cql/HIVIND31Logic.cql index ae2c0b9cd0..1d9dab860b 100644 --- a/input/cql/HIVIND31Logic.cql +++ b/input/cql/HIVIND31Logic.cql @@ -104,10 +104,10 @@ define "Initial Population": define "Numerator": HIE."HIV-positive B.DE116" - and (date from start of HIC."First On ART".effective.toInterval() during "Measurement Period") + and (date from start of HE."First On ART".effective.toInterval() during "Measurement Period") and exists(HE."Baseline CD4 count SRV.DE3" O where O.effective.toInterval() during "Measurement Period" - and O.value < 200 'cells/mm^3') + and O.value < 200) /** @@ -119,7 +119,7 @@ define "Numerator": define "Denominator": HIE."HIV-positive B.DE116" - and (date from start of HIC."First On ART".effective.toInterval() during "Measurement Period") + and (date from start of HE."First On ART".effective.toInterval() during "Measurement Period") and exists(HE."Baseline CD4 count SRV.DE3" O where O.effective.toInterval() during "Measurement Period") @@ -141,10 +141,10 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND32Logic.cql b/input/cql/HIVIND32Logic.cql index 730c5056e1..d8acdf9daa 100644 --- a/input/cql/HIVIND32Logic.cql +++ b/input/cql/HIVIND32Logic.cql @@ -111,7 +111,7 @@ define "Numerator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" and - (months between (end of "Measurement Period") and (date from start of HIC."First On ART".effective.toInterval()) > 6 months) + (months between (end of "Measurement Period") and (date from start of HE."First On ART".effective.toInterval()) > 6 months) and exists( HE."Date viral load test results received by client D.DE193" VL @@ -142,7 +142,7 @@ define "Denominator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" and - (months between (end of "Measurement Period") and (date from start of HIC."First On ART".effective.toInterval()) > 6 months) + (months between (end of "Measurement Period") and (date from start of HE."First On ART".effective.toInterval()) > 6 months) /** * Denominator Exclusions @@ -171,10 +171,10 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') diff --git a/input/cql/HIVIND33Logic.cql b/input/cql/HIVIND33Logic.cql index f32a83d881..97ad5f4577 100644 --- a/input/cql/HIVIND33Logic.cql +++ b/input/cql/HIVIND33Logic.cql @@ -104,8 +104,8 @@ define "Initial Population": define "Numerator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" - and (date from start of HIC."First On ART".effective.toInterval() during "Measurement Period") - and (months between (start of First(HIC."Viral load tests received after ART intitiation").issued.toInterval()) and (date from start of HIC."First On ART".effective.toInterval()) < 6 months) + and (date from start of HE."First On ART".effective.toInterval() during "Measurement Period") + and (months between (start of First(HIC."Viral load tests received after ART intitiation").issued.toInterval()) and (date from start of HE."First On ART".effective.toInterval()) < 6 months) /** @@ -118,7 +118,7 @@ define "Numerator": define "Denominator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" - and (date from start of HIC."First On ART".effective.toInterval() during "Measurement Period") + and (date from start of HE."First On ART".effective.toInterval() during "Measurement Period") /* end Populations */ @@ -137,10 +137,10 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') \ No newline at end of file ++ Combine(HIE.patientGroups, ':') \ No newline at end of file diff --git a/input/cql/HIVIND34Logic.cql b/input/cql/HIVIND34Logic.cql index 3edf423182..200401481b 100644 --- a/input/cql/HIVIND34Logic.cql +++ b/input/cql/HIVIND34Logic.cql @@ -108,11 +108,11 @@ define "Numerator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" and - exists(HIC."Elevated Viral load test during Measurement Period") + exists(HIE."Elevated Viral load test during Measurement Period") and exists( HIC."viral load sample collection" VL - where (months between (start of First(HIC."Elevated Viral load test during Measurement Period").issued.toInterval()) and (date from start of VL.performed.toInterval() ) < 3 months) + where (months between (start of First(HIE."Elevated Viral load test during Measurement Period").issued.toInterval()) and (date from start of VL.performed.toInterval() ) < 3 months) ) @@ -130,7 +130,7 @@ define "Denominator": HIE."HIV-positive B.DE116" and HIE."On ART H.DE47" and - exists(HIC."Elevated Viral load test during Measurement Period") + exists(HIE."Elevated Viral load test during Measurement Period") /* end Populations */ @@ -149,13 +149,13 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') //Need to add // * • ART regimen diff --git a/input/cql/HIVIND35Logic.cql b/input/cql/HIVIND35Logic.cql index 63d2b3d252..43f7ca8292 100644 --- a/input/cql/HIVIND35Logic.cql +++ b/input/cql/HIVIND35Logic.cql @@ -221,13 +221,13 @@ define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') /* need to add diff --git a/input/cql/HIVIND3Logic.cql b/input/cql/HIVIND3Logic.cql index 3946a34451..ebf80e50aa 100644 --- a/input/cql/HIVIND3Logic.cql +++ b/input/cql/HIVIND3Logic.cql @@ -97,6 +97,7 @@ using FHIR version '4.0.1' include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -134,13 +135,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Setting": HIC."setting" @@ -158,9 +159,9 @@ define "prep_dosing": define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 3" + + ':' + HIE."By Age Stratifier 3" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') + Combine(HIC.prep_experience, ':') diff --git a/input/cql/HIVIND44Logic.cql b/input/cql/HIVIND44Logic.cql index 75587e0603..c1922352da 100644 --- a/input/cql/HIVIND44Logic.cql +++ b/input/cql/HIVIND44Logic.cql @@ -65,7 +65,7 @@ library HIVIND44Logic // Included Libraries using FHIR version '4.0.1' -include HIVCommon version '0.0.1' called HIC +include HIVCommon called HIC include FHIRHelpers version '4.0.1' include FHIRCommon called FC include WHOCommon called WCom @@ -117,14 +117,23 @@ define "Denominator": * • Cities and other administrative regions of epidemiologic importance */ - define "Administrative Gender Stratifier": +define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": HIE."By Age Stratifier" define "TPT Regimen Type Stratifier": - HE."TPT regimen type" + HIE."TPT regimen type" define "Geographic Region Stratifier": - HIE."By Geographic Region Stratifier" \ No newline at end of file + HIE."By Geographic Region Stratifier" + +/* + * Combined stratifiers + */ +define "Stratification": + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" + + ':' + First(HIE."TPT regimen type".coding.code) + + ':' + HIE."By Geographic Region Stratifier" diff --git a/input/cql/HIVIND45Logic.cql b/input/cql/HIVIND45Logic.cql index b88c08b8fe..912f8afcd9 100644 --- a/input/cql/HIVIND45Logic.cql +++ b/input/cql/HIVIND45Logic.cql @@ -139,10 +139,20 @@ define "Age Stratifier": HIE."By Age Stratifier" define "TPT Regimen Type Stratifier": - HE."TPT regimen type" + HIE."TPT regimen type" define "ART Initiation Stratifier": HIE."By ART initiation" define "Geographic Region Stratifier": - HIE."By Geographic Region Stratifier" \ No newline at end of file + HIE."By Geographic Region Stratifier" + +/* + * Combined stratifiers + */ +define "Stratification": + HIE."By Administrative Gender Stratifier".code + + ':' + HIE."By Age Stratifier" + + ':' + Combine(HIE."TPT regimen type".coding.code) + + ':' + HIE."By ART initiation" + + ':' + HIE."By Geographic Region Stratifier" diff --git a/input/cql/HIVIND4Logic.cql b/input/cql/HIVIND4Logic.cql index d100f47345..118aea3c7f 100644 --- a/input/cql/HIVIND4Logic.cql +++ b/input/cql/HIVIND4Logic.cql @@ -80,6 +80,8 @@ include FHIRHelpers version '4.0.1' //include FHIRCommon called FC include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -115,13 +117,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "prep product": HIC."prep_product" @@ -133,8 +135,8 @@ define "Setting": define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 3" + + ':' + HIE."By Age Stratifier 3" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') diff --git a/input/cql/HIVIND5Logic.cql b/input/cql/HIVIND5Logic.cql index f36cac8150..0a2b066994 100644 --- a/input/cql/HIVIND5Logic.cql +++ b/input/cql/HIVIND5Logic.cql @@ -79,6 +79,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -109,13 +111,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "prep product": HIC."prep_product" @@ -130,9 +132,9 @@ define "hiv_exposure_type": define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 3" + + ':' + HIE."By Age Stratifier 3" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') + Combine(HIC.hiv_exposure_type, ':') diff --git a/input/cql/HIVIND6Logic.cql b/input/cql/HIVIND6Logic.cql index b2ce183149..62f3dd45b1 100644 --- a/input/cql/HIVIND6Logic.cql +++ b/input/cql/HIVIND6Logic.cql @@ -81,6 +81,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -111,13 +113,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "prep product": HIC."prep_product" @@ -132,11 +134,11 @@ define "hiv_exposure_type": define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 3" + + ':' + HIE."By Age Stratifier 3" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') + Combine(HIC.hiv_exposure_type, ':') //Need to discuss how to add list -//+ ':' +HIC."patientGroups" +//+ ':' +HIE."patientGroups" diff --git a/input/cql/HIVIND7Logic.cql b/input/cql/HIVIND7Logic.cql index 2f6841f026..2f4fc6dff0 100644 --- a/input/cql/HIVIND7Logic.cql +++ b/input/cql/HIVIND7Logic.cql @@ -89,6 +89,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -124,13 +126,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "prep product": HIC."prep_product" @@ -145,9 +147,9 @@ define "hiv_exposure_type": define "Stratification": HIE."By Administrative Gender Stratifier".code - + ':' + HIE."By Age Stratifier 3" + + ':' + HIE."By Age Stratifier 3" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') + Combine(HIC.prep_product, ':') + Combine(HIC.hiv_exposure_type, ':') diff --git a/input/cql/HIVIND8Logic.cql b/input/cql/HIVIND8Logic.cql index b2c338e7ae..99a5d33512 100644 --- a/input/cql/HIVIND8Logic.cql +++ b/input/cql/HIVIND8Logic.cql @@ -67,6 +67,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include WHOCommon called WCom +include HIVIndicatorElements called HIE + // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -97,13 +99,13 @@ define "Administrative Gender Stratifier": HIE."By Administrative Gender Stratifier" define "Age Stratifier": - HIE."By Age Stratifier 3" + HIE."By Age Stratifier 3" define "Geographic Region Stratifier": HIE."By Geographic Region Stratifier" define "patientGroups Stratifier": - HIC."patientGroups" + HIE."patientGroups" define "Setting": HIC."setting" @@ -114,5 +116,5 @@ define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" + ':' + HIE."By Geographic Region Stratifier" -+ Combine(HIC.patientGroups, ':') ++ Combine(HIE.patientGroups, ':') + Combine(HIC.setting, ':') \ No newline at end of file diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index b265b649a1..d0064d23d8 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -11,8 +11,12 @@ include WHOElements called WE include HIVConcepts called Concepts include HIVElements called Elements +include HIVCommon called Common parameter "Measurement Period" Interval default Interval[@2024-01-01, @2024-12-30] +parameter "Testing Interval" System.Quantity default 3 months +parameter "Intervention Interval" System.Quantity default 7 days +parameter "LTFU Days" System.Quantity default 28 days context Patient @@ -20,9 +24,48 @@ context Patient * HIV Elements */ -/* - * Umbrella Data Elements - */ +/* Umbrella Data Elements */ + + + +// HIV Testing +define "Elevated Viral load test during Measurement Period": + "Viral load test result D.DE387" VL + with Common."viral load sample collection" P + such that VL.partOf.references(P) and P.performed.toInterval() during "Measurement Period" + where VL.value > 1000 + sort by start of effective.toInterval() + + +define "Negative Tests within Measurement Period": + Elements."HIV-negative B.DE113" O + with Elements."At elevated risk for HIV acquisition B.DE225" HIV + such that O.hasMember.references(HIV) + where O.effective.toInterval() starts during "Measurement Period" + sort by start of effective.toInterval() + +define "First Negative Test within Measurement Period": + (First("Negative Tests within Measurement Period")) + +define "Negative Tests after First Negative Test": + Elements."HIV-negative B.DE113" O + with Elements."At elevated risk for HIV acquisition B.DE225" HIV + such that O.hasMember.references(HIV) + where O.effective.toInterval() starts after start of "First Negative Test within Measurement Period".effective.toInterval() + and O.effective.toInterval() starts before (start of "First Negative Test within Measurement Period".effective.toInterval() + "Testing Interval") + sort by start of effective.toInterval() + +define "Lost to Follow Up during the measurement period": + exists(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" - 28 days)) + ) + +// HIV Status +define "HIV Positive Condition": + Elements."HIV Positive Condition" C + where C.onset during "Measurement Period" // ART Status @@ -53,6 +96,39 @@ define "By ART initiation": define "By Geographic Region Stratifier": First(Patient.address A where A.use in { 'home' }).state +/* + * Other Stratifiers + */ +define patientGroups: + List{ + if "Sex worker B.DE51" then 'SW' else null, + if "Men who have sex with men" then 'MSM' else null, + if "Trans and gender-diverse people B.DE53" then 'Trans' else null, + if "People who inject drugs B.DE54" then 'PWID' else null, + if "People living in prisons and other closed settings" then 'Prisoner' else null + } + +define "Treatment outcome category": + List{ + if "Is Lost to follow-up" then 'LTFU' else null, + if "Transferred out" then 'Transfer Out' else null, + if "Death documented" then 'Death' else null, + if "Refused stopped treatment" then 'Stopped' else null, + if "On ART H.DE47" then 'On ART' else null + } + + +define "HIV status of partner or contact": + case + when "Already knew positive" then Concepts."Already knew positive" + when "Newly diagnosed" then Concepts."Newly diagnosed" + when "Negative H.DE37" then Concepts."Negative - HIV.H.DE37" + else null + end + + + + // Auto-generated Elements from DAK Data Dictionary // Entries based on DAK Data Dictionary for Data Elements marked as used // in at least one Decision Support Table or Aggregate Indicator @@ -136,6 +212,11 @@ define "By Age Stratifier 3": /* End of Age */ + + + + + /* @dataElement: HIV.A.DE18 - Gender @activity: HIV.A6.1 Review sociodemographic data with client | HIV.A5 Create new client record @@ -804,12 +885,12 @@ define "HIV-inconclusive Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis. */ -// TODO: Replace placeholder with relevant CQL logic -define "HIV status": - exists "HIV status Observation" -define "HIV status Observation": - Elements."HIV status Observation" O - where O.effective.toInterval() during "Measurement Period" +define "HIV Status": + case + when exists(Elements."HIV Positive Condition" C where C.onset before end of "Measurement Period") then Concepts."HIV-positive - HIV.B.DE116" + when not exists(Elements."HIV Positive Condition" C where C.onset before end of "Measurement Period") and exists(Common."HIV Negative Observation" O where O.issued before end of "Measurement Period") then Concepts."HIV-negative - HIV.B.DE117" + else Concepts."Unknown - HIV.B.DE118" + end /* End of HIV status */ /* @@ -822,42 +903,6 @@ define "HIV-positive B.DE116": exists(Elements."HIV-positive B.DE116" HIV where HIV starts before end of "Measurement Period") /* End of HIV-positive B.DE116 */ -/* -@dataElement: HIV.B.DE117 - HIV-negative -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client is HIV-negative -*/ -// TODO: Replace placeholder with relevant CQL logic -define "HIV-negative B.DE117": - exists "HIV-negative B.DE117 Condition" - or exists "HIV-negative B.DE117 Observation" -define "HIV-negative B.DE117 Condition": - Elements."HIV-negative B.DE117 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "HIV-negative B.DE117 Observation": - Elements."HIV-negative B.DE117 Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of HIV-negative B.DE117 */ - -/* -@dataElement: HIV.B.DE118 - Unknown -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client has unknown HIV status -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unknown B.DE118": - exists "Unknown B.DE118 Condition" - or exists "Unknown B.DE118 Observation" -define "Unknown B.DE118 Condition": - Elements."Unknown B.DE118 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Unknown B.DE118 Observation": - Elements."Unknown B.DE118 Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Unknown B.DE118 */ - /* @dataElement: HIV.B.DE121 - Probable route of transmission @activity: HIV.B8 Provide post-test counselling @@ -3117,73 +3162,6 @@ define "Date of baseline CD4 count test D.DE368 Value": return O.value /* End of Date of baseline CD4 count test D.DE368 */ -/* -@dataElement: HIV.D.DE383 - Time to start ART -@activity: HIV.D8 Capture or update client history -@description: Time from HIV diagnosis to when client started ART -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Time to start ART": - exists "Time to start ART Observation" -define "Time to start ART Observation": - Elements."Time to start ART Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Time to start ART */ - -/* -@dataElement: HIV.D.DE384 - Within 7 days of HIV diagnosis -@activity: HIV.D8 Capture or update client history -@description: Client started ART within 7 days -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Within 7 days of HIV diagnosis": - exists "Within 7 days of HIV diagnosis Condition" - or exists "Within 7 days of HIV diagnosis Observation" -define "Within 7 days of HIV diagnosis Condition": - Elements."Within 7 days of HIV diagnosis Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Within 7 days of HIV diagnosis Observation": - Elements."Within 7 days of HIV diagnosis Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Within 7 days of HIV diagnosis */ - -/* -@dataElement: HIV.D.DE385 - Within 30 days of HIV diagnosis -@activity: HIV.D8 Capture or update client history -@description: Client started ART within 30 days of ART initiation (but over 7 days) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Within 30 days of HIV diagnosis": - exists "Within 30 days of HIV diagnosis Condition" - or exists "Within 30 days of HIV diagnosis Observation" -define "Within 30 days of HIV diagnosis Condition": - Elements."Within 30 days of HIV diagnosis Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Within 30 days of HIV diagnosis Observation": - Elements."Within 30 days of HIV diagnosis Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Within 30 days of HIV diagnosis */ - -/* -@dataElement: HIV.D.DE386 - Within 90 days of HIV diagnosis -@activity: HIV.D8 Capture or update client history -@description: Client started ART within 90 days of ART initiation (but over 30 days) -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Within 90 days of HIV diagnosis": - exists "Within 90 days of HIV diagnosis Condition" - or exists "Within 90 days of HIV diagnosis Observation" -define "Within 90 days of HIV diagnosis Condition": - Elements."Within 90 days of HIV diagnosis Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Within 90 days of HIV diagnosis Observation": - Elements."Within 90 days of HIV diagnosis Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Within 90 days of HIV diagnosis */ - /* @dataElement: HIV.D.DE387 - Viral load test result @activity: HIV.D20 Diagnostics @@ -5276,6 +5254,11 @@ define "On TPT regimen": define "TPT regimen": Elements."TPT regimen" MS where MS.effective.toInterval() during "Measurement Period" + +define "TPT regimen type": + "TPT regimen" MS + return Common.ExtractMedicationCode(MS.medication) + /* End of TPT regimen type */ /* @@ -6370,9 +6353,16 @@ 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": - exists(Elements."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" - "LTFU Days")) + + +define "Is Lost to follow-up": + exists("Lost to follow-up") + /* End of Lost to follow-up */ /* @@ -6565,11 +6555,17 @@ define "At elevated risk for HIV acquisition PRV.DE1": @description: HIV prevention intervention that client accessed */ // TODO: Replace placeholder with relevant CQL logic +//(including PrEP, OAMT, NSP, STI services, VMMC) define "HIV prevention intervention": - exists "HIV prevention intervention Observation" -define "HIV prevention intervention Observation": - Elements."HIV prevention intervention Observation" O - where O.effective.toInterval() during "Measurement Period" + List{ + if "PrEP service" then 'PrEP' else null, + if "OAMT" then 'OAMT' else null, + if "NSP" then 'NSP' else null, + if "STI services" then 'STI services' else null, + if "VMMC" then 'VMMC' else null, + if "Other PRV.DE8" then 'other prevention' else null + } + /* End of HIV prevention intervention */ /* From bb5cb194cc5bffb001910c6dedd06eb44faa0cc0 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Mon, 5 Aug 2024 00:08:23 -0700 Subject: [PATCH 06/13] Additional updates to resources --- input/cql/HIVB9DTLogic.cql | 6 ++-- input/cql/HIVConcepts.cql | 4 +-- input/cql/HIVElements.cql | 8 ++--- input/cql/HIVEncounterElements.cql | 44 +--------------------------- input/fsh/libraries/HIVB9DTLogic.fsh | 2 +- input/fsh/measures/HIVIND11.fsh | 2 +- input/fsh/measures/HIVIND12.fsh | 2 +- input/fsh/measures/HIVIND13.fsh | 8 +++-- input/fsh/measures/HIVIND14.fsh | 4 +-- input/fsh/measures/HIVIND15.fsh | 8 +++-- input/fsh/measures/HIVIND16.fsh | 8 +++-- input/fsh/measures/HIVIND18.fsh | 22 ++------------ input/fsh/measures/HIVIND19.fsh | 22 ++------------ input/fsh/measures/HIVIND2.fsh | 18 ++---------- input/fsh/measures/HIVIND20.fsh | 24 +++------------ input/fsh/measures/HIVIND21.fsh | 22 ++------------ input/fsh/measures/HIVIND22.fsh | 8 +++-- input/fsh/measures/HIVIND24.fsh | 8 +++-- input/fsh/measures/HIVIND25.fsh | 8 +++-- input/fsh/measures/HIVIND27.fsh | 18 ++---------- input/fsh/measures/HIVIND28.fsh | 20 +++---------- input/fsh/measures/HIVIND29.fsh | 10 +++++-- input/fsh/measures/HIVIND3.fsh | 18 ++---------- input/fsh/measures/HIVIND30.fsh | 18 ++---------- input/fsh/measures/HIVIND31.fsh | 8 +++-- input/fsh/measures/HIVIND32.fsh | 8 +++-- input/fsh/measures/HIVIND33.fsh | 8 +++-- input/fsh/measures/HIVIND34.fsh | 10 +++++-- input/fsh/measures/HIVIND35.fsh | 8 +++-- input/fsh/measures/HIVIND37.fsh | 2 +- input/fsh/measures/HIVIND38.fsh | 2 +- input/fsh/measures/HIVIND39.fsh | 2 +- input/fsh/measures/HIVIND4.fsh | 18 ++---------- input/fsh/measures/HIVIND40.fsh | 2 +- input/fsh/measures/HIVIND41.fsh | 4 +-- input/fsh/measures/HIVIND42.fsh | 2 +- input/fsh/measures/HIVIND43.fsh | 2 +- input/fsh/measures/HIVIND44.fsh | 8 +++-- input/fsh/measures/HIVIND45.fsh | 8 +++-- input/fsh/measures/HIVIND46.fsh | 2 +- input/fsh/measures/HIVIND47.fsh | 2 +- input/fsh/measures/HIVIND48.fsh | 2 +- input/fsh/measures/HIVIND49.fsh | 2 +- input/fsh/measures/HIVIND5.fsh | 18 ++---------- input/fsh/measures/HIVIND50.fsh | 4 +-- input/fsh/measures/HIVIND51.fsh | 4 +-- input/fsh/measures/HIVIND52.fsh | 2 +- input/fsh/measures/HIVIND53.fsh | 2 +- input/fsh/measures/HIVIND54.fsh | 4 +-- input/fsh/measures/HIVIND55.fsh | 2 +- input/fsh/measures/HIVIND56.fsh | 4 +-- input/fsh/measures/HIVIND57.fsh | 2 +- input/fsh/measures/HIVIND58.fsh | 2 +- input/fsh/measures/HIVIND59.fsh | 2 +- input/fsh/measures/HIVIND6.fsh | 18 ++---------- input/fsh/measures/HIVIND60.fsh | 2 +- input/fsh/measures/HIVIND61.fsh | 2 +- input/fsh/measures/HIVIND62.fsh | 2 +- input/fsh/measures/HIVIND63.fsh | 2 +- input/fsh/measures/HIVIND64.fsh | 2 +- input/fsh/measures/HIVIND65.fsh | 2 +- input/fsh/measures/HIVIND66.fsh | 2 +- input/fsh/measures/HIVIND67.fsh | 2 +- input/fsh/measures/HIVIND68.fsh | 2 +- input/fsh/measures/HIVIND69.fsh | 2 +- input/fsh/measures/HIVIND7.fsh | 18 ++---------- input/fsh/measures/HIVIND70.fsh | 2 +- input/fsh/measures/HIVIND71.fsh | 2 +- input/fsh/measures/HIVIND72.fsh | 2 +- input/fsh/measures/HIVIND73.fsh | 2 +- input/fsh/measures/HIVIND74.fsh | 2 +- input/fsh/measures/HIVIND75.fsh | 2 +- input/fsh/measures/HIVIND76.fsh | 2 +- input/fsh/measures/HIVIND77.fsh | 2 +- input/fsh/measures/HIVIND78.fsh | 2 +- input/fsh/measures/HIVIND79.fsh | 2 +- input/fsh/measures/HIVIND8.fsh | 18 ++---------- input/fsh/measures/HIVIND80.fsh | 2 +- input/fsh/measures/HIVIND81.fsh | 2 +- input/fsh/measures/HIVIND82.fsh | 2 +- input/fsh/measures/HIVIND83.fsh | 2 +- input/fsh/measures/HIVIND84.fsh | 2 +- input/fsh/measures/HIVIND85.fsh | 2 +- input/fsh/measures/HIVIND86.fsh | 2 +- input/fsh/measures/HIVIND87.fsh | 2 +- input/fsh/measures/HIVIND88.fsh | 2 +- input/fsh/measures/HIVIND89.fsh | 2 +- input/fsh/measures/HIVIND9.fsh | 2 +- input/fsh/measures/HIVIND90.fsh | 2 +- input/fsh/measures/HIVIND91.fsh | 2 +- input/fsh/measures/HIVIND92.fsh | 2 +- input/fsh/measures/HIVIND93.fsh | 2 +- input/fsh/measures/HIVIND94.fsh | 2 +- input/fsh/measures/HIVIND95.fsh | 2 +- input/fsh/measures/HIVIND96.fsh | 2 +- 95 files changed, 209 insertions(+), 379 deletions(-) diff --git a/input/cql/HIVB9DTLogic.cql b/input/cql/HIVB9DTLogic.cql index baf76772ee..8f385465d4 100644 --- a/input/cql/HIVB9DTLogic.cql +++ b/input/cql/HIVB9DTLogic.cql @@ -1,5 +1,5 @@ /* -@DecisionID: HIV.B9.DT +@DecisionID: HIV.B9.DT Logic @BusinessRule: HIV restesting recommendations @Trigger: HIV.B9 Determine recommended services @HitPolicy: Rule order @@ -79,7 +79,7 @@ define "HIV burden of setting is low HIV burden setting": @pseudocode: "Key population member" = TRUE */ define "Key population member": - exists(Elements."Key population member* B.DE49 Observation" O + exists(Elements."Key population member B.DE49 Observation" O where O.value is true) /* @@ -95,7 +95,7 @@ define "Currently pregnant": */ define "TB diagnosis result is diagnosed TB": exists(Elements."TB diagnosis result Observation" O - where O.value ~ HCx."Diagnosed TB" or) + where O.value ~ HCx."Diagnosed TB") /* @input: "Presumptive TB" diff --git a/input/cql/HIVConcepts.cql b/input/cql/HIVConcepts.cql index 9d68baf5a4..9348a9bfe4 100644 --- a/input/cql/HIVConcepts.cql +++ b/input/cql/HIVConcepts.cql @@ -312,8 +312,8 @@ code "Facility-level testing": 'HIV.B.DE17' from "HIVConcepts" display 'Facility code "Currently pregnant - HIV.B.DE29": 'HIV.B.DE29' from "HIVConcepts" display 'Currently pregnant' code "Breastfeeding - HIV.B.DE32": 'HIV.B.DE32' from "HIVConcepts" display 'Breastfeeding' code "Partner HIV status reported": 'HIV.B.DE33' from "HIVConcepts" display 'Partner HIV status reported' -code "HIV-positive - HIV.B.DE34": 'HIV.B.DE34' from "HIVConcepts" display 'HIV-positive' -code "HIV-negative - HIV.B.DE35": 'HIV.B.DE35' from "HIVConcepts" display 'HIV-negative' +code "HIV-positive": 'HIV.B.DE34' from "HIVConcepts" display 'HIV-positive' +code "HIV-negative": 'HIV.B.DE35' from "HIVConcepts" display 'HIV-negative' code "Unknown - HIV.B.DE36": 'HIV.B.DE36' from "HIVConcepts" display 'Unknown' code "Key population member - HIV.B.DE49": 'HIV.B.DE49' from "HIVConcepts" display 'Key population member*' code "Key population member type - HIV.B.DE50": 'HIV.B.DE50' from "HIVConcepts" display 'Key population member type*' diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index c2c44b0fad..75a6ff7b62 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -519,11 +519,11 @@ define "HIV-positive B.DE34": exists "HIV-positive B.DE34 Condition" or exists "HIV-positive B.DE34 Observation" define "HIV-positive B.DE34 Condition": - [Condition: Concepts."HIV-positive - HIV.B.DE34"] + [Condition: Concepts."HIV-positive"] define "HIV-positive B.DE34 Observation": "Partner HIV status reported Observation" O where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."HIV-positive - HIV.B.DE34" + and O.value ~ Concepts."HIV-positive" /* End of HIV-positive B.DE34 */ /* @@ -536,11 +536,11 @@ define "HIV-negative B.DE35": exists "HIV-negative B.DE35 Condition" or exists "HIV-negative B.DE35 Observation" define "HIV-negative B.DE35 Condition": - [Condition: Concepts."HIV-negative - HIV.B.DE35"] + [Condition: Concepts."HIV-negative"] define "HIV-negative B.DE35 Observation": "Partner HIV status reported Observation" O where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."HIV-negative - HIV.B.DE35" + and O.value ~ Concepts."HIV-negative" /* End of HIV-negative B.DE35 */ /* diff --git a/input/cql/HIVEncounterElements.cql b/input/cql/HIVEncounterElements.cql index dc923a5b33..be115ac718 100644 --- a/input/cql/HIVEncounterElements.cql +++ b/input/cql/HIVEncounterElements.cql @@ -1042,13 +1042,7 @@ define "HIV-inconclusive Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis. */ -// TODO: Replace placeholder with relevant CQL logic -define "HIV status": - exists "HIV status Observation" -define "HIV status Observation": - Elements."HIV status Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today + /* End of HIV status */ /* @@ -1069,42 +1063,6 @@ define "HIV-positive B.DE116 Observation": or O.effective.toInterval() starts on or before Today /* End of HIV-positive B.DE116 */ -/* -@dataElement: HIV.B.DE117 - HIV-negative -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client is HIV-negative -*/ -// TODO: Replace placeholder with relevant CQL logic -define "HIV-negative B.DE117": - exists "HIV-negative B.DE117 Condition" - or exists "HIV-negative B.DE117 Observation" -define "HIV-negative B.DE117 Condition": - Elements."HIV-negative B.DE117 Condition" C - where C.prevalenceInterval() starts on or before Today -define "HIV-negative B.DE117 Observation": - Elements."HIV-negative B.DE117 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of HIV-negative B.DE117 */ - -/* -@dataElement: HIV.B.DE118 - Unknown -@activity: HIV.B7 Test for HIV using testing algorithm -@description: Client has unknown HIV status -*/ -// TODO: Replace placeholder with relevant CQL logic -define "Unknown B.DE118": - exists "Unknown B.DE118 Condition" - or exists "Unknown B.DE118 Observation" -define "Unknown B.DE118 Condition": - Elements."Unknown B.DE118 Condition" C - where C.prevalenceInterval() starts on or before Today -define "Unknown B.DE118 Observation": - Elements."Unknown B.DE118 Observation" O - where O.encounter.references(EncounterId) - or O.effective.toInterval() starts on or before Today -/* End of Unknown B.DE118 */ - /* @dataElement: HIV.B.DE141 - Partner virally suppressed on ART @activity: HIV.B6 Capture or update client history diff --git a/input/fsh/libraries/HIVB9DTLogic.fsh b/input/fsh/libraries/HIVB9DTLogic.fsh index 291085bcac..77dd3271c1 100644 --- a/input/fsh/libraries/HIVB9DTLogic.fsh +++ b/input/fsh/libraries/HIVB9DTLogic.fsh @@ -7,7 +7,7 @@ Usage: #definition * meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" * meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" * meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" -* url = "http://smart.who.int/HIV/Library/HIVB2DTLogic" +* url = "http://smart.who.int/HIV/Library/HIVB9DTLogic" * extension[+] * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable diff --git a/input/fsh/measures/HIVIND11.fsh b/input/fsh/measures/HIVIND11.fsh index 52e3efb1ab..d9ecdde4bc 100644 --- a/input/fsh/measures/HIVIND11.fsh +++ b/input/fsh/measures/HIVIND11.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.11 OAMT coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND11" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND11" * title = "HIV.IND.11 OAMT coverage" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND12.fsh b/input/fsh/measures/HIVIND12.fsh index c22b1b8e23..c39086e8dd 100644 --- a/input/fsh/measures/HIVIND12.fsh +++ b/input/fsh/measures/HIVIND12.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.12 Total person-years on OAMT" * url = "http://smart.who.int/HIV/Measure/HIVIND12" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND12" * title = "HIV.IND.12 Total person-years on OAMT" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND13.fsh b/input/fsh/measures/HIVIND13.fsh index 218ea6d2ba..9d43f8b464 100644 --- a/input/fsh/measures/HIVIND13.fsh +++ b/input/fsh/measures/HIVIND13.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.13 OAMT minimum duration" * url = "http://smart.who.int/HIV/Measure/HIVIND13" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND13" * title = "HIV.IND.13 OAMT minimum duration" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.13 OAMT minimum duration" * description = "Number of people in cohort retained in OAMT for at least six months" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.13.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND14.fsh b/input/fsh/measures/HIVIND14.fsh index bbcaf24978..71cd9737cb 100644 --- a/input/fsh/measures/HIVIND14.fsh +++ b/input/fsh/measures/HIVIND14.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.14 OAMT minimum dose" * url = "http://smart.who.int/HIV/Measure/HIVIND14" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND14" * title = "HIV.IND.14 OAMT minimum dose" * publisher = "World Health Organization (WHO)" @@ -29,7 +29,7 @@ Title: "HIV.IND.14 OAMT minimum dose" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.14.NUM" - * description = "Number of people, at a specified date, maintained on methadone or buprenorphine receiving recommended minimum maintenance dose (WHO guidance recommends doses of ≥60 mg of methadone or ≥8 mg of buprenorphine*)" + * description = "Number of people, at a specified date, maintained on methadone or buprenorphine receiving recommended minimum maintenance dose (WHO guidance recommends doses of ≥60 mg of methadone or ≥8 mg of buprenorphine)" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND15.fsh b/input/fsh/measures/HIVIND15.fsh index 0e70756183..a14539c3f7 100644 --- a/input/fsh/measures/HIVIND15.fsh +++ b/input/fsh/measures/HIVIND15.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.15 VMMC scale-up" * url = "http://smart.who.int/HIV/Measure/HIVIND15" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND15" * title = "HIV.IND.15 VMMC scale-up" * publisher = "World Health Organization (WHO)" @@ -35,4 +35,8 @@ Title: "HIV.IND.15 VMMC scale-up" * description = "Measure Observation" * code = $measure-population#measure-observation "Measure Observation" * criteria.language = #text/cql-identifier - * criteria.expression = "Measure Observation" \ No newline at end of file + * criteria.expression = "Measure Observation" + * stratifier[+] + * id = "HIV.IND.15.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND16.fsh b/input/fsh/measures/HIVIND16.fsh index 6daa23e870..bc1a1fe10c 100644 --- a/input/fsh/measures/HIVIND16.fsh +++ b/input/fsh/measures/HIVIND16.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.16 VMMC adverse events" * url = "http://smart.who.int/HIV/Measure/HIVIND16" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND16" * title = "HIV.IND.16 VMMC adverse events" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.16 VMMC adverse events" * description = "Number of people experiencing at least one moderate or severe adverse event during or following circumcision surgery during the reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.16.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND18.fsh b/input/fsh/measures/HIVIND18.fsh index 209a134ec6..6a58a329c1 100644 --- a/input/fsh/measures/HIVIND18.fsh +++ b/input/fsh/measures/HIVIND18.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.18 People living with HIV who know their HIV status (first 95)" * url = "http://smart.who.int/HIV/Measure/HIVIND18" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND18" * title = "HIV.IND.18 People living with HIV who know their HIV status (first 95)" * publisher = "World Health Organization (WHO)" @@ -37,22 +37,6 @@ Title: "HIV.IND.18 People living with HIV who know their HIV status (first 95)" * criteria.language = #text/cql-identifier * criteria.expression = "Measure Observation" * stratifier[+] - * id = "HIV.IND.18.S.AG" + * id = "HIV.IND.18.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.18.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.18.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.18.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" - * stratifier[+] - * id = "HIV.IND.18.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "ANC Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND19.fsh b/input/fsh/measures/HIVIND19.fsh index 8d72d538c9..014f3f9f86 100644 --- a/input/fsh/measures/HIVIND19.fsh +++ b/input/fsh/measures/HIVIND19.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.19 HTS test volume and positivity" * url = "http://smart.who.int/HIV/Measure/HIVIND19" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND19" * title = "HIV.IND.19 HTS test volume and positivity" * publisher = "World Health Organization (WHO)" @@ -34,22 +34,6 @@ Title: "HIV.IND.19 HTS test volume and positivity" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.19.S.AG" + * id = "HIV.IND.19.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.19.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.19.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.19.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" - * stratifier[+] - * id = "HIV.IND.19.S.T" - * criteria.language = #text/cql-identifier - * criteria.expression = "TB Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND2.fsh b/input/fsh/measures/HIVIND2.fsh index a152aff248..0a6a19eeb5 100644 --- a/input/fsh/measures/HIVIND2.fsh +++ b/input/fsh/measures/HIVIND2.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.2 Total PrEP recipients" * url = "http://smart.who.int/HIV/Measure/HIVIND2" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND2" * title = "HIV.IND.2 Total PrEP recipients" * publisher = "World Health Organization (WHO)" @@ -37,18 +37,6 @@ Title: "HIV.IND.2 Total PrEP recipients" * criteria.language = #text/cql-identifier * criteria.expression = "Measure Observation" * stratifier[+] - * id = "HIV.IND.2.S.AG" + * id = "HIV.IND.2.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.2.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.2.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.2.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND20.fsh b/input/fsh/measures/HIVIND20.fsh index 9857f27a10..daf2f311a9 100644 --- a/input/fsh/measures/HIVIND20.fsh +++ b/input/fsh/measures/HIVIND20.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.20 Individuals testing positive for HIV" * url = "http://smart.who.int/HIV/Measure/HIVIND20" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND20" * title = "HIV.IND.20 Individuals testing positive for HIV" * publisher = "World Health Organization (WHO)" @@ -29,27 +29,11 @@ Title: "HIV.IND.20 Individuals testing positive for HIV" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.20.NUM" - * description = "Number of people who test HIV-positive in the reporting period and have results returned to them*" + * description = "Number of people who test HIV-positive in the reporting period and have results returned to them" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.20.S.AG" + * id = "HIV.IND.20.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.20.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.20.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.20.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" - * stratifier[+] - * id = "HIV.IND.20.S.T" - * criteria.language = #text/cql-identifier - * criteria.expression = "TB Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND21.fsh b/input/fsh/measures/HIVIND21.fsh index cd7cb39f5a..d51089eb89 100644 --- a/input/fsh/measures/HIVIND21.fsh +++ b/input/fsh/measures/HIVIND21.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.21 Linkage to ART" * url = "http://smart.who.int/HIV/Measure/HIVIND21" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND21" * title = "HIV.IND.21 Linkage to ART" * publisher = "World Health Organization (WHO)" @@ -34,22 +34,6 @@ Title: "HIV.IND.21 Linkage to ART" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.21.S.AG" + * id = "HIV.IND.21.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.21.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.21.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.21.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" - * stratifier[+] - * id = "HIV.IND.21.S.T" - * criteria.language = #text/cql-identifier - * criteria.expression = "TB Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND22.fsh b/input/fsh/measures/HIVIND22.fsh index 39bb01fedc..ebff9d7eeb 100644 --- a/input/fsh/measures/HIVIND22.fsh +++ b/input/fsh/measures/HIVIND22.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.22 HTS partner services" * url = "http://smart.who.int/HIV/Measure/HIVIND22" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND22" * title = "HIV.IND.22 HTS partner services" * publisher = "World Health Organization (WHO)" @@ -35,4 +35,8 @@ Title: "HIV.IND.22 HTS partner services" * description = "Measure Observation" * code = $measure-population#measure-observation "Measure Observation" * criteria.language = #text/cql-identifier - * criteria.expression = "Measure Observation" \ No newline at end of file + * criteria.expression = "Measure Observation" + * stratifier[+] + * id = "HIV.IND.22.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND24.fsh b/input/fsh/measures/HIVIND24.fsh index 2c1176fb24..90f31c3d85 100644 --- a/input/fsh/measures/HIVIND24.fsh +++ b/input/fsh/measures/HIVIND24.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.24 HTS linkage to prevention" * url = "http://smart.who.int/HIV/Measure/HIVIND24" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND24" * title = "HIV.IND.24 HTS linkage to prevention" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.24 HTS linkage to prevention" * description = "Number of people who receive an HIV prevention intervention within a defined period after receiving a negative HIV test result" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.24.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND25.fsh b/input/fsh/measures/HIVIND25.fsh index 021b557b8d..cdb2f02be6 100644 --- a/input/fsh/measures/HIVIND25.fsh +++ b/input/fsh/measures/HIVIND25.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.25 HIV retesting coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND25" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND25" * title = "HIV.IND.25 HIV retesting coverage" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.25 HIV retesting coverage" * description = "Number of individuals who tested HIV-negative assessed to be at elevated risk for HIV acquisition who had another HIV test within a defined period after previous test." * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.25.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND27.fsh b/input/fsh/measures/HIVIND27.fsh index 902e446dc1..e9cb15ac70 100644 --- a/input/fsh/measures/HIVIND27.fsh +++ b/input/fsh/measures/HIVIND27.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.27 People living with HIV on ART" * url = "http://smart.who.int/HIV/Measure/HIVIND27" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND27" * title = "HIV.IND.27 People living with HIV on ART" * publisher = "World Health Organization (WHO)" @@ -37,18 +37,6 @@ Title: "HIV.IND.27 People living with HIV on ART" * criteria.language = #text/cql-identifier * criteria.expression = "Measure Observation" * stratifier[+] - * id = "HIV.IND.27.S.AG" + * id = "HIV.IND.27.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.27.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.27.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.27.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND28.fsh b/input/fsh/measures/HIVIND28.fsh index ce9df48d1a..8c05f54f4c 100644 --- a/input/fsh/measures/HIVIND28.fsh +++ b/input/fsh/measures/HIVIND28.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.28 Total attrition from ART" * url = "http://smart.who.int/HIV/Measure/HIVIND28" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND28" * title = "HIV.IND.28 Total attrition from ART" * publisher = "World Health Organization (WHO)" @@ -29,23 +29,11 @@ Title: "HIV.IND.28 Total attrition from ART" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.28.NUM" - * description = "*Number of people living with HIV reported on ART at the end of the last reporting period | plus | Number of people living with HIV newly initiated on ART during the current reporting period | minus | Total number of people living with HIV on ART at the end of the current reporting period" + * description = "Number of people living with HIV reported on ART at the end of the last reporting period | plus | Number of people living with HIV newly initiated on ART during the current reporting period | minus | Total number of people living with HIV on ART at the end of the current reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.28.S.AG" + * id = "HIV.IND.28.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.28.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.28.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.28.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND29.fsh b/input/fsh/measures/HIVIND29.fsh index d77d0a0197..8ca84359c8 100644 --- a/input/fsh/measures/HIVIND29.fsh +++ b/input/fsh/measures/HIVIND29.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.29 People living with HIV on ART who have suppressed viral load" * url = "http://smart.who.int/HIV/Measure/HIVIND29" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND29" * title = "HIV.IND.29 People living with HIV on ART who have suppressed viral load" * publisher = "World Health Organization (WHO)" @@ -29,7 +29,11 @@ Title: "HIV.IND.29 People living with HIV on ART who have suppressed viral load" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.29.NUM" - * description = "Number of people living with HIV on ART for at least six months and with at least one routine VL test result who have virological suppression (<1000 copies/mL*) during the reporting period." + * description = "Number of people living with HIV on ART for at least six months and with at least one routine VL test result who have virological suppression (<1000 copies/mL) during the reporting period." * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.29.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND3.fsh b/input/fsh/measures/HIVIND3.fsh index 6983ceae34..1d90bc7085 100644 --- a/input/fsh/measures/HIVIND3.fsh +++ b/input/fsh/measures/HIVIND3.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.3 PrEP coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND3" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND3" * title = "HIV.IND.3 PrEP coverage" * publisher = "World Health Organization (WHO)" @@ -34,18 +34,6 @@ Title: "HIV.IND.3 PrEP coverage" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.3.S.AG" + * id = "HIV.IND.3.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.3.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.3.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.3.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND30.fsh b/input/fsh/measures/HIVIND30.fsh index 68418bc68d..a97e0a9788 100644 --- a/input/fsh/measures/HIVIND30.fsh +++ b/input/fsh/measures/HIVIND30.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.30 New ART patients" * url = "http://smart.who.int/HIV/Measure/HIVIND30" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND30" * title = "HIV.IND.30 New ART patients" * publisher = "World Health Organization (WHO)" @@ -37,18 +37,6 @@ Title: "HIV.IND.30 New ART patients" * criteria.language = #text/cql-identifier * criteria.expression = "Measure Observation" * stratifier[+] - * id = "HIV.IND.30.S.AG" + * id = "HIV.IND.30.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.30.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.30.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.30.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND31.fsh b/input/fsh/measures/HIVIND31.fsh index f72dee06fe..bff4f9de2c 100644 --- a/input/fsh/measures/HIVIND31.fsh +++ b/input/fsh/measures/HIVIND31.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.31 Late ART initiation" * url = "http://smart.who.int/HIV/Measure/HIVIND31" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND31" * title = "HIV.IND.31 Late ART initiation" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.31 Late ART initiation" * description = "Number of people living with HIV initiating ART during the reporting period with a baseline CD4 count of <200 cells/mm3" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.31.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND32.fsh b/input/fsh/measures/HIVIND32.fsh index 0fc531239d..a63abcde08 100644 --- a/input/fsh/measures/HIVIND32.fsh +++ b/input/fsh/measures/HIVIND32.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.32 Viral load testing coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND32" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND32" * title = "HIV.IND.32 Viral load testing coverage" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.32 Viral load testing coverage" * description = "Number of people living with HIV on ART with at least one routine VL test result during the reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.32.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND33.fsh b/input/fsh/measures/HIVIND33.fsh index f549373972..0d945b8538 100644 --- a/input/fsh/measures/HIVIND33.fsh +++ b/input/fsh/measures/HIVIND33.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.33 Early viral load testing (at six months)" * url = "http://smart.who.int/HIV/Measure/HIVIND33" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND33" * title = "HIV.IND.33 Early viral load testing (at six months)" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.33 Early viral load testing (at six months)" * description = "Number of people living with HIV on ART who were eligible for VL monitoring at six months after initiation of ART during the reporting period and who had a VL test performed and result reviewed by six months after ART initiation" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.33.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND34.fsh b/input/fsh/measures/HIVIND34.fsh index 6ad6192ff8..9f1709ac67 100644 --- a/input/fsh/measures/HIVIND34.fsh +++ b/input/fsh/measures/HIVIND34.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.34 Appropriate second viral load test after adherence counsellin * url = "http://smart.who.int/HIV/Measure/HIVIND34" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND34" * title = "HIV.IND.34 Appropriate second viral load test after adherence counselling" * publisher = "World Health Organization (WHO)" @@ -29,7 +29,11 @@ Title: "HIV.IND.34 Appropriate second viral load test after adherence counsellin * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.34.NUM" - * description = "Number of people living with HIV on ART who received a follow-up VL test three months after a VL test result of ≥1000 copies/mL during the reporting period*" + * description = "Number of people living with HIV on ART who received a follow-up VL test three months after a VL test result of ≥1000 copies/mL during the reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.34.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND35.fsh b/input/fsh/measures/HIVIND35.fsh index 422bbff6e8..168d9f667b 100644 --- a/input/fsh/measures/HIVIND35.fsh +++ b/input/fsh/measures/HIVIND35.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.35 ARV toxicity prevalence" * url = "http://smart.who.int/HIV/Measure/HIVIND35" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND35" * title = "HIV.IND.35 ARV toxicity prevalence" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.35 ARV toxicity prevalence" * description = "Number of ART patients who have stopped treatment or switched regimen due to toxicity in the reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.35.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND37.fsh b/input/fsh/measures/HIVIND37.fsh index 1a4ab0b67c..860a8c5dda 100644 --- a/input/fsh/measures/HIVIND37.fsh +++ b/input/fsh/measures/HIVIND37.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.37 Viral suppression at labour and delivery" * url = "http://smart.who.int/HIV/Measure/HIVIND37" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND37" * title = "HIV.IND.37 Viral suppression at labour and delivery" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND38.fsh b/input/fsh/measures/HIVIND38.fsh index 9cf6006245..fb8ab42c57 100644 --- a/input/fsh/measures/HIVIND38.fsh +++ b/input/fsh/measures/HIVIND38.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.38 Early infant diagnosis (EID) coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND38" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND38" * title = "HIV.IND.38 Early infant diagnosis (EID) coverage" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND39.fsh b/input/fsh/measures/HIVIND39.fsh index af2f99bbb1..6f97fe8efa 100644 --- a/input/fsh/measures/HIVIND39.fsh +++ b/input/fsh/measures/HIVIND39.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.39 Infant ARV prophylaxis coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND39" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND39" * title = "HIV.IND.39 Infant ARV prophylaxis coverage" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND4.fsh b/input/fsh/measures/HIVIND4.fsh index 459f13f22e..832eaa6ac3 100644 --- a/input/fsh/measures/HIVIND4.fsh +++ b/input/fsh/measures/HIVIND4.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.4 Volume of PrEP prescribed" * url = "http://smart.who.int/HIV/Measure/HIVIND4" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND4" * title = "HIV.IND.4 Volume of PrEP prescribed" * publisher = "World Health Organization (WHO)" @@ -37,18 +37,6 @@ Title: "HIV.IND.4 Volume of PrEP prescribed" * criteria.language = #text/cql-identifier * criteria.expression = "Measure Observation" * stratifier[+] - * id = "HIV.IND.4.S.AG" + * id = "HIV.IND.4.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.4.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.4.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.4.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND40.fsh b/input/fsh/measures/HIVIND40.fsh index 781c0c26b9..28fcfd9dd9 100644 --- a/input/fsh/measures/HIVIND40.fsh +++ b/input/fsh/measures/HIVIND40.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.40 ART coverage in pregnant women" * url = "http://smart.who.int/HIV/Measure/HIVIND40" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND40" * title = "HIV.IND.40 ART coverage in pregnant women" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND41.fsh b/input/fsh/measures/HIVIND41.fsh index b9212708ae..0188c8aa90 100644 --- a/input/fsh/measures/HIVIND41.fsh +++ b/input/fsh/measures/HIVIND41.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.41 ART coverage in breastfeeding mothers" * url = "http://smart.who.int/HIV/Measure/HIVIND41" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND41" * title = "HIV.IND.41 ART coverage in breastfeeding mothers" * publisher = "World Health Organization (WHO)" @@ -29,7 +29,7 @@ Title: "HIV.IND.41 ART coverage in breastfeeding mothers" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.41.NUM" - * description = "Number of HIV-exposed breastfeeding infants whose mothers are receiving ART at 12 months (and 24 months*) postpartum" + * description = "Number of HIV-exposed breastfeeding infants whose mothers are receiving ART at 12 months (and 24 months) postpartum" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND42.fsh b/input/fsh/measures/HIVIND42.fsh index 208a9ee49c..d41f567719 100644 --- a/input/fsh/measures/HIVIND42.fsh +++ b/input/fsh/measures/HIVIND42.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.42 Final outcome of PMTCT" * url = "http://smart.who.int/HIV/Measure/HIVIND42" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND42" * title = "HIV.IND.42 Final outcome of PMTCT" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND43.fsh b/input/fsh/measures/HIVIND43.fsh index 7b5d31de43..6c7f48ec7d 100644 --- a/input/fsh/measures/HIVIND43.fsh +++ b/input/fsh/measures/HIVIND43.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.43 HIV prevalence among women attending ANC" * url = "http://smart.who.int/HIV/Measure/HIVIND43" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND43" * title = "HIV.IND.43 HIV prevalence among women attending ANC" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND44.fsh b/input/fsh/measures/HIVIND44.fsh index c20fa72d00..1d98c96fcd 100644 --- a/input/fsh/measures/HIVIND44.fsh +++ b/input/fsh/measures/HIVIND44.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.44 TPT initiation" * url = "http://smart.who.int/HIV/Measure/HIVIND44" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND44" * title = "HIV.IND.44 TPT initiation" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.44 TPT initiation" * description = "Number of ART patients who initiated TPT during the reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.44.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND45.fsh b/input/fsh/measures/HIVIND45.fsh index 9f349f6b72..59026b1b92 100644 --- a/input/fsh/measures/HIVIND45.fsh +++ b/input/fsh/measures/HIVIND45.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.45 TPT completion" * url = "http://smart.who.int/HIV/Measure/HIVIND45" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND45" * title = "HIV.IND.45 TPT completion" * publisher = "World Health Organization (WHO)" @@ -32,4 +32,8 @@ Title: "HIV.IND.45 TPT completion" * description = "Number of ART patients who completed a course of TPT during the reporting period" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier - * criteria.expression = "Numerator" \ No newline at end of file + * criteria.expression = "Numerator" + * stratifier[+] + * id = "HIV.IND.45.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND46.fsh b/input/fsh/measures/HIVIND46.fsh index b7874ddb8f..9bcf8ec88a 100644 --- a/input/fsh/measures/HIVIND46.fsh +++ b/input/fsh/measures/HIVIND46.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.46 TB diagnostic testing type" * url = "http://smart.who.int/HIV/Measure/HIVIND46" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND46" * title = "HIV.IND.46 TB diagnostic testing type" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND47.fsh b/input/fsh/measures/HIVIND47.fsh index a2120a13b8..36776cfd19 100644 --- a/input/fsh/measures/HIVIND47.fsh +++ b/input/fsh/measures/HIVIND47.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.47 People living with HIV with active TB disease" * url = "http://smart.who.int/HIV/Measure/HIVIND47" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND47" * title = "HIV.IND.47 People living with HIV with active TB disease" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND48.fsh b/input/fsh/measures/HIVIND48.fsh index f34ba370fc..a3c04fc470 100644 --- a/input/fsh/measures/HIVIND48.fsh +++ b/input/fsh/measures/HIVIND48.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.48 TB screening coverage among new ART patients" * url = "http://smart.who.int/HIV/Measure/HIVIND48" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND48" * title = "HIV.IND.48 TB screening coverage among new ART patients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND49.fsh b/input/fsh/measures/HIVIND49.fsh index 2f441635ea..d16db261fe 100644 --- a/input/fsh/measures/HIVIND49.fsh +++ b/input/fsh/measures/HIVIND49.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.49 TB symptom-screened positive among new ART patients" * url = "http://smart.who.int/HIV/Measure/HIVIND49" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND49" * title = "HIV.IND.49 TB symptom-screened positive among new ART patients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND5.fsh b/input/fsh/measures/HIVIND5.fsh index 93aafaa0f3..18c0664cea 100644 --- a/input/fsh/measures/HIVIND5.fsh +++ b/input/fsh/measures/HIVIND5.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.5 Number of PEP recipients" * url = "http://smart.who.int/HIV/Measure/HIVIND5" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND5" * title = "HIV.IND.5 Number of PEP recipients" * publisher = "World Health Organization (WHO)" @@ -37,18 +37,6 @@ Title: "HIV.IND.5 Number of PEP recipients" * criteria.language = #text/cql-identifier * criteria.expression = "Measure Observation" * stratifier[+] - * id = "HIV.IND.5.S.AG" + * id = "HIV.IND.5.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.5.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.5.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.5.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND50.fsh b/input/fsh/measures/HIVIND50.fsh index 9eb9e5be3f..1e5403903b 100644 --- a/input/fsh/measures/HIVIND50.fsh +++ b/input/fsh/measures/HIVIND50.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.50 TB testing among those symptom-screened positive" * url = "http://smart.who.int/HIV/Measure/HIVIND50" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND50" * title = "HIV.IND.50 TB testing among those symptom-screened positive" * publisher = "World Health Organization (WHO)" @@ -29,7 +29,7 @@ Title: "HIV.IND.50 TB testing among those symptom-screened positive" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.50.NUM" - * description = "Number of people living with HIV newly initiated on ART who are investigated for active TB disease with appropriate diagnostic testing*" + * description = "Number of people living with HIV newly initiated on ART who are investigated for active TB disease with appropriate diagnostic testing" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND51.fsh b/input/fsh/measures/HIVIND51.fsh index c4dbf77452..746c2ebfe5 100644 --- a/input/fsh/measures/HIVIND51.fsh +++ b/input/fsh/measures/HIVIND51.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.51 TB diagnosis among those tested for TB" * url = "http://smart.who.int/HIV/Measure/HIVIND51" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND51" * title = "HIV.IND.51 TB diagnosis among those tested for TB" * publisher = "World Health Organization (WHO)" @@ -23,7 +23,7 @@ Title: "HIV.IND.51 TB diagnosis among those tested for TB" * criteria.expression = "Initial Population" * population[denominator] * id = "HIV.IND.51.DEN" - * description = "Number of people living with HIV who newly initiated ART and screened positive for TB symptoms who had appropriate diagnostic testing during the reporting period*" + * description = "Number of people living with HIV who newly initiated ART and screened positive for TB symptoms who had appropriate diagnostic testing during the reporting period" * code = $measure-population#denominator "Denominator" * criteria.language = #text/cql-identifier * criteria.expression = "Denominator" diff --git a/input/fsh/measures/HIVIND52.fsh b/input/fsh/measures/HIVIND52.fsh index 254e5aacdb..dec200f621 100644 --- a/input/fsh/measures/HIVIND52.fsh +++ b/input/fsh/measures/HIVIND52.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.52 TB treatment initiation among diagnosed" * url = "http://smart.who.int/HIV/Measure/HIVIND52" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND52" * title = "HIV.IND.52 TB treatment initiation among diagnosed" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND53.fsh b/input/fsh/measures/HIVIND53.fsh index 302afa4d89..a65a3d1f65 100644 --- a/input/fsh/measures/HIVIND53.fsh +++ b/input/fsh/measures/HIVIND53.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.53 Multi-month ARV dispensing" * url = "http://smart.who.int/HIV/Measure/HIVIND53" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND53" * title = "HIV.IND.53 Multi-month ARV dispensing" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND54.fsh b/input/fsh/measures/HIVIND54.fsh index 4b8ecb6542..3038189d05 100644 --- a/input/fsh/measures/HIVIND54.fsh +++ b/input/fsh/measures/HIVIND54.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.54 Uptake of DSD ART models among people living with HIV" * url = "http://smart.who.int/HIV/Measure/HIVIND54" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND54" * title = "HIV.IND.54 Uptake of DSD ART models among people living with HIV" * publisher = "World Health Organization (WHO)" @@ -23,7 +23,7 @@ Title: "HIV.IND.54 Uptake of DSD ART models among people living with HIV" * criteria.expression = "Initial Population" * population[denominator] * id = "HIV.IND.54.DEN" - * description = "Number of people on ART newly eligible* for DSD ART models during the reporting period. For facilities with electronic health information systems, it is possible to measure uptake as a proportion of all people living with HIV eligible for DSD. | | No denominator for facilities with paper-based reporting systems" + * description = "Number of people on ART newly eligible for DSD ART models during the reporting period. For facilities with electronic health information systems, it is possible to measure uptake as a proportion of all people living with HIV eligible for DSD. | | No denominator for facilities with paper-based reporting systems" * code = $measure-population#denominator "Denominator" * criteria.language = #text/cql-identifier * criteria.expression = "Denominator" diff --git a/input/fsh/measures/HIVIND55.fsh b/input/fsh/measures/HIVIND55.fsh index 77c1b162e8..c64c63bf7f 100644 --- a/input/fsh/measures/HIVIND55.fsh +++ b/input/fsh/measures/HIVIND55.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.55 Coverage of DSD ART models among people living with HIV on AR * url = "http://smart.who.int/HIV/Measure/HIVIND55" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND55" * title = "HIV.IND.55 Coverage of DSD ART models among people living with HIV on ART" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND56.fsh b/input/fsh/measures/HIVIND56.fsh index 3c4645e4b5..cf39042044 100644 --- a/input/fsh/measures/HIVIND56.fsh +++ b/input/fsh/measures/HIVIND56.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.56 Retention in DSD ART models" * url = "http://smart.who.int/HIV/Measure/HIVIND56" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND56" * title = "HIV.IND.56 Retention in DSD ART models" * publisher = "World Health Organization (WHO)" @@ -29,7 +29,7 @@ Title: "HIV.IND.56 Retention in DSD ART models" * criteria.expression = "Denominator" * population[numerator] * id = "HIV.IND.56.NUM" - * description = "Number of people on ART known to be on treatment 12 months after enrolling in a DSD ART model* (also at 24, 36, 48, 60 months, etc. after enrolment in the model)" + * description = "Number of people on ART known to be on treatment 12 months after enrolling in a DSD ART model (also at 24, 36, 48, 60 months, etc. after enrolment in the model)" * code = $measure-population#numerator "Numerator" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND57.fsh b/input/fsh/measures/HIVIND57.fsh index 8ad850f3a9..74d605cd66 100644 --- a/input/fsh/measures/HIVIND57.fsh +++ b/input/fsh/measures/HIVIND57.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.57 Viral suppression among people living with HIV engaged in DSD * url = "http://smart.who.int/HIV/Measure/HIVIND57" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND57" * title = "HIV.IND.57 Viral suppression among people living with HIV engaged in DSD ART models" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND58.fsh b/input/fsh/measures/HIVIND58.fsh index 46e1c03983..2be0672fe5 100644 --- a/input/fsh/measures/HIVIND58.fsh +++ b/input/fsh/measures/HIVIND58.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.58 Syphilis testing coverage, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND58" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND58" * title = "HIV.IND.58 Syphilis testing coverage, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND59.fsh b/input/fsh/measures/HIVIND59.fsh index aa216c1f3b..956474992e 100644 --- a/input/fsh/measures/HIVIND59.fsh +++ b/input/fsh/measures/HIVIND59.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.59 Syphilis testing coverage, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND59" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND59" * title = "HIV.IND.59 Syphilis testing coverage, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND6.fsh b/input/fsh/measures/HIVIND6.fsh index a450eb55fd..9e22d2f1a3 100644 --- a/input/fsh/measures/HIVIND6.fsh +++ b/input/fsh/measures/HIVIND6.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.6 PEP completion" * url = "http://smart.who.int/HIV/Measure/HIVIND6" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND6" * title = "HIV.IND.6 PEP completion" * publisher = "World Health Organization (WHO)" @@ -34,18 +34,6 @@ Title: "HIV.IND.6 PEP completion" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.6.S.AG" + * id = "HIV.IND.6.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.6.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.6.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.6.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND60.fsh b/input/fsh/measures/HIVIND60.fsh index 69f656b416..f4a746c144 100644 --- a/input/fsh/measures/HIVIND60.fsh +++ b/input/fsh/measures/HIVIND60.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.60 Syphilis testing coverage, pregnant women, first ANC visit" * url = "http://smart.who.int/HIV/Measure/HIVIND60" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND60" * title = "HIV.IND.60 Syphilis testing coverage, pregnant women, first ANC visit" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND61.fsh b/input/fsh/measures/HIVIND61.fsh index f9c0623615..55b238533b 100644 --- a/input/fsh/measures/HIVIND61.fsh +++ b/input/fsh/measures/HIVIND61.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.61 Syphilis testing coverage, pregnant women, any ANC visit" * url = "http://smart.who.int/HIV/Measure/HIVIND61" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND61" * title = "HIV.IND.61 Syphilis testing coverage, pregnant women, any ANC visit" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND62.fsh b/input/fsh/measures/HIVIND62.fsh index f3be3d20ea..94d77ef97f 100644 --- a/input/fsh/measures/HIVIND62.fsh +++ b/input/fsh/measures/HIVIND62.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.62 Syphilis test positivity, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND62" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND62" * title = "HIV.IND.62 Syphilis test positivity, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND63.fsh b/input/fsh/measures/HIVIND63.fsh index aa19071ee3..5ec7a1ef03 100644 --- a/input/fsh/measures/HIVIND63.fsh +++ b/input/fsh/measures/HIVIND63.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.63 Syphilis test positivity, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND63" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND63" * title = "HIV.IND.63 Syphilis test positivity, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND64.fsh b/input/fsh/measures/HIVIND64.fsh index fdd9715d62..91e11c4683 100644 --- a/input/fsh/measures/HIVIND64.fsh +++ b/input/fsh/measures/HIVIND64.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.64 Syphilis test positivity, pregnant women, first visit" * url = "http://smart.who.int/HIV/Measure/HIVIND64" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND64" * title = "HIV.IND.64 Syphilis test positivity, pregnant women, first visit" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND65.fsh b/input/fsh/measures/HIVIND65.fsh index 316847d7e2..d5ea47e062 100644 --- a/input/fsh/measures/HIVIND65.fsh +++ b/input/fsh/measures/HIVIND65.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.65 Syphilis test positivity, pregnant women, any visit" * url = "http://smart.who.int/HIV/Measure/HIVIND65" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND65" * title = "HIV.IND.65 Syphilis test positivity, pregnant women, any visit" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND66.fsh b/input/fsh/measures/HIVIND66.fsh index 1ab158a093..33d0a1abc9 100644 --- a/input/fsh/measures/HIVIND66.fsh +++ b/input/fsh/measures/HIVIND66.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.66 Syphilis treatment coverage, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND66" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND66" * title = "HIV.IND.66 Syphilis treatment coverage, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND67.fsh b/input/fsh/measures/HIVIND67.fsh index 0d5841fd95..a05f75efa4 100644 --- a/input/fsh/measures/HIVIND67.fsh +++ b/input/fsh/measures/HIVIND67.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.67 Syphilis treatment coverage, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND67" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND67" * title = "HIV.IND.67 Syphilis treatment coverage, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND68.fsh b/input/fsh/measures/HIVIND68.fsh index 0115ecef76..0850fadf3c 100644 --- a/input/fsh/measures/HIVIND68.fsh +++ b/input/fsh/measures/HIVIND68.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.68 Syphilis treatment coverage, pregnant women, first ANC visit" * url = "http://smart.who.int/HIV/Measure/HIVIND68" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND68" * title = "HIV.IND.68 Syphilis treatment coverage, pregnant women, first ANC visit" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND69.fsh b/input/fsh/measures/HIVIND69.fsh index 007d089458..68f3b1250e 100644 --- a/input/fsh/measures/HIVIND69.fsh +++ b/input/fsh/measures/HIVIND69.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.69 Syphilis treatment coverage, pregnant women, any ANC visit" * url = "http://smart.who.int/HIV/Measure/HIVIND69" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND69" * title = "HIV.IND.69 Syphilis treatment coverage, pregnant women, any ANC visit" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND7.fsh b/input/fsh/measures/HIVIND7.fsh index 440c32e593..c3434c07fa 100644 --- a/input/fsh/measures/HIVIND7.fsh +++ b/input/fsh/measures/HIVIND7.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.7 HIV in PEP recipients" * url = "http://smart.who.int/HIV/Measure/HIVIND7" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND7" * title = "HIV.IND.7 HIV in PEP recipients" * publisher = "World Health Organization (WHO)" @@ -34,18 +34,6 @@ Title: "HIV.IND.7 HIV in PEP recipients" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.7.S.AG" + * id = "HIV.IND.7.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.7.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.7.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.7.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND70.fsh b/input/fsh/measures/HIVIND70.fsh index 1088d7bd84..93426f937b 100644 --- a/input/fsh/measures/HIVIND70.fsh +++ b/input/fsh/measures/HIVIND70.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.70 Gonorrhoea testing coverage, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND70" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND70" * title = "HIV.IND.70 Gonorrhoea testing coverage, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND71.fsh b/input/fsh/measures/HIVIND71.fsh index 57858e8239..7dbe9851d1 100644 --- a/input/fsh/measures/HIVIND71.fsh +++ b/input/fsh/measures/HIVIND71.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.71 Gonorrhoea testing coverage, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND71" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND71" * title = "HIV.IND.71 Gonorrhoea testing coverage, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND72.fsh b/input/fsh/measures/HIVIND72.fsh index 2eae99ddd9..a2e4aaab87 100644 --- a/input/fsh/measures/HIVIND72.fsh +++ b/input/fsh/measures/HIVIND72.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.72 Gonorrhoea test positivity, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND72" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND72" * title = "HIV.IND.72 Gonorrhoea test positivity, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND73.fsh b/input/fsh/measures/HIVIND73.fsh index 10f74f1904..5f51e51c82 100644 --- a/input/fsh/measures/HIVIND73.fsh +++ b/input/fsh/measures/HIVIND73.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.73 Gonorrhoea test positivity, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND73" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND73" * title = "HIV.IND.73 Gonorrhoea test positivity, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND74.fsh b/input/fsh/measures/HIVIND74.fsh index 2299926afa..f1c6151759 100644 --- a/input/fsh/measures/HIVIND74.fsh +++ b/input/fsh/measures/HIVIND74.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.74 Gonorrhoea treatment coverage, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND74" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND74" * title = "HIV.IND.74 Gonorrhoea treatment coverage, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND75.fsh b/input/fsh/measures/HIVIND75.fsh index 9519a5e48b..061b4a342b 100644 --- a/input/fsh/measures/HIVIND75.fsh +++ b/input/fsh/measures/HIVIND75.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.75 Gonorrhoea treatment coverage, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND75" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND75" * title = "HIV.IND.75 Gonorrhoea treatment coverage, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND76.fsh b/input/fsh/measures/HIVIND76.fsh index 42f47e68e8..f10ce9db50 100644 --- a/input/fsh/measures/HIVIND76.fsh +++ b/input/fsh/measures/HIVIND76.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.76 Presence of STI syndrome, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND76" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND76" * title = "HIV.IND.76 Presence of STI syndrome, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND77.fsh b/input/fsh/measures/HIVIND77.fsh index cc2eedb027..ec10e7e7a8 100644 --- a/input/fsh/measures/HIVIND77.fsh +++ b/input/fsh/measures/HIVIND77.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.77 Presence of STI syndrome, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND77" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND77" * title = "HIV.IND.77 Presence of STI syndrome, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND78.fsh b/input/fsh/measures/HIVIND78.fsh index 5f1ba2983a..499d9ff1d2 100644 --- a/input/fsh/measures/HIVIND78.fsh +++ b/input/fsh/measures/HIVIND78.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.78 Repeat diagnosis of STI syndrome, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND78" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND78" * title = "HIV.IND.78 Repeat diagnosis of STI syndrome, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND79.fsh b/input/fsh/measures/HIVIND79.fsh index 9763c1c610..b265559e41 100644 --- a/input/fsh/measures/HIVIND79.fsh +++ b/input/fsh/measures/HIVIND79.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.79 Repeat diagnosis of STI syndrome, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND79" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND79" * title = "HIV.IND.79 Repeat diagnosis of STI syndrome, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND8.fsh b/input/fsh/measures/HIVIND8.fsh index 32ca1ee119..85ed9a72bf 100644 --- a/input/fsh/measures/HIVIND8.fsh +++ b/input/fsh/measures/HIVIND8.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.8 NSP coverage" * url = "http://smart.who.int/HIV/Measure/HIVIND8" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND8" * title = "HIV.IND.8 NSP coverage" * publisher = "World Health Organization (WHO)" @@ -34,18 +34,6 @@ Title: "HIV.IND.8 NSP coverage" * criteria.language = #text/cql-identifier * criteria.expression = "Numerator" * stratifier[+] - * id = "HIV.IND.8.S.AG" + * id = "HIV.IND.8.S" * criteria.language = #text/cql-identifier - * criteria.expression = "Administrative Gender Stratifier" - * stratifier[+] - * id = "HIV.IND.8.S.A" - * criteria.language = #text/cql-identifier - * criteria.expression = "Age Stratifier" - * stratifier[+] - * id = "HIV.IND.8.S.GR" - * criteria.language = #text/cql-identifier - * criteria.expression = "Geographic Region Stratifier" - * stratifier[+] - * id = "HIV.IND.8.S.P" - * criteria.language = #text/cql-identifier - * criteria.expression = "patientGroups Stratifier" \ No newline at end of file + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/HIVIND80.fsh b/input/fsh/measures/HIVIND80.fsh index 00712b4dce..d226066589 100644 --- a/input/fsh/measures/HIVIND80.fsh +++ b/input/fsh/measures/HIVIND80.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.80 HBV test coverage, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND80" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND80" * title = "HIV.IND.80 HBV test coverage, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND81.fsh b/input/fsh/measures/HIVIND81.fsh index 05b48e57ce..6e911e215a 100644 --- a/input/fsh/measures/HIVIND81.fsh +++ b/input/fsh/measures/HIVIND81.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.81 HBV test coverage, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND81" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND81" * title = "HIV.IND.81 HBV test coverage, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND82.fsh b/input/fsh/measures/HIVIND82.fsh index cac6159fae..6705e9730b 100644 --- a/input/fsh/measures/HIVIND82.fsh +++ b/input/fsh/measures/HIVIND82.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.82 HBV test coverage, pregnant women" * url = "http://smart.who.int/HIV/Measure/HIVIND82" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND82" * title = "HIV.IND.82 HBV test coverage, pregnant women" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND83.fsh b/input/fsh/measures/HIVIND83.fsh index a888ff3300..32ee8bbb5d 100644 --- a/input/fsh/measures/HIVIND83.fsh +++ b/input/fsh/measures/HIVIND83.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.83 HCV test coverage, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND83" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND83" * title = "HIV.IND.83 HCV test coverage, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND84.fsh b/input/fsh/measures/HIVIND84.fsh index e1ecc50de2..5819e90950 100644 --- a/input/fsh/measures/HIVIND84.fsh +++ b/input/fsh/measures/HIVIND84.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.84 HCV test coverage, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND84" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND84" * title = "HIV.IND.84 HCV test coverage, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND85.fsh b/input/fsh/measures/HIVIND85.fsh index 8948e98fd4..115c3c3b2a 100644 --- a/input/fsh/measures/HIVIND85.fsh +++ b/input/fsh/measures/HIVIND85.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.85 HBsAg positivity, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND85" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND85" * title = "HIV.IND.85 HBsAg positivity, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND86.fsh b/input/fsh/measures/HIVIND86.fsh index ca310f50a9..6899af49f3 100644 --- a/input/fsh/measures/HIVIND86.fsh +++ b/input/fsh/measures/HIVIND86.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.86 HBsAg positivity, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND86" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND86" * title = "HIV.IND.86 HBsAg positivity, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND87.fsh b/input/fsh/measures/HIVIND87.fsh index db62de5490..45f8030a0e 100644 --- a/input/fsh/measures/HIVIND87.fsh +++ b/input/fsh/measures/HIVIND87.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.87 HBsAg positivity, pregnant women" * url = "http://smart.who.int/HIV/Measure/HIVIND87" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND87" * title = "HIV.IND.87 HBsAg positivity, pregnant women" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND88.fsh b/input/fsh/measures/HIVIND88.fsh index 2ffe2e2848..1d03ce7895 100644 --- a/input/fsh/measures/HIVIND88.fsh +++ b/input/fsh/measures/HIVIND88.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.88 HCV positivity, HIV prevention services" * url = "http://smart.who.int/HIV/Measure/HIVIND88" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND88" * title = "HIV.IND.88 HCV positivity, HIV prevention services" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND89.fsh b/input/fsh/measures/HIVIND89.fsh index 9a8f96a673..0dd22cb4bc 100644 --- a/input/fsh/measures/HIVIND89.fsh +++ b/input/fsh/measures/HIVIND89.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.89 HCV positivity, HIV-positive clients" * url = "http://smart.who.int/HIV/Measure/HIVIND89" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND89" * title = "HIV.IND.89 HCV positivity, HIV-positive clients" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND9.fsh b/input/fsh/measures/HIVIND9.fsh index 81d3c5a953..559d2f7b4a 100644 --- a/input/fsh/measures/HIVIND9.fsh +++ b/input/fsh/measures/HIVIND9.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.9 Regular NSP access" * url = "http://smart.who.int/HIV/Measure/HIVIND9" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND9" * title = "HIV.IND.9 Regular NSP access" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND90.fsh b/input/fsh/measures/HIVIND90.fsh index f40ec1ed1a..7cb70e91e3 100644 --- a/input/fsh/measures/HIVIND90.fsh +++ b/input/fsh/measures/HIVIND90.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.90 HBV treatment among people living with HIV" * url = "http://smart.who.int/HIV/Measure/HIVIND90" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND90" * title = "HIV.IND.90 HBV treatment among people living with HIV" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND91.fsh b/input/fsh/measures/HIVIND91.fsh index 1b5f88d588..878de8c6ba 100644 --- a/input/fsh/measures/HIVIND91.fsh +++ b/input/fsh/measures/HIVIND91.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.91 HCV treatment among people living with HIV" * url = "http://smart.who.int/HIV/Measure/HIVIND91" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND91" * title = "HIV.IND.91 HCV treatment among people living with HIV" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND92.fsh b/input/fsh/measures/HIVIND92.fsh index abb95e62e6..ce5388e969 100644 --- a/input/fsh/measures/HIVIND92.fsh +++ b/input/fsh/measures/HIVIND92.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.92 HCV cured among people living with HIV" * url = "http://smart.who.int/HIV/Measure/HIVIND92" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND92" * title = "HIV.IND.92 HCV cured among people living with HIV" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND93.fsh b/input/fsh/measures/HIVIND93.fsh index a99c6bc387..a454013638 100644 --- a/input/fsh/measures/HIVIND93.fsh +++ b/input/fsh/measures/HIVIND93.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.93 Cervical cancer screening" * url = "http://smart.who.int/HIV/Measure/HIVIND93" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND93" * title = "HIV.IND.93 Cervical cancer screening" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND94.fsh b/input/fsh/measures/HIVIND94.fsh index 663be7c710..23ec55ec89 100644 --- a/input/fsh/measures/HIVIND94.fsh +++ b/input/fsh/measures/HIVIND94.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.94 Pre-invasive cervical disease treatment" * url = "http://smart.who.int/HIV/Measure/HIVIND94" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND94" * title = "HIV.IND.94 Pre-invasive cervical disease treatment" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND95.fsh b/input/fsh/measures/HIVIND95.fsh index de25c9e792..87f0886995 100644 --- a/input/fsh/measures/HIVIND95.fsh +++ b/input/fsh/measures/HIVIND95.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.95 Invasive cervical cancer treatment" * url = "http://smart.who.int/HIV/Measure/HIVIND95" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND95" * title = "HIV.IND.95 Invasive cervical cancer treatment" * publisher = "World Health Organization (WHO)" diff --git a/input/fsh/measures/HIVIND96.fsh b/input/fsh/measures/HIVIND96.fsh index ff6f0f48e2..5e5718cce3 100644 --- a/input/fsh/measures/HIVIND96.fsh +++ b/input/fsh/measures/HIVIND96.fsh @@ -8,7 +8,7 @@ Title: "HIV.IND.96 Cervical cancer survival" * url = "http://smart.who.int/HIV/Measure/HIVIND96" * status = #draft * experimental = true -* date = "2024-07-12" +* date = "2024-08-05" * name = "HIVIND96" * title = "HIV.IND.96 Cervical cancer survival" * publisher = "World Health Organization (WHO)" From e37577732e35e1245fbb1636386024c064a56a47 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Mon, 5 Aug 2024 07:20:44 -0700 Subject: [PATCH 07/13] Added simple Config file --- input/cql/HIVConfig.cql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 input/cql/HIVConfig.cql diff --git a/input/cql/HIVConfig.cql b/input/cql/HIVConfig.cql new file mode 100644 index 0000000000..89476690d4 --- /dev/null +++ b/input/cql/HIVConfig.cql @@ -0,0 +1,10 @@ +library HIVConfig + +using FHIR version '4.0.1' + +/* + * HIV burden of setting + */ +define "HIV burden of setting": + 'High HIV burden setting' + From 6b7db0193bc48f83b0a96dc45fb621f116f1c833 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Mon, 5 Aug 2024 15:37:57 -0700 Subject: [PATCH 08/13] Additional cleanup of Common library --- input/cql/HIVB9DTLogic.cql | 18 +- input/cql/HIVCommon.cql | 420 ++++++++--------------------- input/cql/HIVConcepts.cql | 4 +- input/cql/HIVElements.cql | 184 +++++++++---- input/cql/HIVEncounterElements.cql | 15 +- input/cql/HIVIND44Logic.cql | 2 +- input/cql/HIVIndicatorElements.cql | 82 +++++- 7 files changed, 350 insertions(+), 375 deletions(-) diff --git a/input/cql/HIVB9DTLogic.cql b/input/cql/HIVB9DTLogic.cql index 8f385465d4..ca5f8494b8 100644 --- a/input/cql/HIVB9DTLogic.cql +++ b/input/cql/HIVB9DTLogic.cql @@ -22,8 +22,8 @@ library HIVB9DTLogic // Included Libraries using FHIR version '4.0.1' -include HIVCommon version '0.0.1' called HIC -include HIVConcepts called HCx +include HIVCommon version '0.0.1' called Common +include HIVConcepts called Concepts include HIVConfig called Config include HIVEncounterElements called Elements include FHIRHelpers version '4.0.1' @@ -41,8 +41,8 @@ context Patient @pseudocode: "HIV status" IN 'HIV-negative', 'Unknown' */ define "HIV status negative or unknown": - exists(Elements."HIV status Observation" O - where O.value in { HCx."HIV-negative", HCx."Unknown" }) + exists(Elements."HIV status" S + where S in { Concepts."HIV-negative", Concepts."Unknown" }) /* @input: "Partner HIV reported positive" @@ -50,7 +50,7 @@ define "HIV status negative or unknown": */ define "Partner HIV positive": exists(Elements."Partner HIV status reported Observation" O - where O.value ~ HCx."HIV-positive") + where O.value ~ Concepts."HIV-positive") /* @input: "Sex partner's HIV treatment status is partner not virally suppressed" @@ -58,21 +58,21 @@ define "Partner HIV positive": */ define "Sex partner's HIV treatment status is partner not virally suppressed": exists(Elements."Sex partners HIV treatment status Observation" O - where O.value ~ HCx."Partner is not virally suppressed") + where O.value ~ Concepts."Partner is not virally suppressed") /* @input: "HIV burden of setting is high HIV burden setting" @pseudocode: "HIV burden of the setting"='High HIV burden setting' */ define "HIV burden of setting is high HIV burden setting": - Config."HIV burden of setting" ~ HCx."High HIV burden setting" + Config."HIV burden of setting" ~ Concepts."High HIV burden setting" /* @input: "HIV burden of setting is low HIV burden setting" @pseudocode: "HIV burden of the setting"='Low HIV burden setting' */ define "HIV burden of setting is low HIV burden setting": - Config."HIV burden of setting" ~ HCx."Low HIV burden setting" + Config."HIV burden of setting" ~ Concepts."Low HIV burden setting" /* @input: "Key population member" @@ -95,7 +95,7 @@ define "Currently pregnant": */ define "TB diagnosis result is diagnosed TB": exists(Elements."TB diagnosis result Observation" O - where O.value ~ HCx."Diagnosed TB") + where O.value ~ Concepts."Diagnosed TB") /* @input: "Presumptive TB" diff --git a/input/cql/HIVCommon.cql b/input/cql/HIVCommon.cql index eae8877c64..3d4d0d9cbf 100644 --- a/input/cql/HIVCommon.cql +++ b/input/cql/HIVCommon.cql @@ -4,267 +4,65 @@ using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' include WHOCommon called WCom -//include FHIRCommon called FC -include HIVConcepts called HC -include HIVConceptsCustom called HCC +include FHIRCommon called FC +include HIVConcepts called Concepts +include HIVConceptsCustom called CustomConcepts -parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] -parameter "Measurement Date" Date default @2020-01-01 -parameter "Testing Interval" System.Quantity default 3 months -parameter "Intervention Interval" System.Quantity default 7 days +// parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] +// parameter "Measurement Date" Date default @2020-01-01 +// parameter "Testing Interval" System.Quantity default 3 months +// parameter "Intervention Interval" System.Quantity default 7 days context Patient //VERIFIED -define "routine viral load sample collection": - [Procedure] P - where P.status = 'completed' - and P.code ~ HCC."viral load test" - and exists(P.reasonCode RC where RC ~ HC."Routine viral load test") - -define "viral load sample collection": - [Procedure] P - where P.status = 'completed' - and P.code ~ HCC."viral load test" //DRAFT -define "Patient Deceased during Measurement Period": - case - when Patient.deceased is FHIR.boolean and Patient.deceased ~ true then Patient.meta.lastUpdated before end of "Measurement Period" and Patient.meta.lastUpdated after start of "Measurement Period" - when Patient.deceased is FHIR.dateTime then Patient.deceased as FHIR.dateTime before end of "Measurement Period" and Patient.deceased as FHIR.dateTime after start of "Measurement Period" - else false - end - -define "HIV Positive Observation": -[Observation] O - where O.status in {'final', 'amended'} - and O.code ~ HC."HIV status" - and O.value ~ HC."HIV-positive - HIV.B.DE116" - -define "HIV Positive Observation - HIV Self Test": -[Observation] O - where O.status in {'final', 'amended'} - and O.code ~ HC."HIV self-test" - and O.value ~ HC."HIV-positive - HIV.B.DE116" - -define "HIV Negative Observation": -[Observation] O - where O.status in {'final', 'amended'} - and O.code ~ HC."Rapid diagnostic test for HIV - HIV.B.DE82" - and O.value ~ HC."HIV-negative - HIV.B.DE117" - -define "HIV test resulted": - [Observation] O - where O.status in {'final', 'amended'} - and O.code ~ HC."Rapid diagnostic test for HIV - HIV.B.DE82" - -define "HIV PREP Active": -[MedicationStatement] MS - where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."PrEP for HIV prevention") - - define "Client is at elevated risk for HIV acquisition": - [Observation] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."At elevated risk for HIV acquisition - HIV.B.DE225" - -define "PREP Prescription": - [MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HC."PrEP for HIV prevention" - -define "PEP Prescription": - [MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HC."PEP for HIV prevention" - -define "PEP Prescribed before start of Measurement Period and Completed": - [MedicationStatement] MS - with [MedicationRequest] MR - such that MS.basedOn.references(MR) and MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HC."PEP for HIV prevention" - and MR.authoredOn before end of "Measurement Period" - where (MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."PrEP for HIV prevention") - ) - -define "PEP Prescribed during Measurement Period and Completed": - [MedicationStatement] MS - with [MedicationRequest] MR - such that MS.basedOn.references(MR) and MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HC."PEP for HIV prevention" - and MR.authoredOn after start of "Measurement Period" - and MR.authoredOn before end of "Measurement Period" - where (MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."PrEP for HIV prevention") - ) - -define "HIV Test Positive After PEP Prescribed during Measurement Period": - [Observation: HC."HIV test result - HIV.B.DE111"] O - with [MedicationRequest] MR - such that O.basedOn.references(MR) and MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HC."PEP for HIV prevention" - and MR.authoredOn after start of "Measurement Period" - and MR.authoredOn before end of "Measurement Period" - and O.issued before (MR.authoredOn + 3 months) - where ( O.status in {'final', 'amended'} - and O.value ~ HC."HIV-positive - HIV.B.DE112" - ) - -define "Needle Syringe Dispensed": - [DeviceUseStatement] DUS - with [Observation: HC."Key population member - HIV.E.DE113"] O - such that DUS.reasonReference.references(O) - and O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."People who inject drugs - HIV.B.DE54" - where DUS.status = 'completed' - -define PWID_person: - [Observation: HC."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."People who inject drugs - HIV.B.DE54" - -define "OAMT_initiated": -exists( - [EpisodeOfCare] EOC - where exists(EOC.type T where T ~ HC."OAMT") - and (exists ( - EOC.statusHistory H - where H.period starts after start of "Measurement Period" - and H.period starts before end of "Measurement Period" - ) - or ( - EOC.period starts after start of "Measurement Period" - and EOC.period starts before end of "Measurement Period" - ) - ) - ) - -define "OAMT_retained": -exists( - [EpisodeOfCare] EOC - where exists(EOC.type T where T ~ HC."OAMT") - and (exists ( - EOC.statusHistory H - where H.period starts after start of "Measurement Period" - and H.period starts before end of "Measurement Period" - and H.period ends after (end of "Measurement Period" + 6 months) - ) - or ( - EOC.period starts after start of "Measurement Period" - and EOC.period starts before end of "Measurement Period" - and (EOC.period ends after (end of "Measurement Period" + 6 months) - or end of EOC.period is null) - ) - ) - ) - -define "methadone_prescribed": -[MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HCC."methadone" - -define "buprenorphine_prescribed": -[MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ HCC."buprenorphine" - -/* - * Key populations (men who have sex with men, people living in prisons and other closed settings, people who inject drugs, sex workers, trans and gender diverse people) - */ - define SW: - exists ( - [Observation: HC."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."Sex worker - HIV.B.DE51" - ) - - define MSM: - exists ( - [Observation: HC."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."Men who have sex with men" - ) - - define Trans: - exists ( - [Observation: HC."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."Trans and gender-diverse people - HIV.B.DE53" - ) - define PWID: - exists ( - [Observation: HC."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."People who inject drugs - HIV.B.DE54" - ) - - define Prisoner: - exists ( - [Observation: HC."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."People living in prisons and other closed settings" - ) define TB_diagnosed: exists( ([Condition] C - where C.clinicalStatus ~ HCC."active" - and exists(C.category CC where CC ~ HCC."encounter-diagnosis") - and C.code ~ HC."Diagnosed TB" + where C.clinicalStatus ~ CustomConcepts."active" + and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") + and C.code ~ Concepts."Diagnosed TB" and C.onset during "Measurement Period") ) define TB_presumptive: exists( ([Condition] C - where C.clinicalStatus ~ HCC."active" - and exists(C.category CC where CC ~ HCC."encounter-diagnosis") - and C.code ~ HC."Presumptive TB - HIV.D.DE945" + where C.clinicalStatus ~ CustomConcepts."active" + and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") + and C.code ~ Concepts."Presumptive TB - HIV.D.DE945" and C.onset during "Measurement Period") ) define Exposure_Occupational: exists ( - [Observation: HC."HIV exposure type"] O + [Observation: Concepts."HIV exposure type"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."Occupational" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."Occupational" ) define Exposure_Non_Occupational_violent: exists ( - [Observation: HC."HIV exposure type"] O + [Observation: Concepts."HIV exposure type"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."Non-occupational violent" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."Non-occupational violent" ) define Exposure_Non_Occupational_consensual_sex: exists ( - [Observation: HC."HIV exposure type"] O + [Observation: Concepts."HIV exposure type"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.value ~ HC."Non-occupational consensual sex" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."Non-occupational consensual sex" ) define hiv_exposure_type: @@ -279,9 +77,9 @@ define hiv_exposure_type: define "Community_testing": exists([Observation] O with [Encounter] E - such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ HC."Community-level testing") + such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ Concepts."Community-level testing") where (O.status in { 'final', 'amended' } - and O.code ~ HC."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" and O.issued after start of "Measurement Period" and O.issued before end of "Measurement Period")) @@ -290,9 +88,9 @@ define "Community_testing": define "Facility_testing": exists([Observation] O with [Encounter] E - such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ HC."Facility-level testing") + such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ Concepts."Facility-level testing") where (O.status in { 'final', 'amended' } - and O.code ~ HC."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" and O.issued after start of "Measurement Period" and O.issued before end of "Measurement Period") ) @@ -301,7 +99,7 @@ define "Facility_testing": define "ANC_case": exists( [EpisodeOfCare] EOC - where exists(EOC.type T where T ~ HC."Already on ART at first antenatal care visit") + where exists(EOC.type T where T ~ Concepts."Already on ART at first antenatal care visit") and (exists ( EOC.statusHistory H where H.period overlaps "Measurement Period" @@ -316,67 +114,67 @@ exists( define "PREP Product Oral": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and (MS.medication ~ HC."TDF + FTC - HIV.C.DE18" or - MS.medication ~ HC."TDF - HIV.C.DE19" or - MS.medication ~ HC."TDF + 3TC - HIV.C.DE20" or - MS.medication ~ HC."Other TDF-based regimen") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and (MS.medication ~ Concepts."TDF + FTC - HIV.C.DE18" or + MS.medication ~ Concepts."TDF - HIV.C.DE19" or + MS.medication ~ Concepts."TDF + 3TC - HIV.C.DE20" or + MS.medication ~ Concepts."Other TDF-based regimen") ) define "PREP Product long-acting device": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and MS.medication ~ HC."Dapivirine vaginal ring DVR - HIV.C.DE22" + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and MS.medication ~ Concepts."Dapivirine vaginal ring DVR - HIV.C.DE22" ) define "PREP Product long-acting injectable": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and MS.medication ~ HC."CAB-LA - HIV.C.DE23" + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and MS.medication ~ Concepts."CAB-LA - HIV.C.DE23" ) define "PREP first time": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and exists(MS.statusReason SR where SR ~ HC."First-time user - HIV.C.DE25") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and exists(MS.statusReason SR where SR ~ Concepts."First-time user - HIV.C.DE25") ) define "PREP Continuing user": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and exists(MS.statusReason SR where SR ~ HC."Continuing user") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and exists(MS.statusReason SR where SR ~ Concepts."Continuing user") ) define "PREP Restarting": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and exists(MS.statusReason SR where SR ~ HC."Restarting following a period of not taking PrEP") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and exists(MS.statusReason SR where SR ~ Concepts."Restarting following a period of not taking PrEP") ) define "Daily_oral_PrEP": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and exists(MS.dosage.additionalInstruction AI where AI ~ HC."Daily oral PrEP") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and exists(MS.dosage.additionalInstruction AI where AI ~ Concepts."Daily oral PrEP") ) define "Event_driven_PrEP": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and exists(MS.dosage.additionalInstruction AI where AI ~ HC."Event-driven PrEP 2+1+1") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and exists(MS.dosage.additionalInstruction AI where AI ~ Concepts."Event-driven PrEP 2+1+1") ) define "other_dosing_PrEP": exists([MedicationStatement] MS where MS.status = 'completed' - and exists(MS.reasonCode C where C ~ HC."Currently on PrEP") - and exists(MS.dosage.additionalInstruction AI where AI ~ HC."Other PrEP dosing type") + and exists(MS.reasonCode C where C ~ Concepts."Currently on PrEP") + and exists(MS.dosage.additionalInstruction AI where AI ~ Concepts."Other PrEP dosing type") ) @@ -486,7 +284,7 @@ define "PREP Prescription Days": [MedicationRequest] MR where MR.status = 'completed' and MR.intent = 'order' - and MR.medication ~ HC."PrEP for HIV prevention" + and MR.medication ~ Concepts."PrEP for HIV prevention" return WComV2."Prescription Relevant Period"( MR ) intersect "Measurement Period" ) ) PREPUseInterval @@ -587,26 +385,26 @@ define function ToDaily(frequency System.Integer, period System.Quantity): define function "DosesPerDay"(frequency Code): /*Calculates the cumulative dose per day for each prescription*/ case - when frequency ~ HCC."Once daily (qualifier value)" then 1.0 - when frequency ~ HCC."Twice a day (qualifier value)" then 2.0 - when frequency ~ HCC."Three times daily (qualifier value)" then 3.0 - when frequency ~ HCC."Four times daily (qualifier value)" then 4.0 - when frequency ~ HCC."Every twenty four hours (qualifier value)" then 1.0 - when frequency ~ HCC."Every twelve hours (qualifier value)" then 2.0 - when frequency ~ HCC."Every thirty six hours (qualifier value)" then 0.67 - when frequency ~ HCC."Every eight hours (qualifier value)" then 3.0 - when frequency ~ HCC."Every four hours (qualifier value)" then 6.0 - when frequency ~ HCC."Every six hours (qualifier value)" then 4.0 - when frequency ~ HCC."Every seventy two hours (qualifier value)" then 0.34 - when frequency ~ HCC."Every forty eight hours (qualifier value)" then 0.5 - when frequency ~ HCC."Every eight to twelve hours (qualifier value)" then 2.0 - when frequency ~ HCC."Every six to eight hours (qualifier value)" then 3.0 - when frequency ~ HCC."Every three to four hours (qualifier value)" then 6.0 - when frequency ~ HCC."Every three to six hours (qualifier value)" then 4.0 - when frequency ~ HCC."Every two to four hours (qualifier value)" then 6.0 - when frequency ~ HCC."One to four times a day (qualifier value)" then 4.0 - when frequency ~ HCC."One to three times a day (qualifier value)" then 3.0 - when frequency ~ HCC."One to two times a day (qualifier value)" then 2.0 + when frequency ~ CustomConcepts."Once daily (qualifier value)" then 1.0 + when frequency ~ CustomConcepts."Twice a day (qualifier value)" then 2.0 + when frequency ~ CustomConcepts."Three times daily (qualifier value)" then 3.0 + when frequency ~ CustomConcepts."Four times daily (qualifier value)" then 4.0 + when frequency ~ CustomConcepts."Every twenty four hours (qualifier value)" then 1.0 + when frequency ~ CustomConcepts."Every twelve hours (qualifier value)" then 2.0 + when frequency ~ CustomConcepts."Every thirty six hours (qualifier value)" then 0.67 + when frequency ~ CustomConcepts."Every eight hours (qualifier value)" then 3.0 + when frequency ~ CustomConcepts."Every four hours (qualifier value)" then 6.0 + when frequency ~ CustomConcepts."Every six hours (qualifier value)" then 4.0 + when frequency ~ CustomConcepts."Every seventy two hours (qualifier value)" then 0.34 + when frequency ~ CustomConcepts."Every forty eight hours (qualifier value)" then 0.5 + when frequency ~ CustomConcepts."Every eight to twelve hours (qualifier value)" then 2.0 + when frequency ~ CustomConcepts."Every six to eight hours (qualifier value)" then 3.0 + when frequency ~ CustomConcepts."Every three to four hours (qualifier value)" then 6.0 + when frequency ~ CustomConcepts."Every three to six hours (qualifier value)" then 4.0 + when frequency ~ CustomConcepts."Every two to four hours (qualifier value)" then 6.0 + when frequency ~ CustomConcepts."One to four times a day (qualifier value)" then 4.0 + when frequency ~ CustomConcepts."One to three times a day (qualifier value)" then 3.0 + when frequency ~ CustomConcepts."One to two times a day (qualifier value)" then 2.0 else null end @@ -618,7 +416,7 @@ define "methadone_prescribed at date": [MedicationRequest] MR where MR.status = 'completed' and MR.intent = 'order' - and MR.medication ~ HCC."methadone" + and MR.medication ~ CustomConcepts."methadone" //and "GetMedicationDailyDose"(MR.dosageInstruction, "DosesPerDay"(singleton from MR.dosageInstruction.timing.repeat.frequencyMax)) >= 60 'mg/d' and MedicationRequestPeriod(MR) starts before "Measurement Date" and MedicationRequestPeriod(MR) ends after "Measurement Date" @@ -626,13 +424,13 @@ define "methadone_prescribed at date": define "VMMC_done": [Procedure] P where P.status = 'completed' - and P.code ~ HC."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" define "VMMC_adverse_event": [AdverseEvent] AE with [Procedure] P such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ HC."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" and P.performed after start of "Measurement Period" and P.performed before end of "Measurement Period" and AE.date <= (P.performed + 30 days) @@ -641,27 +439,27 @@ define "VMMC_adverse_event": define "VMMC_adverse_event_type": case - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Abnormal pain") then HC."Abnormal pain" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Anaesthesia-related effects") then HC."Anaesthesia-related effects" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Damage to the penis") then HC."Damage to the penis" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Difficulty urinating") then HC."Difficulty urinating" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Excessive bleeding") then HC."Excessive bleeding" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Excessive skin removal") then HC."Excessive skin removal" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Excessive swelling") then HC."Excessive swelling" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Haematoma") then HC."Haematoma" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Infection") then HC."Infection" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Injury to glans") then HC."Injury to glans" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Scar or disfigurement") then HC."Scar or disfigurement" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Sharps injury to personnel") then HC."Sharps injury to personnel" - when exists("VMMC_adverse_event" AE where AE.event ~ HC."Wound disruption") then HC."Wound disruption" - else HC."Other - HIV.B.DE222" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Abnormal pain") then Concepts."Abnormal pain" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Anaesthesia-related effects") then Concepts."Anaesthesia-related effects" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Damage to the penis") then Concepts."Damage to the penis" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Difficulty urinating") then Concepts."Difficulty urinating" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive bleeding") then Concepts."Excessive bleeding" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive skin removal") then Concepts."Excessive skin removal" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive swelling") then Concepts."Excessive swelling" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Haematoma") then Concepts."Haematoma" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Infection") then Concepts."Infection" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Injury to glans") then Concepts."Injury to glans" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Scar or disfigurement") then Concepts."Scar or disfigurement" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Sharps injury to personnel") then Concepts."Sharps injury to personnel" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Wound disruption") then Concepts."Wound disruption" + else Concepts."Other - HIV.B.DE222" end define "VMMC_adverse_event_Intraoperative": [AdverseEvent] AE with [Procedure] P such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ HC."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" and P.performed after start of "Measurement Period" and P.performed before end of "Measurement Period" and AE.date = P.performed @@ -671,7 +469,7 @@ define "VMMC_adverse_event_Postoperative": [AdverseEvent] AE with [Procedure] P such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ HC."Voluntary medical male circumcision VMMC" + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" and P.performed after start of "Measurement Period" and P.performed before end of "Measurement Period" and AE.date <= (P.performed + 30 days) @@ -680,49 +478,49 @@ define "VMMC_adverse_event_Postoperative": define "VMMC_adverse_event_timing": case - when exists(VMMC_adverse_event_Intraoperative) then HC."Intraoperative" - when exists(VMMC_adverse_event_Postoperative) then HC."Postoperative" + when exists(VMMC_adverse_event_Intraoperative) then Concepts."Intraoperative" + when exists(VMMC_adverse_event_Postoperative) then Concepts."Postoperative" else null end define "Partner or contact of an index case": - [Observation: HC."Referred through partner services"] O + [Observation: Concepts."Referred through partner services"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."Partner or contact of an index case" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."Partner or contact of an index case" define "Drug-injecting partner": - [Observation: HC."Type of contact or partner for partner services"] O + [Observation: Concepts."Type of contact or partner for partner services"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."Drug-injecting partner - HIV.B.DE10" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."Drug-injecting partner - HIV.B.DE10" define "Sexual partner": - [Observation: HC."Type of contact or partner for partner services"] O + [Observation: Concepts."Type of contact or partner for partner services"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."Sexual partner - HIV.B.DE11" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."Sexual partner - HIV.B.DE11" //HIV status of partner or contact (already known positive, newly diagnosed positive, negative) define "already known positive": - [Observation: HC."HIV status of partner or contact"] O + [Observation: Concepts."HIV status of partner or contact"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."Already knew positive" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."Already knew positive" define "Newly diagnosed": - [Observation: HC."HIV status of partner or contact"] O + [Observation: Concepts."HIV status of partner or contact"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."Newly diagnosed" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."Newly diagnosed" define "Negative - HIV.H.DE37": - [Observation: HC."HIV status of partner or contact"] O + [Observation: Concepts."HIV status of partner or contact"] O where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ HCC."social-history") - and O.code ~ HC."Negative - HIV.H.DE37" + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."Negative - HIV.H.DE37" @@ -730,7 +528,7 @@ define "VMMC_adverse_event_Postoperative": define STI_testing: [Procedure] P where P.status = 'completed' - and P.code ~ HC."STI testing and treatment services" + and P.code ~ Concepts."STI testing and treatment services" /** diff --git a/input/cql/HIVConcepts.cql b/input/cql/HIVConcepts.cql index 9348a9bfe4..5d4d3166ee 100644 --- a/input/cql/HIVConcepts.cql +++ b/input/cql/HIVConcepts.cql @@ -15,7 +15,7 @@ valueset "Country of birth Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE valueset "Gender Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE18' valueset "Sex Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE25' valueset "Marital Status Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE30' -valueset "[Administrative Area] Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE43' +valueset "Administrative Area Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE43' valueset "Communication preferences Choices": 'http://smart.who.int/hiv/ValueSet/HIV.A.DE46' valueset "Reason for visit - HIV.B.DE1 Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE1' valueset "Referred through partner services Choices": 'http://smart.who.int/hiv/ValueSet/HIV.B.DE5' @@ -314,7 +314,7 @@ code "Breastfeeding - HIV.B.DE32": 'HIV.B.DE32' from "HIVConcepts" display 'Brea code "Partner HIV status reported": 'HIV.B.DE33' from "HIVConcepts" display 'Partner HIV status reported' code "HIV-positive": 'HIV.B.DE34' from "HIVConcepts" display 'HIV-positive' code "HIV-negative": 'HIV.B.DE35' from "HIVConcepts" display 'HIV-negative' -code "Unknown - HIV.B.DE36": 'HIV.B.DE36' from "HIVConcepts" display 'Unknown' +code "Unknown": 'HIV.B.DE36' from "HIVConcepts" display 'Unknown' code "Key population member - HIV.B.DE49": 'HIV.B.DE49' from "HIVConcepts" display 'Key population member*' code "Key population member type - HIV.B.DE50": 'HIV.B.DE50' from "HIVConcepts" display 'Key population member type*' code "Sex worker - HIV.B.DE51": 'HIV.B.DE51' from "HIVConcepts" display 'Sex worker' diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 75a6ff7b62..0b065e7af2 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -14,10 +14,10 @@ include HIVConceptsCustom called CustomConcepts include HIVCommon called Common // parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] -parameter "Measurement Date" Date default @2020-01-01 -parameter "Testing Interval" System.Quantity default 3 months -parameter "Intervention Interval" System.Quantity default 7 days -parameter "LTFU Days" System.Quantity default 28 days +// parameter "Measurement Date" Date default @2020-01-01 +// parameter "Testing Interval" System.Quantity default 3 months +// parameter "Intervention Interval" System.Quantity default 7 days +// parameter "LTFU Days" System.Quantity default 28 days context Patient @@ -26,6 +26,94 @@ context Patient */ /* Umbrella Element Definitions */ +// From Common + + +define "methadone_prescribed": +[MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ CustomConcepts."methadone" + +define "buprenorphine_prescribed": +[MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ CustomConcepts."buprenorphine" + + +define "Needle Syringe Dispensed": + [DeviceUseStatement] DUS + with [Observation: Concepts."Key population member - HIV.E.DE113"] O + such that DUS.reasonReference.references(O) + and O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."People who inject drugs - HIV.B.DE54" + where DUS.status = 'completed' + +define PWID_person: + [Observation: Concepts."Key population member - HIV.E.DE113"] O + where O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."People who inject drugs - HIV.B.DE54" + +define "HIV Positive Observation": +[Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."HIV status" + and O.value ~ Concepts."HIV-positive - HIV.B.DE116" + +define "HIV Positive Observation - HIV Self Test": +[Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."HIV self-test" + and O.value ~ Concepts."HIV-positive - HIV.B.DE116" + +define "HIV Negative Observation": +[Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.value ~ Concepts."HIV-negative - HIV.B.DE117" + +define "HIV test resulted": + [Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + +define "HIV PREP Active": +[MedicationStatement] MS + where MS.status = 'completed' + and exists(MS.reasonCode C where C ~ Concepts."PrEP for HIV prevention") + + define "Client is at elevated risk for HIV acquisition": + [Observation] O + where O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.code ~ Concepts."At elevated risk for HIV acquisition - HIV.B.DE225" + +define "PREP Prescription": + [MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ Concepts."PrEP for HIV prevention" + +define "PEP Prescription": + [MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ Concepts."PEP for HIV prevention" + +define "routine viral load sample collection": + [Procedure] P + where P.status = 'completed' + and P.code ~ CustomConcepts."viral load test" + and exists(P.reasonCode RC where RC ~ Concepts."Routine viral load test") + +define "viral load sample collection": + [Procedure] P + where P.status = 'completed' + and P.code ~ CustomConcepts."viral load test" + define "HIV Positive Condition": [Condition] C where C.clinicalStatus ~ CustomConcepts."active" @@ -560,18 +648,18 @@ define "Unknown B.DE36 Observation": and O.value ~ Concepts."Unknown - HIV.B.DE36" /* End of Unknown B.DE36 */ + +/* + * Key populations (men who have sex with men, people living in prisons and other closed settings, people who inject drugs, sex workers, trans and gender diverse people) + */ + /* @dataElement: HIV.B.DE49 - Key population member @activity: HIV.B6 Capture or update client history @description: Client is a member of a key population that has an increased risk of HIV */ -// TODO: Replace placeholder with relevant CQL logic -define "Key population member B.DE49": - exists "Key population member B.DE49 Observation" -define "Key population member B.DE49 Observation": - [Observation: Concepts."Key population member - HIV.B.DE49"] O - where O.status in { 'final', 'amended', 'corrected' } - and O.value is true +define "Is Key population member": + exists "Key population member type Observation" /* End of Key population member B.DE49 */ /* @@ -579,12 +667,10 @@ define "Key population member B.DE49 Observation": @activity: HIV.B6 Capture or update client history @description: The type of key population that the client is included in */ -// TODO: Replace placeholder with relevant CQL logic -define "Key population member type B.DE50": - exists "Key population member type B.DE50 Observation" -define "Key population member type B.DE50 Observation": - [Observation: Concepts."Key population member type - HIV.B.DE50"] O +define "Key population member type Observation": + [Observation: Concepts."Key population member - HIV.B.DE49"] O where O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") /* End of Key population member type B.DE50 */ /* @@ -592,12 +678,11 @@ define "Key population member type B.DE50 Observation": @activity: HIV.B6 Capture or update client history @description: Client is a sex worker */ - -define "Sex worker B.DE51": - [Observation: Concepts."Key population member - HIV.B.DE49"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."Sex worker - HIV.B.DE51" +define SW: + exists ( + "Key population member type Observation" O + where O.value ~ Concepts."Sex worker - HIV.B.DE51" + ) /* End of Sex worker B.DE51 */ /* @@ -605,12 +690,10 @@ define "Sex worker B.DE51": @activity: HIV.B6 Capture or update client history @description: Client is a man who has sex with men */ - -define "Men who have sex with men": - [Observation: Concepts."Key population member - HIV.B.DE49"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."Men who have sex with men" +define MSM: + exists ("Key population member type Observation" O + where O.value ~ Concepts."Men who have sex with men" + ) /* End of Men who have sex with men */ /* @@ -618,12 +701,11 @@ define "Men who have sex with men": @activity: HIV.B6 Capture or update client history @description: Client identifies as trans and gender-diverse */ - -define "Trans and gender-diverse people B.DE53": - [Observation: Concepts."Key population member - HIV.B.DE49"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."Trans and gender-diverse people - HIV.B.DE53" +define Trans: + exists ( + "Key population member type Observation" O + where O.value ~ Concepts."Trans and gender-diverse people - HIV.B.DE53" + ) /* End of Trans and gender-diverse people B.DE53 */ /* @@ -631,12 +713,11 @@ define "Trans and gender-diverse people B.DE53": @activity: HIV.B6 Capture or update client history @description: Client is a person who injects drugs */ - -define "People who inject drugs B.DE54": - [Observation: Concepts."Key population member - HIV.B.DE49"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."People who inject drugs - HIV.B.DE54" +define PWID: + exists ( + "Key population member type Observation" O + where O.value ~ Concepts."People who inject drugs - HIV.B.DE54" + ) /* End of People who inject drugs B.DE54 */ /* @@ -644,12 +725,11 @@ define "People who inject drugs B.DE54": @activity: HIV.B6 Capture or update client history @description: Client lives in a prison or another closed setting */ - -define "People living in prisons and other closed settings": - [Observation: Concepts."Key population member - HIV.B.DE49"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."People living in prisons and other closed settings" +define Prisoner: + exists ( + "Key population member type Observation" O + where O.value ~ Concepts."People living in prisons and other closed settings" + ) /* End of People living in prisons and other closed settings */ /* @@ -1317,7 +1397,19 @@ define "HIV-inconclusive Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis. */ +define "HIV Status": + case + when exists("HIV Positive Condition") or exists(Common."HIV Positive Observation") then Concepts."HIV-positive - HIV.B.DE116" + when not exists("HIV Positive Condition") and exists(Common."HIV Negative Observation") then Concepts."HIV-negative - HIV.B.DE117" + else Concepts."Unknown - HIV.B.DE118" + end +define "HIV Status Condition": + [Condition: Concepts."HIV status"] + +define "HIV Status Observation": + [Observation: Concepts."HIV status"] O + where O.status in { 'final', 'amended', 'corrected' } /* End of HIV status */ /* diff --git a/input/cql/HIVEncounterElements.cql b/input/cql/HIVEncounterElements.cql index be115ac718..b11ff5456e 100644 --- a/input/cql/HIVEncounterElements.cql +++ b/input/cql/HIVEncounterElements.cql @@ -1042,7 +1042,12 @@ define "HIV-inconclusive Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: HIV status reported after applying the national HIV testing algorithm. No single HIV test can provide an HIV-positive diagnosis. */ - +define "HIV status": + case + when exists("HIV-positive Condition") or exists("HIV-positive Condition") then Concepts."HIV-positive - HIV.B.DE116" + when not exists("HIV-positive Condition") and exists(Common."HIV Negative Observation") then Concepts."HIV-negative - HIV.B.DE117" + else Concepts."Unknown - HIV.B.DE118" + end /* End of HIV status */ /* @@ -1052,12 +1057,12 @@ define "HIV-inconclusive Observation": */ // TODO: Replace placeholder with relevant CQL logic define "HIV-positive B.DE116": - exists "HIV-positive B.DE116 Condition" - or exists "HIV-positive B.DE116 Observation" -define "HIV-positive B.DE116 Condition": + exists "HIV-positive Condition" + or exists "HIV-positive Observation" +define "HIV-positive Condition": Elements."HIV-positive B.DE116 Condition" C where C.prevalenceInterval() starts on or before Today -define "HIV-positive B.DE116 Observation": +define "HIV-positive Observation": Elements."HIV-positive B.DE116 Observation" O where O.encounter.references(EncounterId) or O.effective.toInterval() starts on or before Today diff --git a/input/cql/HIVIND44Logic.cql b/input/cql/HIVIND44Logic.cql index c1922352da..f40c21797f 100644 --- a/input/cql/HIVIND44Logic.cql +++ b/input/cql/HIVIND44Logic.cql @@ -135,5 +135,5 @@ define "Geographic Region Stratifier": define "Stratification": HIE."By Administrative Gender Stratifier".code + ':' + HIE."By Age Stratifier" - + ':' + First(HIE."TPT regimen type".coding.code) + + ':' + Combine(HIE."TPT regimen type".coding.code) + ':' + HIE."By Geographic Region Stratifier" diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index d0064d23d8..e9a227273e 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -25,7 +25,87 @@ context Patient */ /* Umbrella Data Elements */ - +// From Common + +define "OAMT_initiated": +exists( + [EpisodeOfCare] EOC + where exists(EOC.type T where T ~ Concepts."OAMT") + and (exists ( + EOC.statusHistory H + where H.period starts after start of "Measurement Period" + and H.period starts before end of "Measurement Period" + ) + or ( + EOC.period starts after start of "Measurement Period" + and EOC.period starts before end of "Measurement Period" + ) + ) + ) + +define "OAMT_retained": +exists( + [EpisodeOfCare] EOC + where exists(EOC.type T where T ~ Concepts."OAMT") + and (exists ( + EOC.statusHistory H + where H.period starts after start of "Measurement Period" + and H.period starts before end of "Measurement Period" + and H.period ends after (end of "Measurement Period" + 6 months) + ) + or ( + EOC.period starts after start of "Measurement Period" + and EOC.period starts before end of "Measurement Period" + and (EOC.period ends after (end of "Measurement Period" + 6 months) + or end of EOC.period is null) + ) + ) + ) + + +define "PEP Prescribed before start of Measurement Period and Completed": + [MedicationStatement] MS + with [MedicationRequest] MR + such that MS.basedOn.references(MR) and MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ Concepts."PEP for HIV prevention" + and MR.authoredOn before end of "Measurement Period" + where (MS.status = 'completed' + and exists(MS.reasonCode C where C ~ Concepts."PrEP for HIV prevention") + ) + +define "PEP Prescribed during Measurement Period and Completed": + [MedicationStatement] MS + with [MedicationRequest] MR + such that MS.basedOn.references(MR) and MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ Concepts."PEP for HIV prevention" + and MR.authoredOn after start of "Measurement Period" + and MR.authoredOn before end of "Measurement Period" + where (MS.status = 'completed' + and exists(MS.reasonCode C where C ~ Concepts."PrEP for HIV prevention") + ) + +define "HIV Test Positive After PEP Prescribed during Measurement Period": + [Observation: Concepts."HIV test result - HIV.B.DE111"] O + with [MedicationRequest] MR + such that O.basedOn.references(MR) and MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ Concepts."PEP for HIV prevention" + and MR.authoredOn after start of "Measurement Period" + and MR.authoredOn before end of "Measurement Period" + and O.issued before (MR.authoredOn + 3 months) + where ( O.status in {'final', 'amended'} + and O.value ~ Concepts."HIV-positive - HIV.B.DE112" + ) + + +define "Patient Deceased during Measurement Period": + case + when Patient.deceased is FHIR.boolean and Patient.deceased ~ true then Patient.meta.lastUpdated before end of "Measurement Period" and Patient.meta.lastUpdated after start of "Measurement Period" + when Patient.deceased is FHIR.dateTime then Patient.deceased as FHIR.dateTime before end of "Measurement Period" and Patient.deceased as FHIR.dateTime after start of "Measurement Period" + else false + end // HIV Testing From d47e518bdaf0c726c7c34d65086be339c421d834 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Mon, 5 Aug 2024 16:54:20 -0700 Subject: [PATCH 09/13] Updated KeyPopulation --- input/cql/HIVCommon.cql | 15 ++++++++ input/cql/HIVConfig.cql | 6 ++++ input/cql/HIVElements.cql | 34 +++++++----------- input/cql/HIVIndicatorElements.cql | 57 ++++++++++++++---------------- 4 files changed, 60 insertions(+), 52 deletions(-) diff --git a/input/cql/HIVCommon.cql b/input/cql/HIVCommon.cql index 3d4d0d9cbf..bca456f2d8 100644 --- a/input/cql/HIVCommon.cql +++ b/input/cql/HIVCommon.cql @@ -546,4 +546,19 @@ define function ExtractMedicationCode(choice Choice): + obslist obs return obs.getObservationCode() + diff --git a/input/cql/HIVConfig.cql b/input/cql/HIVConfig.cql index 89476690d4..d026da08c2 100644 --- a/input/cql/HIVConfig.cql +++ b/input/cql/HIVConfig.cql @@ -8,3 +8,9 @@ using FHIR version '4.0.1' define "HIV burden of setting": 'High HIV burden setting' + +define "Testing Interval": + 3 months +parameter "Testing Interval" System.Quantity default 3 months +// parameter "Intervention Interval" System.Quantity default 7 days +// parameter "LTFU Days" System.Quantity default 28 days diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 0b065e7af2..e668ac3d3a 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -15,9 +15,7 @@ include HIVCommon called Common // parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] // parameter "Measurement Date" Date default @2020-01-01 -// parameter "Testing Interval" System.Quantity default 3 months -// parameter "Intervention Interval" System.Quantity default 7 days -// parameter "LTFU Days" System.Quantity default 28 days + context Patient @@ -678,11 +676,9 @@ define "Key population member type Observation": @activity: HIV.B6 Capture or update client history @description: Client is a sex worker */ -define SW: - exists ( - "Key population member type Observation" O - where O.value ~ Concepts."Sex worker - HIV.B.DE51" - ) +define "Sex worker": + exists("Key population member type Observation" O + where O.value ~ Concepts."Sex worker - HIV.B.DE51") /* End of Sex worker B.DE51 */ /* @@ -690,8 +686,8 @@ define SW: @activity: HIV.B6 Capture or update client history @description: Client is a man who has sex with men */ -define MSM: - exists ("Key population member type Observation" O +define "Men who have sex with men": + exists("Key population member type Observation" O where O.value ~ Concepts."Men who have sex with men" ) /* End of Men who have sex with men */ @@ -701,9 +697,8 @@ define MSM: @activity: HIV.B6 Capture or update client history @description: Client identifies as trans and gender-diverse */ -define Trans: - exists ( - "Key population member type Observation" O +define "Trans and gender-diverse people": + exists("Key population member type Observation" O where O.value ~ Concepts."Trans and gender-diverse people - HIV.B.DE53" ) /* End of Trans and gender-diverse people B.DE53 */ @@ -713,9 +708,8 @@ define Trans: @activity: HIV.B6 Capture or update client history @description: Client is a person who injects drugs */ -define PWID: - exists ( - "Key population member type Observation" O +define "People who inject drugs": + exists("Key population member type Observation" O where O.value ~ Concepts."People who inject drugs - HIV.B.DE54" ) /* End of People who inject drugs B.DE54 */ @@ -725,11 +719,9 @@ define PWID: @activity: HIV.B6 Capture or update client history @description: Client lives in a prison or another closed setting */ -define Prisoner: - exists ( - "Key population member type Observation" O - where O.value ~ Concepts."People living in prisons and other closed settings" - ) +define "People living in prisons and other closed settings": + exists("Key population member type Observation" O + where O.value ~ Concepts."People living in prisons and other closed settings") /* End of People living in prisons and other closed settings */ /* diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index e9a227273e..e0986f8fdd 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -179,14 +179,7 @@ define "By Geographic Region Stratifier": /* * Other Stratifiers */ -define patientGroups: - List{ - if "Sex worker B.DE51" then 'SW' else null, - if "Men who have sex with men" then 'MSM' else null, - if "Trans and gender-diverse people B.DE53" then 'Trans' else null, - if "People who inject drugs B.DE54" then 'PWID' else null, - if "People living in prisons and other closed settings" then 'Prisoner' else null - } + define "Treatment outcome category": List{ @@ -598,12 +591,17 @@ define "Unknown B.DE36 Observation": @activity: HIV.B6 Capture or update client history @description: The type of key population that the client is included in */ -// TODO: Replace placeholder with relevant CQL logic -define "Key population member type B.DE50": - exists "Key population member type B.DE50 Observation" -define "Key population member type B.DE50 Observation": - Elements."Key population member type B.DE50 Observation" O - where O.effective.toInterval() during "Measurement Period" +define "Is Key population member": + exists "Key population member type Observation" + +define "Key population member type Observation": + Elements."Key population member type Observation" O + where O.effective.toInterval() before end of "Measurement Period" + or O.issued before end of "Measurement Period" + +// Stratifier +define patientGroups: + "Key population member type Observation".getObservationCodes() /* End of Key population member type B.DE50 */ /* @@ -612,9 +610,9 @@ define "Key population member type B.DE50 Observation": @description: Client is a sex worker */ -define "Sex worker B.DE51": - exists(Elements."Sex worker B.DE51" SW - where SW.issued before end of "Measurement Period") +define "Sex worker": + exists("Key population member type Observation" O + where O.value ~ Concepts."Sex worker - HIV.B.DE51") /* End of Sex worker B.DE51 */ /* @@ -622,10 +620,9 @@ define "Sex worker B.DE51": @activity: HIV.B6 Capture or update client history @description: Client is a man who has sex with men */ - define "Men who have sex with men": - exists(Elements."Men who have sex with men" MSM - where MSM.issued before end of "Measurement Period") + exists("Key population member type Observation" O + where O.value ~ Concepts."Men who have sex with men") /* End of Men who have sex with men */ /* @@ -633,10 +630,9 @@ define "Men who have sex with men": @activity: HIV.B6 Capture or update client history @description: Client identifies as trans and gender-diverse */ - -define "Trans and gender-diverse people B.DE53": - exists(Elements."Trans and gender-diverse people B.DE53" T - where T.issued before end of "Measurement Period") +define "Trans and gender-diverse people": + exists("Key population member type Observation" O + where O.value ~ Concepts."Trans and gender-diverse people - HIV.B.DE53") /* End of Trans and gender-diverse people B.DE53 */ /* @@ -644,10 +640,10 @@ define "Trans and gender-diverse people B.DE53": @activity: HIV.B6 Capture or update client history @description: Client is a person who injects drugs */ - -define "People who inject drugs B.DE54": - exists(Elements."People who inject drugs B.DE54" PWID - where PWID.issued before end of "Measurement Period") +define "People who inject drugs": + exists("Key population member type Observation" O + where O.value ~ Concepts."People who inject drugs - HIV.B.DE54" + ) /* End of People who inject drugs B.DE54 */ /* @@ -655,10 +651,9 @@ define "People who inject drugs B.DE54": @activity: HIV.B6 Capture or update client history @description: Client lives in a prison or another closed setting */ - define "People living in prisons and other closed settings": - exists(Elements."People living in prisons and other closed settings" P - where P.issued before end of "Measurement Period") + exists("Key population member type Observation" O + where O.value ~ Concepts."People living in prisons and other closed settings") /* End of People living in prisons and other closed settings */ /* From 5a3f01f504332f5f3fbdce0a235e2eaf471863f3 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 6 Aug 2024 06:54:57 -0700 Subject: [PATCH 10/13] Fixes --- input/cql/HIVConceptsCustom.cql | 6 +- input/cql/HIVElements.cql | 107 +++++++++++++++-------------- input/cql/HIVIndicatorElements.cql | 5 +- 3 files changed, 61 insertions(+), 57 deletions(-) diff --git a/input/cql/HIVConceptsCustom.cql b/input/cql/HIVConceptsCustom.cql index b375081e9f..666c4cdf40 100644 --- a/input/cql/HIVConceptsCustom.cql +++ b/input/cql/HIVConceptsCustom.cql @@ -8,9 +8,13 @@ codesystem "Devicestatement-status": 'http://hl7.org/fhir/device-statement-statu codesystem "SNOMEDCT:2018-03": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2018-03' codesystem "SNOMEDCT": 'urn:oid:2.16.840.1.113883.6.96' codesystem "AdverseEventSeverity": 'http://terminology.hl7.org/CodeSystem/adverse-event-severity' - +codesystem "RoleCode": 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' code "encounter-diagnosis": 'encounter-diagnosis' from "ConditionCategoryCodes" display 'Encounter Diagnosis' +// Related Person +valueset "RelatedPersonRelationshipType": 'http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype' +code "Mother": 'MTH' from "RoleCode" + // Condition Clinical Status Codes code "active": 'active' from "ConditionClinicalStatusCodes" code "recurrence": 'recurrence' from "ConditionClinicalStatusCodes" diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index e668ac3d3a..8617200164 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -23,23 +23,9 @@ context Patient * HIV Elements */ -/* Umbrella Element Definitions */ -// From Common - - -define "methadone_prescribed": -[MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ CustomConcepts."methadone" - -define "buprenorphine_prescribed": -[MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ CustomConcepts."buprenorphine" - +/* General Element Definitions */ +// From Common define "Needle Syringe Dispensed": [DeviceUseStatement] DUS with [Observation: Concepts."Key population member - HIV.E.DE113"] O @@ -49,34 +35,11 @@ define "Needle Syringe Dispensed": and O.value ~ Concepts."People who inject drugs - HIV.B.DE54" where DUS.status = 'completed' -define PWID_person: - [Observation: Concepts."Key population member - HIV.E.DE113"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."People who inject drugs - HIV.B.DE54" - -define "HIV Positive Observation": -[Observation] O - where O.status in {'final', 'amended'} - and O.code ~ Concepts."HIV status" - and O.value ~ Concepts."HIV-positive - HIV.B.DE116" - -define "HIV Positive Observation - HIV Self Test": -[Observation] O - where O.status in {'final', 'amended'} - and O.code ~ Concepts."HIV self-test" - and O.value ~ Concepts."HIV-positive - HIV.B.DE116" - -define "HIV Negative Observation": -[Observation] O - where O.status in {'final', 'amended'} - and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" - and O.value ~ Concepts."HIV-negative - HIV.B.DE117" - -define "HIV test resulted": - [Observation] O - where O.status in {'final', 'amended'} - and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" +// define PWID_person: +// [Observation: Concepts."Key population member - HIV.E.DE113"] O +// where O.status in { 'final', 'amended', 'corrected' } +// and exists(O.category OC where OC ~ CustomConcepts."social-history") +// and O.value ~ Concepts."People who inject drugs - HIV.B.DE54" define "HIV PREP Active": [MedicationStatement] MS @@ -138,7 +101,6 @@ define "ART start date": "ART Medication Statement" MS return start of MS.effective.toInterval() - define "First On ART": (First("On ART D.DE38")) @@ -639,14 +601,13 @@ define "Unknown B.DE36": exists "Unknown B.DE36 Condition" or exists "Unknown B.DE36 Observation" define "Unknown B.DE36 Condition": - [Condition: Concepts."Unknown - HIV.B.DE36"] + [Condition: Concepts."Unknown"] define "Unknown B.DE36 Observation": "Partner HIV status reported Observation" O where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Unknown - HIV.B.DE36" + and O.value ~ Concepts."Unknown" /* End of Unknown B.DE36 */ - /* * Key populations (men who have sex with men, people living in prisons and other closed settings, people who inject drugs, sex workers, trans and gender diverse people) */ @@ -1391,8 +1352,8 @@ define "HIV-inconclusive Observation": */ define "HIV Status": case - when exists("HIV Positive Condition") or exists(Common."HIV Positive Observation") then Concepts."HIV-positive - HIV.B.DE116" - when not exists("HIV Positive Condition") and exists(Common."HIV Negative Observation") then Concepts."HIV-negative - HIV.B.DE117" + when exists("HIV Positive Condition") or exists("HIV Positive Observation") then Concepts."HIV-positive - HIV.B.DE116" + when not exists("HIV Positive Condition") and exists("HIV Negative Observation") then Concepts."HIV-negative - HIV.B.DE117" else Concepts."Unknown - HIV.B.DE118" end @@ -1402,6 +1363,18 @@ define "HIV Status Condition": define "HIV Status Observation": [Observation: Concepts."HIV status"] O where O.status in { 'final', 'amended', 'corrected' } + +define "HIV Negative Observation": +[Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.value ~ Concepts."HIV-negative - HIV.B.DE117" + +define "HIV test resulted": + [Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + /* End of HIV status */ /* @@ -1409,6 +1382,18 @@ define "HIV Status Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Client is HIV-positive */ +define "HIV Positive Observation": +[Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."HIV status" + and O.value ~ Concepts."HIV-positive - HIV.B.DE116" + +define "HIV Positive Observation - HIV Self Test": +[Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."HIV self-test" + and O.value ~ Concepts."HIV-positive - HIV.B.DE116" + // TODO: Replace placeholder with relevant CQL logic define "HIV-positive B.DE116": {First("HIV-positive B.DE116 Condition").prevalenceInterval(),First("HIV-positive B.DE116 Observation").effective.toInterval()} @@ -9493,6 +9478,11 @@ define "Antivirals Observation": @activity: HIV.D8 Capture or update client history @description: Opioid substitution to treat opioid dependence */ +define "buprenorphine_prescribed": +[MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ CustomConcepts."buprenorphine" // TODO: Replace placeholder with relevant CQL logic define "Buprenorphine D.DE552": exists "Buprenorphine D.DE552 Condition" @@ -9544,6 +9534,12 @@ define "Hormonal family planning method Observation": @activity: HIV.D8 Capture or update client history @description: Opioid substitution to treat opioid dependence */ +define "methadone_prescribed": +[MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ CustomConcepts."methadone" + // TODO: Replace placeholder with relevant CQL logic define "Methadone D.DE555": exists "Methadone D.DE555 Condition" @@ -12614,9 +12610,15 @@ define "HIV-exposed infant or child E.DE112 Observation": @activity: HIV.E1 Capture or update mother's history @description: Mother is a member of a key population which has an increased risk of HIV */ -// TODO: Replace placeholder with relevant CQL logic -define "Key population member E.DE113": +define "RelatedPersonMother": + [RelatedPerson] R + where CustomConcepts."Mother" in R.relationship.coding + +define "Mother": singleton from "RelatedPersonMother" + +define "Is Key population member E.DE113": exists "Key population member E.DE113 Observation" + define "Key population member E.DE113 Observation": [Observation: Concepts."Key population member - HIV.E.DE113"] O where O.status in { 'final', 'amended', 'corrected' } @@ -12680,7 +12682,6 @@ define "Trans and gender-diverse people E.DE117": @activity: HIV.E1 Capture or update mother's history @description: Infant's mother is in a prison or closed setting */ - define "People living in prisons and other closed setting": [Observation: Concepts."Key population member - HIV.E.DE113"] O where O.status in { 'final', 'amended', 'corrected' } diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index e0986f8fdd..e40ff30f49 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -111,7 +111,7 @@ define "Patient Deceased during Measurement Period": // HIV Testing define "Elevated Viral load test during Measurement Period": "Viral load test result D.DE387" VL - with Common."viral load sample collection" P + with Elements."viral load sample collection" P such that VL.partOf.references(P) and P.performed.toInterval() during "Measurement Period" where VL.value > 1000 sort by start of effective.toInterval() @@ -609,7 +609,6 @@ define patientGroups: @activity: HIV.B6 Capture or update client history @description: Client is a sex worker */ - define "Sex worker": exists("Key population member type Observation" O where O.value ~ Concepts."Sex worker - HIV.B.DE51") @@ -963,7 +962,7 @@ define "HIV-inconclusive Observation": define "HIV Status": case when exists(Elements."HIV Positive Condition" C where C.onset before end of "Measurement Period") then Concepts."HIV-positive - HIV.B.DE116" - when not exists(Elements."HIV Positive Condition" C where C.onset before end of "Measurement Period") and exists(Common."HIV Negative Observation" O where O.issued before end of "Measurement Period") then Concepts."HIV-negative - HIV.B.DE117" + when not exists(Elements."HIV Positive Condition" C where C.onset before end of "Measurement Period") and exists(Elements."HIV Negative Observation" O where O.issued before end of "Measurement Period") then Concepts."HIV-negative - HIV.B.DE117" else Concepts."Unknown - HIV.B.DE118" end /* End of HIV status */ From 908fded7003549e55d0c75b814dd0f1623a60905 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 6 Aug 2024 08:36:57 -0700 Subject: [PATCH 11/13] Updates --- input/cql/HIVCommon.cql | 162 ++--------------------------- input/cql/HIVElements.cql | 39 +++++++ input/cql/HIVIndicatorElements.cql | 131 ++++++++++++++++++++++- 3 files changed, 176 insertions(+), 156 deletions(-) diff --git a/input/cql/HIVCommon.cql b/input/cql/HIVCommon.cql index bca456f2d8..26830eb625 100644 --- a/input/cql/HIVCommon.cql +++ b/input/cql/HIVCommon.cql @@ -22,95 +22,9 @@ context Patient - define TB_diagnosed: - exists( - ([Condition] C - where C.clinicalStatus ~ CustomConcepts."active" - and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") - and C.code ~ Concepts."Diagnosed TB" - and C.onset during "Measurement Period") - ) - - define TB_presumptive: - exists( - ([Condition] C - where C.clinicalStatus ~ CustomConcepts."active" - and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") - and C.code ~ Concepts."Presumptive TB - HIV.D.DE945" - and C.onset during "Measurement Period") - ) - - -define Exposure_Occupational: - exists ( - [Observation: Concepts."HIV exposure type"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."Occupational" - ) - -define Exposure_Non_Occupational_violent: - exists ( - [Observation: Concepts."HIV exposure type"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."Non-occupational violent" - ) - -define Exposure_Non_Occupational_consensual_sex: - exists ( - [Observation: Concepts."HIV exposure type"] O - where O.status in { 'final', 'amended', 'corrected' } - and exists(O.category OC where OC ~ CustomConcepts."social-history") - and O.value ~ Concepts."Non-occupational consensual sex" - ) - -define hiv_exposure_type: - List{ - if Exposure_Occupational then 'Occupational' else null, - if Exposure_Non_Occupational_violent then 'Non-occupational violent' else null, - if Exposure_Non_Occupational_consensual_sex then 'Non-occupational consensual sex' else null - } /*@triggeredBy Encounter with location = community level testing*/ -define "Community_testing": - exists([Observation] O - with [Encounter] E - such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ Concepts."Community-level testing") - where (O.status in { 'final', 'amended' } - and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" - and O.issued after start of "Measurement Period" - and O.issued before end of "Measurement Period")) - - -/*@triggeredBy Encounter with location = facility level testing*/ -define "Facility_testing": - exists([Observation] O - with [Encounter] E - such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ Concepts."Facility-level testing") - where (O.status in { 'final', 'amended' } - and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" - and O.issued after start of "Measurement Period" - and O.issued before end of "Measurement Period") - ) - -//lifted this from ANC DAK -define "ANC_case": -exists( - [EpisodeOfCare] EOC - where exists(EOC.type T where T ~ Concepts."Already on ART at first antenatal care visit") - and (exists ( - EOC.statusHistory H - where H.period overlaps "Measurement Period" - ) - or ( - EOC.period overlaps "Measurement Period" - ) - ) - ) - - define "PREP Product Oral": exists([MedicationStatement] MS where MS.status = 'completed' @@ -349,7 +263,7 @@ define function ToDaily(frequency System.Integer, period System.Quantity): or end of period = maximum DateTime ) - define function MedicationRequestPeriod(Request "MedicationRequest"): + define function MedicationRequestPeriod(Request FHIR.MedicationRequest): Request R let dosage: singleton from R.dosageInstruction, @@ -412,76 +326,14 @@ define function "DosesPerDay"(frequency Code): //dosage * Quantity { value: dosesPerDay, unit: '/d' } -define "methadone_prescribed at date": -[MedicationRequest] MR - where MR.status = 'completed' - and MR.intent = 'order' - and MR.medication ~ CustomConcepts."methadone" - //and "GetMedicationDailyDose"(MR.dosageInstruction, "DosesPerDay"(singleton from MR.dosageInstruction.timing.repeat.frequencyMax)) >= 60 'mg/d' - and MedicationRequestPeriod(MR) starts before "Measurement Date" - and MedicationRequestPeriod(MR) ends after "Measurement Date" -define "VMMC_done": -[Procedure] P - where P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" - -define "VMMC_adverse_event": -[AdverseEvent] AE - with [Procedure] P - such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" - and P.performed after start of "Measurement Period" - and P.performed before end of "Measurement Period" - and AE.date <= (P.performed + 30 days) - and AE.date >= (P.performed) - where AE.actuality = 'actual' - -define "VMMC_adverse_event_type": - case - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Abnormal pain") then Concepts."Abnormal pain" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Anaesthesia-related effects") then Concepts."Anaesthesia-related effects" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Damage to the penis") then Concepts."Damage to the penis" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Difficulty urinating") then Concepts."Difficulty urinating" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive bleeding") then Concepts."Excessive bleeding" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive skin removal") then Concepts."Excessive skin removal" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive swelling") then Concepts."Excessive swelling" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Haematoma") then Concepts."Haematoma" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Infection") then Concepts."Infection" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Injury to glans") then Concepts."Injury to glans" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Scar or disfigurement") then Concepts."Scar or disfigurement" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Sharps injury to personnel") then Concepts."Sharps injury to personnel" - when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Wound disruption") then Concepts."Wound disruption" - else Concepts."Other - HIV.B.DE222" - end -define "VMMC_adverse_event_Intraoperative": -[AdverseEvent] AE - with [Procedure] P - such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" - and P.performed after start of "Measurement Period" - and P.performed before end of "Measurement Period" - and AE.date = P.performed - where AE.actuality = 'actual' - -define "VMMC_adverse_event_Postoperative": -[AdverseEvent] AE - with [Procedure] P - such that AE.suspectEntity.instance.references(P) and P.status = 'completed' - and P.code ~ Concepts."Voluntary medical male circumcision VMMC" - and P.performed after start of "Measurement Period" - and P.performed before end of "Measurement Period" - and AE.date <= (P.performed + 30 days) - and AE.date > (P.performed) - where AE.actuality = 'actual' - - define "VMMC_adverse_event_timing": - case - when exists(VMMC_adverse_event_Intraoperative) then Concepts."Intraoperative" - when exists(VMMC_adverse_event_Postoperative) then Concepts."Postoperative" - else null - end + + + + + + define "Partner or contact of an index case": diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 8617200164..22e288914a 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -26,6 +26,40 @@ context Patient /* General Element Definitions */ // From Common + +// Exposure to HIV +define Exposure_Occupational: + exists ( + [Observation: Concepts."HIV exposure type"] O + where O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."Occupational" + ) + +define Exposure_Non_Occupational_violent: + exists ( + [Observation: Concepts."HIV exposure type"] O + where O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."Non-occupational violent" + ) + +define Exposure_Non_Occupational_consensual_sex: + exists ( + [Observation: Concepts."HIV exposure type"] O + where O.status in { 'final', 'amended', 'corrected' } + and exists(O.category OC where OC ~ CustomConcepts."social-history") + and O.value ~ Concepts."Non-occupational consensual sex" + ) + +define hiv_exposure_type: + List{ + if Exposure_Occupational then 'Occupational' else null, + if Exposure_Non_Occupational_violent then 'Non-occupational violent' else null, + if Exposure_Non_Occupational_consensual_sex then 'Non-occupational consensual sex' else null + } + +// Needle Syringe Dispensed define "Needle Syringe Dispensed": [DeviceUseStatement] DUS with [Observation: Concepts."Key population member - HIV.E.DE113"] O @@ -14512,6 +14546,11 @@ define "STI services": @activity: HIV.B6 Capture or update client history @description: Client accessed voluntary medical male circumcision (VMMC) services */ +// define "VMMC_done": +// [Procedure] P +// where P.status = 'completed' +// and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + define "VMMC": [Procedure] P diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index e40ff30f49..29926d2ebc 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -10,6 +10,7 @@ include WHOCommon called WC include WHOElements called WE include HIVConcepts called Concepts +include HIVConceptsCustom called ConceptsCustom include HIVElements called Elements include HIVCommon called Common @@ -24,9 +25,60 @@ context Patient * HIV Elements */ -/* Umbrella Data Elements */ +/* General Data Elements */ + // From Common + +define "Community_testing": + exists([Observation] O + with [Encounter] E + such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ Concepts."Community-level testing") + where (O.status in { 'final', 'amended' } + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.issued after start of "Measurement Period" + and O.issued before end of "Measurement Period")) + + +/*@triggeredBy Encounter with location = facility level testing*/ +define "Facility_testing": + exists([Observation] O + with [Encounter] E + such that O.encounter.references(E) and exists(E.location.physicalType PT where PT ~ Concepts."Facility-level testing") + where (O.status in { 'final', 'amended' } + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.issued after start of "Measurement Period" + and O.issued before end of "Measurement Period") + ) + +//lifted this from ANC DAK +define "ANC_case": +exists( + [EpisodeOfCare] EOC + where exists(EOC.type T where T ~ Concepts."Already on ART at first antenatal care visit") + and (exists ( + EOC.statusHistory H + where H.period overlaps "Measurement Period" + ) + or ( + EOC.period overlaps "Measurement Period" + ) + ) + ) + + + +define "methadone_prescribed at date": +[MedicationRequest] MR + where MR.status = 'completed' + and MR.intent = 'order' + and MR.medication ~ ConceptsCustom."methadone" + //and "GetMedicationDailyDose"(MR.dosageInstruction, "DosesPerDay"(singleton from MR.dosageInstruction.timing.repeat.frequencyMax)) >= 60 'mg/d' + and MedicationRequestPeriod(MR) starts before "Measurement Date" + and MedicationRequestPeriod(MR) ends after "Measurement Date" + + + define "OAMT_initiated": exists( [EpisodeOfCare] EOC @@ -1135,6 +1187,65 @@ define "VMMC procedure date Value": @activity: HIV.B21 Offer prevention options @description: Severity of the adverse event associated with voluntary medical male circumcision (VMMC) procedure */ + +define "VMMC_adverse_event": +[AdverseEvent] AE + with [Procedure] P + such that AE.suspectEntity.instance.references(P) and P.status = 'completed' + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.performed after start of "Measurement Period" + and P.performed before end of "Measurement Period" + and AE.date <= (P.performed + 30 days) + and AE.date >= (P.performed) + where AE.actuality = 'actual' + + +define "VMMC_adverse_event_type": + case + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Abnormal pain") then Concepts."Abnormal pain" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Anaesthesia-related effects") then Concepts."Anaesthesia-related effects" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Damage to the penis") then Concepts."Damage to the penis" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Difficulty urinating") then Concepts."Difficulty urinating" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive bleeding") then Concepts."Excessive bleeding" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive skin removal") then Concepts."Excessive skin removal" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Excessive swelling") then Concepts."Excessive swelling" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Haematoma") then Concepts."Haematoma" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Infection") then Concepts."Infection" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Injury to glans") then Concepts."Injury to glans" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Scar or disfigurement") then Concepts."Scar or disfigurement" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Sharps injury to personnel") then Concepts."Sharps injury to personnel" + when exists("VMMC_adverse_event" AE where AE.event ~ Concepts."Wound disruption") then Concepts."Wound disruption" + else Concepts."Other - HIV.B.DE222" + end + +define "VMMC_adverse_event_Intraoperative": +[AdverseEvent] AE + with [Procedure] P + such that AE.suspectEntity.instance.references(P) and P.status = 'completed' + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.performed after start of "Measurement Period" + and P.performed before end of "Measurement Period" + and AE.date = P.performed + where AE.actuality = 'actual' + +define "VMMC_adverse_event_Postoperative": +[AdverseEvent] AE + with [Procedure] P + such that AE.suspectEntity.instance.references(P) and P.status = 'completed' + and P.code ~ Concepts."Voluntary medical male circumcision VMMC" + and P.performed after start of "Measurement Period" + and P.performed before end of "Measurement Period" + and AE.date <= (P.performed + 30 days) + and AE.date > (P.performed) + where AE.actuality = 'actual' + +define "VMMC_adverse_event_timing": + case + when exists(VMMC_adverse_event_Intraoperative) then Concepts."Intraoperative" + when exists(VMMC_adverse_event_Postoperative) then Concepts."Postoperative" + else null + end + // TODO: Replace placeholder with relevant CQL logic define "Adverse event severity": exists "Adverse event severity Observation" @@ -5037,6 +5148,15 @@ define "TB diagnosis result Observation": @activity: HIV.D8 Capture or update client history @description: Client is diagnosed with TB disease */ +define TB_diagnosed: + exists( + ([Condition] C + where C.clinicalStatus ~ ConceptsCustom."active" + and exists(C.category CC where CC ~ ConceptsCustom."encounter-diagnosis") + and C.code ~ Concepts."Diagnosed TB" + and C.onset during "Measurement Period") + ) + // TODO: Replace placeholder with relevant CQL logic define "Diagnosed TB": exists "Diagnosed TB Condition" @@ -5073,6 +5193,15 @@ define "TB excluded Observation": @activity: HIV.D8 Capture or update client history @description: Client has signs or symptoms of tuberculosis (TB) without laboratory confirmation */ +define TB_presumptive: + exists( + ([Condition] C + where C.clinicalStatus ~ ConceptsCustom."active" + and exists(C.category CC where CC ~ ConceptsCustom."encounter-diagnosis") + and C.code ~ Concepts."Presumptive TB - HIV.D.DE945" + and C.onset during "Measurement Period") + ) + // TODO: Replace placeholder with relevant CQL logic define "Presumptive TB D.DE945": exists "Presumptive TB D.DE945 Observation" From e29682a6150dc7144b3dda327576dc85d264183b Mon Sep 17 00:00:00 2001 From: Patric Prado Date: Wed, 7 Aug 2024 23:20:57 -0700 Subject: [PATCH 12/13] indicators --- input/cql/HIVConceptsCustom.cql | 2 +- input/cql/HIVElements.cql | 105 +++++++---------------- input/cql/HIVIND37Logic.cql | 41 ++++++++- input/cql/HIVIND38Logic.cql | 23 ++++- input/cql/HIVIndicatorElements.cql | 129 ++++++++--------------------- 5 files changed, 125 insertions(+), 175 deletions(-) diff --git a/input/cql/HIVConceptsCustom.cql b/input/cql/HIVConceptsCustom.cql index 666c4cdf40..327734aba2 100644 --- a/input/cql/HIVConceptsCustom.cql +++ b/input/cql/HIVConceptsCustom.cql @@ -63,4 +63,4 @@ code "needle-syringe": 'needle syringe' from "missing concepts" code "methadone": 'methadone' from "missing concepts" code "buprenorphine": 'buprenorphine' from "missing concepts" code "viral load test": 'viral load test' from "missing concepts" - +code "delivery": 'delivery' from "missing concepts" diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 22e288914a..54d85347f7 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -860,8 +860,6 @@ define "HIV test conducted Observation": */ // TODO: Replace placeholder with relevant CQL logic define "HIV test type B.DE81": - exists "HIV test type B.DE81 Observation" -define "HIV test type B.DE81 Observation": [Observation: Concepts."HIV test type - HIV.B.DE81"] O where O.status in { 'final', 'amended', 'corrected' } /* End of HIV test type B.DE81 */ @@ -871,14 +869,9 @@ define "HIV test type B.DE81 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV performed with a rapid diagnostic */ -// TODO: Replace placeholder with relevant CQL logic + define "Rapid diagnostic test for HIV B.DE82": - exists "Rapid diagnostic test for HIV B.DE82 Condition" - or exists "Rapid diagnostic test for HIV B.DE82 Observation" -define "Rapid diagnostic test for HIV B.DE82 Condition": - [Condition: Concepts."Rapid diagnostic test for HIV - HIV.B.DE82"] -define "Rapid diagnostic test for HIV B.DE82 Observation": - "HIV test type B.DE81 Observation" O + "HIV test type B.DE81" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" /* End of Rapid diagnostic test for HIV B.DE82 */ @@ -888,14 +881,9 @@ define "Rapid diagnostic test for HIV B.DE82 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV performed with an enzyme immunoassay */ -// TODO: Replace placeholder with relevant CQL logic + define "Enzyme immunoassay for HIV B.DE83": - exists "Enzyme immunoassay for HIV B.DE83 Condition" - or exists "Enzyme immunoassay for HIV B.DE83 Observation" -define "Enzyme immunoassay for HIV B.DE83 Condition": - [Condition: Concepts."Enzyme immunoassay for HIV - HIV.B.DE83"] -define "Enzyme immunoassay for HIV B.DE83 Observation": - "HIV test type B.DE81 Observation" O + "HIV test type B.DE81" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."Enzyme immunoassay for HIV - HIV.B.DE83" /* End of Enzyme immunoassay for HIV B.DE83 */ @@ -905,14 +893,9 @@ define "Enzyme immunoassay for HIV B.DE83 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Virological test, which includes testing for early infant diagnosis */ -// TODO: Replace placeholder with relevant CQL logic + define "Nucleic acid test for HIV B.DE84": - exists "Nucleic acid test for HIV B.DE84 Condition" - or exists "Nucleic acid test for HIV B.DE84 Observation" -define "Nucleic acid test for HIV B.DE84 Condition": - [Condition: Concepts."Nucleic acid test for HIV - HIV.B.DE84"] -define "Nucleic acid test for HIV B.DE84 Observation": - "HIV test type B.DE81 Observation" O + "HIV test type B.DE81" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."Nucleic acid test for HIV - HIV.B.DE84" /* End of Nucleic acid test for HIV B.DE84 */ @@ -922,14 +905,9 @@ define "Nucleic acid test for HIV B.DE84 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV and syphilis performed with a rapid diagnostic */ -// TODO: Replace placeholder with relevant CQL logic + define "Dual HIV/syphilis rapid diagnostic test B.DE85": - exists "Dual HIV/syphilis rapid diagnostic test B.DE85 Condition" - or exists "Dual HIV/syphilis rapid diagnostic test B.DE85 Observation" -define "Dual HIV/syphilis rapid diagnostic test B.DE85 Condition": - [Condition: Concepts."Dual HIV/syphilis rapid diagnostic test - HIV.B.DE85"] -define "Dual HIV/syphilis rapid diagnostic test B.DE85 Observation": - "HIV test type B.DE81 Observation" O + "HIV test type B.DE81" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."Dual HIV/syphilis rapid diagnostic test - HIV.B.DE85" /* End of Dual HIV/syphilis rapid diagnostic test B.DE85 */ @@ -939,14 +917,9 @@ define "Dual HIV/syphilis rapid diagnostic test B.DE85 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV performed by self-tester using a rapid diagnostic */ -// TODO: Replace placeholder with relevant CQL logic + define "HIV self-test": - exists "HIV self-test Condition" - or exists "HIV self-test Observation" -define "HIV self-test Condition": - [Condition: Concepts."HIV self-test"] -define "HIV self-test Observation": - "HIV test type B.DE81 Observation" O + "HIV test type B.DE81" O where O.status in { 'final', 'amended', 'corrected' } and O.value ~ Concepts."HIV self-test" /* End of HIV self-test */ @@ -12515,12 +12488,10 @@ define "Delivery date Value": @activity: HIV.E1 Capture or update mother's history @description: The type of place where the woman delivered */ -// TODO: Replace placeholder with relevant CQL logic + define "Place of delivery": - exists "Place of delivery Observation" -define "Place of delivery Observation": - [Observation: Concepts."Place of delivery"] O - where O.status in { 'final', 'amended', 'corrected' } + [Procedure: CustomConcepts."delivery"] + /* End of Place of delivery */ /* @@ -12528,16 +12499,13 @@ define "Place of delivery Observation": @activity: HIV.E1 Capture or update mother's history @description: The woman delivered at a health facility */ -// TODO: Replace placeholder with relevant CQL logic + define "Health facility": - exists "Health facility Condition" - or exists "Health facility Observation" -define "Health facility Condition": - [Condition: Concepts."Health facility"] -define "Health facility Observation": - "Place of delivery Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Health facility" + "Place of delivery" P + with [Location] L + such that P.location.references(L) + and L.physicalType ~ Concepts."Health facility" + /* End of Health facility */ /* @@ -12545,16 +12513,13 @@ define "Health facility Observation": @activity: HIV.E1 Capture or update mother's history @description: The woman delivered at home */ -// TODO: Replace placeholder with relevant CQL logic + define "Home": - exists "Home Condition" - or exists "Home Observation" -define "Home Condition": - [Condition: Concepts."Home"] -define "Home Observation": - "Place of delivery Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Home" + "Place of delivery" P + with [Location] L + such that P.location.references(L) + and L.physicalType ~ Concepts."Home" + /* End of Home */ /* @@ -12562,16 +12527,12 @@ define "Home Observation": @activity: HIV.E1 Capture or update mother's history @description: The woman delivered at another location that is not at home or at a health facility */ -// TODO: Replace placeholder with relevant CQL logic + define "Other E.DE70": - exists "Other E.DE70 Condition" - or exists "Other E.DE70 Observation" -define "Other E.DE70 Condition": - [Condition: Concepts."Other - HIV.E.DE70"] -define "Other E.DE70 Observation": - "Place of delivery Observation" O - where O.status in { 'final', 'amended', 'corrected' } - and O.value ~ Concepts."Other - HIV.E.DE70" + "Place of delivery" P + with [Location] L + such that P.location.references(L) + and L.physicalType ~ Concepts."Other - HIV.E.DE70" /* End of Other E.DE70 */ /* @@ -12630,13 +12591,11 @@ define "Age of infant in years": @activity: HIV.F6 Check whether infant/child had HIV exposure @description: Whether the infant or child was determined to have had HIV exposure */ -// TODO: Replace placeholder with relevant CQL logic + define "HIV-exposed infant or child E.DE112": - exists "HIV-exposed infant or child E.DE112 Observation" -define "HIV-exposed infant or child E.DE112 Observation": [Observation: Concepts."HIV-exposed infant or child - HIV.E.DE112"] O where O.status in { 'final', 'amended', 'corrected' } - and O.value is true + /* End of HIV-exposed infant or child E.DE112 */ /* diff --git a/input/cql/HIVIND37Logic.cql b/input/cql/HIVIND37Logic.cql index 0ca1b334e3..f3090fac22 100644 --- a/input/cql/HIVIND37Logic.cql +++ b/input/cql/HIVIND37Logic.cql @@ -68,6 +68,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include FHIRCommon called FC include WHOCommon called WCom +include HIVElements called HE +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -89,8 +91,19 @@ define "Initial Population": * Calculation: COUNT of clients with "HIV status"='HIV-positive' AND "Place of delivery" is a 'Health facility' AND "Delivery date" is in the reporting period AND "Date of viral load sample collection" is on "Delivery date" AND "Viral load test result" LESS THAN 1000 copies/mL */ +define "First Health facility": + (First(HE."Health facility")) + define "Numerator": - true + HIE."HIV-positive B.DE116" + and HIE."On ART D.DE38" + and HIE."Health facility" + and exists( + HIE."Viral load test result D.DE387" VL + with HE."viral load sample collection" P + such that VL.partOf.references(P) and start of P.performed.toInterval() = start of "First Health facility".performed.toInterval() + where VL.value < 1000 + ) /** @@ -101,8 +114,30 @@ define "Numerator": */ define "Denominator": - true - + HIE."HIV-positive B.DE116" + and HIE."On ART D.DE38" + and HIE."Health facility" + and exists( + HIE."Viral load test result D.DE387" VL + with HE."viral load sample collection" P + such that VL.partOf.references(P) and start of P.performed.toInterval() = start of "First Health facility".performed.toInterval() + ) /* end Populations */ +/* + * Disaggregators + */ + + +define "Age Stratifier": + HIE."By Age Stratifier 3" + +define "Geographic Region Stratifier": + HIE."By Geographic Region Stratifier" + +define "Stratification": + HIE."By Age Stratifier 3" ++ ':' + HIE."By Geographic Region Stratifier" + + // need to add  Timing of ART initiation (during pregnancy, on ART at first ANC visit) \ No newline at end of file diff --git a/input/cql/HIVIND38Logic.cql b/input/cql/HIVIND38Logic.cql index 894312b5a3..a1bc2b0ef9 100644 --- a/input/cql/HIVIND38Logic.cql +++ b/input/cql/HIVIND38Logic.cql @@ -68,6 +68,8 @@ include HIVCommon version '0.0.1' called HIC include FHIRHelpers version '4.0.1' include FHIRCommon called FC include WHOCommon called WCom +include HIVElements called HE +include HIVIndicatorElements called HIE // Indicator Definition parameter "Measurement Period" Interval default Interval[@2023-01-01, @2023-01-30] @@ -89,12 +91,22 @@ define "Initial Population": * Calculation: COUNT of infants who are an "HIV-exposed infant or child" with "Infant date of birth" within the reporting period AND with "Date of viral load sample collection" LESS THAN 2 months AFTER "Infant date of birth" AND "HIV test type"='Nucleic acid test for HIV' */ + define "Numerator": - true + exists(HE."HIV-exposed infant or child E.DE112" O + with [Patient] P + such that O.subject.references(P) and P.birthDate during "Measurement Period") + and exists( + HE."Nucleic acid test for HIV B.DE84" O + with [Patient] Pt + such that O.subject.references(Pt) + and months between start of O.effective.toInterval() and FHIRHelpers.ToDate(Pt.birthDate) < 2 months) + + /** - * Denominator + * Denominator - THiS SHOULDN'T BE PROPORTION * * Definition: Estimated number of HIV-positive women who delivered during the reporting period. | | Note: The denominator is a proxy measure for the number of infants born to HIV-infected women. * Calculation: *Estimated number of HIV-positive women who delivered during the reporting period @@ -106,3 +118,10 @@ define "Denominator": /* end Populations */ +/* + * Disaggregators + */ + + +define "Geographic Region Stratifier": + HIE."By Geographic Region Stratifier" \ No newline at end of file diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index 29926d2ebc..fd032360c3 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -835,12 +835,10 @@ define "ART start date B.DE72 Value": @activity: HIV.B7 Test for HIV using testing algorithm @description: Type of HIV test */ -// TODO: Replace placeholder with relevant CQL logic + define "HIV test type B.DE81": - exists "HIV test type B.DE81 Observation" -define "HIV test type B.DE81 Observation": - Elements."HIV test type B.DE81 Observation" O - where O.effective.toInterval() during "Measurement Period" + exists Elements."HIV test type B.DE81" + /* End of HIV test type B.DE81 */ /* @@ -848,17 +846,10 @@ define "HIV test type B.DE81 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV performed with a rapid diagnostic */ -// TODO: Replace placeholder with relevant CQL logic + define "Rapid diagnostic test for HIV B.DE82": - exists "Rapid diagnostic test for HIV B.DE82 Condition" - or exists "Rapid diagnostic test for HIV B.DE82 Observation" -define "Rapid diagnostic test for HIV B.DE82 Condition": - Elements."Rapid diagnostic test for HIV B.DE82 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Rapid diagnostic test for HIV B.DE82 Observation": - Elements."Rapid diagnostic test for HIV B.DE82 Observation" O - where O.effective.toInterval() during "Measurement Period" + exists(Elements."Rapid diagnostic test for HIV B.DE82" O + where O.effective.toInterval() during "Measurement Period") /* End of Rapid diagnostic test for HIV B.DE82 */ /* @@ -866,17 +857,10 @@ define "Rapid diagnostic test for HIV B.DE82 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV performed with an enzyme immunoassay */ -// TODO: Replace placeholder with relevant CQL logic + define "Enzyme immunoassay for HIV B.DE83": - exists "Enzyme immunoassay for HIV B.DE83 Condition" - or exists "Enzyme immunoassay for HIV B.DE83 Observation" -define "Enzyme immunoassay for HIV B.DE83 Condition": - Elements."Enzyme immunoassay for HIV B.DE83 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Enzyme immunoassay for HIV B.DE83 Observation": - Elements."Enzyme immunoassay for HIV B.DE83 Observation" O - where O.effective.toInterval() during "Measurement Period" + exists(Elements."Enzyme immunoassay for HIV B.DE83" O + where O.effective.toInterval() during "Measurement Period") /* End of Enzyme immunoassay for HIV B.DE83 */ /* @@ -884,17 +868,10 @@ define "Enzyme immunoassay for HIV B.DE83 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Virological test, which includes testing for early infant diagnosis */ -// TODO: Replace placeholder with relevant CQL logic + define "Nucleic acid test for HIV B.DE84": - exists "Nucleic acid test for HIV B.DE84 Condition" - or exists "Nucleic acid test for HIV B.DE84 Observation" -define "Nucleic acid test for HIV B.DE84 Condition": - Elements."Nucleic acid test for HIV B.DE84 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Nucleic acid test for HIV B.DE84 Observation": - Elements."Nucleic acid test for HIV B.DE84 Observation" O - where O.effective.toInterval() during "Measurement Period" + exists(Elements."Nucleic acid test for HIV B.DE84" O + where O.effective.toInterval() during "Measurement Period") /* End of Nucleic acid test for HIV B.DE84 */ /* @@ -902,17 +879,10 @@ define "Nucleic acid test for HIV B.DE84 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV and syphilis performed with a rapid diagnostic */ -// TODO: Replace placeholder with relevant CQL logic + define "Dual HIV/syphilis rapid diagnostic test B.DE85": - exists "Dual HIV/syphilis rapid diagnostic test B.DE85 Condition" - or exists "Dual HIV/syphilis rapid diagnostic test B.DE85 Observation" -define "Dual HIV/syphilis rapid diagnostic test B.DE85 Condition": - Elements."Dual HIV/syphilis rapid diagnostic test B.DE85 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Dual HIV/syphilis rapid diagnostic test B.DE85 Observation": - Elements."Dual HIV/syphilis rapid diagnostic test B.DE85 Observation" O - where O.effective.toInterval() during "Measurement Period" + exists(Elements."Dual HIV/syphilis rapid diagnostic test B.DE85" O + where O.effective.toInterval() during "Measurement Period") /* End of Dual HIV/syphilis rapid diagnostic test B.DE85 */ /* @@ -920,17 +890,10 @@ define "Dual HIV/syphilis rapid diagnostic test B.DE85 Observation": @activity: HIV.B7 Test for HIV using testing algorithm @description: Antibody test for HIV performed by self-tester using a rapid diagnostic */ -// TODO: Replace placeholder with relevant CQL logic + define "HIV self-test": - exists "HIV self-test Condition" - or exists "HIV self-test Observation" -define "HIV self-test Condition": - Elements."HIV self-test Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "HIV self-test Observation": - Elements."HIV self-test Observation" O - where O.effective.toInterval() during "Measurement Period" + exists(Elements."HIV self-test" O + where O.effective.toInterval() during "Measurement Period") /* End of HIV self-test */ /* @@ -1024,7 +987,7 @@ define "HIV Status": @activity: HIV.B7 Test for HIV using testing algorithm @description: Client is HIV-positive */ -// TODO: Replace placeholder with relevant CQL logic + define "HIV-positive B.DE116": exists(Elements."HIV-positive B.DE116" HIV where HIV starts before end of "Measurement Period") /* End of HIV-positive B.DE116 */ @@ -5653,12 +5616,10 @@ define "Delivery date Value": @activity: HIV.E1 Capture or update mother's history @description: The type of place where the woman delivered */ -// TODO: Replace placeholder with relevant CQL logic + define "Place of delivery": - exists "Place of delivery Observation" -define "Place of delivery Observation": - Elements."Place of delivery Observation" O - where O.effective.toInterval() during "Measurement Period" + exists (Elements."Place of delivery" P + where P.performed.toInterval() during "Measurement Period") /* End of Place of delivery */ /* @@ -5666,35 +5627,20 @@ define "Place of delivery Observation": @activity: HIV.E1 Capture or update mother's history @description: The woman delivered at a health facility */ -// TODO: Replace placeholder with relevant CQL logic + define "Health facility": - exists "Health facility Condition" - or exists "Health facility Observation" -define "Health facility Condition": - Elements."Health facility Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Health facility Observation": - Elements."Health facility Observation" O - where O.effective.toInterval() during "Measurement Period" -/* End of Health facility */ + exists (Elements."Health facility" P + where P.performed.toInterval() during "Measurement Period") /* @dataElement: HIV.E.DE69 - Home @activity: HIV.E1 Capture or update mother's history @description: The woman delivered at home */ -// TODO: Replace placeholder with relevant CQL logic + define "Home": - exists "Home Condition" - or exists "Home Observation" -define "Home Condition": - Elements."Home Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Home Observation": - Elements."Home Observation" O - where O.effective.toInterval() during "Measurement Period" + exists (Elements."Health facility" P + where P.performed.toInterval() during "Measurement Period") /* End of Home */ /* @@ -5702,17 +5648,10 @@ define "Home Observation": @activity: HIV.E1 Capture or update mother's history @description: The woman delivered at another location that is not at home or at a health facility */ -// TODO: Replace placeholder with relevant CQL logic + define "Other E.DE70": - exists "Other E.DE70 Condition" - or exists "Other E.DE70 Observation" -define "Other E.DE70 Condition": - Elements."Other E.DE70 Condition" C - where C.prevalenceInterval() overlaps before "Measurement Period" - or C.prevalenceInterval() overlaps after "Measurement Period" -define "Other E.DE70 Observation": - Elements."Other E.DE70 Observation" O - where O.effective.toInterval() during "Measurement Period" + exists (Elements."Other E.DE70" P + where P.performed.toInterval() during "Measurement Period") /* End of Other E.DE70 */ /* @@ -5770,11 +5709,9 @@ define "Age of infant in years": @activity: HIV.F6 Check whether infant/child had HIV exposure @description: Whether the infant or child was determined to have had HIV exposure */ -// TODO: Replace placeholder with relevant CQL logic + define "HIV-exposed infant or child E.DE112": - exists "HIV-exposed infant or child E.DE112 Observation" -define "HIV-exposed infant or child E.DE112 Observation": - Elements."HIV-exposed infant or child E.DE112 Observation" O + exists Elements."HIV-exposed infant or child E.DE112" O where O.effective.toInterval() during "Measurement Period" /* End of HIV-exposed infant or child E.DE112 */ From 73789b6644205a565d708f5f455379a33f01cfb7 Mon Sep 17 00:00:00 2001 From: Patric Prado Date: Thu, 8 Aug 2024 09:17:56 -0700 Subject: [PATCH 13/13] resolved conflicts --- input/cql/HIVElements.cql | 55 ++++++++++++++++++++++++++++++ input/cql/HIVIndicatorElements.cql | 25 ++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/input/cql/HIVElements.cql b/input/cql/HIVElements.cql index 54d85347f7..09fdc44729 100644 --- a/input/cql/HIVElements.cql +++ b/input/cql/HIVElements.cql @@ -303,8 +303,13 @@ define "Other A.DE23 Observation": @description: Reason for HIV testing services visit */ // TODO: Replace placeholder with relevant CQL logic +// TODO: Replace placeholder with relevant CQL logic define "Reason for visit B.DE1": exists "Reason for visit B.DE1 Observation" +define "Reason for visit B.DE1 Observation": + [Observation: Concepts."Reason for visit - HIV.B.DE1"] O + where O.status in { 'final', 'amended', 'corrected' } + exists "Reason for visit B.DE1 Observation" define "Reason for visit B.DE1 Observation": [Observation: Concepts."Reason for visit - HIV.B.DE1"] O where O.status in { 'final', 'amended', 'corrected' } @@ -316,6 +321,16 @@ define "Reason for visit B.DE1 Observation": @description: First encounter for screening for human immunodeficiency virus */ // TODO: Replace placeholder with relevant CQL logic +define "First-time HIV test": + exists "First-time HIV test Condition" + or exists "First-time HIV test Observation" +define "First-time HIV test Condition": + [Condition: Concepts."First-time HIV test"] +define "First-time HIV test Observation": + "Reason for visit B.DE1 Observation" O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."First-time HIV test" +// TODO: Replace placeholder with relevant CQL logic define "First-time HIV test": exists "First-time HIV test Condition" or exists "First-time HIV test Observation" @@ -333,6 +348,15 @@ define "First-time HIV test Observation": @description: Retesting for human immunodeficiency virus */ // TODO: Replace placeholder with relevant CQL logic +define "Retesting for HIV B.DE3": + exists "Retesting for HIV B.DE3 Condition" + or exists "Retesting for HIV B.DE3 Observation" +define "Retesting for HIV B.DE3 Condition": + [Condition: Concepts."Retesting for HIV - HIV.B.DE3"] +define "Retesting for HIV B.DE3 Observation": + "Reason for visit B.DE1 Observation" O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."Retesting for HIV - HIV.B.DE3" define "Retesting for HIV B.DE3": exists "Retesting for HIV B.DE3 Condition" or exists "Retesting for HIV B.DE3 Observation" @@ -350,6 +374,15 @@ define "Retesting for HIV B.DE3 Observation": @description: Client attending facility for HIV testing services visit */ // TODO: Replace placeholder with relevant CQL logic +define "HIV testing services visit": + exists "HIV testing services visit Condition" + or exists "HIV testing services visit Observation" +define "HIV testing services visit Condition": + [Condition: Concepts."HIV testing services visit"] +define "HIV testing services visit Observation": + "Reason for visit B.DE1 Observation" O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."HIV testing services visit" define "HIV testing services visit": exists "HIV testing services visit Condition" or exists "HIV testing services visit Observation" @@ -1284,6 +1317,7 @@ define "Invalid B.DE109 Observation": @description: Date of the HIV test */ // TODO: Replace placeholder with relevant CQL logic +// TODO: Replace placeholder with relevant CQL logic define "HIV test date B.DE110": [Observation: Concepts."HIV test date - HIV.B.DE110"] O where O.status in { 'final', 'amended', 'corrected' } @@ -1298,6 +1332,9 @@ define "HIV test date B.DE110 Value": @description: The result from HIV testing after applying the testing algorithm */ // TODO: Replace placeholder with relevant CQL logic +define "HIV test result B.DE111": + exists "HIV test result B.DE111 Observation" +// TODO: Replace placeholder with relevant CQL logic define "HIV test result B.DE111": exists "HIV test result B.DE111 Observation" define "HIV test result B.DE111 Observation": @@ -1311,6 +1348,11 @@ define "HIV test result B.DE111 Observation": @description: Test result is HIV-positive */ // TODO: Replace placeholder with relevant CQL logic +define "HIV-positive B.DE112": + exists "HIV-positive B.DE112 Condition" + or exists "HIV-positive B.DE112 Observation" +define "HIV-positive B.DE112 Condition": + [Condition: Concepts."HIV-positive - HIV.B.DE112"] define "HIV-positive B.DE112": exists "HIV-positive B.DE112 Condition" or exists "HIV-positive B.DE112 Observation" @@ -1328,6 +1370,12 @@ define "HIV-positive B.DE112 Observation": @description: Test result is HIV-negative */ +define "HIV-negative B.DE113": + [Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."Rapid diagnostic test for HIV - HIV.B.DE82" + and O.value ~ Concepts."HIV-negative - HIV.B.DE117" + define "HIV-negative B.DE113": [Observation] O where O.status in {'final', 'amended'} @@ -1410,8 +1458,15 @@ define "HIV-positive B.DE116 Condition": where C.clinicalStatus ~ CustomConcepts."active" and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") and C.code ~ Concepts."HIV-positive - HIV.B.DE116" + and exists(C.category CC where CC ~ CustomConcepts."encounter-diagnosis") + and C.code ~ Concepts."HIV-positive - HIV.B.DE116" sort by start of onset.toInterval() +define "HIV-positive B.DE116 Observation": + [Observation] O + where O.status in {'final', 'amended'} + and O.code ~ Concepts."HIV status" + and O.value ~ Concepts."HIV-positive - HIV.B.DE116" define "HIV-positive B.DE116 Observation": [Observation] O where O.status in {'final', 'amended'} diff --git a/input/cql/HIVIndicatorElements.cql b/input/cql/HIVIndicatorElements.cql index fd032360c3..0c846055bc 100644 --- a/input/cql/HIVIndicatorElements.cql +++ b/input/cql/HIVIndicatorElements.cql @@ -713,12 +713,18 @@ define "People living in prisons and other closed settings": @description: Date HIV test result returned to client */ // TODO: Replace placeholder with relevant CQL logic +define "Date HIV test results returned": + Elements."Date HIV test results returned" O +// TODO: Replace placeholder with relevant CQL logic define "Date HIV test results returned": Elements."Date HIV test results returned" O where O.effective.toInterval() during "Measurement Period" define "Date HIV test results returned Value": "Date HIV test results returned" O return O.value +define "Date HIV test results returned Value": + "Date HIV test results returned" O + return O.value /* End of Date HIV test results returned */ /* @@ -902,6 +908,13 @@ define "HIV self-test": @description: Date of the HIV test */ // TODO: Replace placeholder with relevant CQL logic +define "HIV test date B.DE110": + Elements."HIV test date B.DE110" O + where O.effective.toInterval() during "Measurement Period" +define "HIV test date B.DE110 Value": + "HIV test date B.DE110" O + return O.value +// TODO: Replace placeholder with relevant CQL logic define "HIV test date B.DE110": Elements."HIV test date B.DE110" O where O.effective.toInterval() during "Measurement Period" @@ -916,6 +929,7 @@ define "HIV test date B.DE110 Value": @description: The result from HIV testing after applying the testing algorithm */ // TODO: Replace placeholder with relevant CQL logic +// TODO: Replace placeholder with relevant CQL logic define "HIV test result B.DE111": exists "HIV test result B.DE111 Observation" define "HIV test result B.DE111 Observation": @@ -929,6 +943,17 @@ define "HIV test result B.DE111 Observation": @description: Test result is HIV-positive */ // TODO: Replace placeholder with relevant CQL logic +define "HIV-positive B.DE112": + exists "HIV-positive B.DE112 Condition" + or exists "HIV-positive B.DE112 Observation" +define "HIV-positive B.DE112 Condition": + Elements."HIV-positive B.DE112 Condition" C + where C.prevalenceInterval() overlaps before "Measurement Period" + or C.prevalenceInterval() overlaps after "Measurement Period" +define "HIV-positive B.DE112 Observation": + Elements."HIV-positive B.DE112 Observation" O + where O.effective.toInterval() during "Measurement Period" +// TODO: Replace placeholder with relevant CQL logic define "HIV-positive B.DE112": exists "HIV-positive B.DE112 Condition" or exists "HIV-positive B.DE112 Observation"