<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:qdm43="urn:healthit-gov:qdm:v4_3" xmlns:qdm53="urn:healthit-gov:qdm:v5_3" xmlns:a="urn:hl7-org:cql-annotations:r1" localId="0">
   <annotation translatorOptions="EnableAnnotations,EnableLocators,DisableListDemotion,DisableListPromotion" signatureLevel="Overloads" xsi:type="a:CqlToElmInfo"/>
   <annotation message="An operand identifier reference is hiding another identifier of the same name." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation message="An operand identifier reference is hiding another identifier of the same name." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation message="An operand identifier reference is hiding another identifier of the same name." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation xsi:type="a:Annotation">
      <a:s r="515">
         <a:s>/*
  * Library: IMMZD2DTMeaslesEncounterElements
  */
library IMMZD2DTMeaslesEncounterElements</a:s>
      </a:s>
   </annotation>
   <identifier id="IMMZD2DTMeaslesEncounterElements" system="http://smart.who.int/immunizations"/>
   <schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
   <usings>
      <def localId="1" localIdentifier="System" uri="urn:hl7-org:elm-types:r1" version="1.0.0"/>
      <def localId="206" locator="7:1-7:26" localIdentifier="FHIR" uri="http://hl7.org/fhir" version="4.0.1">
         <annotation xsi:type="a:Annotation">
            <a:s r="206">
               <a:s>using </a:s>
               <a:s>
                  <a:s>FHIR</a:s>
               </a:s>
               <a:s> version '4.0.1'</a:s>
            </a:s>
         </annotation>
      </def>
   </usings>
   <includes>
      <def localId="208" locator="8:1-8:35" localIdentifier="FHIRHelpers" path="http://hl7.org/fhir/FHIRHelpers" version="4.0.1">
         <annotation xsi:type="a:Annotation">
            <a:s r="208">
               <a:s>include </a:s>
               <a:s>
                  <a:s>FHIRHelpers</a:s>
               </a:s>
               <a:s> version '4.0.1'</a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="210" locator="10:1-10:19" localIdentifier="WHOConcepts" path="http://smart.who.int/immunizations/WHOConcepts">
         <annotation xsi:type="a:Annotation">
            <a:s r="210">
               <a:s>include </a:s>
               <a:s>
                  <a:s>WHOConcepts</a:s>
               </a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="212" locator="11:1-11:27" localIdentifier="WC" path="http://smart.who.int/immunizations/WHOCommon">
         <annotation xsi:type="a:Annotation">
            <a:s r="212">
               <a:s>include </a:s>
               <a:s>
                  <a:s>WHOCommon</a:s>
               </a:s>
               <a:s> called WC</a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="214" locator="12:1-12:29" localIdentifier="WE" path="http://smart.who.int/immunizations/WHOElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="214">
               <a:s>include </a:s>
               <a:s>
                  <a:s>WHOElements</a:s>
               </a:s>
               <a:s> called WE</a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="216" locator="14:1-14:32" localIdentifier="Common" path="http://smart.who.int/immunizations/IMMZCommon">
         <annotation xsi:type="a:Annotation">
            <a:s r="216">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZCommon</a:s>
               </a:s>
               <a:s> called Common</a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="218" locator="15:1-15:36" localIdentifier="Concepts" path="http://smart.who.int/immunizations/IMMZConcepts">
         <annotation xsi:type="a:Annotation">
            <a:s r="218">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZConcepts</a:s>
               </a:s>
               <a:s> called Concepts</a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="220" locator="16:1-16:46" localIdentifier="Encounter" path="http://smart.who.int/immunizations/IMMZEncounterElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="220">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZEncounterElements</a:s>
               </a:s>
               <a:s> called Encounter</a:s>
            </a:s>
         </annotation>
      </def>
      <def localId="222" locator="18:1-18:54" localIdentifier="MeaslesElements" path="http://smart.who.int/immunizations/IMMZD2DTMeaslesElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="222">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZD2DTMeaslesElements</a:s>
               </a:s>
               <a:s> called MeaslesElements</a:s>
            </a:s>
         </annotation>
      </def>
   </includes>
   <parameters>
      <def localId="224" locator="20:1-20:36" name="Today" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:s r="224">
               <a:s>parameter Today </a:s>
               <a:s r="228">
                  <a:s>Date</a:s>
               </a:s>
               <a:s> default </a:s>
               <a:s r="227">
                  <a:s>Today()</a:s>
               </a:s>
            </a:s>
         </annotation>
         <default localId="227" locator="20:30-20:36" xsi:type="Today"/>
         <parameterTypeSpecifier localId="228" locator="20:17-20:20" name="t:Date" xsi:type="NamedTypeSpecifier"/>
      </def>
      <def localId="230" locator="21:1-21:28" name="EncounterId" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:s r="230">
               <a:s>parameter EncounterId </a:s>
               <a:s r="231">
                  <a:s>String</a:s>
               </a:s>
            </a:s>
         </annotation>
         <parameterTypeSpecifier localId="231" locator="21:23-21:28" name="t:String" xsi:type="NamedTypeSpecifier"/>
      </def>
   </parameters>
   <contexts>
      <def localId="236" locator="23:1-23:15" name="Patient"/>
   </contexts>
   <statements>
      <def localId="234" locator="23:1-23:15" name="Patient" context="Patient">
         <expression localId="235" xsi:type="SingletonFrom">
            <operand localId="233" locator="23:1-23:15" dataType="fhir:Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def localId="239" locator="28:1-32:59" name="Measles Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Measles containing Doses Administered to Patient"/>
            <a:s r="239">
               <a:s>/*
@internal: Measles containing Doses Administered to Patient
*/
define &quot;Measles Doses Administered to Patient&quot;:

  </a:s>
               <a:s r="251">
                  <a:s>
                     <a:s r="240">
                        <a:s r="242">
                           <a:s>
                              <a:s>Encounter.&quot;Doses Administered to Patient&quot;</a:s>
                           </a:s>
                        </a:s>
                        <a:s> I</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  </a:s>
                  <a:s r="248">
                     <a:s>where
    </a:s>
                     <a:s r="248">
                        <a:s r="245">
                           <a:s r="244">
                              <a:s>I</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="245">
                              <a:s>vaccineCode</a:s>
                           </a:s>
                        </a:s>
                        <a:s> in </a:s>
                        <a:s r="247">
                           <a:s r="246">
                              <a:s>Concepts</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="247">
                              <a:s>&quot;Measles-containing vaccines&quot;</a:s>
                           </a:s>
                        </a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="251" locator="30:3-32:59" xsi:type="Query">
            <source localId="240" locator="30:3-30:45" alias="I">
               <expression localId="242" locator="30:3-30:43" name="Doses Administered to Patient" libraryName="Encounter" xsi:type="ExpressionRef"/>
            </source>
            <where localId="248" locator="31:3-32:59" xsi:type="InValueSet">
               <signature localId="250" name="t:Concept" xsi:type="NamedTypeSpecifier"/>
               <code localId="249" name="ToConcept" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                  <operand localId="245" locator="32:5-32:17" path="vaccineCode" scope="I" xsi:type="Property"/>
               </code>
               <valueset localId="247" locator="32:22-32:59" name="Measles-containing vaccines" libraryName="Concepts" preserve="true"/>
            </where>
         </expression>
      </def>
      <def localId="254" locator="37:1-39:57" name="Measles Primary Series Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Measles containing Doses Administered to Patient that are in the Primary series"/>
            <a:s r="254">
               <a:s>/*
@internal: Measles containing Doses Administered to Patient that are in the Primary series
*/
define &quot;Measles Primary Series Doses Administered to Patient&quot;:

  </a:s>
               <a:s r="256">
                  <a:s r="255">
                     <a:s>&quot;Measles Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="256">
                     <a:s>seriesPrimary()</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="256" locator="39:3-39:57" name="seriesPrimary" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="255" locator="39:3-39:41" name="Measles Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="259" locator="44:1-46:63" name="Number of Measles Primary Series Doses Administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Number of Measles Primary Series doses"/>
            <a:s r="259">
               <a:s>/*
@internal: Number of Measles Primary Series doses
*/
define &quot;Number of Measles Primary Series Doses Administered&quot;:

  </a:s>
               <a:s r="263">
                  <a:s>Count(</a:s>
                  <a:s r="260">
                     <a:s>&quot;Measles Primary Series Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>)</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="263" locator="46:3-46:63" xsi:type="Count">
            <source localId="260" locator="46:9-46:62" name="Measles Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="266" locator="54:1-55:47" name="Client's age is less than 9 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is less than 9 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 9 months"/>
            <a:t name="code" value="Client's age is less than 9 months-41"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:s r="266">
               <a:s>/*
@input: Client's age is less than 9 months
@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 9 months
@code: Client's age is less than 9 months-41
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
*/
define &quot;Client's age is less than 9 months&quot;:
  </a:s>
               <a:s r="267">
                  <a:s r="269">
                     <a:s r="268">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="269">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="270"> &lt; 9</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="267" locator="55:3-55:47" xsi:type="Less">
            <signature localId="271" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="272" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="269" locator="55:3-55:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="270" locator="55:47" valueType="t:Integer" value="9" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="282" locator="253:1-254:86" name="MCV Primary Series Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="MCV Primary Series Doses Administered to Patient"/>
            <a:s r="282">
               <a:s>/*
@internal: MCV Primary Series Doses Administered to Patient
*/
define &quot;MCV Primary Series Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="286">
                  <a:s r="284">
                     <a:s r="283">
                        <a:s>MeaslesElements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="284">
                        <a:s>&quot;MCV Primary Series Doses Administered to Patient&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="286">
                     <a:s>onOrBefore(</a:s>
                     <a:s r="285">
                        <a:s>Today</a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="286" locator="254:3-254:86" name="onOrBefore" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="284" locator="254:3-254:68" name="MCV Primary Series Doses Administered to Patient" libraryName="MeaslesElements" xsi:type="ExpressionRef"/>
            <operand localId="285" locator="254:81-254:85" name="Today" xsi:type="ParameterRef"/>
         </expression>
      </def>
      <def localId="279" locator="277:1-278:59" name="Number of MCV Primary Series Doses Administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Number of MCV Primary Series Doses Administered"/>
            <a:s r="279">
               <a:s>/*
@internal: Number of MCV Primary Series Doses Administered
*/
define &quot;Number of MCV Primary Series Doses Administered&quot;:
  </a:s>
               <a:s r="290">
                  <a:s>Count(</a:s>
                  <a:s r="287">
                     <a:s>&quot;MCV Primary Series Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>)</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="290" locator="278:3-278:59" xsi:type="Count">
            <source localId="287" locator="278:9-278:58" name="MCV Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="275" locator="64:1-65:55" name="No measles primary series doses were administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No measles primary series doses were administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0"/>
            <a:t name="code" value="No measles primary series doses were administered-127"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="275">
               <a:s>/*
@input: No measles primary series doses were administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0
@code: No measles primary series doses were administered-127
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;No measles primary series doses were administered&quot;:
  </a:s>
               <a:s r="276">
                  <a:s r="291">
                     <a:s>&quot;Number of MCV Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="292"> = 0</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="276" locator="65:3-65:55" xsi:type="Equal">
            <signature localId="293" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="294" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="291" locator="65:3-65:51" name="Number of MCV Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="292" locator="65:55" valueType="t:Integer" value="0" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="297" locator="74:1-75:48" name="Client's age is more than or equal to 9 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is more than or equal to 9 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; ≥ 9 months"/>
            <a:t name="code" value="Client's age is more than or equal to 9 months-41"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="297">
               <a:s>/*
@input: Client's age is more than or equal to 9 months
@pseudocode: Today's date − &quot;Date of birth&quot; ≥ 9 months
@code: Client's age is more than or equal to 9 months-41
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;Client's age is more than or equal to 9 months&quot;:
  </a:s>
               <a:s r="298">
                  <a:s r="300">
                     <a:s r="299">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="300">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="301"> >= 9</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="298" locator="75:3-75:48" xsi:type="GreaterOrEqual">
            <signature localId="302" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="303" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="300" locator="75:3-75:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="301" locator="75:48" valueType="t:Integer" value="9" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="306" locator="85:1-86:66" name="No live vaccine was administered in the last 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No live vaccine was administered in the last 4 weeks"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) ≥ 4 weeks"/>
            <a:t name="code" value="No live vaccine was administered in the last 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="306">
               <a:s>/*
@input: No live vaccine was administered in the last 4 weeks
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) ≥ 4 weeks
@code: No live vaccine was administered in the last 4 weeks-92
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;No live vaccine was administered in the last 4 weeks&quot;:
  </a:s>
               <a:s r="308">
                  <a:s r="307">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="308">
                     <a:s>&quot;No live vaccine was administered in the last 4 weeks&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="308" locator="86:3-86:66" name="No live vaccine was administered in the last 4 weeks" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="311" locator="96:1-97:63" name="Live vaccine was administered in the last 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Live vaccine was administered in the last 4 weeks"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks"/>
            <a:t name="code" value="Live vaccine was administered in the last 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="311">
               <a:s>/*
@input: Live vaccine was administered in the last 4 weeks
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks
@code: Live vaccine was administered in the last 4 weeks-92
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;Live vaccine was administered in the last 4 weeks&quot;:
  </a:s>
               <a:s r="313">
                  <a:s r="312">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="313">
                     <a:s>&quot;Live vaccine was administered in the last 4 weeks&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="313" locator="97:3-97:63" name="Live vaccine was administered in the last 4 weeks" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="316" locator="106:1-107:55" name="MCV1 was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="MCV1 was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1"/>
            <a:t name="code" value="MCV1 was administered-127"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="316">
               <a:s>/*
@input: MCV1 was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1
@code: MCV1 was administered-127
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;MCV1 was administered&quot;:
  </a:s>
               <a:s r="317">
                  <a:s r="318">
                     <a:s>&quot;Number of MCV Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="319"> = 1</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="317" locator="107:3-107:55" xsi:type="Equal">
            <signature localId="320" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="321" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="318" locator="107:3-107:51" name="Number of MCV Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="319" locator="107:55" valueType="t:Integer" value="1" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="324" locator="116:1-117:48" name="Client's age is less than 15 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is less than 15 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 15 months"/>
            <a:t name="code" value="Client's age is less than 15 months-42"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="324">
               <a:s>/*
@input: Client's age is less than 15 months
@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 15 months
@code: Client's age is less than 15 months-42
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;Client's age is less than 15 months&quot;:
  </a:s>
               <a:s r="325">
                  <a:s r="327">
                     <a:s r="326">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="327">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="328"> &lt; 15</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="325" locator="117:3-117:48" xsi:type="Less">
            <signature localId="329" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="330" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="327" locator="117:3-117:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="328" locator="117:47-117:48" valueType="t:Integer" value="15" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="333" locator="126:1-127:49" name="Client's age is more than or equal to 15 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is more than or equal to 15 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; ≥ 15 months"/>
            <a:t name="code" value="Client's age is more than or equal to 15 months-42"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="333">
               <a:s>/*
@input: Client's age is more than or equal to 15 months
@pseudocode: Today's date − &quot;Date of birth&quot; ≥ 15 months
@code: Client's age is more than or equal to 15 months-42
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;Client's age is more than or equal to 15 months&quot;:
  </a:s>
               <a:s r="334">
                  <a:s r="336">
                     <a:s r="335">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="336">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="337"> >= 15</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="334" locator="127:3-127:49" xsi:type="GreaterOrEqual">
            <signature localId="338" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="339" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="336" locator="127:3-127:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="337" locator="127:48-127:49" valueType="t:Integer" value="15" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="342" locator="136:1-137:55" name="MCV2 was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="MCV2 was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2"/>
            <a:t name="code" value="MCV2 was administered-127"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="342">
               <a:s>/*
@input: MCV2 was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2
@code: MCV2 was administered-127
@decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months)
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;MCV2 was administered&quot;:
  </a:s>
               <a:s r="343">
                  <a:s r="344">
                     <a:s>&quot;Number of MCV Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="345"> = 2</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="343" locator="137:3-137:55" xsi:type="Equal">
            <signature localId="346" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="347" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="344" locator="137:3-137:51" name="Number of MCV Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="345" locator="137:55" valueType="t:Integer" value="2" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="350" locator="145:1-146:48" name="Client's age is less than 12 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is less than 12 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 12 months"/>
            <a:t name="code" value="Client's age is less than 12 months-42"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="350">
               <a:s>/*
@input: Client's age is less than 12 months
@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 12 months
@code: Client's age is less than 12 months-42
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;Client's age is less than 12 months&quot;:
  </a:s>
               <a:s r="351">
                  <a:s r="353">
                     <a:s r="352">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="353">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="354"> &lt; 12</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="351" locator="146:3-146:48" xsi:type="Less">
            <signature localId="355" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="356" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="353" locator="146:3-146:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="354" locator="146:47-146:48" valueType="t:Integer" value="12" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="359" locator="154:1-155:49" name="Client's age is more than or equal to 12 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is more than or equal to 12 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; ≥ 12 months"/>
            <a:t name="code" value="Client's age is more than or equal to 12 months-42"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)"/>
            <a:s r="359">
               <a:s>/*
@input: Client's age is more than or equal to 12 months
@pseudocode: Today's date − &quot;Date of birth&quot; ≥ 12 months
@code: Client's age is more than or equal to 12 months-42
@decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months)
*/
define &quot;Client's age is more than or equal to 12 months&quot;:
  </a:s>
               <a:s r="360">
                  <a:s r="362">
                     <a:s r="361">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="362">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="363"> >= 12</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="360" locator="155:3-155:49" xsi:type="GreaterOrEqual">
            <signature localId="364" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="365" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="362" locator="155:3-155:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="363" locator="155:48-155:49" valueType="t:Integer" value="12" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="368" locator="163:1-164:47" name="Client's age is less than 6 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is less than 6 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 6 months"/>
            <a:t name="code" value="Client's age is less than 6 months-41"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="368">
               <a:s>/*
@input: Client's age is less than 6 months
@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 6 months
@code: Client's age is less than 6 months-41
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;Client's age is less than 6 months&quot;:
  </a:s>
               <a:s r="369">
                  <a:s r="371">
                     <a:s r="370">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="371">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="372"> &lt; 6</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="369" locator="164:3-164:47" xsi:type="Less">
            <signature localId="373" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="374" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="371" locator="164:3-164:43" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="372" locator="164:47" valueType="t:Integer" value="6" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="384" locator="265:1-266:78" name="MCV Dose 0 Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="MCV Dose 0 Doses Administered to Patient"/>
            <a:s r="384">
               <a:s>/*
@internal: MCV Dose 0 Doses Administered to Patient
*/
define &quot;MCV Dose 0 Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="388">
                  <a:s r="386">
                     <a:s r="385">
                        <a:s>MeaslesElements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="386">
                        <a:s>&quot;MCV Dose 0 Doses Administered to Patient&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="388">
                     <a:s>onOrBefore(</a:s>
                     <a:s r="387">
                        <a:s>Today</a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="388" locator="266:3-266:78" name="onOrBefore" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="386" locator="266:3-266:60" name="MCV Dose 0 Doses Administered to Patient" libraryName="MeaslesElements" xsi:type="ExpressionRef"/>
            <operand localId="387" locator="266:73-266:77" name="Today" xsi:type="ParameterRef"/>
         </expression>
      </def>
      <def localId="381" locator="283:1-284:51" name="Number of MCV Dose 0 Doses Administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Number of MCV Dose 0 Doses Administered"/>
            <a:s r="381">
               <a:s>/*
@internal: Number of MCV Dose 0 Doses Administered
*/
define &quot;Number of MCV Dose 0 Doses Administered&quot;:
  </a:s>
               <a:s r="392">
                  <a:s>Count(</a:s>
                  <a:s r="389">
                     <a:s>&quot;MCV Dose 0 Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>)</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="392" locator="284:3-284:51" xsi:type="Count">
            <source localId="389" locator="284:9-284:50" name="MCV Dose 0 Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="377" locator="172:1-173:47" name="MCV0 was not administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="MCV0 was not administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Dose 0&quot;) = 0"/>
            <a:t name="code" value="MCV0 was not administered-119"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="377">
               <a:s>/*
@input: MCV0 was not administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Dose 0&quot;) = 0
@code: MCV0 was not administered-119
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;MCV0 was not administered&quot;:
  </a:s>
               <a:s r="378">
                  <a:s r="393">
                     <a:s>&quot;Number of MCV Dose 0 Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="394"> = 0</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="378" locator="173:3-173:47" xsi:type="Equal">
            <signature localId="395" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="396" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="393" locator="173:3-173:43" name="Number of MCV Dose 0 Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="394" locator="173:47" valueType="t:Integer" value="0" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="399" locator="181:1-183:51" name="Client's age is between 6 months and 9 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is between 6 months and 9 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 9 months"/>
            <a:t name="code" value="Client's age is between 6 months and 9 months-52"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="399">
               <a:s>/*
@input: Client's age is between 6 months and 9 months
@pseudocode: 6 months ≤ Today's date − &quot;Date of birth&quot; &lt; 9 months
@code: Client's age is between 6 months and 9 months-52
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;Client's age is between 6 months and 9 months&quot;:
  </a:s>
               <a:s r="400">
                  <a:s r="401">
                     <a:s r="402">6 &lt;= </a:s>
                     <a:s r="404">
                        <a:s r="403">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="404">
                           <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  and </a:s>
                  <a:s r="407">
                     <a:s r="409">
                        <a:s r="408">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="409">
                           <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s r="410"> &lt; 9</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="400" locator="182:3-183:51" xsi:type="And">
            <operand localId="401" locator="182:3-182:48" xsi:type="LessOrEqual">
               <signature localId="405" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <signature localId="406" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <operand localId="402" locator="182:3" valueType="t:Integer" value="6" xsi:type="Literal"/>
               <operand localId="404" locator="182:8-182:48" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
            </operand>
            <operand localId="407" locator="183:7-183:51" xsi:type="Less">
               <signature localId="411" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <signature localId="412" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <operand localId="409" locator="183:7-183:47" name="Current Patient Age In Months" libraryName="Encounter" xsi:type="ExpressionRef"/>
               <operand localId="410" locator="183:51" valueType="t:Integer" value="9" xsi:type="Literal"/>
            </operand>
         </expression>
      </def>
      <def localId="415" locator="191:1-192:47" name="MCV0 was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="MCV0 was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Dose 0&quot;) = 1"/>
            <a:t name="code" value="MCV0 was administered-119"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration"/>
            <a:s r="415">
               <a:s>/*
@input: MCV0 was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Dose 0&quot;) = 1
@code: MCV0 was administered-119
@decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration
*/
define &quot;MCV0 was administered&quot;:
  </a:s>
               <a:s r="416">
                  <a:s r="417">
                     <a:s>&quot;Number of MCV Dose 0 Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="418"> = 1</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="416" locator="192:3-192:47" xsi:type="Equal">
            <signature localId="419" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="420" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="417" locator="192:3-192:43" name="Number of MCV Dose 0 Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="418" locator="192:47" valueType="t:Integer" value="1" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="430" locator="271:1-272:85" name="MCV Supplementary Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="MCV Supplementary Doses Administered to Patient"/>
            <a:s r="430">
               <a:s>/*
@internal: MCV Supplementary Doses Administered to Patient
*/
define &quot;MCV Supplementary Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="434">
                  <a:s r="432">
                     <a:s r="431">
                        <a:s>MeaslesElements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="432">
                        <a:s>&quot;MCV Supplementary Doses Administered to Patient&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="434">
                     <a:s>onOrBefore(</a:s>
                     <a:s r="433">
                        <a:s>Today</a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="434" locator="272:3-272:85" name="onOrBefore" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="432" locator="272:3-272:67" name="MCV Supplementary Doses Administered to Patient" libraryName="MeaslesElements" xsi:type="ExpressionRef"/>
            <operand localId="433" locator="272:80-272:84" name="Today" xsi:type="ParameterRef"/>
         </expression>
      </def>
      <def localId="427" locator="289:1-290:58" name="Number of MCV Supplementary Doses Administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Number of MCV Supplementary Doses Administered"/>
            <a:s r="427">
               <a:s>/*
@internal: Number of MCV Supplementary Doses Administered
*/
define &quot;Number of MCV Supplementary Doses Administered&quot;:
  </a:s>
               <a:s r="438">
                  <a:s>Count(</a:s>
                  <a:s r="435">
                     <a:s>&quot;MCV Supplementary Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>)</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="438" locator="290:3-290:58" xsi:type="Count">
            <source localId="435" locator="290:9-290:57" name="MCV Supplementary Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="423" locator="200:1-201:54" name="Measles supplementary dose was not administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Measles supplementary dose was not administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Supplementary dose&quot;) = 0"/>
            <a:t name="code" value="Measles supplementary dose was not administered-131"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration"/>
            <a:s r="423">
               <a:s>/*
@input: Measles supplementary dose was not administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Supplementary dose&quot;) = 0
@code: Measles supplementary dose was not administered-131
@decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration
*/
define &quot;Measles supplementary dose was not administered&quot;:
  </a:s>
               <a:s r="424">
                  <a:s r="439">
                     <a:s>&quot;Number of MCV Supplementary Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="440"> = 0</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="424" locator="201:3-201:54" xsi:type="Equal">
            <signature localId="441" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="442" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="439" locator="201:3-201:50" name="Number of MCV Supplementary Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="440" locator="201:54" valueType="t:Integer" value="0" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="451" locator="247:1-248:71" name="MCV Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="MCV Doses Administered to Patient"/>
            <a:s r="451">
               <a:s>/*
@internal: MCV Doses Administered to Patient
*/
define &quot;MCV Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="455">
                  <a:s r="453">
                     <a:s r="452">
                        <a:s>MeaslesElements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="453">
                        <a:s>&quot;MCV Doses Administered to Patient&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="455">
                     <a:s>onOrBefore(</a:s>
                     <a:s r="454">
                        <a:s>Today</a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="455" locator="248:3-248:71" name="onOrBefore" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="453" locator="248:3-248:53" name="MCV Doses Administered to Patient" libraryName="MeaslesElements" xsi:type="ExpressionRef"/>
            <operand localId="454" locator="248:66-248:70" name="Today" xsi:type="ParameterRef"/>
         </expression>
      </def>
      <def localId="445" locator="209:1-215:11" name="Measles routine immunization schedule is complete" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Measles routine immunization schedule is complete"/>
            <a:t name="pseudocode" value="&quot;Completed the primary vaccination series&quot; = TRUE (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot;)"/>
            <a:t name="code" value="Measles routine immunization schedule is complete-104"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration"/>
            <a:s r="445">
               <a:s>/*
@input: Measles routine immunization schedule is complete
@pseudocode: &quot;Completed the primary vaccination series&quot; = TRUE (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot;)
@code: Measles routine immunization schedule is complete-104
@decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration
*/
define &quot;Measles routine immunization schedule is complete&quot;:
  </a:s>
               <a:s r="446">
                  <a:s r="447">
                     <a:s>&quot;MCV2 was administered&quot;</a:s>
                  </a:s>
                  <a:s>
  or
  </a:s>
                  <a:s r="485">
                     <a:s>Coalesce(
    </a:s>
                     <a:s r="481">
                        <a:s>
                           <a:s r="448">
                              <a:s r="456">
                                 <a:s>
                                    <a:s>&quot;MCV Doses Administered to Patient&quot;</a:s>
                                 </a:s>
                              </a:s>
                              <a:s> Dose</a:s>
                           </a:s>
                        </a:s>
                        <a:s>
    </a:s>
                        <a:s r="458">
                           <a:s>aggregate Result: </a:s>
                           <a:s r="461">
                              <a:s r="475">
                                 <a:s r="473">
                                    <a:s r="463">
                                       <a:s r="462">
                                          <a:s>Encounter</a:s>
                                       </a:s>
                                       <a:s>.</a:s>
                                       <a:s r="463">
                                          <a:s>&quot;Completed the primary vaccination series Observation&quot;</a:s>
                                       </a:s>
                                    </a:s>
                                    <a:s>.</a:s>
                                    <a:s r="473">
                                       <a:s>partOf</a:s>
                                    </a:s>
                                 </a:s>
                                 <a:s>.</a:s>
                                 <a:s r="475">
                                    <a:s>references(</a:s>
                                    <a:s r="474">
                                       <a:s>Dose</a:s>
                                    </a:s>
                                    <a:s>)</a:s>
                                 </a:s>
                              </a:s>
                              <a:s> or </a:s>
                              <a:s r="479">
                                 <a:s>Result</a:s>
                              </a:s>
                           </a:s>
                        </a:s>
                     </a:s>
                     <a:s r="482">,
    false )</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="446" locator="210:3-215:11" xsi:type="Or">
            <operand localId="447" locator="210:3-210:25" name="MCV2 was administered" xsi:type="ExpressionRef"/>
            <operand localId="485" locator="212:3-215:11" xsi:type="Coalesce">
               <operand localId="481" locator="213:5-214:120" xsi:type="Query">
                  <source localId="448" locator="213:5-213:44" alias="Dose">
                     <expression localId="456" locator="213:5-213:39" name="MCV Doses Administered to Patient" xsi:type="ExpressionRef"/>
                  </source>
                  <aggregate localId="458" locator="214:5-214:120" identifier="Result">
                     <expression localId="461" locator="214:23-214:120" xsi:type="Or">
                        <operand localId="475" locator="214:23-214:110" name="references" libraryName="WC" xsi:type="FunctionRef">
                           <signature localId="476" xsi:type="ListTypeSpecifier">
                              <elementType localId="477" name="fhir:Reference" xsi:type="NamedTypeSpecifier"/>
                           </signature>
                           <signature localId="478" name="fhir:Resource" xsi:type="NamedTypeSpecifier"/>
                           <operand localId="473" locator="214:23-214:93" xsi:type="Flatten">
                              <operand localId="471" xsi:type="Query">
                                 <source localId="470" alias="$this">
                                    <expression localId="463" locator="214:23-214:86" name="Completed the primary vaccination series Observation" libraryName="Encounter" xsi:type="ExpressionRef"/>
                                 </source>
                                 <where localId="467" xsi:type="Not">
                                    <operand localId="466" xsi:type="IsNull">
                                       <operand localId="465" path="partOf" xsi:type="Property">
                                          <source localId="464" name="$this" xsi:type="AliasRef"/>
                                       </operand>
                                    </operand>
                                 </where>
                                 <return localId="472" distinct="false">
                                    <expression localId="469" path="partOf" xsi:type="Property">
                                       <source localId="468" name="$this" xsi:type="AliasRef"/>
                                    </expression>
                                 </return>
                              </operand>
                           </operand>
                           <operand localId="474" locator="214:106-214:109" name="Dose" xsi:type="AliasRef"/>
                        </operand>
                        <operand localId="480" asType="t:Boolean" xsi:type="As">
                           <operand localId="479" locator="214:115-214:120" name="Result" xsi:type="QueryLetRef"/>
                        </operand>
                     </expression>
                     <starting localId="459" xsi:type="Null"/>
                  </aggregate>
               </operand>
               <operand localId="482" locator="215:5-215:9" valueType="t:Boolean" value="false" xsi:type="Literal"/>
            </operand>
         </expression>
      </def>
      <def localId="488" locator="223:1-224:53" name="Live vaccine was administered in the past 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Live vaccine was administered in the past 4 weeks"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks"/>
            <a:t name="code" value="Live vaccine was administered in the past 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration"/>
            <a:s r="488">
               <a:s>/*
@input: Live vaccine was administered in the past 4 weeks
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks
@code: Live vaccine was administered in the past 4 weeks-92
@decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration
*/
define &quot;Live vaccine was administered in the past 4 weeks&quot;:
  </a:s>
               <a:s r="489">
                  <a:s>&quot;Live vaccine was administered in the last 4 weeks&quot;</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="489" locator="224:3-224:53" name="Live vaccine was administered in the last 4 weeks" xsi:type="ExpressionRef"/>
      </def>
      <def localId="492" locator="232:1-233:56" name="No live vaccine was administered in the past 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No live vaccine was administered in the past 4 weeks"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) ≥ 4 weeks"/>
            <a:t name="code" value="No live vaccine was administered in the past 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration"/>
            <a:s r="492">
               <a:s>/*
@input: No live vaccine was administered in the past 4 weeks
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) ≥ 4 weeks
@code: No live vaccine was administered in the past 4 weeks-92
@decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration
*/
define &quot;No live vaccine was administered in the past 4 weeks&quot;:
  </a:s>
               <a:s r="493">
                  <a:s>&quot;No live vaccine was administered in the last 4 weeks&quot;</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="493" locator="233:3-233:56" name="No live vaccine was administered in the last 4 weeks" xsi:type="ExpressionRef"/>
      </def>
      <def localId="496" locator="241:1-242:54" name="Measles supplementary dose was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Measles supplementary dose was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Supplementary dose&quot;) = 1"/>
            <a:t name="code" value="Measles supplementary dose was administered-131"/>
            <a:t name="decision" value="IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration"/>
            <a:s r="496">
               <a:s>/*
@input: Measles supplementary dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Measles-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Supplementary dose&quot;) = 1
@code: Measles supplementary dose was administered-131
@decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration
*/
define &quot;Measles supplementary dose was administered&quot;:
  </a:s>
               <a:s r="497">
                  <a:s r="498">
                     <a:s>&quot;Number of MCV Supplementary Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="499"> = 1</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="497" locator="242:3-242:54" xsi:type="Equal">
            <signature localId="500" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="501" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="498" locator="242:3-242:50" name="Number of MCV Supplementary Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="499" locator="242:54" valueType="t:Integer" value="1" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="504" locator="259:1-260:108" name="Date when the primary vaccination series completed" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Date when the primary vaccination series completed"/>
            <a:s r="504">
               <a:s>/*
@internal: Date when the primary vaccination series completed
*/
define &quot;Date when the primary vaccination series completed&quot;:
  </a:s>
               <a:s r="505">
                  <a:s>date from </a:s>
                  <a:s r="506">
                     <a:s>start of </a:s>
                     <a:s r="512">
                        <a:s r="511">
                           <a:s r="508">
                              <a:s r="507">
                                 <a:s>&quot;MCV Primary Series Doses Administered to Patient&quot;</a:s>
                              </a:s>
                              <a:s>.</a:s>
                              <a:s r="508">
                                 <a:s>mostRecent()</a:s>
                              </a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="511">
                              <a:s>occurrence</a:s>
                           </a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="512">
                           <a:s>toInterval()</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="505" locator="260:3-260:108" xsi:type="DateFrom">
            <operand localId="506" locator="260:13-260:108" xsi:type="Start">
               <operand localId="512" locator="260:22-260:108" name="toInterval" libraryName="WC" xsi:type="FunctionRef">
                  <operand localId="511" locator="260:22-260:95" path="occurrence" xsi:type="Property">
                     <source localId="508" locator="260:22-260:84" name="mostRecent" libraryName="WC" xsi:type="FunctionRef">
                        <signature localId="509" xsi:type="ListTypeSpecifier">
                           <elementType localId="510" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                        </signature>
                        <operand localId="507" locator="260:22-260:71" name="MCV Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/>
                     </source>
                  </operand>
               </operand>
            </operand>
         </expression>
      </def>
      <def localId="515" locator="295:1-296:94" name="Date of Latest Live Attenuated Vaccine" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Date of Latest Live Attenuated Vaccine"/>
            <a:s r="515">
               <a:s>/*
@internal: Date of Latest Live Attenuated Vaccine
*/
define &quot;Date of Latest Live Attenuated Vaccine&quot;:
  </a:s>
               <a:s r="516">
                  <a:s>date from </a:s>
                  <a:s r="517">
                     <a:s>start of </a:s>
                     <a:s r="524">
                        <a:s r="523">
                           <a:s r="520">
                              <a:s r="519">
                                 <a:s r="518">
                                    <a:s>Encounter</a:s>
                                 </a:s>
                                 <a:s>.</a:s>
                                 <a:s r="519">
                                    <a:s>&quot;Live Attenuated Vaccines&quot;</a:s>
                                 </a:s>
                              </a:s>
                              <a:s>.</a:s>
                              <a:s r="520">
                                 <a:s>mostRecent()</a:s>
                              </a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="523">
                              <a:s>occurrence</a:s>
                           </a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="524">
                           <a:s>toInterval()</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="516" locator="296:3-296:94" xsi:type="DateFrom">
            <operand localId="517" locator="296:13-296:94" xsi:type="Start">
               <operand localId="524" locator="296:22-296:94" name="toInterval" libraryName="WC" xsi:type="FunctionRef">
                  <operand localId="523" locator="296:22-296:81" path="occurrence" xsi:type="Property">
                     <source localId="520" locator="296:22-296:70" name="mostRecent" libraryName="WC" xsi:type="FunctionRef">
                        <signature localId="521" xsi:type="ListTypeSpecifier">
                           <elementType localId="522" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                        </signature>
                        <operand localId="519" locator="296:22-296:57" name="Live Attenuated Vaccines" libraryName="Encounter" xsi:type="ExpressionRef"/>
                     </source>
                  </operand>
               </operand>
            </operand>
         </expression>
      </def>
   </statements>
</library>
