Skip to content

Commit

Permalink
Added in Yellow Fever indicator (26) and measure. Updated measures to…
Browse files Browse the repository at this point in the history
… use a rulesets.
  • Loading branch information
lukeaduncan committed Jan 26, 2024
1 parent d70e1e5 commit 086f220
Show file tree
Hide file tree
Showing 27 changed files with 954 additions and 169 deletions.
65 changes: 65 additions & 0 deletions input/cql/IMMZIND26YellowFever.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Library: IMMZ.IND.26.YellowFever
* Immunization coverage for Yellow Fever containing vaccine
* The percentage in the target population who have received one dose of Yellow Fever (YF) vaccine during reporting period
*
*
* References: WHO / UNICEF Joint Reporting Form
* WHO Immunization data portal
*/

library IMMZIND26YellowFever

// 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
include IMMZINDYellowFever called Ind
include IMMZStratifiers called Stratifiers
// End Skeleton CQL
parameter "Measurement Period" Interval<DateTime> default Interval[@2023-01-01T00:00:00.0, @2023-12-31T23:59:59.9]

context Patient

/*
@population: Initial population for first dose: Any one over 9 months
*/
define "Initial Population":
Patient.birthDate + 9 months before end of "Measurement Period"

/*
@numerator: Number of yellow fever doses administered through routine services during reporting period
@computation: COUNT of immunization events WHERE "Vaccine type" = "Yellow fever containing vaccines" AND "Date and time of vaccination" is during the reporting period
*/
define "Numerator":
exists( Ind."Yellow Fever Doses in Measurement Period" I where IMMZCom.ToPositiveInt((singleton from I.protocolApplied).doseNumber) = 1 )

/*
@denominator: Number in target group
@computation: As defined by the Member States
*/
define "Denominator":
"Initial Population"

/*
@disaggregation: Administrative area
Sex
Age in years
Age group (depending on schedule)
*/
define "Stratification 1":
Stratifiers."Administrative Area"

define "Stratification 2":
Stratifiers."Sex"

define "Stratification 3":
Stratifiers."Age"

define "Stratification 4":
Stratifiers."Age Group"
15 changes: 0 additions & 15 deletions input/cql/IMMZINDMeasles.cql
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
/*
* Library: IMMZ.IND.Measles
* 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.Z.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)
*
* Disaggregation:
* - Dose Sequence (1, 2)
* - Age Group (< 1 year or > 1 year)
* - 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 IMMZINDMeasles
Expand Down
27 changes: 27 additions & 0 deletions input/cql/IMMZINDYellowFever.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Library: IMMZ.IND.YellowFever
*/

library IMMZINDYellowFever

// 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
include IMMZD2DTYellowFeverInput called YF
// End Skeleton CQL
parameter "Measurement Period" Interval<DateTime> default Interval[@2023-01-01T00:00:00.0, @2023-12-31T23:59:59.9]

context Patient

/*
* Measles doses given during measurement period
*/
define "Yellow Fever Doses in Measurement Period":
YF."Yellow Fever Doses Administered to Patient" I where I.occurrence during "Measurement Period"

50 changes: 2 additions & 48 deletions input/fsh/measures/IMMZIND07MeaslesHighTx.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,5 @@ Instance: IMMZIND07MeaslesHighTx
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Title: "IMMZIND07MeaslesHighTx"

* description = "IMMZ.IND.07 Measles indicator for first dose in High Transmission area."
* url = "http://smart.who.int/ig/smart-immunizations/Measure/IMMZIND07MeaslesHighTx"
* version = "0.1.0"
* status = #draft
* experimental = false
* date = "2024-01-16"
* name = "IMMZIND07MeaslesHighTx"
* publisher = "World Health Organization (WHO)"
* library = "http://smart.who.int/ig/smart-immunizations/Library/IMMZIND07MeaslesHighTx"
* scoring = $measure-scoring#proportion "Proportion"
* group[+]
* population[initialPopulation]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.07.HTx.IP"
* description = "Initial Population"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql
* criteria.expression = "Initial Population"
* population[denominator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.07.HTx.D"
* description = "Denominator"
* code = $measure-population#denominator "Denominator"
* criteria.language = #text/cql
* criteria.expression = "Denominator"
* population[numerator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.07.HTx.N"
* description = "Numerator"
* code = $measure-population#numerator "Numerator"
* criteria.language = #text/cql
* criteria.expression = "Numerator"
* stratifier[+]
* id = "IMMZ.IND.07.HTx.S1"
* criteria.language = #text/cql
* criteria.expression = "Stratification 1"
* stratifier[+]
* id = "IMMZ.IND.07.HTx.S2"
* criteria.language = #text/cql
* criteria.expression = "Stratification 2"
* stratifier[+]
* id = "IMMZ.IND.07.HTx.S3"
* criteria.language = #text/cql
* criteria.expression = "Stratification 3"
* stratifier[+]
* id = "IMMZ.IND.07.HTx.S4"
* criteria.language = #text/cql
* criteria.expression = "Stratification 4"
* insert MeasureProportion( IMMZ.IND.07 Measles indicator for first dose in High Transmission area., IMMZIND07MeaslesHighTx,
0.1.0, 2024-01-06, IMMZ.IND.07.HTx)
50 changes: 2 additions & 48 deletions input/fsh/measures/IMMZIND07MeaslesLowTx.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,5 @@ Instance: IMMZIND07MeaslesLowTx
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Title: "IMMZIND07MeaslesLowTx"

* description = "IMMZ.IND.07 Measles indicator for first dose in Low Transmission area."
* url = "http://smart.who.int/ig/smart-immunizations/Measure/IMMZIND07MeaslesLowTx"
* version = "0.1.0"
* status = #draft
* experimental = false
* date = "2024-01-16"
* name = "IMMZIND07MeaslesLowTx"
* publisher = "World Health Organization (WHO)"
* library = "http://smart.who.int/ig/smart-immunizations/Library/IMMZIND07MeaslesLowTx"
* scoring = $measure-scoring#proportion "Proportion"
* group[+]
* population[initialPopulation]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.07.LTx.IP"
* description = "Initial Population"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql
* criteria.expression = "Initial Population"
* population[denominator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.07.LTx.D"
* description = "Denominator"
* code = $measure-population#denominator "Denominator"
* criteria.language = #text/cql
* criteria.expression = "Denominator"
* population[numerator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.07.LTx.N"
* description = "Numerator"
* code = $measure-population#numerator "Numerator"
* criteria.language = #text/cql
* criteria.expression = "Numerator"
* stratifier[+]
* id = "IMMZ.IND.07.LTx.S1"
* criteria.language = #text/cql
* criteria.expression = "Stratification 1"
* stratifier[+]
* id = "IMMZ.IND.07.LTx.S2"
* criteria.language = #text/cql
* criteria.expression = "Stratification 2"
* stratifier[+]
* id = "IMMZ.IND.07.LTx.S3"
* criteria.language = #text/cql
* criteria.expression = "Stratification 3"
* stratifier[+]
* id = "IMMZ.IND.07.LTx.S4"
* criteria.language = #text/cql
* criteria.expression = "Stratification 4"
* insert MeasureProportion( IMMZ.IND.07 Measles indicator for first dose in Low Transmission area., IMMZIND07MeaslesLowTx,
0.1.0, 2024-01-06, IMMZ.IND.07.LTx)
3 changes: 3 additions & 0 deletions input/fsh/measures/IMMZIND08Measles.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Instance: IMMZIND08Measles
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Title: "IMMZIND08Measles"

* insert MeasureProportion( IMMZ.IND.08 Measles indicator for second dose., IMMZIND08Measles,
0.1.0, 2024-01-06, IMMZ.IND.08)

* description = "IMMZ.IND.08 Measles indicator for second dose."
* url = "http://smart.who.int/ig/smart-immunizations/Measure/IMMZIND08Measles"
* version = "0.1.0"
Expand Down
6 changes: 6 additions & 0 deletions input/fsh/measures/IMMZIND26YellowFever.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Instance: IMMZIND26YellowFever
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Title: "IMMZIND26YellowFever"

* insert MeasureProportion( IMMZ.IND.26 Yellow Fever indicator for first dose., IMMZIND26YellowFever,
0.1.0, 2024-01-06, IMMZ.IND.26)
50 changes: 2 additions & 48 deletions input/fsh/measures/IMMZIND40Measles.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,5 @@ Instance: IMMZIND40Measles
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Title: "IMMZIND08Measles"

* description = "IMMZ.IND.40 Dropout rate of MCV1 to MCV2."
* url = "http://smart.who.int/ig/smart-immunizations/Measure/IMMZIND40Measles"
* version = "0.1.0"
* status = #draft
* experimental = false
* date = "2024-01-16"
* name = "IMMZIND40Measles"
* publisher = "World Health Organization (WHO)"
* library = "http://smart.who.int/ig/smart-immunizations/Library/IMMZIND40Measles"
* scoring = $measure-scoring#proportion "Proportion"
* group[+]
* population[initialPopulation]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.40.IP"
* description = "Initial Population"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql
* criteria.expression = "Initial Population"
* population[denominator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.40.D"
* description = "Denominator"
* code = $measure-population#denominator "Denominator"
* criteria.language = #text/cql
* criteria.expression = "Denominator"
* population[numerator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "IMMZ.IND.40.N"
* description = "Numerator"
* code = $measure-population#numerator "Numerator"
* criteria.language = #text/cql
* criteria.expression = "Numerator"
* stratifier[+]
* id = "IMMZ.IND.40.S1"
* criteria.language = #text/cql
* criteria.expression = "Stratification 1"
* stratifier[+]
* id = "IMMZ.IND.40.S2"
* criteria.language = #text/cql
* criteria.expression = "Stratification 2"
* stratifier[+]
* id = "IMMZ.IND.40.S3"
* criteria.language = #text/cql
* criteria.expression = "Stratification 3"
* stratifier[+]
* id = "IMMZ.IND.40.S4"
* criteria.language = #text/cql
* criteria.expression = "Stratification 4"
* insert MeasureProportion( IMMZ.IND.40 Dropout rate of MCV1 to MCV2., IMMZIND40Measles,
0.1.0, 2024-01-06, IMMZ.IND.40)
43 changes: 43 additions & 0 deletions input/fsh/measures/IMMZINDrulesets.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
RuleSet: Stratifier( idprefix, count )
* stratifier[+]
* id = "{idprefix}.S{count}"
* criteria.language = #text/cql
* criteria.expression = "Stratification {count}"

RuleSet: MeasureProportion( description, library, version, date, idprefix)
* description = "{description}"
* url = "http://smart.who.int/ig/smart-immunizations/Measure/{library}"
* version = "{version}"
* status = #draft
* experimental = false
* date = "{date}"
* name = "{library}"
* publisher = "World Health Organization (WHO)"
* library = "http://smart.who.int/ig/smart-immunizations/Library/{library}"
* scoring = $measure-scoring#proportion "Proportion"
* group[+]
* population[initialPopulation]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "{idprefix}.IP"
* description = "Initial Population"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql
* criteria.expression = "Initial Population"
* population[denominator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "{idprefix}.D"
* description = "Denominator"
* code = $measure-population#denominator "Denominator"
* criteria.language = #text/cql
* criteria.expression = "Denominator"
* population[numerator]
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean
* id = "{idprefix}.N"
* description = "Numerator"
* code = $measure-population#numerator "Numerator"
* criteria.language = #text/cql
* criteria.expression = "Numerator"
* insert Stratifier( {idprefix}, 1 )
* insert Stratifier( {idprefix}, 2 )
* insert Stratifier( {idprefix}, 3 )
* insert Stratifier( {idprefix}, 4 )
Loading

0 comments on commit 086f220

Please sign in to comment.