Skip to content

Commit

Permalink
Updated indicators for measles and added high/low tx for scheduling d…
Browse files Browse the repository at this point in the history
…ose 0 for the expiration dates.
  • Loading branch information
lukeaduncan committed Jan 18, 2024
1 parent b80c284 commit ecb5985
Show file tree
Hide file tree
Showing 125 changed files with 2,155 additions and 90 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* Library: IMMZD18SMeaslesDose0 (IMMZ.D18.S.Measles.Dose0)
* Library: IMMZD18SMeaslesDose0HighTx (IMMZ.D18.S.Measles.Dose0.HighTx)
* Rule: Measles MCV0 dose schedule
* Trigger: IMMZ.D18 Determine required vaccination(s) Schedule if any
*/
library IMMZD18SMeaslesDose0
library IMMZD18SMeaslesDose0HighTx
// Start Skeleton CQL
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
Expand Down
63 changes: 63 additions & 0 deletions input/cql/IMMZD18SMeaslesDose0LowTx.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Library: IMMZD18SMeaslesDose0LowTx (IMMZ.D18.S.Measles.Dose0.LowTx)
* Rule: Measles MCV0 dose schedule
* Trigger: IMMZ.D18 Determine required vaccination(s) Schedule if any
*/
library IMMZD18SMeaslesDose0LowTx
// 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 IMMZVaccineLibrary called IMMZvl
include FHIRCommon called FC
include IMMZD2DTMeaslesInput called input

// End Skeleton CQL
context Patient


/*
@output: Measles MCV0 dose
@trigger: Child's birth
*/
define "Measles MCV0 dose":
Count(input."MCV Doses Administered to Patient") = 0 and Now() <= "Measles MCV0 dose Expiration"

/*
@output: Measles MCV0 dose Create
@create: In the following situations, a supplementary dose of MCV should be given to infants from 6 months of age:
- (1) during a measles outbreak as part of intensified service delivery;
- (2) during campaigns in settings where the risk of measles among infants < 9 months of age remains high (e.g. in endemic countries experiencing regular outbreaks);
- (3) for internally displaced populations and refugees, and populations in conflict zones;
- (4) for individual infants at high risk of contracting measles (e.g. contacts of known measles cases or in settings with increased risk of exposure during outbreaks such as day-care facilities);
- (5) for infants travelling to countries experiencing measles outbreaks;
- (6) for infants known to be HIV-infected or exposed (i.e. born to an HIV-infected woman).
*/
define "Measles MCV0 dose Create":
if "Measles MCV0 dose" then 'In the following situations, a supplementary dose of MCV should be given to infants from 6 months of age: \n- (1) during a measles outbreak as part of intensified service delivery;\n- (2) during campaigns in settings where the risk of measles among infants < 9 months of age remains high (e.g. in endemic countries experiencing regular outbreaks);\n- (3) for internally displaced populations and refugees, and populations in conflict zones;\n- (4) for individual infants at high risk of contracting measles (e.g. contacts of known measles cases or in settings with increased risk of exposure during outbreaks such as day-care facilities);\n- (5) for infants travelling to countries experiencing measles outbreaks;\n- (6) for infants known to be HIV-infected or exposed (i.e. born to an HIV-infected woman).\nDue Date is '
+ ToString("Measles MCV0 dose Due Date")
else ''

/*
@dynamicValue: Measles MCV0 dose Due Date
@pseudocode: "Date of birth" + 6 'month'
*/
define "Measles MCV0 dose Due Date":
if "Measles MCV0 dose" then Patient.birthDate + 6 months
else null

/*
@dynamicValue: Measles MCV0 dose Overdue
@pseudocode: To be determined by Member States however there is no recommended overdue date and individuals are always eligible to be vaccinated
*/
define "Measles MCV0 dose Overdue":
null

/*
@dynamicValue: Measles MCV0 dose Expiration
@pseudocode: "Date of birth" + 9 'month' for countries with ongoing transmission in which the risk of measles mortality remains high OR "Date of birth" + 12 'month' for countries with low levels of measles transmission
*/
define "Measles MCV0 dose Expiration":
Patient.birthDate + 12 months
65 changes: 65 additions & 0 deletions input/cql/IMMZIND07MeaslesHighTx.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Library: IMMZ.IND.07.MeaslesHighTx
* Immunization coverage for measles containing vaccine, 1st dose
* The percentage in the target population who have received one dose of measles-containing vaccine during reporting period
*
*
* References: WHO / UNICEF Joint Reporting Form
* WHO Immunization data portal
*/

library IMMZIND07MeaslesHighTx

// 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 IMMZINDMeasles 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 (in high transmission area)
*/
define "Initial Population":
Patient.birthDate + 9 months before end of "Measurement Period"

/*
@numerator: Number of Measles doses (1st dose) administered through routine services during reporting period
@computation: COUNT of immunization events WHERE "Vaccine type" = "Measles containing vaccines" for the first dose in the primary series (MCV1) AND "Date and time of vaccination" is during the reporting period
*/
define "Numerator":
exists( Ind."Measles 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"
65 changes: 65 additions & 0 deletions input/cql/IMMZIND07MeaslesLowTx.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Library: IMMZ.IND.07.MeaslesLowTx
* Immunization coverage for measles containing vaccine, 1st dose
* The percentage in the target population who have received one dose of measles-containing vaccine during reporting period
*
*
* References: WHO / UNICEF Joint Reporting Form
* WHO Immunization data portal
*/

library IMMZIND07MeaslesLowTx

// 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 IMMZINDMeasles 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 12 months (in low transmission area)
*/
define "Initial Population":
Patient.birthDate + 12 months before end of "Measurement Period"

/*
@numerator: Number of Measles doses (1st dose) administered through routine services during reporting period
@computation: COUNT of immunization events WHERE "Vaccine type" = "Measles containing vaccines" for the first dose in the primary series (MCV1) AND "Date and time of vaccination" is during the reporting period
*/
define "Numerator":
exists( Ind."Measles 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"
65 changes: 65 additions & 0 deletions input/cql/IMMZIND08Measles.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Library: IMMZ.IND.08.Measles
* Immunization coverage for measles containing vaccine, 2nd dose
* The percentage in the target population who have received second dose of measles-containing vaccine during reporting period
*
*
* References: WHO / UNICEF Joint Reporting Form
* WHO Immunization data portal
*/

library IMMZIND08Measles

// 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 IMMZINDMeasles 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 second dose: Any one over 15 months
*/
define "Initial Population":
Patient.birthDate + 15 months before end of "Measurement Period"

/*
@numerator: Number of Measles doses (2nd dose) administered through routine services during reporting period
@computation: COUNT of immunization events WHERE "Vaccine type" = "Measles containing vaccines" for the second dose in the primary series (MCV2) AND "Date and time of vaccination" is during the reporting period
*/
define "Numerator":
exists( Ind."Measles Doses in Measurement Period" I where IMMZCom.ToPositiveInt((singleton from I.protocolApplied).doseNumber) = 2 )

/*
@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"
79 changes: 79 additions & 0 deletions input/cql/IMMZIND40Measles.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Library: IMMZ.IND.40.Measles
* Dropout rate of MCV1 to MCV2
* The percentage in the target population who received a first dose of measles containing vaccine in the primary series (MCV1)
* but have not received the second dose of measles containing vaccine in the primary series (i.e. are past due for MCV2) during the reporting period
*
*
* References: WHO Immunization Facility Analysis Guide
*
*/

library IMMZIND40Measles

// 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 IMMZINDMeasles 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

/*
@internal: First dose received during reporting period
*/
define "First Dose":
exists( Ind."Measles Doses in Measurement Period" I where IMMZCom.ToPositiveInt((singleton from I.protocolApplied).doseNumber) = 1 )

/*
@internal: Second dose received during reporting period
*/
define "Second Dose":
exists( Ind."Measles Doses in Measurement Period" I where IMMZCom.ToPositiveInt((singleton from I.protocolApplied).doseNumber) = 2 )

/*
@population: Number of clients in the target population who received dose 1 of MCV containing vaccine during the reporting period
*/
define "Initial Population":
"First Dose"

/*
@numerator: Number of clients who received dose 1 of MCV containing vaccine during the reporting period who should have received dose 2 of MCV containing vaccine during the reporting period, however did not receive MCV dose 2.
@computation: COUNT of clients with an immunization event WHERE "Vaccine type" = "Measles containing vaccines" for the first dose in the primary series (MCV1) AND "Date and time of vaccination" is during the reporting period
MINUS
COUNT of clients with an immunization event WHERE "Vaccine type"" = "Measles containing vaccines" for the second dose in the primary series (MCV2) AND "Date and time of vaccination" is during the reporting period
*/
define "Numerator":
"First Dose" and not( "Second Dose" )
/*
@denominator: Number of clients in the target population who received dose 1 of MCV containing vaccine during the reporting period
@computation: COUNT clients with an immunization event WHERE "Vaccine type" = "Measles containing vaccines" for a first dose in the primary series (MCV1) AND "Date and time of vaccination" is during the reporting period
*/
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"
Loading

0 comments on commit ecb5985

Please sign in to comment.