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/tree/123/merge and changes regularly. See the Directory of published versions

: IMMZ.D18.S.Cholera.WC-rBS vaccine 3-dose schedule - XML Representation

Draft as of 2026-03-03

Raw xml | Download


<PlanDefinition xmlns="http://hl7.org/fhir">
  <id value="IMMZD18SCholeraWCRBSVaccine3Doses"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition"/>
    <profile
             value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition"/>
    <profile
             value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
<div>
    <table class="grid dict">
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">IMMZD18SCholeraWCRBSVaccine3Doses</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="PlanDefinition-IMMZD18SCholeraWCRBSVaccine3Doses.html">IMMZ.D18.S.Cholera.WC-rBS vaccine 3-dose schedule</a></td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Version: </b></th>
            <td style="padding-left: 4px;">0.2.0</td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">IMMZ.D18.S.Cholera.WC-rBS vaccine 3-dose schedule</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.0.1/CodeSystem-plan-definition-type.html">http://terminology.hl7.org/CodeSystem/plan-definition-type</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>eca-rule</span>
                        </p>
                        
                        
                    
                
                
            </td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2026-03-03 13:07:11+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>IMMZ.D18.S.Cholera.WC-rBS vaccine 3-dose schedule
Whole cell-recombinant B subunit (WC-rBS) vaccine (Dukoral), 3-dose schedule for clients aged 2–5 years</p>
</div></td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Knowledge Capability: </b></th>
            <td style="padding-left: 4px;">
                
                computable 
            </td>
        </tr>
        

        

        

        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Related Artifacts: </b></th>
            <td style="padding-left: 4px;">
                
                
                <p><b>References</b></p>
                <ul>
                    
                    <li><div><p>WHO recommendations for routine immunization - summary tables (January 2025)</p>
</div><br/><a href="null"/></li>
                    
                </ul>
                
                
                
                
                
                
            </td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Libraries: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    
                    <tr>
                        <td><a href="Library-IMMZD18SCholeraWCRBSVaccine3DosesLogic.html">IMMZD18SCholeraWCRBSVaccine3DosesLogic</a></td>
                    </tr>
                    
                </table>
            </td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Actions: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    
                    <tr>
                        <td>
                            
                            <b> Cholera dose 1:</b> Provision of the cholera dose 1
Trigger event: Child's birth
Trigger pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 0 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
OR Primary series interrupted for 6 or more weeks
&quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = FALSE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≥ 6 weeks AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
OR more than 6 months have passed since completion of primary vaccination series
&quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) &gt; 6 months AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: &quot;Date of birth&quot;
OR
Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine (Dukoral), 3 doses should be given to children 2–5 years of age, with an interval of 1-6 weeks between doses. If the interval since the last dose ≥ 6 weeks, restart the primary series.

Revaccination for children aged 2–5 years: If more than 6 months have passed since completion of primary vaccination series, the primary series of 3 doses should be repeated.
                            
                            <br/>
                            
                            
                            <b>If:</b>
                            
                            <i>Applicability:</i>
                            
                            Cholera dose 1
                            
                            <i>(Cholera dose 1)</i>
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b> <i>Definition:</i> <a href="ActivityDefinition-IMMZD2DTCR.html">IMMZ.D2.DT.CR</a><br/>
                            
                            <i>Dynamic Values:</i><br/>
                            
                            status: <i>('active')</i>
                            <br/>
                            
                            payload.contentString: <i>(Cholera dose 1 Create)</i>
                            <br/>
                            
                            category.coding: <i>(Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' })</i>
                            <br/>
                            
                            priority: <i>(Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' })</i>
                            <br/>
                            
                            
                            
                            
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            
                            <b> Cholera dose 2:</b> Provision of the cholera dose 2
Trigger event: First cholera dose was administered
Trigger pseudo: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 1 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses.
                            
                            <br/>
                            
                            
                            <b>If:</b>
                            
                            <i>Applicability:</i>
                            
                            Cholera dose 2
                            
                            <i>(Cholera dose 2)</i>
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b> <i>Definition:</i> <a href="ActivityDefinition-IMMZD2DTCR.html">IMMZ.D2.DT.CR</a><br/>
                            
                            <i>Dynamic Values:</i><br/>
                            
                            status: <i>('active')</i>
                            <br/>
                            
                            payload.contentString: <i>(Cholera dose 2 Create)</i>
                            <br/>
                            
                            category.coding: <i>(Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' })</i>
                            <br/>
                            
                            priority: <i>(Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' })</i>
                            <br/>
                            
                            
                            
                            
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            
                            <b> Cholera dose 3:</b> Provision of the cholera dose 3
Trigger event: Second cholera dose was administered
Trigger pseudo: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 2 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses.
                            
                            <br/>
                            
                            
                            <b>If:</b>
                            
                            <i>Applicability:</i>
                            
                            Cholera dose 3
                            
                            <i>(Cholera dose 3)</i>
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b> <i>Definition:</i> <a href="ActivityDefinition-IMMZD2DTCR.html">IMMZ.D2.DT.CR</a><br/>
                            
                            <i>Dynamic Values:</i><br/>
                            
                            status: <i>('active')</i>
                            <br/>
                            
                            payload.contentString: <i>(Cholera dose 3 Create)</i>
                            <br/>
                            
                            category.coding: <i>(Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' })</i>
                            <br/>
                            
                            priority: <i>(Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' })</i>
                            <br/>
                            
                            
                            
                            
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            
                            <b> Cholera booster dose:</b> Provision of the cholera booster dose
Trigger event: Primary series for cholera has been completed and latest cholera dose was administered approximately less than 6 months ago
Trigger pseudo: &quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≤ 6 months ± Member States defined interval AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine, for children aged 2–5 years, if less than 6 months have passed since completion of primary vaccination series, 1 dose for revaccination.
                            
                            <br/>
                            
                            
                            <b>If:</b>
                            
                            <i>Applicability:</i>
                            
                            Cholera booster dose
                            
                            <i>(Cholera booster dose)</i>
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b> <i>Definition:</i> <a href="ActivityDefinition-IMMZD2DTCR.html">IMMZ.D2.DT.CR</a><br/>
                            
                            <i>Dynamic Values:</i><br/>
                            
                            status: <i>('active')</i>
                            <br/>
                            
                            payload.contentString: <i>(Cholera booster dose Create)</i>
                            <br/>
                            
                            category.coding: <i>(Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' })</i>
                            <br/>
                            
                            priority: <i>(Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' })</i>
                            <br/>
                            
                            
                            
                            
                        </td>
                    </tr>
                    
                </table>
            </td>
        </tr>
        
    </table>
</div>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString value="Current Patient Age In Years"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/** 
 * @dataElement Patient age in years
 */
define &quot;Current Patient Age In Years&quot;:
  AgeInYearsAt(Today)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString value="Client's age is 2–5 years"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: Client's age is 2–5 years
@pseudocode: 2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years
@code: Client's age is 2–5 years-50
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
*/
define &quot;Client's age is 2–5 years&quot;:
  Encounter.&quot;Current Patient Age In Years&quot; &gt;= 2
  and Encounter.&quot;Current Patient Age In Years&quot; &lt;= 5"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZElements"/>
        </extension>
        <extension url="name">
          <valueString value="Doses Administered to Patient"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/**
 * @dataElement All Doses Administered to Patient
 */
define &quot;Doses Administered to Patient&quot;:
  [Immunization] I
    where I.status = 'completed'
    and I.isSubpotent is not true"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString value="Doses Administered to Patient"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/**
 * @dataElement All Doses Administered to Patient
 */
define &quot;Doses Administered to Patient&quot;:
  Elements.&quot;Doses Administered to Patient&quot; I
    where I.occurrence.toInterval() same day or before Today"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera Doses Administered to Patient"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@internal: Cholera containing Doses Administered to Patient
*/
define &quot;Cholera Doses Administered to Patient&quot;:
  Encounter.&quot;Doses Administered to Patient&quot; I
  where
    I.vaccineCode in Concepts.&quot;Cholera vaccines&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Cholera Primary Series Doses Administered to Patient"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@internal: Cholera containing Doses Administered to Patient that are in the Primary series
*/
define &quot;Cholera Primary Series Doses Administered to Patient&quot;:
  &quot;Cholera Doses Administered to Patient&quot;.seriesPrimary()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Dose number of the latest primary series dose is one"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: Dose number of the latest primary series dose is one
@pseudocode: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1
@code: Dose number of the latest primary series dose is one-106
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 2 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 2-dose schedule for clients aged over 5 years
*/
define &quot;Dose number of the latest primary series dose is one&quot;:
  &quot;Cholera Primary Series Doses Administered to Patient&quot;.mostRecent().getDose('1') is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="First cholera dose was administered"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@complete: First cholera dose was administered
@pseudocode: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 1
*/
define &quot;First cholera dose was administered&quot;:
  Encounter.&quot;Dose number of the latest primary series dose is one&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString value="Date of Latest Cholera Dose"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@internal: Date of Latest Cholera Dose
*/
define &quot;Date of Latest Cholera Dose&quot;:
  date from start of &quot;Cholera Doses Administered to Patient&quot;.mostRecent().occurrence.toInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 2 Expiration"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera dose 2 Expiration
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) + 6 weeks
*/
define &quot;Cholera dose 2 Expiration&quot;:
  Encounter.&quot;Date of Latest Cholera Dose&quot; + 6 weeks"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Dose number of the latest primary series dose is two"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: Dose number of the latest primary series dose is two
@pseudocode: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2
@code: Dose number of the latest primary series dose is two-106
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
*/
define &quot;Dose number of the latest primary series dose is two&quot;:
  &quot;Cholera Primary Series Doses Administered to Patient&quot;.mostRecent().getDose('2') is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Second cholera dose was administered"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@complete: Second cholera dose was administered
@pseudocode: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 2
*/
define &quot;Second cholera dose was administered&quot;:
  Encounter.&quot;Dose number of the latest primary series dose is two&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 2"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera dose 2
@description: Provision of the cholera dose 2
@trigger: First cholera dose was administered
@pseudo: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 1 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
@triggerDate: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
*/
define &quot;Cholera dose 2&quot;:
  Encounter.&quot;Client's age is 2–5 years&quot;
  and &quot;First cholera dose was administered&quot;
  and &quot;Cholera dose 2 Expiration&quot; after day of Today
  and not &quot;Second cholera dose was administered&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 2 Due Date"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera dose 2 Due Date
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) + 1 week
*/
define &quot;Cholera dose 2 Due Date&quot;:
  if &quot;Cholera dose 2&quot; then Encounter.&quot;Date of Latest Cholera Dose&quot; + 1 week
  else null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 2 Create"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera dose 2 Create
@create: For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses.
*/
define &quot;Cholera dose 2 Create&quot;:
  if &quot;Cholera dose 2&quot;
  then 'For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses.' + '
Due Date: ' + ToString(&quot;Cholera dose 2 Due Date&quot;) + '
Expiration: ' + ToString(&quot;Cholera dose 2 Expiration&quot;)
  else ''"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 3 Expiration"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera dose 3 Expiration
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) + 6 weeks
*/
define &quot;Cholera dose 3 Expiration&quot;:
  Encounter.&quot;Date of Latest Cholera Dose&quot; + 6 weeks"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Dose number of the latest primary series dose is three"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: Dose number of the latest primary series dose is three
@pseudocode: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 3
@code: Dose number of the latest primary series dose is three-106
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
*/
define &quot;Dose number of the latest primary series dose is three&quot;:
  &quot;Cholera Primary Series Doses Administered to Patient&quot;.mostRecent().getDose('3') is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Three doses from primary series were administered. The primary series has been completed"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@complete: Three doses from primary series were administered. The primary series has been completed
@pseudocode: &quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE
*/
define &quot;Three doses from primary series were administered. The primary series has been completed&quot;:
  Encounter.&quot;Dose number of the latest primary series dose is three&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 3"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera dose 3
@description: Provision of the cholera dose 3
@trigger: Second cholera dose was administered
@pseudo: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 2 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
@triggerDate: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
*/
define &quot;Cholera dose 3&quot;:
  Encounter.&quot;Client's age is 2–5 years&quot;
  and &quot;Second cholera dose was administered&quot;
  and &quot;Cholera dose 3 Expiration&quot; after day of Today
  and not &quot;Three doses from primary series were administered. The primary series has been completed&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 3 Due Date"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera dose 3 Due Date
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) + 1 week
*/
define &quot;Cholera dose 3 Due Date&quot;:
  if &quot;Cholera dose 3&quot; then Encounter.&quot;Date of Latest Cholera Dose&quot; + 1 week
  else null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 3 Create"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera dose 3 Create
@create: For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses.
*/
define &quot;Cholera dose 3 Create&quot;:
  if &quot;Cholera dose 3&quot;
  then 'For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses.' + '
Due Date: ' + ToString(&quot;Cholera dose 3 Due Date&quot;) + '
Expiration: ' + ToString(&quot;Cholera dose 3 Expiration&quot;)
  else ''"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera booster dose Expiration"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera booster dose Expiration
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) + 6 months ± Member States defined interval
*/
define &quot;Cholera booster dose Expiration&quot;:
  Encounter.&quot;Date of Latest Cholera Dose&quot; + 6 months + (CholeraExactIntervalDays * 1 days)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera booster dose"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera booster dose
@description: Provision of the cholera booster dose
@trigger: Primary series for cholera has been completed and latest cholera dose was administered approximately less than 6 months ago
@pseudo: &quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≤ 6 months ± Member States defined interval AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
@triggerDate: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
*/
define &quot;Cholera booster dose&quot;:
  Encounter.&quot;Dose number of the latest primary series dose is three&quot;
  and &quot;Cholera booster dose Expiration&quot; after day of Today"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera booster dose Due Date"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera booster dose Due Date
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ± Member States defined interval
*/
define &quot;Cholera booster dose Due Date&quot;:
  if &quot;Cholera booster dose&quot; then Encounter.&quot;Date of Latest Cholera Dose&quot; + (CholeraLowerLimitDays * 1 days)
  else null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera booster dose Create"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera booster dose Create
@create: For WC-rBS vaccine, for children aged 2–5 years, if less than 6 months have passed since completion of primary vaccination series, 1 dose for revaccination.
*/
define &quot;Cholera booster dose Create&quot;:
  if &quot;Cholera booster dose&quot;
  then 'For WC-rBS vaccine, for children aged 2–5 years, if less than 6 months have passed since completion of primary vaccination series, 1 dose for revaccination.' + '
Due Date: ' + ToString(&quot;Cholera booster dose Due Date&quot;) + '
Expiration: ' + ToString(&quot;Cholera booster dose Expiration&quot;)
  else ''"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString value="Client's age is less than 2 years"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: Client's age is less than 2 years
@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 2 years
@code: Client's age is less than 2 years-40
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
*/
define &quot;Client's age is less than 2 years&quot;:
  Encounter.&quot;Current Patient Age In Years&quot; &lt; 2"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Number of Cholera Primary Series Doses Administered"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@internal: Number of Cholera Primary Series doses
*/
define &quot;Number of Cholera Primary Series Doses Administered&quot;:
  Count(&quot;Cholera Primary Series Doses Administered to Patient&quot;)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="No cholera primary series dose was administered"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: No cholera primary series dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0
@code: No cholera primary series dose was administered-116
@decision: IMMZ.D2.DT.Cholera.WC vaccines: Whole-cell (WC) vaccines schedule
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 2 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 2-dose schedule for clients aged over 5 years
*/
define &quot;No cholera primary series dose was administered&quot;:
  &quot;Number of Cholera Primary Series Doses Administered&quot; = 0"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Dose number of the latest primary series dose is less than three"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: Dose number of the latest primary series dose is less than three
@pseudocode: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) &lt; 3
@code: Dose number of the latest primary series dose is less than three-106
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
*/
define &quot;Dose number of the latest primary series dose is less than three&quot;:
  ((&quot;Cholera Primary Series Doses Administered to Patient&quot;.mostRecent()) I
    where exists( I.protocolApplied pa where ToInteger(pa.doseNumber) &lt; 3)) is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="The latest cholera dose was administered more than 6 weeks ago"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: The latest cholera dose was administered more than 6 weeks ago
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≥ 6 weeks
@code: The latest cholera dose was administered more than 6 weeks ago-106
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 2 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 2-dose schedule for clients aged over 5 years
*/
define &quot;The latest cholera dose was administered more than 6 weeks ago&quot;:
  &quot;Date of Latest Cholera Dose&quot; is not null
  and duration in weeks between &quot;Date of Latest Cholera Dose&quot; and Today &gt;= 6"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD2DTCholeraEncounterElements"/>
        </extension>
        <extension url="name">
          <valueString
                       value="The latest cholera dose was administered approximately more than 6 months ago {Member States defined exact interval}"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@input: The latest cholera dose was administered approximately more than 6 months ago {Member States defined exact interval}
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) &gt; 6 months
@code: The latest cholera dose was administered approximately more than 6 months ago {Member States defined exact interval}-107
@decision: IMMZ.D2.DT.Cholera.WC-rBS vaccine 3 doses: Whole cell-recombinant B subunit (WC-rBS) vaccine, 3-dose schedule for clients aged 2–5 years
*/
define &quot;The latest cholera dose was administered approximately more than 6 months ago {Member States defined exact interval}&quot;:
  &quot;Date of Latest Cholera Dose&quot; is not null
  and duration in days between (&quot;Date of Latest Cholera Dose&quot; + 6 months) and Today &gt; CholeraExactIntervalDays"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 1"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera dose 1
@description: Provision of the cholera dose 1
@trigger: Child's birth
@pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 0 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
OR Primary series interrupted for 6 or more weeks
&quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = FALSE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≥ 6 weeks AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
OR more than 6 months have passed since completion of primary vaccination series
&quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) &gt; 6 months AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
@triggerDate: &quot;Date of birth&quot;
OR
Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
*/
define &quot;Cholera dose 1&quot;:
  ( Encounter.&quot;Client's age is less than 2 years&quot;
    or Encounter.&quot;Client's age is 2–5 years&quot; )
  and ( Encounter.&quot;No cholera primary series dose was administered&quot;
    or ( Encounter.&quot;Dose number of the latest primary series dose is less than three&quot;
      and Encounter.&quot;The latest cholera dose was administered more than 6 weeks ago&quot;)
    or Encounter.&quot;The latest cholera dose was administered approximately more than 6 months ago {Member States defined exact interval}&quot;
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 1 Due Date"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@dynamicValue: Cholera dose 1 Due Date
@pseudocode: &quot;Date of birth&quot; + 2 years
*/
define &quot;Cholera dose 1 Due Date&quot;:
  if &quot;Cholera dose 1&quot; then Patient.birthDate + 2 years
  else null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Cholera dose 1 Create"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@output: Cholera dose 1 Create
@create: For WC-rBS vaccine (Dukoral), 3 doses should be given to children 2–5 years of age, with an interval of 1-6 weeks between doses. If the interval since the last dose ≥ 6 weeks, restart the primary series.

Revaccination for children aged 2–5 years: If more than 6 months have passed since completion of primary vaccination series, the primary series of 3 doses should be repeated.
*/
define &quot;Cholera dose 1 Create&quot;:
  if &quot;Cholera dose 1&quot;
  then 'For WC-rBS vaccine (Dukoral), 3 doses should be given to children 2–5 years of age, with an interval of 1-6 weeks between doses. If the interval since the last dose ≥ 6 weeks, restart the primary series.
Revaccination for children aged 2–5 years: If more than 6 months have passed since completion of primary vaccination series, the primary series of 3 doses should be repeated.' + '
Due Date: ' + ToString(&quot;Cholera dose 1 Due Date&quot;)
  else ''"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getDose"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/**
 * @description: Gets a given immunization from a list that matches the dose number
 */
define fluent function getDose(immunization Immunization, doseNumber String):
  immunization I where
    exists( I.protocolApplied pa where pa.doseNumber = doseNumber )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value string): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="WHOCommon"/>
        </extension>
        <extension url="name">
          <valueString value="mostRecent"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define fluent function mostRecent(immunizations List&lt;Immunization&gt;):
  Last(
    immunizations I
      sort by start of occurrence.toInterval()
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="IMMZCommon"/>
        </extension>
        <extension url="name">
          <valueString value="seriesPrimary"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/**
 * @description: Gets the doses from the primary series
 */
define fluent function seriesPrimary(immunizations List&lt;Immunization&gt;):
  immunizations I where
    exists( I.protocolApplied pa where pa.series = 'Primary series' )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value ImmunizationStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToBoolean"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToBoolean(value boolean): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="40"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCode"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="41"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDate"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToDate(value date): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="42"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="FHIR model information"/>
        <resource
                  value="http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Encounter"/>
        <resource
                  value="http://smart.who.int/immunizations/Library/IMMZD2DTCholeraEncounterElements"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Encounter"/>
        <resource
                  value="http://smart.who.int/immunizations/Library/IMMZEncounterElements"/>
      </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 FHIRHelpers"/>
        <resource
                  value="http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <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 Elements"/>
        <resource
                  value="http://smart.who.int/immunizations/Library/IMMZElements"/>
      </relatedArtifact>
      <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 FHIRHelpers"/>
        <resource
                  value="http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"/>
      </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="Value set Cholera vaccines"/>
        <resource
                  value="http://smart.who.int/immunizations/ValueSet/IMMZ.Z.DE2"/>
      </relatedArtifact>
      <parameter>
        <name value="Today"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="date"/>
      </parameter>
      <parameter>
        <name value="CholeraExactIntervalDays"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="integer"/>
      </parameter>
      <parameter>
        <name value="CholeraLowerLimitDays"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="integer"/>
      </parameter>
      <parameter>
        <name value="Cholera dose 2 Create"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Cholera dose 3 Create"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Cholera booster dose Create"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Cholera dose 3"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Cholera dose 2"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Cholera dose 1"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Cholera booster dose"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Cholera dose 1 Create"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Immunization"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
        <mustSupport value="status"/>
        <mustSupport value="isSubpotent"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Immunization"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
        <mustSupport value="status"/>
        <mustSupport value="isSubpotent"/>
        <mustSupport value="occurrence"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Immunization"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
        <mustSupport value="status"/>
        <mustSupport value="isSubpotent"/>
        <mustSupport value="occurrence"/>
        <mustSupport value="vaccineCode"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Immunization"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
        <mustSupport value="status"/>
        <mustSupport value="isSubpotent"/>
        <mustSupport value="occurrence"/>
        <mustSupport value="vaccineCode"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Immunization"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
        <mustSupport value="status"/>
        <mustSupport value="isSubpotent"/>
        <mustSupport value="occurrence"/>
        <mustSupport value="vaccineCode"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Immunization"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
        <mustSupport value="status"/>
        <mustSupport value="isSubpotent"/>
        <mustSupport value="occurrence"/>
        <mustSupport value="vaccineCode"/>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability">
    <valueCode value="computable"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url
       value="http://smart.who.int/immunizations/PlanDefinition/IMMZD18SCholeraWCRBSVaccine3Doses"/>
  <version value="0.2.0"/>
  <name value="IMMZD18SCholeraWCRBSVaccine3Doses"/>
  <title value="IMMZ.D18.S.Cholera.WC-rBS vaccine 3-dose schedule"/>
  <type>
    <coding>
      <system
              value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
      <code value="eca-rule"/>
    </coding>
  </type>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2026-03-03T13:07:11+00:00"/>
  <publisher value="WHO"/>
  <contact>
    <name value="WHO"/>
    <telecom>
      <system value="url"/>
      <value value="http://who.int"/>
    </telecom>
  </contact>
  <description
               value="IMMZ.D18.S.Cholera.WC-rBS vaccine 3-dose schedule
Whole cell-recombinant B subunit (WC-rBS) vaccine (Dukoral), 3-dose schedule for clients aged 2–5 years"/>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="WHO recommendations for routine immunization - summary tables (January 2025)"/>
  </relatedArtifact>
  <library
           value="http://smart.who.int/immunizations/Library/IMMZD18SCholeraWCRBSVaccine3DosesLogic"/>
  <action>
    <title value="Cholera dose 1"/>
    <description
                 value="Provision of the cholera dose 1
Trigger event: Child's birth
Trigger pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 0 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
OR Primary series interrupted for 6 or more weeks
&quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = FALSE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≥ 6 weeks AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
OR more than 6 months have passed since completion of primary vaccination series
&quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) &gt; 6 months AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: &quot;Date of birth&quot;
OR
Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine (Dukoral), 3 doses should be given to children 2–5 years of age, with an interval of 1-6 weeks between doses. If the interval since the last dose ≥ 6 weeks, restart the primary series.

Revaccination for children aged 2–5 years: If more than 6 months have passed since completion of primary vaccination series, the primary series of 3 doses should be repeated."/>
    <condition>
      <kind value="applicability"/>
      <expression>
        <description value="Cholera dose 1"/>
        <language value="text/cql-identifier"/>
        <expression value="Cholera dose 1"/>
      </expression>
    </condition>
    <definitionCanonical
                         value="http://smart.who.int/immunizations/ActivityDefinition/IMMZD2DTCR"/>
    <dynamicValue>
      <path value="status"/>
      <expression>
        <language value="text/cql-expression"/>
        <expression value="'active'"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="payload.contentString"/>
      <expression>
        <language value="text/cql-identifier"/>
        <expression value="Cholera dose 1 Create"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="category.coding"/>
      <expression>
        <description value="Category of communication"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="priority"/>
      <expression>
        <description value="Alert priority"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"/>
      </expression>
    </dynamicValue>
  </action>
  <action>
    <title value="Cholera dose 2"/>
    <description
                 value="Provision of the cholera dose 2
Trigger event: First cholera dose was administered
Trigger pseudo: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 1 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses."/>
    <condition>
      <kind value="applicability"/>
      <expression>
        <description value="Cholera dose 2"/>
        <language value="text/cql-identifier"/>
        <expression value="Cholera dose 2"/>
      </expression>
    </condition>
    <definitionCanonical
                         value="http://smart.who.int/immunizations/ActivityDefinition/IMMZD2DTCR"/>
    <dynamicValue>
      <path value="status"/>
      <expression>
        <language value="text/cql-expression"/>
        <expression value="'active'"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="payload.contentString"/>
      <expression>
        <language value="text/cql-identifier"/>
        <expression value="Cholera dose 2 Create"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="category.coding"/>
      <expression>
        <description value="Category of communication"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="priority"/>
      <expression>
        <description value="Alert priority"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"/>
      </expression>
    </dynamicValue>
  </action>
  <action>
    <title value="Cholera dose 3"/>
    <description
                 value="Provision of the cholera dose 3
Trigger event: Second cholera dose was administered
Trigger pseudo: Latest &quot;Dose number&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = 2 AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine (Dukoral), 3 doses should be given to children aged 2–5 years, with an interval of 1–6 weeks between doses."/>
    <condition>
      <kind value="applicability"/>
      <expression>
        <description value="Cholera dose 3"/>
        <language value="text/cql-identifier"/>
        <expression value="Cholera dose 3"/>
      </expression>
    </condition>
    <definitionCanonical
                         value="http://smart.who.int/immunizations/ActivityDefinition/IMMZD2DTCR"/>
    <dynamicValue>
      <path value="status"/>
      <expression>
        <language value="text/cql-expression"/>
        <expression value="'active'"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="payload.contentString"/>
      <expression>
        <language value="text/cql-identifier"/>
        <expression value="Cholera dose 3 Create"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="category.coding"/>
      <expression>
        <description value="Category of communication"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="priority"/>
      <expression>
        <description value="Alert priority"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"/>
      </expression>
    </dynamicValue>
  </action>
  <action>
    <title value="Cholera booster dose"/>
    <description
                 value="Provision of the cholera booster dose
Trigger event: Primary series for cholera has been completed and latest cholera dose was administered approximately less than 6 months ago
Trigger pseudo: &quot;Completed the primary vaccination series&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) = TRUE AND Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;) ≤ 6 months ± Member States defined interval AND (2 years ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years)
Trigger date: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Cholera vaccines&quot;)
Create condition: For WC-rBS vaccine, for children aged 2–5 years, if less than 6 months have passed since completion of primary vaccination series, 1 dose for revaccination."/>
    <condition>
      <kind value="applicability"/>
      <expression>
        <description value="Cholera booster dose"/>
        <language value="text/cql-identifier"/>
        <expression value="Cholera booster dose"/>
      </expression>
    </condition>
    <definitionCanonical
                         value="http://smart.who.int/immunizations/ActivityDefinition/IMMZD2DTCR"/>
    <dynamicValue>
      <path value="status"/>
      <expression>
        <language value="text/cql-expression"/>
        <expression value="'active'"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="payload.contentString"/>
      <expression>
        <language value="text/cql-identifier"/>
        <expression value="Cholera booster dose Create"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="category.coding"/>
      <expression>
        <description value="Category of communication"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"/>
      </expression>
    </dynamicValue>
    <dynamicValue>
      <path value="priority"/>
      <expression>
        <description value="Alert priority"/>
        <language value="text/cql-expression"/>
        <expression
                    value="Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"/>
      </expression>
    </dynamicValue>
  </action>
</PlanDefinition>