From 60f28d9d474cd3c300c7d4667ba8e503ebb9d8e3 Mon Sep 17 00:00:00 2001 From: delcroip Date: Tue, 17 Oct 2023 11:38:51 +0200 Subject: [PATCH 1/4] add measuse measles --- input/cql/IMMZCommon.cql | 4 + input/cql/IMMZIND08.cql | 182 +++++++-- .../resources/measure/measure-IMMZIND08.json | 203 ++++++++++ .../tests/measure/MeasrueReport-location.json | 380 ++++++++++++++++++ 4 files changed, 727 insertions(+), 42 deletions(-) create mode 100644 input/resources/measure/measure-IMMZIND08.json create mode 100644 input/tests/measure/MeasrueReport-location.json diff --git a/input/cql/IMMZCommon.cql b/input/cql/IMMZCommon.cql index 23921021529..05a82959d3a 100644 --- a/input/cql/IMMZCommon.cql +++ b/input/cql/IMMZCommon.cql @@ -229,6 +229,8 @@ define function ToDate(choice Choice): case when choice is FHIR.date then choice as FHIR.date + when ConvertsToDate(choice) then + ToDate(choice) else Message(null as FHIR.date, true, '1', 'Error', 'Cannot compute a date from a String value') end @@ -240,6 +242,8 @@ define function ToDateTime(choice Choice): case when choice is FHIR.dateTime then choice as FHIR.dateTime + when ConvertsToDateTime(choice) then + ToDateTime(choice) else Message(null as FHIR.dateTime, true, '1', 'Error', 'Cannot compute a date from a String value') end diff --git a/input/cql/IMMZIND08.cql b/input/cql/IMMZIND08.cql index 1f3eb19d26d..84e6abff472 100644 --- a/input/cql/IMMZIND08.cql +++ b/input/cql/IMMZIND08.cql @@ -1,68 +1,166 @@ /* * Library: IMMZ.IND.08 * Immunization coverage for Measles containing vaccine (Estimated Denominator) - * Compares the administered doses of measles containing vaccines (MCV) with the estimated number of surviving infants (if dose 1) or a country supplied denominator (if dose 2) expressed as a percentage. - * - * Numerator: Number of administrations of vaccinations containing a Measles component during reporting period - * Numerator Computation: COUNT immunization events WHERE administered product is a Measles vaccine (IMMZ.A1.DE9) during reporting period - * Denominator: Estimated number of surviving infants (for dose 1) and country supplied denominator for dose sequence 2 (see comments) - * Denominator Computation: PARAMETER number of surviving infants (if Dose Sequence = 1) or PARAMETER of country supplied denominator (if Dose Sequence = 2) + * References: WHO Immunization Facility Analysis Guide (1), WHO / UNICEF Joint Reporting Form (3 - elements 4240 and 4260 ) + */ + + +/* ============================================================================ + * Measle Dose 1 + * ============================================================================ + * Initial Patient Population = + * All patient + * + * Denominator = + * Demographic data from measure report + * + * Numerator = + * Patient with 1st Measle immunization in the reporting period + * + * Denominator Exceptions = + * None + * + * Disaggregation: + * Age Group (< 1 year or 1 year or > 2 years) + * Geographic Region + * Administrative Gender (or Biological Sex) * + * ============================================================================ + + /* ============================================================================ + * Measle Dose 2 + * ============================================================================ + * Initial Patient Population = + * All patient + * + * Denominator = + * Demographic data from measure report + * + * Numerator = + * Patient with 2nd Measle immunization in the reporting period + * + * Denominator Exceptions = + * None + * * Disaggregation: - * - Dose Sequence (1, 2) - * - Age Group (< 1 year or > 1 year) - * - Geographic Region - * - Administrative Gender (or Biological Sex) + * Age Group (< 1 year or 1 year or > 2 years) + * Geographic Region + * Administrative Gender (or Biological Sex) * - * References: WHO Immunization Facility Analysis Guide (1), WHO / UNICEF Joint Reporting Form (3 - elements 4240 and 4260 ) + * ============================================================================ */ library IMMZIND08 -// Start Skeleton CQL + using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' -include IMMZCommon called IMMZCom -include IMMZConcepts called IMMZc -include IMMZConfig called IMMZCon -include IMMZIndicatorCommon called IMMZIndCom -include IMMZVaccineLibrary called IMMZvl -include FHIRCommon called FC -// End Skeleton CQL + parameter "Measurement Period" Interval +parameter "canonical_demographic_measure_url" String default 'https://fhir.who.org/Measure/demographic-for-immunization' + +valueset "Measles Vaccines": 'http://fhir.org/guides/who/smart-immunization/ValueSet/IMMZ.A1.DE' + +// Age codes +codesystem "ISO-8601-Derived Periods": 'http://ohie.org/ValueSet/iso-8601-derived-periods' // { 'P0Y--P1Y', 'P1Y--P5Y', ... } +code "P0Y--P1Y": 'P0Y--P1Y' from "ISO-8601-Derived Periods" display '< 1 year' +code "P1Y--P2Y": 'P1Y--P2Y' from "ISO-8601-Derived Periods" display '1 year' +code "P2Y--P9999Y": 'P1Y--P9999Y' from "ISO-8601-Derived Periods" display '2+ years' + + +// Sex codes +codesystem "Administrative Gender Codes": 'http://hl7.org/fhir/administrative-gender' +code "Males" : 'male' from "Administrative Gender Codes" display 'Males' +code "Females" : 'female' from "Administrative Gender Codes" display 'Females' +code "Other" : 'other' from "Administrative Gender Codes" display 'Other/NA' context Patient -/* - * Numerator: Number of administrations of vaccinations containing a Measles component during reporting period - * Numerator Computation: COUNT immunization events WHERE administered product is a Measles vaccine (IMMZ.A1.DE9) during reporting period - */ -define "measure-population": - exists(IMMZIndCom."MCV Doses Administered to Patient During Measurement Period") +define getPatientGeographicStr: + First(Patient.address A where A.use in { 'home' }).district + +define getPatientGeographicLocation: + if getPatientGeographicStr is not null then + First([Location] L where L.id = id { value: getPatientGeographicStr}) + else null -/* - * Disaggregator: Dose Sequence (1, 2) - */ -define "Dose Sequence Stratifier": - IMMZIndCom."MCV Doses Administered to Patient During Measurement Period" I - return (singleton from I.protocolApplied).doseNumber /* - * Disaggregator: Age Group (<24H of Birth, < 2 weeks) - */ -define "Age Group Stratifier": - IMMZIndCom."Infant By Age Stratifier" +All patient should be included +*/ +define InitialPopulation: + true /* - * Disaggregator: Geographic Region +Denominator initiation population from population measure report on district, +needs https://build.fhir.org/ig/HL7/cqf-measures/StructureDefinition-cqfm-aggregateMethod.html +with https://terminology.hl7.org/5.2.0/CodeSystem-measure-aggregate-method.html#measure-aggregate-method-maximum +*/ +define DenominatorPopulation: + First( + [MeasureReport] MR + where MR.subject.reference = 'Location/' + getPatientGeographicStr + and MR.measure = FHIR.canonical {value:canonical_demographic_measure_url} + and start of "Measurement Period" in MR.period ).group.first().stratifier.first().stratum.where( + exists(component.where(code.coding.first().code ~ code { value: 'sex'} and value.coding.first().code = Patient.gender)) + and exists(component.where(code.coding.first().code ~ code { value: 'AgeGroup'} and value.coding.first().code ~ "Age Group".code)) + ).first().population.first().count + + +define getdoses: + [Immunization] I + where I.vaccineCode in "Measles Vaccines" + sort by (occurrence as FHIR.dateTime).value desc + + + +define FirstDose: + Count(getdoses) = 1 and exists(getdoses.where(ToDate(occurrence) in "Measurement Period")) + + +define SecondDose: + Count(getdoses) = 2 and exists(getdoses.where(ToDate(occurrence) in "Measurement Period")) + + +/** + * @description Takes the date choice of a date/string choice (for Immunization date) */ -define "Geographic Region Stratifier": - IMMZIndCom."By Geographic Region Stratifier" +define function ToDate(choice Choice): + case + when choice is FHIR.date then + choice as FHIR.date + when ConvertsToDate(choice) then + ToDate(choice) + else + Message(null as FHIR.date, true, '1', 'Error', 'Cannot compute a date from a String value') + end -/* - * Disaggregator: Administrative Gender (or Biological Sex) +// Stratifiers + +// Age Group +define "Age Group": + case + when AgeInYearsAt(start of "Measurement Period") in Interval[0, 1) then "P0Y--P1Y" + when AgeInYearsAt(start of "Measurement Period") in Interval[1, 2) then "P1Y--P2Y" + when AgeInYearsAt(start of "Measurement Period") >= 2 then "P2Y--P9999Y" + else null + end + +// Sex +define "Sex": Patient.gender + +/** + * By Administrative Gender of Patient Stratifier */ define "Administrative Gender Stratifier": - IMMZIndCom."By Administrative Gender Stratifier" + case + when Patient.gender = 'male' then "Males" + when Patient.gender = 'female' then "Females" + else "Other" + end -/* End of IMMZ.IND.08 */ +/** + * By Administrative Gender of Patient Stratifier + */ +define "Geographic Region Stratifier": + code {value: getPatientGeographicStr} diff --git a/input/resources/measure/measure-IMMZIND08.json b/input/resources/measure/measure-IMMZIND08.json new file mode 100644 index 00000000000..d71860d1e55 --- /dev/null +++ b/input/resources/measure/measure-IMMZIND08.json @@ -0,0 +1,203 @@ +{ + "resourceType": "Measure", + "id": "IMMZIND08", + "meta": { + "profile": [ "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm" ] + }, + "url": "http://fhir.org/guides/who/smart-immunization/Measure/IMMZIND08", + "name": "IMMZIND08", + "title": "IMMZ.IND.08 Immunization coverage for Measles containing vaccine (Estimated Denominator)", + "date": "2022-05-12T15:36:34.955-04:00", + "description": "Compares the administered doses of measles containing vaccines (MCV) with the estimated number of surviving infants (if dose 1) or a country supplied denominator (if dose 2) expressed as a percentage.", + "library": [ "http://fhir.org/guides/who/smart-immunization/Library/IMMZIND08" ], + "scoring": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-scoring", + "code": "proportion" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-type", + "code": "process" + } ] + } ], + "improvementNotation": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation", + "code": "increase" + } ] + }, + "group": [ + { + "id": "IMMZ.IND.05", + "description": "Compares the number of clients who received the first dose in the primary series of measles containing vaccine (MCV1) with the number in the target population, expressed as a percentage.", + "population": [ + { + "id": "initial-population", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population" + } ] + }, + "description": "All patients", + "criteria": { + "language": "text/cql-identifier", + "expression": "InitialPopulation" + } + },{ + "id": "denominator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "denominator" + } ] + }, + "description": "Demographic data", + "criteria": { + "language": "text/cql-identifier", + "expression": "DenominatorPopulation" + }, + "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "denominator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "maximum" + } + ] + }, { + "id": "numerator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "numerator" + } ] + }, + "description": "Number of persons that recieved the 1st dose in the reporting period", + "criteria": { + "language": "text/cql-identifier", + "expression": "FirstDose" + }, "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "numerator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "sum" + } + ] + } + ], + "stratifier": [ + { + "id": "age-group-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Age Group Stratifier" + } + }, { + "id": "geographic-region-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Geographic Region Stratifier" + } + }, { + "id": "administrative-gender-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Administrative Gender Stratifier" + } + } + ] + },{ + "id": "IMMZ.IND.40", + "description": "Compares the number of clients who received the second dose in the primary series of measles containing vaccine (MCV2), according to the national schedule, with the target population, expressed as a percentage.", + "population": [ + { + "id": "initial-population", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population" + } ] + }, + "description": "All patients", + "criteria": { + "language": "text/cql-identifier", + "expression": "InitialPopulation" + } + },{ + "id": "denominator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "denominator" + } ] + }, + "description": "Demographic data", + "criteria": { + "language": "text/cql-identifier", + "expression": "DenominatorPopulation" + }, + "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "denominator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "maximum" + } + ] + }, { + "id": "numerator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "numerator" + } ] + }, + "description": "Number of persons that recieved the 1st dose in the reporting period", + "criteria": { + "language": "text/cql-identifier", + "expression": "SecondDose" + }, "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "numerator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "sum" + } + ] + } + ], + "stratifier": [ + { + "id": "age-group-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Age Group Stratifier" + } + }, { + "id": "geographic-region-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Geographic Region Stratifier" + } + }, { + "id": "administrative-gender-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Administrative Gender Stratifier" + } + } + ] + } ] +} diff --git a/input/tests/measure/MeasrueReport-location.json b/input/tests/measure/MeasrueReport-location.json new file mode 100644 index 00000000000..964d654496f --- /dev/null +++ b/input/tests/measure/MeasrueReport-location.json @@ -0,0 +1,380 @@ +{ + "resourceType": "MeasureReport", + "id": "smart-location-example", + "meaure": "https://fhir.who.org/Measure/demographic-for-immunization", + "contained": [ + { + "resourceType": "Location", + "id": "reporter", + "name": "Health District", + "physicalType":{ + "coding": [ + { + "code": "386012008", + "system": "http://terminology.hl7.org/CodeSystem/location-physical-type", + "display": "jdn" + } + ] + } + } + ], + "identifier": [ + { + "value": "measurereport-cms146-cat1-example-2017-03-13" + } + ], + "status": "complete", + "type": "summary", + "subject": { + "reference": "Location/reporter" + }, + "date": "2023-01-01", + "reporter": { + "reference": "#reporter" + }, + "period": { + "start": "2023-01-01", + "end": "2023-12-31" + }, + "group": [ + { + "id": "Demographic", + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 99 + } + ], + "stratifier": [ + { + "code": [ + { + "text": "stratifier-gender-age" + } + ], + "stratum": [ + { + "value": { + "text": "male, < 1 year" + }, + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 10 + } + ], + "component":[ + { + "code": { + "coding": [ + { + "code": "sex" + } + ] + }, + "value": { + "coding": [ + { + "code": "male" + } + ] + } + }, + { + "code": { + "coding": [ + { + "code": "AgeGroup" + } + ] + }, + "value": { + "coding": [ + { + "code": "Y0P--Y1P" + } + ] + } + } + + ] + }, + { + "value": { + "text": "male, 1 year" + }, + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 20 + } + ], + "component":[ + { + "code": { + "coding": [ + { + "code": "sex" + } + ] + }, + "value": { + "coding": [ + { + "code": "male" + } + ] + } + }, + { + "code": { + "coding": [ + { + "code": "AgeGroup" + } + ] + }, + "value": { + "coding": [ + { + "code": "Y1P--Y2P" + } + ] + } + } + + ] + }, + { + "value": { + "text": "male, 2+ year" + }, + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 30 + } + ], + "component":[ + { + "code": { + "coding": [ + { + "code": "sex" + } + ] + }, + "value": { + "coding": [ + { + "code": "male" + } + ] + } + }, + { + "code": { + "coding": [ + { + "code": "AgeGroup" + } + ] + }, + "value": { + "coding": [ + { + "code": "Y2P--Y9999P" + } + ] + } + } + + ] + }, + { + "value": { + "text": "female, < 1 year" + }, + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 40 + } + ], + "component":[ + { + "code": { + "coding": [ + { + "code": "sex" + } + ] + }, + "value": { + "coding": [ + { + "code": "female" + } + ] + } + }, + { + "code": { + "coding": [ + { + "code": "AgeGroup" + } + ] + }, + "value": { + "coding": [ + { + "code": "Y0P--Y1P" + } + ] + } + } + + ] + }, + { + "value": { + "text": "female, 1 year" + }, + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 50 + } + ], + "component":[ + { + "code": { + "coding": [ + { + "code": "sex" + } + ] + }, + "value": { + "coding": [ + { + "code": "female" + } + ] + } + }, + { + "code": { + "coding": [ + { + "code": "AgeGroup" + } + ] + }, + "value": { + "coding": [ + { + "code": "Y1P--Y2P" + } + ] + } + } + + ] + }, + { + "value": { + "text": "female, 2+ year" + }, + "population": [ + { + "code": { + "coding": [ + { + "code": "initial-population" + } + ] + }, + "count": 60 + } + ], + "component":[ + { + "code": { + "coding": [ + { + "code": "sex" + } + ] + }, + "value": { + "coding": [ + { + "code": "female" + } + ] + } + }, + { + "code": { + "coding": [ + { + "code": "AgeGroup" + } + ] + }, + "value": { + "coding": [ + { + "code": "Y2P--Y9999P" + } + ] + } + } + + ] + } + ] + } + ] + } + ] + + } \ No newline at end of file From 1ef8575744024a061ffdfd9b776ead57250ee614 Mon Sep 17 00:00:00 2001 From: delcroip Date: Tue, 17 Oct 2023 14:14:21 +0200 Subject: [PATCH 2/4] add district reference to patient address --- input/tests/Patient-IMMZ-Patient-NoVaxAdult-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-NoVaxAdult-m.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-NoVaxeninfant-m.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-NoVaxenteen-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-NoVaxenteen-m.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-NoVaxinfant-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-deceased-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-enadult-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-enadult-m.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-enchild-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-enchild-m.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-eninfant-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-eninfant-m.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-enteen-f.json | 6 ++++++ input/tests/Patient-IMMZ-Patient-enteen-m.json | 6 ++++++ 15 files changed, 90 insertions(+) diff --git a/input/tests/Patient-IMMZ-Patient-NoVaxAdult-f.json b/input/tests/Patient-IMMZ-Patient-NoVaxAdult-f.json index a23599d8081..13c779d3964 100644 --- a/input/tests/Patient-IMMZ-Patient-NoVaxAdult-f.json +++ b/input/tests/Patient-IMMZ-Patient-NoVaxAdult-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "1996-03-08", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-NoVaxAdult-m.json b/input/tests/Patient-IMMZ-Patient-NoVaxAdult-m.json index 18821ce4d3b..7e55e287c4f 100644 --- a/input/tests/Patient-IMMZ-Patient-NoVaxAdult-m.json +++ b/input/tests/Patient-IMMZ-Patient-NoVaxAdult-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "1993-04-08", "gender": "male" } diff --git a/input/tests/Patient-IMMZ-Patient-NoVaxeninfant-m.json b/input/tests/Patient-IMMZ-Patient-NoVaxeninfant-m.json index 9cb0c7aad3a..ee897f47701 100644 --- a/input/tests/Patient-IMMZ-Patient-NoVaxeninfant-m.json +++ b/input/tests/Patient-IMMZ-Patient-NoVaxeninfant-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2022-03-12", "gender": "male" } diff --git a/input/tests/Patient-IMMZ-Patient-NoVaxenteen-f.json b/input/tests/Patient-IMMZ-Patient-NoVaxenteen-f.json index d0db126dfb9..ce2807c46f1 100644 --- a/input/tests/Patient-IMMZ-Patient-NoVaxenteen-f.json +++ b/input/tests/Patient-IMMZ-Patient-NoVaxenteen-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2009-10-16", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-NoVaxenteen-m.json b/input/tests/Patient-IMMZ-Patient-NoVaxenteen-m.json index dacf3d799a0..0652f850838 100644 --- a/input/tests/Patient-IMMZ-Patient-NoVaxenteen-m.json +++ b/input/tests/Patient-IMMZ-Patient-NoVaxenteen-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2009-11-05", "gender": "male" } diff --git a/input/tests/Patient-IMMZ-Patient-NoVaxinfant-f.json b/input/tests/Patient-IMMZ-Patient-NoVaxinfant-f.json index 1c44d2a55c3..30393451356 100644 --- a/input/tests/Patient-IMMZ-Patient-NoVaxinfant-f.json +++ b/input/tests/Patient-IMMZ-Patient-NoVaxinfant-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2022-03-28", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-deceased-f.json b/input/tests/Patient-IMMZ-Patient-deceased-f.json index f31e8a2849d..a62b0769922 100644 --- a/input/tests/Patient-IMMZ-Patient-deceased-f.json +++ b/input/tests/Patient-IMMZ-Patient-deceased-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "1995-04-08", "gender": "female", "deceasedBoolean": true diff --git a/input/tests/Patient-IMMZ-Patient-enadult-f.json b/input/tests/Patient-IMMZ-Patient-enadult-f.json index f0b87bb10cd..763fc8963ab 100644 --- a/input/tests/Patient-IMMZ-Patient-enadult-f.json +++ b/input/tests/Patient-IMMZ-Patient-enadult-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "1996-04-08", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-enadult-m.json b/input/tests/Patient-IMMZ-Patient-enadult-m.json index f358f91bd81..af330a7c6ce 100644 --- a/input/tests/Patient-IMMZ-Patient-enadult-m.json +++ b/input/tests/Patient-IMMZ-Patient-enadult-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "1993-07-29", "gender": "male" } diff --git a/input/tests/Patient-IMMZ-Patient-enchild-f.json b/input/tests/Patient-IMMZ-Patient-enchild-f.json index 0475b022c8d..17d360481f7 100644 --- a/input/tests/Patient-IMMZ-Patient-enchild-f.json +++ b/input/tests/Patient-IMMZ-Patient-enchild-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2014-08-03", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-enchild-m.json b/input/tests/Patient-IMMZ-Patient-enchild-m.json index 5f2aad9b060..6a95f7537bf 100644 --- a/input/tests/Patient-IMMZ-Patient-enchild-m.json +++ b/input/tests/Patient-IMMZ-Patient-enchild-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2015-04-15", "gender": "male" } diff --git a/input/tests/Patient-IMMZ-Patient-eninfant-f.json b/input/tests/Patient-IMMZ-Patient-eninfant-f.json index 878f6beef52..f77b56b0590 100644 --- a/input/tests/Patient-IMMZ-Patient-eninfant-f.json +++ b/input/tests/Patient-IMMZ-Patient-eninfant-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2022-04-28", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-eninfant-m.json b/input/tests/Patient-IMMZ-Patient-eninfant-m.json index 346f89c359d..ba83be1805b 100644 --- a/input/tests/Patient-IMMZ-Patient-eninfant-m.json +++ b/input/tests/Patient-IMMZ-Patient-eninfant-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2022-04-28", "gender": "male" } diff --git a/input/tests/Patient-IMMZ-Patient-enteen-f.json b/input/tests/Patient-IMMZ-Patient-enteen-f.json index df5414b7b44..f4ea4ac8953 100644 --- a/input/tests/Patient-IMMZ-Patient-enteen-f.json +++ b/input/tests/Patient-IMMZ-Patient-enteen-f.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2006-10-16", "gender": "female" } diff --git a/input/tests/Patient-IMMZ-Patient-enteen-m.json b/input/tests/Patient-IMMZ-Patient-enteen-m.json index 3bb217cecbc..bca17e8a616 100644 --- a/input/tests/Patient-IMMZ-Patient-enteen-m.json +++ b/input/tests/Patient-IMMZ-Patient-enteen-m.json @@ -12,6 +12,12 @@ "use": "official" } ], + "address": [ + { + "use": "home", + "district": "reporter" + } + ], "birthDate": "2006-11-08", "gender": "male" } From c485a5b7e48b0d1aae66ee6462dd3924d81fbb41 Mon Sep 17 00:00:00 2001 From: delcroip Date: Tue, 17 Oct 2023 16:59:39 +0200 Subject: [PATCH 3/4] better stratifiers --- input/cql/IMMZIND08.cql | 15 +- input/resources/library/IMMZIND08.json | 34 +++ .../measure-IMMZIND08-multistratifier.json | 217 ++++++++++++++++++ .../resources/measure/measure-IMMZIND08.json | 36 +-- 4 files changed, 265 insertions(+), 37 deletions(-) create mode 100644 input/resources/library/IMMZIND08.json create mode 100644 input/resources/measure/measure-IMMZIND08-multistratifier.json diff --git a/input/cql/IMMZIND08.cql b/input/cql/IMMZIND08.cql index 84e6abff472..0ae1da6d61f 100644 --- a/input/cql/IMMZIND08.cql +++ b/input/cql/IMMZIND08.cql @@ -3,8 +3,6 @@ * Immunization coverage for Measles containing vaccine (Estimated Denominator) * References: WHO Immunization Facility Analysis Guide (1), WHO / UNICEF Joint Reporting Form (3 - elements 4240 and 4260 ) */ - - /* ============================================================================ * Measle Dose 1 * ============================================================================ @@ -50,7 +48,7 @@ * ============================================================================ */ -library IMMZIND08 +library IMMZIND08 version '1.0.1' using FHIR version '4.0.1' @@ -102,8 +100,8 @@ define DenominatorPopulation: where MR.subject.reference = 'Location/' + getPatientGeographicStr and MR.measure = FHIR.canonical {value:canonical_demographic_measure_url} and start of "Measurement Period" in MR.period ).group.first().stratifier.first().stratum.where( - exists(component.where(code.coding.first().code ~ code { value: 'sex'} and value.coding.first().code = Patient.gender)) - and exists(component.where(code.coding.first().code ~ code { value: 'AgeGroup'} and value.coding.first().code ~ "Age Group".code)) + exists(component.where(code.coding.first().code ~ code { value: 'sex'} and value.coding.first().code ~ "Administrative Gender Stratifier".code)) + and exists(component.where(code.coding.first().code ~ code { value: 'AgeGroup'} and value.coding.first().code ~ "Age Group Stratifier".code)) ).first().population.first().count @@ -138,7 +136,7 @@ define function ToDate(choice Choice): // Stratifiers // Age Group -define "Age Group": +define "Age Group Stratifier": case when AgeInYearsAt(start of "Measurement Period") in Interval[0, 1) then "P0Y--P1Y" when AgeInYearsAt(start of "Measurement Period") in Interval[1, 2) then "P1Y--P2Y" @@ -163,4 +161,7 @@ define "Administrative Gender Stratifier": * By Administrative Gender of Patient Stratifier */ define "Geographic Region Stratifier": - code {value: getPatientGeographicStr} + System.Code {code: getPatientGeographicStr} + +define "Age Group / Region / Sex Stratifier": + code { value: ("Geographic Region Stratifier".code + '__' + "Administrative Gender Stratifier".code + '__' + "Age Group Stratifier".code)} \ No newline at end of file diff --git a/input/resources/library/IMMZIND08.json b/input/resources/library/IMMZIND08.json new file mode 100644 index 00000000000..3a924204d25 --- /dev/null +++ b/input/resources/library/IMMZIND08.json @@ -0,0 +1,34 @@ +{ + "resourceType": "Library", + "id": "IMMZIND08", + "version" : "1.0.1", + "extension": [ { + "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", + "valueReference": { + "reference": "Device/cqf-tooling" + } + } ], + "url": "http://fhir.org/guides/who/smart-immunization/Library/IMMZIND08", + "name": "IMMZ.IND.08", + "parameter": [ { + "name": "periodStart", + "use": "in", + "min": 1, + "max": "1", + "type": "string" + } ], + "dataRequirement": [ { + "type": "Patient", + "profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ] + }, { + "type": "Immunization", + "profile": [ "http://hl7.org/fhir/StructureDefinition/Immunization" ], + "mustSupport": [ "status", "vaccineCode", "occurrence" ] + } ], + "content": [ + { + "contentType": "text/cql", + "data": "LyoKICogTGlicmFyeTogSU1NWi5JTkQuMDgKICogSW1tdW5pemF0aW9uIGNvdmVyYWdlIGZvciBNZWFzbGVzIGNvbnRhaW5pbmcgdmFjY2luZSAoRXN0aW1hdGVkIERlbm9taW5hdG9yKSAKICogUmVmZXJlbmNlczogV0hPIEltbXVuaXphdGlvbiBGYWNpbGl0eSBBbmFseXNpcyBHdWlkZSAoMSksIFdITyAvIFVOSUNFRiBKb2ludCBSZXBvcnRpbmcgRm9ybSAoMyAtIGVsZW1lbnRzIDQyNDAgYW5kIDQyNjAgKQogKi8KLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBNZWFzbGUgRG9zZSAxCiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogSW5pdGlhbCBQYXRpZW50IFBvcHVsYXRpb24gPQogKiAgICAgQWxsIHBhdGllbnQKICoKICogRGVub21pbmF0b3IgPQogKiAgICAgRGVtb2dyYXBoaWMgZGF0YSBmcm9tIG1lYXN1cmUgcmVwb3J0CiAqCiAqIE51bWVyYXRvciA9CiAqICAgICBQYXRpZW50IHdpdGggMXN0IE1lYXNsZSBpbW11bml6YXRpb24gaW4gdGhlIHJlcG9ydGluZyBwZXJpb2QKICoKICogRGVub21pbmF0b3IgRXhjZXB0aW9ucyA9CiAqICAgICBOb25lCiAqCiAqIERpc2FnZ3JlZ2F0aW9uOgogKiAgICBBZ2UgR3JvdXAgKDwgMSB5ZWFyIG9yIDEgeWVhciBvciA+IDIgeWVhcnMpCiAqICAgIEdlb2dyYXBoaWMgUmVnaW9uCiAqICAgIEFkbWluaXN0cmF0aXZlIEdlbmRlciAob3IgQmlvbG9naWNhbCBTZXgpCiAqIAogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CgogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBNZWFzbGUgRG9zZSAyCiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogSW5pdGlhbCBQYXRpZW50IFBvcHVsYXRpb24gPQ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yYXRpdmUgR2VuZGVyIFN0cmF0aWZpZXIiOgogICAgY2FzZSAKICAgICAgICB3aGVuIFBhdGllbnQuZ2VuZGVyID0gJ21hbGUnIHRoZW4gIk1hbGVzIgogICAgICAgIHdoZW4gUGF0aWVudC5nZW5kZXIgPSAnZmVtYWxlJyB0aGVuICJGZW1hbGVzIgogICAgICAgIGVsc2UgIk90aGVyIgogICAgZW5kCgovKioKICogQnkgQWRtaW5pc3RyYXRpdmUgR2VuZGVyIG9mIFBhdGllbnQgU3RyYXRpZmllcgogKi8KZGVmaW5lICJHZW9ncmFwaGljIFJlZ2lvbiBTdHJhdGlmaWVyIjoKICAgIFN5c3RlbS5Db2RlIHtjb2RlOiBnZXRQYXRpZW50R2VvZ3JhcGhpY1N0cn0KCmRlZmluZSAiQWdlIEdyb3VwIC8gUmVnaW9uIC8gU2V4IFN0cmF0aWZpZXIiOgoJY29kZSB7IHZhbHVlOiAoIkdlb2dyYXBoaWMgUmVnaW9uIFN0cmF0aWZpZXIiLmNvZGUgKyAnX18nICsgIkFkbWluaXN0cmF0aXZlIEdlbmRlciBTdHJhdGlmaWVyIi5jb2RlICsgJ19fJyArICJBZ2UgR3JvdXAgU3RyYXRpZmllciIuY29kZSl9" + } + ] +} \ No newline at end of file diff --git a/input/resources/measure/measure-IMMZIND08-multistratifier.json b/input/resources/measure/measure-IMMZIND08-multistratifier.json new file mode 100644 index 00000000000..288a0e71320 --- /dev/null +++ b/input/resources/measure/measure-IMMZIND08-multistratifier.json @@ -0,0 +1,217 @@ +{ + "resourceType": "Measure", + "id": "IMMZIND08multistratifier", + "meta": { + "profile": [ "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm" ] + }, + "url": "http://fhir.org/guides/who/smart-immunization/Measure/IMMZIND08multistratifier", + "name": "measure-IMMZIND08-multistratifier", + "title": "IMMZ.IND.08 Immunization coverage for Measles containing vaccine (Estimated Denominator)", + "date": "2022-05-12T15:36:34.955-04:00", + "description": "Compares the administered doses of measles containing vaccines (MCV) with the estimated number of surviving infants (if dose 1) or a country supplied denominator (if dose 2) expressed as a percentage.", + "library": [ "http://fhir.org/guides/who/smart-immunization/Library/IMMZIND08" ], + "scoring": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-scoring", + "code": "proportion" + } ] + }, + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-type", + "code": "process" + } ] + } ], + "improvementNotation": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation", + "code": "increase" + } ] + }, + "group": [ + { + "id": "IMMZ.IND.05", + "description": "Compares the number of clients who received the first dose in the primary series of measles containing vaccine (MCV1) with the number in the target population, expressed as a percentage.", + "population": [ + { + "id": "initial-population", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population" + } ] + }, + "description": "All patients", + "criteria": { + "language": "text/cql-identifier", + "expression": "InitialPopulation" + } + },{ + "id": "denominator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "denominator" + } ] + }, + "description": "Demographic data", + "criteria": { + "language": "text/cql-identifier", + "expression": "DenominatorPopulation" + }, + "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "denominator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "maximum" + } + ] + }, { + "id": "numerator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "numerator" + } ] + }, + "description": "Number of persons that recieved the 1st dose in the reporting period", + "criteria": { + "language": "text/cql-identifier", + "expression": "FirstDose" + }, "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "numerator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "sum" + } + ] + } + ], + "stratifier": [ + { + "id":"age-group.sex.region.stratifier", + "component":[ + { + "id": "age-group-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Age Group" + } + }, { + "id": "geographic-region-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Geographic Region Stratifier" + } + }, { + "id": "administrative-gender-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Administrative Gender Stratifier" + } + } + + + ] + } + ] + },{ + "id": "IMMZ.IND.40", + "description": "Compares the number of clients who received the second dose in the primary series of measles containing vaccine (MCV2), according to the national schedule, with the target population, expressed as a percentage.", + "population": [ + { + "id": "initial-population", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population" + } ] + }, + "description": "All patients", + "criteria": { + "language": "text/cql-identifier", + "expression": "InitialPopulation" + } + },{ + "id": "denominator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "denominator" + } ] + }, + "description": "Demographic data", + "criteria": { + "language": "text/cql-identifier", + "expression": "DenominatorPopulation" + }, + "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "denominator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "maximum" + } + ] + }, { + "id": "numerator", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "numerator" + } ] + }, + "description": "Number of persons that recieved the 1st dose in the reporting period", + "criteria": { + "language": "text/cql-identifier", + "expression": "SecondDose" + }, "extension" : [ + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference", + "valueString" : "numerator" + }, + { + "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", + "valueCode" : "sum" + } + ] + } + ], + "stratifier": [ + { + "id":"age-group.sex.region.stratifier", + "component":[ + { + "id": "age-group-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Age Group" + } + }, { + "id": "geographic-region-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Geographic Region Stratifier" + } + }, { + "id": "administrative-gender-stratifier", + "criteria": { + "language": "text/cql-identifier", + "expression": "Administrative Gender Stratifier" + } + } + + + ] + } + ] + } ] +} diff --git a/input/resources/measure/measure-IMMZIND08.json b/input/resources/measure/measure-IMMZIND08.json index d71860d1e55..b26d10719ee 100644 --- a/input/resources/measure/measure-IMMZIND08.json +++ b/input/resources/measure/measure-IMMZIND08.json @@ -94,25 +94,13 @@ } ], "stratifier": [ - { - "id": "age-group-stratifier", - "criteria": { - "language": "text/cql-identifier", - "expression": "Age Group Stratifier" - } - }, { - "id": "geographic-region-stratifier", - "criteria": { - "language": "text/cql-identifier", - "expression": "Geographic Region Stratifier" - } - }, { - "id": "administrative-gender-stratifier", + { + "id": "age-group-sex-region-stratifier", "criteria": { "language": "text/cql-identifier", - "expression": "Administrative Gender Stratifier" + "expression": "Age Group / Region / Sex Stratifier" } - } + } ] },{ "id": "IMMZ.IND.40", @@ -180,22 +168,10 @@ ], "stratifier": [ { - "id": "age-group-stratifier", - "criteria": { - "language": "text/cql-identifier", - "expression": "Age Group Stratifier" - } - }, { - "id": "geographic-region-stratifier", - "criteria": { - "language": "text/cql-identifier", - "expression": "Geographic Region Stratifier" - } - }, { - "id": "administrative-gender-stratifier", + "id": "age-group-sex-region-stratifier", "criteria": { "language": "text/cql-identifier", - "expression": "Administrative Gender Stratifier" + "expression": "Age Group / Region / Sex Stratifier" } } ] From de0bd9b4feafa1e664dffd92568370d69a361049 Mon Sep 17 00:00:00 2001 From: delcroip Date: Wed, 18 Oct 2023 17:46:30 +0200 Subject: [PATCH 4/4] small improvement --- input/cql/IMMZIND08.cql | 26 ++++--- input/resources/library/IMMZIND08.json | 13 ++-- .../resources/measure/measure-IMMZIND08.json | 8 +-- .../measure-demographic-immunization.json | 71 +++++++++++++++++++ .../tests/measure/MeasrueReport-location.json | 18 +---- 5 files changed, 95 insertions(+), 41 deletions(-) create mode 100644 input/resources/measure/measure-demographic-immunization.json diff --git a/input/cql/IMMZIND08.cql b/input/cql/IMMZIND08.cql index 0ae1da6d61f..f9ca27fc969 100644 --- a/input/cql/IMMZIND08.cql +++ b/input/cql/IMMZIND08.cql @@ -47,15 +47,14 @@ * * ============================================================================ */ - -library IMMZIND08 version '1.0.1' +library IMMZIND08 version '1.0.2' using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' parameter "Measurement Period" Interval -parameter "canonical_demographic_measure_url" String default 'https://fhir.who.org/Measure/demographic-for-immunization' +parameter "canonical_demographic_measure_url" String default 'https://fhir.who.org/Measure/demographicForImmunization' valueset "Measles Vaccines": 'http://fhir.org/guides/who/smart-immunization/ValueSet/IMMZ.A1.DE' @@ -75,14 +74,13 @@ code "Other" : 'other' from "Administrative Gender Codes" display 'Other/NA' context Patient define getPatientGeographicStr: - First(Patient.address A where A.use in { 'home' }).district + Coalesce(First(Patient.address A where A.use in { 'home' }).district, 'nodistrict') define getPatientGeographicLocation: - if getPatientGeographicStr is not null then + if getPatientGeographicStr is not null and getPatientGeographicStr != 'nodistrict' then First([Location] L where L.id = id { value: getPatientGeographicStr}) else null - /* All patient should be included */ @@ -100,8 +98,8 @@ define DenominatorPopulation: where MR.subject.reference = 'Location/' + getPatientGeographicStr and MR.measure = FHIR.canonical {value:canonical_demographic_measure_url} and start of "Measurement Period" in MR.period ).group.first().stratifier.first().stratum.where( - exists(component.where(code.coding.first().code ~ code { value: 'sex'} and value.coding.first().code ~ "Administrative Gender Stratifier".code)) - and exists(component.where(code.coding.first().code ~ code { value: 'AgeGroup'} and value.coding.first().code ~ "Age Group Stratifier".code)) + exists(component.where(code.coding.first().code ~ 'sex' and value.coding.first().code ~ "Administrative Gender Stratifier".code)) + and exists(component.where(code.coding.first().code ~ 'AgeGroup' and value.coding.first().code ~ "Age Group Stratifier".code)) ).first().population.first().count @@ -113,11 +111,11 @@ define getdoses: define FirstDose: - Count(getdoses) = 1 and exists(getdoses.where(ToDate(occurrence) in "Measurement Period")) + Count(getdoses) = 1 and exists(getdoses.where(ToDate(occurrence) during "Measurement Period")) define SecondDose: - Count(getdoses) = 2 and exists(getdoses.where(ToDate(occurrence) in "Measurement Period")) + Count(getdoses) = 2 and exists(getdoses.where(ToDate(occurrence) during "Measurement Period")) /** @@ -140,8 +138,7 @@ define "Age Group Stratifier": case when AgeInYearsAt(start of "Measurement Period") in Interval[0, 1) then "P0Y--P1Y" when AgeInYearsAt(start of "Measurement Period") in Interval[1, 2) then "P1Y--P2Y" - when AgeInYearsAt(start of "Measurement Period") >= 2 then "P2Y--P9999Y" - else null + else "P2Y--P9999Y" end // Sex @@ -163,5 +160,6 @@ define "Administrative Gender Stratifier": define "Geographic Region Stratifier": System.Code {code: getPatientGeographicStr} -define "Age Group / Region / Sex Stratifier": - code { value: ("Geographic Region Stratifier".code + '__' + "Administrative Gender Stratifier".code + '__' + "Age Group Stratifier".code)} \ No newline at end of file +define "Region - Sex - Age Group Stratifier": + "Geographic Region Stratifier".code + ':' + "Administrative Gender Stratifier".code + ':' + "Age Group Stratifier".code + diff --git a/input/resources/library/IMMZIND08.json b/input/resources/library/IMMZIND08.json index 3a924204d25..a3fb6433a69 100644 --- a/input/resources/library/IMMZIND08.json +++ b/input/resources/library/IMMZIND08.json @@ -1,7 +1,7 @@ { "resourceType": "Library", "id": "IMMZIND08", - "version" : "1.0.1", + "version": "1.0.2", "extension": [ { "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", "valueReference": { @@ -11,15 +11,16 @@ "url": "http://fhir.org/guides/who/smart-immunization/Library/IMMZIND08", "name": "IMMZ.IND.08", "parameter": [ { - "name": "periodStart", + "name": "Measurement Period", "use": "in", - "min": 1, + "min": 0, "max": "1", - "type": "string" + "type": "Period" } ], "dataRequirement": [ { "type": "Patient", - "profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ] + "profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ], + "mustSupport": [ "use" ] }, { "type": "Immunization", "profile": [ "http://hl7.org/fhir/StructureDefinition/Immunization" ], @@ -28,7 +29,7 @@ "content": [ { "contentType": "text/cql", - "data": "LyoKICogTGlicmFyeTogSU1NWi5JTkQuMDgKICogSW1tdW5pemF0aW9uIGNvdmVyYWdlIGZvciBNZWFzbGVzIGNvbnRhaW5pbmcgdmFjY2luZSAoRXN0aW1hdGVkIERlbm9taW5hdG9yKSAKICogUmVmZXJlbmNlczogV0hPIEltbXVuaXphdGlvbiBGYWNpbGl0eSBBbmFseXNpcyBHdWlkZSAoMSksIFdITyAvIFVOSUNFRiBKb2ludCBSZXBvcnRpbmcgRm9ybSAoMyAtIGVsZW1lbnRzIDQyNDAgYW5kIDQyNjAgKQogKi8KLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBNZWFzbGUgRG9zZSAxCiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogSW5pdGlhbCBQYXRpZW50IFBvcHVsYXRpb24gPQogKiAgICAgQWxsIHBhdGllbnQKICoKICogRGVub21pbmF0b3IgPQogKiAgICAgRGVtb2dyYXBoaWMgZGF0YSBmcm9tIG1lYXN1cmUgcmVwb3J0CiAqCiAqIE51bWVyYXRvciA9CiAqICAgICBQYXRpZW50IHdpdGggMXN0IE1lYXNsZSBpbW11bml6YXRpb24gaW4gdGhlIHJlcG9ydGluZyBwZXJpb2QKICoKICogRGVub21pbmF0b3IgRXhjZXB0aW9ucyA9CiAqICAgICBOb25lCiAqCiAqIERpc2FnZ3JlZ2F0aW9uOgogKiAgICBBZ2UgR3JvdXAgKDwgMSB5ZWFyIG9yIDEgeWVhciBvciA+IDIgeWVhcnMpCiAqICAgIEdlb2dyYXBoaWMgUmVnaW9uCiAqICAgIEFkbWluaXN0cmF0aXZlIEdlbmRlciAob3IgQmlvbG9naWNhbCBTZXgpCiAqIAogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CgogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBNZWFzbGUgRG9zZSAyCiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogSW5pdGlhbCBQYXRpZW50IFBvcHVsYXRpb24gPQogKiAgICAgQWxsIHBhdGllbnQKICoKICogRGVub21pbmF0b3IgPQogKiAgICAgRGVtb2dyYXBoaWMgZGF0YSBmcm9tIG1lYXN1cmUgcmVwb3J0CiAqCiAqIE51bWVyYXRvciA9CiAqICAgICBQYXRpZW50IHdpdGggMm5kIE1lYXNsZSBpbW11bml6YXRpb24gaW4gdGhlIHJlcG9ydGluZyBwZXJpb2QKICoKICogRGVub21pbmF0b3IgRXhjZXB0aW9ucyA9CiAqICAgICBOb25lCiAqCiAqIERpc2FnZ3JlZ2F0aW9uOgogKiAgICBBZ2UgR3JvdXAgKDwgMSB5ZWFyIG9yIDEgeWVhciBvciA+IDIgeWVhcnMpCiAqICAgIEdlb2dyYXBoaWMgUmVnaW9uCiAqICAgIEFkbWluaXN0cmF0aXZlIEdlbmRlciAob3IgQmlvbG9naWNhbCBTZXgpCiAqIAogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwoKbGlicmFyeSBJTU1aSU5EMDggdmVyc2lvbiAnMS4wLjEnCgoKdXNpbmcgRkhJUiB2ZXJzaW9uICc0LjAuMScKaW5jbHVkZSBGSElSSGVscGVycyB2ZXJzaW9uICc0LjAuMScKC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i5JTkQuMDgKICogSW1tdW5pemF0aW9uIGNvdmVyYWdlIGZvciBNZWFzbGVzIGNvbnRhaW5pbmcgdmFjY2luZSAoRXN0aW1hdGVkIERlbm9taW5hdG9yKSAKICogUmVmZXJlbmNlczogV0hPIEltbXVuaXphdGlvbiBGYWNpbGl0eSBBbmFseXNpcyBHdWlkZSAoMSksIFdITyAvIFVOSUNFRiBKb2ludCBSZXBvcnRpbmcgRm9ybSAoMyAtIGVsZW1lbnRzIDQyNDAgYW5kIDQyNjAgKQogKi8KLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBNZWFzbGUgRG9zZSAxCiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogSW5pdGlhbCBQYXRpZW50IFBvcHVsYXRpb24gPQogKiAgICAgQWxsIHBhdGllbnQKICoKICogRGVub21pbmF0b3IgPQogKiAgICAgRGVtb2dyYXBoaWMgZGF0YSBmcm9tIG1lYXN1cmUgcmVwb3J0CiAqCiAqIE51bWVyYXRvciA9CiAqICAgICBQYXRpZW50IHdpdGggMXN0IE1lYXNsZSBpbW11bml6YXRpb24gaW4gdGhlIHJlcG9ydGluZyBwZXJpb2QKICoKICogRGVub21pbmF0b3IgRXhjZXB0aW9ucyA9CiAqICAgICBOb25lCiAqCiAqIERpc2FnZ3JlZ2F0aW9uOgogKiAgICBBZ2UgR3JvdXAgKDwgMSB5ZWFyIG9yIDEgeWVhciBvciA+IDIgeWVhcnMpCiAqICAgIEdlb2dyYXBoaWMgUmVnaW9uCiAqICAgIEFkbWluaXN0cmF0aXZlIEdlbmRlciAob3IgQmlvbG9naWNhbCBTZXgpCiAqIAogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CgogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBNZWFzbGUgRG9zZSAyCiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICogSW5pdGlhbCBQYXRpZW50IFBvcHVsYXRpb24gPQogKiAgICAgQWxsIHBhdGllbnQKICoKICogRGVub21pbmF0b3IgPQogKiAgICAgRGVtb2dyYXBoaWMgZGF0YSBmcm9tIG1lYXN1cmUgcmVwb3J0CiAqCiAqIE51bWVyYXRvciA9CiAqICAgICBQYXRpZW50IHdpdGggMm5kIE1lYXNsZSBpbW11bml6YXRpb24gaW4gdGhlIHJlcG9ydGluZyBwZXJpb2QKICoKICogRGVub21pbmF0b3IgRXhjZXB0aW9ucyA9CiAqICAgICBOb25lCiAqCiAqIERpc2FnZ3JlZ2F0aW9uOgogKiAgICBBZ2UgR3JvdXAgKDwgMSB5ZWFyIG9yIDEgeWVhciBvciA+IDIgeWVhcnMpCiAqICAgIEdlb2dyYXBoaWMgUmVnaW9uCiAqICAgIEFkbWluaXN0cmF0aXZlIEdlbmRlciAob3IgQmlvbG9naWNhbCBTZXgpCiAqIAogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAqLwpsaWJyYXJ5IElNTVpJTkQwOCB2ZXJzaW9uICcxLjAuMicKCgp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4xJwppbmNsdWRlIEZISVJIZWxwZXJzIHZlcnNpb24gJzQuMC4xJwoKcGFyYW1ldGVyICJNZWFzdXJlbWVudCBQZXJpb2QiIEludGVydmFsPERhdGU+CnBhcmFtZXRlciAiY2Fub25pY2FsX2RlbW9ncmFwaGljX21lYXN1cmVfdXJsIiBTdHJpbmcgZGVmYXVsdCAnaHR0cHM6Ly9ma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k5OVkiCiAgZW5kCgovLyBTZXgKZGVmaW5lICJTZXgiOiBQYXRpZW50LmdlbmRlcgoKLyoqCiAqIEJ5IEFkbWluaXN0cmF0aXZlIEdlbmRlciBvZiBQYXRpZW50IFN0cmF0aWZpZXIKICovCmRlZmluZSAiQWRtaW5pc3RyYXRpdmUgR2VuZGVyIFN0cmF0aWZpZXIiOgogICAgY2FzZSAKICAgICAgICB3aGVuIFBhdGllbnQuZ2VuZGVyID0gJ21hbGUnIHRoZW4gIk1hbGVzIgogICAgICAgIHdoZW4gUGF0aWVudC5nZW5kZXIgPSAnZmVtYWxlJyB0aGVuICJGZW1hbGVzIgogICAgICAgIGVsc2UgIk90aGVyIgogICAgZW5kCgovKioKICogQnkgQWRtaW5pc3RyYXRpdmUgR2VuZGVyIG9mIFBhdGllbnQgU3RyYXRpZmllcgogKi8KZGVmaW5lICJHZW9ncmFwaGljIFJlZ2lvbiBTdHJhdGlmaWVyIjoKICAgIFN5c3RlbS5Db2RlIHtjb2RlOiBnZXRQYXRpZW50R2VvZ3JhcGhpY1N0cn0KCmRlZmluZSAiUmVnaW9uIC0gU2V4IC0gQWdlIEdyb3VwIFN0cmF0aWZpZXIiOgoJIkdlb2dyYXBoaWMgUmVnaW9uIFN0cmF0aWZpZXIiLmNvZGUgKyAnOicgKyAiQWRtaW5pc3RyYXRpdmUgR2VuZGVyIFN0cmF0aWZpZXIiLmNvZGUgKyAnOicgKyAiQWdlIEdyb3VwIFN0cmF0aWZpZXIiLmNvZGUKCg==" } ] } \ No newline at end of file diff --git a/input/resources/measure/measure-IMMZIND08.json b/input/resources/measure/measure-IMMZIND08.json index b26d10719ee..2f70d9c0074 100644 --- a/input/resources/measure/measure-IMMZIND08.json +++ b/input/resources/measure/measure-IMMZIND08.json @@ -19,7 +19,7 @@ "type": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/measure-type", - "code": "process" + "code": "outcome" } ] } ], "improvementNotation": { @@ -66,7 +66,7 @@ }, { "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod", - "valueCode" : "maximum" + "valueCode" : "sum" } ] }, { @@ -98,7 +98,7 @@ "id": "age-group-sex-region-stratifier", "criteria": { "language": "text/cql-identifier", - "expression": "Age Group / Region / Sex Stratifier" + "expression": "Region - Sex - Age Group Stratifier" } } ] @@ -171,7 +171,7 @@ "id": "age-group-sex-region-stratifier", "criteria": { "language": "text/cql-identifier", - "expression": "Age Group / Region / Sex Stratifier" + "expression": "Region - Sex - Age Group Stratifier" } } ] diff --git a/input/resources/measure/measure-demographic-immunization.json b/input/resources/measure/measure-demographic-immunization.json new file mode 100644 index 00000000000..a268845f543 --- /dev/null +++ b/input/resources/measure/measure-demographic-immunization.json @@ -0,0 +1,71 @@ +{ + "resourceType": "Measure", + "id": "demographicForImmunization", + "url": "https://fhir.who.org/Measure/demographicForImmunization", + "name": "demographic for immunization", + "title": "demographic for immunization use ad Estimated Denominator", + "date": "2022-05-12T15:36:34.955-04:00", + "description": "Definition of the MeasureReport expected to rum the Immunization measure", + "scoring": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-scoring", + "code": "cohort" + } ] + }, + "library": [ "http://fhir.org/guides/who/smart-immunization/Library/WHOCommon" ], + "type": [ { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-type", + "code": "process" + } ] + } ], + "group": [ + { + "id": "IMMZ.IND.05", + "description": "Compares the number of clients who received the first dose in the primary series of measles containing vaccine (MCV1) with the number in the target population, expressed as a percentage.", + "population": [ + { + "id": "initial-population", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population" + } ] + }, + "description": "All patients", + "criteria": { + "language": "text/cql-expression", + "expression": "true" + } + }, { + "id": "measured-population", + "code": { + "coding": [ { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "numerator" + } ] + }, + "description": "Number of persons", + "criteria": { + "language": "text/cql-expression", + "expression": "true" + } + } + ], + "stratifier": [ + { + "id": "age-group-stratifier", + "criteria": { + "language": "text/cql-expression", + "expression": " case when AgeInYearsAt(periodStart) in Interval[0, 1) then FHIR.code {value: 'P0Y--P1Y'} when AgeInYearsAt(periodStart) in Interval[1, 2) then FHIR.code {value: 'P1Y--P2Y'} when AgeInYearsAt(periodStart) >= 2 then FHIR.code {value: 'P2Y--P9999Y'} else null end " + } + },{ + "id": "administrative-gender-stratifier", + "criteria": { + "language": "text/cql-expression", + "expression": "case when Patient.gender = 'male' then code {value: 'male'} when Patient.gender = 'female' then code {value: 'female'} else code {value: 'other'} end" + } + } + ] + } ] +} diff --git a/input/tests/measure/MeasrueReport-location.json b/input/tests/measure/MeasrueReport-location.json index 964d654496f..edba9fdf5ca 100644 --- a/input/tests/measure/MeasrueReport-location.json +++ b/input/tests/measure/MeasrueReport-location.json @@ -1,23 +1,7 @@ { "resourceType": "MeasureReport", "id": "smart-location-example", - "meaure": "https://fhir.who.org/Measure/demographic-for-immunization", - "contained": [ - { - "resourceType": "Location", - "id": "reporter", - "name": "Health District", - "physicalType":{ - "coding": [ - { - "code": "386012008", - "system": "http://terminology.hl7.org/CodeSystem/location-physical-type", - "display": "jdn" - } - ] - } - } - ], + "meaure": "https://fhir.who.org/Measure/demographicForImmunization", "identifier": [ { "value": "measurereport-cms146-cat1-example-2017-03-13"