Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final fixes dor tx_curr #13

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions input/cql/HIVIND27Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ define "numerator":
))
and exists(HIC."HIV Treatment Active" H
where H.effective starts before end of "Measurement Period"
and (H.effective ends after start of "Measurement Period"
or end of H.effective ~ null)
and (H.effective ends after (end of "Measurement Period" - 28 days))
and (H.effective ends after start of "Measurement Period")
)
and not exists (HIC."Patient Deceased before end of Measurement Period")
and not exists (HIC."Stopped ART at Facility during the measurement period")
and not exists (HIC."Transfer Out at Facility during the measurement period")
and not exists (HIC."Lost to Follow Up during the measurement period")


define "denominator":
Expand All @@ -82,7 +81,8 @@ define "denominator":
where (O.issued before end of "Measurement Period")
))
and not exists (HIC."Patient Deceased before end of Measurement Period")
and not exists (HIC."Stopped ART at Facility during the measurement period")
and not exists (HIC."Transfer Out at Facility during the measurement period")
and not exists (HIC."Lost to Follow Up during the measurement period")

/*
* Disaggregators
Expand All @@ -99,3 +99,8 @@ define "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"
25 changes: 20 additions & 5 deletions input/cql/HIVIndicatorCommon.cql
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ codesystem ARTCodes: 'http://example.org/fhir/CodeSystem/art-codes'

code "Currently on PrEP": 'HIV.C.DE10' from HIV_DAK_Codes
code "Oral PrEP": 'HIV.C.DE12' from HIV_DAK_Codes
code "TDF + FTC": 'HIV.C.DE18' from HIV_DAK_Codes
code "TDF": 'HIV.C.DE19' from HIV_DAK_Codes
code "TDF + 3TC": 'HIV.C.DE20' from HIV_DAK_Codes
code "Dapivirine vaginal ring (DVR)": 'HIV.C.DE22' from HIV_DAK_Codes
code "CAB-LA": 'HIV.C.DE23' from HIV_DAK_Codes

Expand All @@ -54,6 +57,9 @@ valueset "Continuing user": 'http://example.org/fhir/ValueSet/continuing'
valueset "Restarting following a period of not taking medication": 'http://example.org/fhir/ValueSet/restarting'

valueset "Daily oral PrEP": 'http://example.org/fhir/ValueSet/dailyPrEP'
//valueset "TDF + FTC": 'http://example.org/fhir/ValueSet/dailyPrEP'
//valueset "TDF": 'http://example.org/fhir/ValueSet/dailyPrEP'
//valueset "TDF + 3TC": 'http://example.org/fhir/ValueSet/dailyPrEP'
valueset "Event-driven PrEP (2+1+1)": 'http://example.org/fhir/ValueSet/eventprep'
valueset "Other PrEP dosing type": 'http://example.org/fhir/ValueSet/otherprep'

Expand Down Expand Up @@ -169,9 +175,9 @@ define "Patient Deceased during Measurement Period":
else false
end

/* End of care because of transferring out, death, lost to follow up, or stopped treatment*/
/* End of care because of transferring out*/

define "Stopped ART at Facility during the measurement period":
define "Transfer Out at Facility during the measurement period":
exists(
[EpisodeOfCare] EOC
where exists(EOC.type T where T ~ "On ART")
Expand All @@ -187,6 +193,13 @@ define "Stopped ART at Facility during the measurement period":
)
)

define "Lost to Follow Up during the measurement period":
exists("HIV Treatment Active" 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))
)

/*
* 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)
Expand Down Expand Up @@ -359,21 +372,23 @@ exists(
exists([MedicationStatement] MS
where MS.status = 'recorded'
and exists(MS.reasonCode C where C ~ "Currently on PrEP")
and exists(MS.medication M where M ~ "Oral PrEP")
and (MS.medication ~ "TDF + FTC" or
MS.medication ~ "TDF + 3TC" or
MS.medication ~ "TDF")
)

define "PREP Product long-acting device":
exists([MedicationStatement] MS
where MS.status = 'recorded'
and exists(MS.reasonCode C where C ~ "Currently on PrEP")
and MS.medication in "Dapivirine vaginal ring (DVR)"
and MS.medication ~ "Dapivirine vaginal ring (DVR)"
)

define "PREP Product long-acting injectable":
exists([MedicationStatement] MS
where MS.status = 'recorded'
and exists(MS.reasonCode C where C ~ "Currently on PrEP")
and MS.medication in "CAB-LA"
and MS.medication ~ "CAB-LA"
)

define "PREP first time":
Expand Down