WHO Immunization Implementation Guide
1.0.0 - release
WHO Immunization Implementation Guide, published by WHO. This guide is not an authorized publication; it is the continuous build for version 1.0.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/tree/132/merge and changes regularly. See the Directory of published versions
| Draft as of 2026-03-31 |
<Library xmlns="http://hl7.org/fhir">
<id value="IMMZIND39Logic"/>
<meta>
<profile
value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"/>
<profile
value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"/>
<profile
value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"/>
<profile
value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module"/>
</meta>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<div>
<table class="grid dict">
<tr>
<th scope="row"><b>Title: </b></th>
<td style="padding-left: 4px;">IMMZIND39Logic</td>
</tr>
<tr>
<th scope="row"><b>Id: </b></th>
<td style="padding-left: 4px;">IMMZIND39Logic</td>
</tr>
<tr>
<th scope="row"><b>Version: </b></th>
<td style="padding-left: 4px;">1.0.0</td>
</tr>
<tr>
<th scope="row"><b>Url: </b></th>
<td style="padding-left: 4px;"><a href="Library-IMMZIND39Logic.html">IMMZIND39Logic</a></td>
</tr>
<tr>
<th scope="row"><b>Status: </b></th>
<td style="padding-left: 4px;">draft</td>
</tr>
<tr>
<th scope="row"><b>Type: </b></th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<b>system: </b> <span><a href="http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html">http://terminology.hl7.org/CodeSystem/library-type</a></span>
</p>
<p style="margin-bottom: 5px;">
<b>code: </b> <span>logic-library</span>
</p>
</td>
</tr>
<tr>
<th scope="row"><b>Date: </b></th>
<td style="padding-left: 4px;">2026-03-31 13:54:17+0000</td>
</tr>
<tr>
<th scope="row"><b>Publisher: </b></th>
<td style="padding-left: 4px;">WHO</td>
</tr>
<tr>
<th scope="row"><b>Description: </b></th>
<td style="padding-left: 4px;"><div><p>This library defines population criteria logic for the IMMZ.IND.39 indicator in the Immunization CPG</p>
</div></td>
</tr>
<tr>
<th scope="row"><b>Related Artifacts: </b></th>
<td style="padding-left: 4px;">
<p><b>Dependencies</b></p>
<ul>
<li><a href="Library-WHOCommon.html">WHOCommon</a></li>
<li><a href="Library-IMMZCommon.html">IMMZCommon</a></li>
<li><a href="Library-IMMZConcepts.html">IMMZConcepts</a></li>
<li><code>http://smart.who.int/immunizations/Library/IMMZIndicatorElements</code></li>
<li><a href="Library-IMMZD2DTMalariaElements.html">IMMZD2DTMalariaElements</a></li>
</ul>
</td>
</tr>
<tr>
<th scope="row"><b>Parameters: </b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>
<tr><th>Measurement Period</th><th>Period</th><th>0</th><th>1</th><th>In</th></tr>
<tr><th>Patient</th><th>Patient</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Initial Population</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Denominator</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Numerator</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Stratification 1</th><th>string</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Stratification 2</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Stratification 3</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>
<tr><th>Stratification 4</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table>
<tr><th><a id="cql-content"><b>Content: </b></a> text/cql</th></tr>
<tr><td><pre><code class="language-cql">/*
* Library: IMMZ.IND.39 Logic
* Drop-out rate from the 3rd dose of malaria vaccines to the 4th dose
* The percentage in the target population who received a 3rd dose of malaria vaccine but have not received the 4th dose of malaria vaccine (i.e. are past due for malaria vaccine 4th dose) during the reporting period
*
* Numerator: Number of clients who received the 3rd dose of malaria vaccine during the reporting period who should have received (via scheduling logic) the 4th dose of malaria vaccine during the reporting period but did not receive it
* Numerator Computation: (COUNT of clients with an immunization event WHERE "Vaccine type" = "Malaria vaccines" for the 3rd dose in the primary series AND "Date and time of vaccination" is during the reporting period) - (COUNT of clients with an immunization event WHERE "Vaccine type" = "Malaria vaccines" for the 4th 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 dose 3 of malaria vaccine during the reporting period
* Denominator Computation: COUNT clients with an immunization event WHERE "Vaccine type" = "Malaria vaccines" for the 3rd dose in the primary series AND "Date and time of vaccination" is during the reporting period
*
* Disaggregation
* - Administrative area
* - Sex
* - Age in years
* - Age group (depending on schedule)
*
* References: Guide to introduce malaria vaccine (4)
*
* Annotations: –
*/
library IMMZIND39Logic
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 IMMZD2DTMalariaElements called Malaria
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 dose 3 of malaria vaccine during the reporting period
@pseudocode: COUNT clients with an immunization event WHERE "Vaccine type" = "Malaria vaccines" for the 3rd dose in the primary series AND "Date and time of vaccination" is during the reporting period
@note: Put 4 weeks as the minimum, but note the scheduling table recommends being at least a year so this may be better to be
a 12 month for the due date or even 18 months for the overdue date.
*/
define "Denominator":
exists( (Malaria."Malaria Primary Series Doses Administered to Patient".getDose('3')) I
where (start of I.occurrence.toInterval() + 4 weeks) during "Measurement Period" )
/*
@numerator: Number of clients who received the 3rd dose of malaria vaccine during the reporting period who should have received (via scheduling logic) the 4th dose of malaria vaccine during the reporting period but did not receive it
@pseudocode: (COUNT of clients with an immunization event WHERE "Vaccine type" = "Malaria vaccines" for the 3rd dose in the primary series AND "Date and time of vaccination" is during the reporting period) - (COUNT of clients with an immunization event WHERE "Vaccine type" = "Malaria vaccines" for the 4th dose in the primary series AND "Date and time of vaccination" is during the reporting period)
*/
define "Numerator":
"Denominator"
and not exists( (Malaria."Malaria Primary Series Doses Administered to Patient".getDose('4')) I
where I.occurrence.toInterval() starts during "Measurement Period" )
/*
@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"
</code></pre></td></tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</text>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability">
<valueCode value="computable"/>
</extension>
<url value="http://smart.who.int/immunizations/Library/IMMZIND39Logic"/>
<version value="1.0.0"/>
<name value="IMMZIND39Logic"/>
<title value="IMMZIND39Logic"/>
<status value="draft"/>
<experimental value="false"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/library-type"/>
<code value="logic-library"/>
</coding>
</type>
<date value="2026-03-31T13:54:17+00:00"/>
<publisher value="WHO"/>
<contact>
<name value="WHO"/>
<telecom>
<system value="url"/>
<value value="http://who.int"/>
</telecom>
</contact>
<description
value="This library defines population criteria logic for the IMMZ.IND.39 indicator in the Immunization CPG"/>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library WC"/>
<resource value="http://smart.who.int/immunizations/Library/WHOCommon"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Common"/>
<resource value="http://smart.who.int/immunizations/Library/IMMZCommon"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Concepts"/>
<resource
value="http://smart.who.int/immunizations/Library/IMMZConcepts"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Elements"/>
<resource
value="http://smart.who.int/immunizations/Library/IMMZIndicatorElements"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Malaria"/>
<resource
value="http://smart.who.int/immunizations/Library/IMMZD2DTMalariaElements"/>
</relatedArtifact>
<parameter>
<name value="Measurement Period"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<type value="Period"/>
</parameter>
<parameter>
<name value="Patient"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Patient"/>
</parameter>
<parameter>
<name value="Initial Population"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Denominator"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Numerator"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Stratification 1"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Stratification 2"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Coding"/>
</parameter>
<parameter>
<name value="Stratification 3"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Coding"/>
</parameter>
<parameter>
<name value="Stratification 4"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Coding"/>
</parameter>
<content>
<contentType value="text/cql"/>
<data
value="LyoKICogTGlicmFyeTogSU1NWi5JTkQuMzkgTG9naWMKICogRHJvcC1vdXQgcmF0ZSBmcm9tIHRoZSAzcmQgZG9zZSBvZiBtYWxhcmlhIHZhY2NpbmVzIHRvIHRoZSA0dGggZG9zZQogKiBUaGUgcGVyY2VudGFnZSBpbiB0aGUgdGFyZ2V0IHBvcHVsYXRpb24gd2hvIHJlY2VpdmVkIGEgM3JkIGRvc2Ugb2YgbWFsYXJpYSB2YWNjaW5lIGJ1dCBoYXZlIG5vdCByZWNl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