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

Updates and fixes to Measure FSH files based on fixes in tooling #7

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: 14 additions & 1 deletion input/cql/HIVIND18Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ parameter "Measurement Period" Interval<Date> default Interval[@2020-01-01, @202

context Patient

define "numerator":
define "Measure Population":
exists(HIC."HIV Positive Condition" C
where C.onset before end of "Measurement Period")
or
Expand All @@ -90,6 +90,19 @@ define "numerator":
//define denominator?
//How to bring in data from external sources

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

/*
* NOTE: Modeled as a Continuous Variable measure because this is an estimated denominator proportion measure
*/

define function "Measure Observation"(Patient "Patient"):
1

/*
* Disaggregators
*/
Expand Down
13 changes: 12 additions & 1 deletion input/cql/HIVIND19Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ parameter "Measurement Period" Interval<Date> default Interval[@2020-01-01, @202

context Patient

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


//Exclusion happens automatically through test type valueset = excludes self test
define "numerator":
exists(HIC."HIV Positive Condition" C
Expand Down Expand Up @@ -125,4 +132,8 @@ define "Setting":
define "TB Stratifier":
HIC."tb"


define "Stratification":
HIC."By Administrative Gender Stratifier".code
+ ':' + HIC."By Age Stratifier"
+ ':' + HIC."By Geographic Region Stratifier"
//Need to discuss how to add list
33 changes: 21 additions & 12 deletions input/cql/HIVIND28Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,20 @@ include FHIRCommon called FC

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

context Unfiltered
context Patient

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


define "numerator":
(
exists(HIC."Patient Deceased during Measurement Period")
or exists(HIC."Stopped ART at Facility during the measurement period")
HIC."Patient Deceased before end of Measurement Period"
and HIC."Transfer Out at Facility during the measurement period"
and HIC."Lost to Follow Up during the measurement period"
)
and ((
//saying needs to not be counted this measurement period but should have counted this period or last period
Expand All @@ -100,8 +108,7 @@ 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 start of "Measurement Period"
)
) or
(
Expand All @@ -114,8 +121,7 @@ define "numerator":
))
and exists(HIC."HIV Treatment Active" H
where H.effective starts before (end of "Measurement Period" - duration in days of "Measurement Period")
and (H.effective ends after (start of "Measurement Period" - duration in days of "Measurement Period")
or end of H.effective ~ null)
and H.effective ends after (start of "Measurement Period" - duration in days of "Measurement Period")
)
)
)
Expand All @@ -133,8 +139,7 @@ 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 start of "Measurement Period"
)
) or
(
Expand All @@ -147,8 +152,7 @@ define "numerator":
))
and exists(HIC."HIV Treatment Active" H
where H.effective starts before (end of "Measurement Period" - duration in days of "Measurement Period")
and (H.effective ends after (start of "Measurement Period" - duration in days of "Measurement Period")
or end of H.effective ~ null)
and H.effective ends after (start of "Measurement Period" - duration in days of "Measurement Period")
)
)
)
Expand All @@ -171,4 +175,9 @@ define "Geographic Region Stratifier":
define "patientGroups Stratifier":
HIC."patientGroups"

//NEED TO FIGURE OUT Treatment outcome category (died, stopped treatment, lost to follow-up)
//NEED TO FIGURE OUT Treatment outcome category (died, stopped treatment, lost to follow-up)

define "Stratification":
HIC."By Administrative Gender Stratifier".code
+ ':' + HIC."By Age Stratifier"
+ ':' + HIC."By Geographic Region Stratifier"
24 changes: 22 additions & 2 deletions input/cql/HIVIND2Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,27 @@ parameter "Measurement Period" Interval<Date> default Interval[@2020-01-01, @202

context Patient

define "numerator":
define "Measure Population":
exists(HIC."HIV PREP 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)
)

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

/*
* NOTE: Modeled as a Continuous Variable measure because this is an estimated denominator proportion measure
*/

define function "Measure Observation"(Patient "Patient"):
1


/*
* Disaggregators
*/
Expand Down Expand Up @@ -132,4 +146,10 @@ define "prep_experience":
define "prep_dosing":
HIC."prep_dosing"

// Provider type concepts are not found in DD
// 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"
// how to add list
19 changes: 18 additions & 1 deletion input/cql/HIVIND30Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ parameter "Measurement Period" Interval<Date> default Interval[@2020-01-01, @202

context Patient

define "numerator":
define "Measure Population":
(exists(HIC."HIV Positive Condition" C
where C.onset before end of "Measurement Period")
or
Expand All @@ -91,6 +91,18 @@ context Patient
exists(HIC."HIV Treatment Active" H
where H.effective starts during "Measurement Period")

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

/*
* NOTE: Modeled as a Continuous Variable measure because this is an estimated denominator proportion measure
*/

define function "Measure Observation"(Patient "Patient"):
1


/*
Expand All @@ -108,3 +120,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"
15 changes: 14 additions & 1 deletion input/cql/HIVIND3Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ parameter "Measurement Period" Interval<Date> default Interval[@2020-01-01, @202

context Patient

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


define "numerator":
exists(HIC."HIV PREP Active" H
where H.effective starts before end of "Measurement Period"
Expand Down Expand Up @@ -145,4 +152,10 @@ define "prep_experience":
define "prep_dosing":
HIC."prep_dosing"

// Provider type concepts are not found in DD
// 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"
// how to add list
2 changes: 1 addition & 1 deletion input/cql/HIVIndicatorCommon.cql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include FHIRHelpers version '4.0.1'
include WHOCommon called WCom
include FHIRCommon called FC
include HIVConcepts called HC
include HIVConcepts_custom called HCC
include HIVConceptsCustom called HCC

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

Expand Down
101 changes: 58 additions & 43 deletions input/fsh/measures/HIVIND18.fsh
Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
// Instance: HIVIND18
// InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
// Title: "HIV.IND.18 People living with HIV who know their HIV status (first 95)"
// * meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"
// * meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure"
// * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
// * description = "Number and % of people living with HIV who know their HIV status"
// * url = "http://smart.who.int/immunizations-measles/Measure/HIVIND18"
// * status = #draft
// * experimental = true
// * date = "2024-06-15"
// * name = "HIVIND18"
// * title = "HIV.IND.18 People living with HIV who know their HIV status (first 95)"
// * publisher = "World Health Organization (WHO)"
// * library = "http://smart.who.int/immunizations-measles/Library/HIVIND18Logic"
// * scoring = $measure-scoring#proportion "Proportion"
// * group[+]
// * population[numerator]
// * id = "HIV.IND.18.NUM"
// * description = "Number of people living with HIV who have received their diagnosis and are still alive"
// * code = $measure-population#numerator "Numerator"
// * criteria.language = #text/cql-identifier
// * criteria.expression = "Numerator"
// * stratifier[+]
// * id = "HIV.IND.18.S.AG"
// * 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"
Instance: HIVIND18
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm
Title: "HIV.IND.18 People living with HIV who know their HIV status (first 95)"
* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"
* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* description = "Number and % of people living with HIV who know their HIV status"
* url = "http://smart.who.int/HIV/Measure/HIVIND18"
* status = #draft
* experimental = true
* date = "2024-07-01"
* name = "HIVIND18"
* title = "HIV.IND.18 People living with HIV who know their HIV status (first 95)"
* publisher = "World Health Organization (WHO)"
* library = "http://smart.who.int/HIV/Library/HIVIND18Logic"
* scoring = $measure-scoring#continuous-variable "Continuous Variable"
* group[+]
* population[initialPopulation]
* id = "HIV.IND.18.IP"
* description = "Initial Population"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql-identifier
* criteria.expression = "Initial Population"
* population[measurePopulation]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "HIV.IND.18.MP"
* description = "Measure Population"
* code = $measure-population#measure-population "Measure Population"
* criteria.language = #text/cql-identifier
* criteria.expression = "Measure Population"
* population[measureObservation]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "measure-population"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod].valueCode = #count
* id = "HIV.IND.18.MO"
* description = "Measure Observation"
* code = $measure-population#measure-observation "Measure Observation"
* criteria.language = #text/cql-identifier
* criteria.expression = "Measure Observation"
* stratifier[+]
* id = "HIV.IND.18.S.AG"
* 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"
Loading
Loading