WHO Immunization Implementation Guide
0.2.0 - ci-build

WHO Immunization Implementation Guide, published by WHO. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-immunizations/ and changes regularly. See the Directory of published versions

Library: IMMZIND36Logic

Official URL: http://smart.who.int/immunizations/Library/IMMZIND36Logic Version: 0.2.0
Draft as of 2025-09-17 Computable Name: IMMZIND36Logic

This library defines population criteria logic for the IMMZ.IND.36 indicator in the Immunization CPG

Title: IMMZIND36Logic
Id: IMMZIND36Logic
Version: 0.2.0
Url: IMMZIND36Logic
Status: draft
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2025-09-17 23:03:28+0000
Publisher: WHO
Description:

This library defines population criteria logic for the IMMZ.IND.36 indicator in the Immunization CPG

Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
Measurement PeriodPeriod01In
PatientPatient01Out
Initial Populationboolean01Out
Denominatorboolean01Out
Numeratorboolean01Out
Stratification 1string01Out
Stratification 2Coding01Out
Stratification 3Coding01Out
Stratification 4Coding01Out
Content: text/cql
/*
 * Library: IMMZ.IND.36 Logic
 * Drop-out rate of BCG to measles and rubella-containing vaccine 1st dose
 * The percentage in the target population who received a dose of BCG vaccine at birth (or early life) but have not received the 1st dose of measles and rubella-containing vaccine (i.e. are past due for measles and rubella-containing vaccine 1st dose) during the reporting period
 * 
 * Numerator: Number of clients who received BCG vaccine during the reporting period who should have received 1st dose of measles and rubella-containing vaccine during the reporting period but did not receive it
 * Numerator Computation: (COUNT of clients with an immunization event WHERE "Vaccine type"" = "BCG vaccines" AND "Date and time of vaccination" is during the reporting period) - (COUNT of clients with an immunization event WHERE "Vaccine type" = "Measles and rubella-containing vaccines" for the 1st dose in the primary series AND "Date and time of vaccination" is during the reporting period)
 * Denominator: Number of clients in the target population who received BCG vaccine during the reporting period
 * Denominator Computation: COUNT clients with an immunization event WHERE "Vaccine type" = "BCG vaccines" AND "Date and time of vaccination" is during the reporting period
 * 
 * Disaggregation
 *  - Administrative area
 *  - Sex
 *  - Age in years
 *  - Age group (depending on schedule)
 *
 * References: WHO Immunization facility analysis guide (5)
 * 
 * Annotations: –
 */
library IMMZIND36Logic

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

include WHOCommon called WC

include IMMZCommon called Common
include IMMZConcepts called Concepts
include IMMZIndicatorElements called Elements

include IMMZD2DTBCGElements called BCG

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

context Patient

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

/*
@denominator: Number of clients in the target population who received BCG vaccine during the reporting period
@pseudocode: COUNT clients with an immunization event WHERE "Vaccine type" = "BCG vaccines" AND "Date and time of vaccination" is during the reporting period
@note: Only including those who are eligible for first dose of Measles/rubella at 9 months and who have 
        received the BCG dose.  This is for high incidence of Measles/rubella.  For low incidence this should be 12 months.
*/
define "Denominator":
  exists( BCG."BCG Doses Administered to Patient" I )
  and Patient.birthDate + 9 months during "Measurement Period" 

/*
@numerator: Number of clients who received BCG vaccine during the reporting period who should have received 1st dose of measles and rubella-containing vaccine during the reporting period but did not receive it
@pseudocode: (COUNT of clients with an immunization event WHERE "Vaccine type"" = "BCG vaccines" AND "Date and time of vaccination" is during the reporting period) - (COUNT of clients with an immunization event WHERE "Vaccine type" = "Measles and rubella-containing vaccines" for the 1st dose in the primary series AND "Date and time of vaccination" is during the reporting period)
@note: Only include those from the denominator that did not receive a measles/rubella 1st dose during the measurement period.
        Those where the 1st dose due date is during the period but have not received the 1st dose.
*/
define "Numerator":
  "Denominator"
  and not exists( Elements."Measles and Rubella Doses Administered to Patient During Measurement Period".getDose('1') )

/*
@disaggregation: Administrative area
                 Sex
                 Age in years
                 Age group (depending on schedule)
*/
define "Stratification 1":
	Elements."By Geographic Region Stratifier"

define "Stratification 2":
	Elements."By Administrative Gender Stratifier"

define "Stratification 3":
	Elements."Age Stratifier"

define "Stratification 4":
	Elements."Infant By Age Stratifier"
Content: application/elm+xml
Encoded data (28544 characters)