Skip to content

Commit

Permalink
in middle of HIV 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Pprado23 committed Jul 9, 2024
1 parent 82a870d commit f5bf493
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 2 deletions.
2 changes: 0 additions & 2 deletions input/cql/HIVIND6Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,3 @@ define "Stratification":
+ ':' + HIC."By Geographic Region Stratifier"
//Need to discuss how to add list
//+ ':' +HIC."patientGroups"

//Need exposure type
61 changes: 61 additions & 0 deletions input/cql/HIVIND7Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,64 @@ include WHOCommon called WCom
include FHIRCommon called FC

// Indicator Definition

parameter "Measurement Period" Interval<Date> default Interval[@2020-01-01, @2020-01-31]

context Patient

/*
* As defined by Member State
*/
define "Initial Population":
true


define "numerator":
exists(HIC."HIV Test After PEP Prescribed during Measurement Period" O
where (O.issued before end of "Measurement Period"
and O.issued after start of "Measurement Period")
)


define "denominator":
exists(HIC."PEP Prescribed during Measurement Period and Completed" MS
where not (MS.effective ends after end of "Measurement Period")
)





/*
* Disaggregators
*/

define "Administrative Gender Stratifier":
HIC."By Administrative Gender Stratifier"

define "Age Stratifier":
HIC."By Age Stratifier 3"

define "Geographic Region Stratifier":
HIC."By Geographic Region Stratifier"

define "patientGroups Stratifier":
HIC."patientGroups"

define "prep product":
HIC."prep_product"

define "Setting":
HIC."setting"

define "hiv_exposure_type":
HIC."hiv_exposure_type"

//provider type not provided?

define "Stratification":
HIC."By Administrative Gender Stratifier".code
+ ':' + HIC."By Age Stratifier"
+ ':' + HIC."By Geographic Region Stratifier"
//Need to discuss how to add list
//+ ':' +HIC."patientGroups"
13 changes: 13 additions & 0 deletions input/cql/HIVIndicatorCommon.cql
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ define "PEP Prescribed during Measurement Period and Completed":
where (MS.status = 'recorded'
and exists(MS.reasonCode C where C ~ HC."PrEP for HIV prevention")
)

define "HIV Test 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"
where ( O.status in {'final', 'amended'}
and O.value ~ HC."HIV-positive - HIV.B.DE112"
)
Return {MR.authoredOn,O.issued}


define "Patient Deceased before end of Measurement Period":
Expand Down

0 comments on commit f5bf493

Please sign in to comment.