<?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="341">
         <a:s>/*
  * Library: IMMZD2DTRotavirusElements
  */
library IMMZD2DTRotavirusElements</a:s>
      </a:s>
   </annotation>
   <identifier id="IMMZD2DTRotavirusElements" 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:36" localIdentifier="Elements" path="http://smart.who.int/immunizations/IMMZElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="220">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZElements</a:s>
               </a:s>
               <a:s> called Elements</a:s>
            </a:s>
         </annotation>
      </def>
   </includes>
   <contexts>
      <def localId="225" locator="19:1-19:15" name="Patient"/>
   </contexts>
   <statements>
      <def localId="223" locator="19:1-19:15" name="Patient" context="Patient">
         <expression localId="224" xsi:type="SingletonFrom">
            <operand localId="222" locator="19:1-19:15" dataType="fhir:Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def localId="228" locator="24:1-27:50" name="Rotavirus Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Rotavirus containing Doses Administered to Patient"/>
            <a:s r="228">
               <a:s>/*
@internal: Rotavirus containing Doses Administered to Patient
*/
define &quot;Rotavirus Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="240">
                  <a:s>
                     <a:s r="229">
                        <a:s r="231">
                           <a:s>
                              <a:s>Elements.&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="237">
                     <a:s>where
    </a:s>
                     <a:s r="237">
                        <a:s r="234">
                           <a:s r="233">
                              <a:s>I</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="234">
                              <a:s>vaccineCode</a:s>
                           </a:s>
                        </a:s>
                        <a:s> in </a:s>
                        <a:s r="236">
                           <a:s r="235">
                              <a:s>Concepts</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="236">
                              <a:s>&quot;Rotavirus vaccines&quot;</a:s>
                           </a:s>
                        </a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="240" locator="25:3-27:50" xsi:type="Query">
            <source localId="229" locator="25:3-25:44" alias="I">
               <expression localId="231" locator="25:3-25:42" name="Doses Administered to Patient" libraryName="Elements" xsi:type="ExpressionRef"/>
            </source>
            <where localId="237" locator="26:3-27:50" xsi:type="InValueSet">
               <signature localId="239" name="t:Concept" xsi:type="NamedTypeSpecifier"/>
               <code localId="238" name="ToConcept" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                  <operand localId="234" locator="27:5-27:17" path="vaccineCode" scope="I" xsi:type="Property"/>
               </code>
               <valueset localId="236" locator="27:22-27:50" name="Rotavirus vaccines" libraryName="Concepts" preserve="true"/>
            </where>
         </expression>
      </def>
      <def localId="243" locator="32:1-33:59" name="Rotavirus Primary Series Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Rotavirus containing Doses Administered to Patient that are in the Primary series"/>
            <a:s r="243">
               <a:s>/*
@internal: Rotavirus containing Doses Administered to Patient that are in the Primary series
*/
define &quot;Rotavirus Primary Series Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="245">
                  <a:s r="244">
                     <a:s>&quot;Rotavirus Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="245">
                     <a:s>seriesPrimary()</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="245" locator="33:3-33:59" name="seriesPrimary" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="244" locator="33:3-33:43" name="Rotavirus Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="248" locator="38:1-39:65" name="Number of Rotavirus Primary Series Doses Administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Number of Rotavirus Primary Series doses"/>
            <a:s r="248">
               <a:s>/*
@internal: Number of Rotavirus Primary Series doses
*/
define &quot;Number of Rotavirus Primary Series Doses Administered&quot;:
  </a:s>
               <a:s r="252">
                  <a:s>Count(</a:s>
                  <a:s r="249">
                     <a:s>&quot;Rotavirus Primary Series Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>)</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="252" locator="39:3-39:65" xsi:type="Count">
            <source localId="249" locator="39:9-39:64" name="Rotavirus Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="255" locator="47:1-48:45" name="Client's age is less than 6 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is less than 6 weeks"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 6 weeks"/>
            <a:t name="code" value="Client's age is less than 6 weeks-41"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="255">
               <a:s>/*
@input: Client's age is less than 6 weeks
@pseudocode: 'Today's date – &quot;Date of birth&quot; &lt; 6 weeks
@code: Client's age is less than 6 weeks-41
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Client's age is less than 6 weeks&quot;:
  </a:s>
               <a:s r="256">
                  <a:s r="258">
                     <a:s r="257">
                        <a:s>Elements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="258">
                        <a:s>&quot;Current Patient Age In Weeks&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="259"> &lt; 6</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="256" locator="48:3-48:45" xsi:type="Less">
            <signature localId="260" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="261" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="258" locator="48:3-48:41" name="Current Patient Age In Weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
            <operand localId="259" locator="48:45" valueType="t:Integer" value="6" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="264" locator="56:1-57:61" name="No rotavirus primary series doses were administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No rotavirus primary series doses were administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0"/>
            <a:t name="code" value="No rotavirus primary series doses were administered-118"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="264">
               <a:s>/*
@input: No rotavirus primary series doses were administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0
@code: No rotavirus primary series doses were administered-118
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;No rotavirus primary series doses were administered&quot;:
  </a:s>
               <a:s r="265">
                  <a:s r="266">
                     <a:s>&quot;Number of Rotavirus Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="267"> = 0</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="265" locator="57:3-57:61" xsi:type="Equal">
            <signature localId="268" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="269" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="266" locator="57:3-57:57" name="Number of Rotavirus Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="267" locator="57:61" valueType="t:Integer" value="0" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="272" locator="65:1-67:51" name="Client's age is between 6 weeks and 24 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is between 6 weeks and 24 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 24 months"/>
            <a:t name="code" value="Client's age is between 6 weeks and 24 months-52"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="272">
               <a:s>/*
@input: Client's age is between 6 weeks and 24 months
@pseudocode: 6 weeks ≤ Today's date – &quot;Date of birth&quot; &lt; 24 months
@code: Client's age is between 6 weeks and 24 months-52
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Client's age is between 6 weeks and 24 months&quot;:
  </a:s>
               <a:s r="273">
                  <a:s r="274">
                     <a:s r="275">6 &lt;= </a:s>
                     <a:s r="277">
                        <a:s r="276">
                           <a:s>Elements</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="277">
                           <a:s>&quot;Current Patient Age In Weeks&quot;</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  and </a:s>
                  <a:s r="280">
                     <a:s r="282">
                        <a:s r="281">
                           <a:s>Elements</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="282">
                           <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s r="283"> &lt; 24</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="273" locator="66:3-67:51" xsi:type="And">
            <operand localId="274" locator="66:3-66:46" xsi:type="LessOrEqual">
               <signature localId="278" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <signature localId="279" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <operand localId="275" locator="66:3" valueType="t:Integer" value="6" xsi:type="Literal"/>
               <operand localId="277" locator="66:8-66:46" name="Current Patient Age In Weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
            </operand>
            <operand localId="280" locator="67:7-67:51" xsi:type="Less">
               <signature localId="284" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <signature localId="285" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <operand localId="282" locator="67:7-67:46" name="Current Patient Age In Months" libraryName="Elements" xsi:type="ExpressionRef"/>
               <operand localId="283" locator="67:50-67:51" valueType="t:Integer" value="24" xsi:type="Literal"/>
            </operand>
         </expression>
      </def>
      <def localId="288" locator="75:1-76:65" 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.Rotavirus"/>
            <a:s r="288">
               <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.Rotavirus
*/
define &quot;No live vaccine was administered in the last 4 weeks&quot;:
  </a:s>
               <a:s r="290">
                  <a:s r="289">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="290">
                     <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="290" locator="76:3-76:65" name="No live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="293" locator="84:1-85:62" 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.Rotavirus"/>
            <a:s r="293">
               <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.Rotavirus
*/
define &quot;Live vaccine was administered in the last 4 weeks&quot;:
  </a:s>
               <a:s r="295">
                  <a:s r="294">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="295">
                     <a:s>&quot;Live vaccine was administered in the last 4 weeks&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="295" locator="85:3-85:62" name="Live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="298" locator="93:1-94:61" name="One rotavirus primary series dose was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="One rotavirus primary series dose was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1"/>
            <a:t name="code" value="One rotavirus primary series dose was administered-118"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="298">
               <a:s>/*
@input: One rotavirus primary series dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1
@code: One rotavirus primary series dose was administered-118
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;One rotavirus primary series dose was administered&quot;:
  </a:s>
               <a:s r="299">
                  <a:s r="300">
                     <a:s>&quot;Number of Rotavirus Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="301"> = 1</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="299" locator="94:3-94:61" xsi:type="Equal">
            <signature localId="302" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="303" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="300" locator="94:3-94:57" name="Number of Rotavirus Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="301" locator="94:61" valueType="t:Integer" value="1" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="306" locator="102:1-103:61" name="Two rotavirus primary series doses were administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Two rotavirus primary series doses were administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2"/>
            <a:t name="code" value="Two rotavirus primary series doses were administered-118"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="306">
               <a:s>/*
@input: Two rotavirus primary series doses were administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2
@code: Two rotavirus primary series doses were administered-118
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Two rotavirus primary series doses were administered&quot;:
  </a:s>
               <a:s r="307">
                  <a:s r="308">
                     <a:s>&quot;Number of Rotavirus Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="309"> = 2</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="307" locator="103:3-103:61" xsi:type="Equal">
            <signature localId="310" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="311" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="308" locator="103:3-103:57" name="Number of Rotavirus Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="309" locator="103:61" valueType="t:Integer" value="2" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="322" locator="196:1-197:71" name="Brand of First Dose" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Brand of First Dose"/>
            <a:s r="322">
               <a:s>/*
@internal: Brand of First Dose
*/
define &quot;Brand of First Dose&quot;:
  </a:s>
               <a:s r="333">
                  <a:s r="332">
                     <a:s>First(</a:s>
                     <a:s r="326">
                        <a:s r="323">
                           <a:s>&quot;Rotavirus Doses Administered to Patient&quot;</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="326">
                           <a:s>getDose(</a:s>
                           <a:s r="324">
                              <a:s>'1'</a:s>
                           </a:s>
                           <a:s>)</a:s>
                        </a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="333">
                     <a:s>brand()</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="333" locator="197:3-197:71" name="brand" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="332" locator="197:3-197:63" xsi:type="First">
               <source localId="326" locator="197:9-197:62" name="getDose" libraryName="Common" xsi:type="FunctionRef">
                  <signature localId="327" xsi:type="ListTypeSpecifier">
                     <elementType localId="328" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                  </signature>
                  <signature localId="329" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="323" locator="197:9-197:49" name="Rotavirus Doses Administered to Patient" xsi:type="ExpressionRef"/>
                  <operand localId="324" locator="197:59-197:61" valueType="t:String" value="1" xsi:type="Literal"/>
               </source>
            </operand>
         </expression>
      </def>
      <def localId="341" locator="202:1-203:71" name="Brand of Second Dose" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Brand of Second Dose"/>
            <a:s r="341">
               <a:s>/*
@internal: Brand of Second Dose
*/
define &quot;Brand of Second Dose&quot;:
  </a:s>
               <a:s r="352">
                  <a:s r="351">
                     <a:s>First(</a:s>
                     <a:s r="345">
                        <a:s r="342">
                           <a:s>&quot;Rotavirus Doses Administered to Patient&quot;</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="345">
                           <a:s>getDose(</a:s>
                           <a:s r="343">
                              <a:s>'2'</a:s>
                           </a:s>
                           <a:s>)</a:s>
                        </a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="352">
                     <a:s>brand()</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="352" locator="203:3-203:71" name="brand" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="351" locator="203:3-203:63" xsi:type="First">
               <source localId="345" locator="203:9-203:62" name="getDose" libraryName="Common" xsi:type="FunctionRef">
                  <signature localId="346" xsi:type="ListTypeSpecifier">
                     <elementType localId="347" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                  </signature>
                  <signature localId="348" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="342" locator="203:9-203:49" name="Rotavirus Doses Administered to Patient" xsi:type="ExpressionRef"/>
                  <operand localId="343" locator="203:59-203:61" valueType="t:String" value="2" xsi:type="Literal"/>
               </source>
            </operand>
         </expression>
      </def>
      <def localId="318" locator="138:1-140:48" name="The series administered to the client contains the same product" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="The series administered to the client contains the same product"/>
            <a:t name="pseudocode" value="&quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 1) = &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 2)"/>
            <a:t name="code" value="The series administered to the client contains the same product-169"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="318">
               <a:s>/*
@input: The series administered to the client contains the same product
@pseudocode: &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 1) = &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 2)
@code: The series administered to the client contains the same product-169
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;The series administered to the client contains the same product&quot;:
  </a:s>
               <a:s r="319">
                  <a:s r="336">
                     <a:s r="334">
                        <a:s>&quot;Brand of First Dose&quot;</a:s>
                     </a:s>
                     <a:s> is not null</a:s>
                  </a:s>
                  <a:s> and
  </a:s>
                  <a:s r="337">
                     <a:s r="338">
                        <a:s>&quot;Brand of First Dose&quot;</a:s>
                     </a:s>
                     <a:s> ~ </a:s>
                     <a:s r="353">
                        <a:s>&quot;Brand of Second Dose&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="319" locator="139:3-140:48" xsi:type="And">
            <operand localId="336" locator="139:3-139:35" xsi:type="Not">
               <operand localId="335" locator="139:3-139:35" xsi:type="IsNull">
                  <operand localId="334" locator="139:3-139:23" name="Brand of First Dose" xsi:type="ExpressionRef"/>
               </operand>
            </operand>
            <operand localId="337" locator="140:3-140:48" xsi:type="Equivalent">
               <signature localId="354" name="fhir:CodeableConcept" xsi:type="NamedTypeSpecifier"/>
               <signature localId="355" name="fhir:CodeableConcept" xsi:type="NamedTypeSpecifier"/>
               <operand localId="338" locator="140:3-140:23" name="Brand of First Dose" xsi:type="ExpressionRef"/>
               <operand localId="353" locator="140:27-140:48" name="Brand of Second Dose" xsi:type="ExpressionRef"/>
            </operand>
         </expression>
      </def>
      <def localId="314" locator="111:1-112:71" name="The series administered to the client is a mixed series or a series with unknown vaccine products" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="The series administered to the client is a mixed series or a series with unknown vaccine products"/>
            <a:t name="pseudocode" value="&quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 1) ≠ &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 2)"/>
            <a:t name="code" value="The series administered to the client is a mixed series or a series with unknown vaccine products-169"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="314">
               <a:s>/*
@input: The series administered to the client is a mixed series or a series with unknown vaccine products
@pseudocode: &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 1) ≠ &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 2)
@code: The series administered to the client is a mixed series or a series with unknown vaccine products-169
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;The series administered to the client is a mixed series or a series with unknown vaccine products&quot;:
  </a:s>
               <a:s r="315">
                  <a:s>not </a:s>
                  <a:s r="356">
                     <a:s>&quot;The series administered to the client contains the same product&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="315" locator="112:3-112:71" xsi:type="Not">
            <operand localId="356" locator="112:7-112:71" name="The series administered to the client contains the same product" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="359" locator="120:1-121:62" name="Live vaccines was administered in the last 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Live vaccines 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 vaccines was administered in the last 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="359">
               <a:s>/*
@input: Live vaccines 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 vaccines was administered in the last 4 weeks-92
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Live vaccines was administered in the last 4 weeks&quot;:
  </a:s>
               <a:s r="361">
                  <a:s r="360">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="361">
                     <a:s>&quot;Live vaccine was administered in the last 4 weeks&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="361" locator="121:3-121:62" name="Live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="364" locator="129:1-130:65" name="No live vaccine was administered in last 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No live vaccine was administered in 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 last 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="364">
               <a:s>/*
@input: No live vaccine was administered in 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 last 4 weeks-92
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;No live vaccine was administered in last 4 weeks&quot;:
  </a:s>
               <a:s r="366">
                  <a:s r="365">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="366">
                     <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="366" locator="130:3-130:65" name="No live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="369" locator="148:1-149:85" name="The series contain more than two doses" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="The series contain more than two doses"/>
            <a:t name="pseudocode" value="&quot;Total doses in series&quot; > 2"/>
            <a:t name="code" value="The series contain more than two doses-27"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="369">
               <a:s>/*
@input: The series contain more than two doses
@pseudocode: &quot;Total doses in series&quot; > 2
@code: The series contain more than two doses-27
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;The series contain more than two doses&quot;:
  </a:s>
               <a:s r="370">
                  <a:s r="382">
                     <a:s>ToInteger(</a:s>
                     <a:s r="375">
                        <a:s r="372">
                           <a:s r="371">
                              <a:s>&quot;Rotavirus Doses Administered to Patient&quot;</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="372">
                              <a:s>mostRecent()</a:s>
                           </a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="375">
                           <a:s>seriesDoses()</a:s>
                        </a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
                  <a:s r="387"> > 2</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="370" locator="149:3-149:85" xsi:type="Greater">
            <signature localId="388" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="389" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="382" locator="149:3-149:81" xsi:type="ToInteger">
               <signature localId="386" name="t:String" xsi:type="NamedTypeSpecifier"/>
               <operand localId="384" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                  <signature localId="385" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="383" asType="fhir:string" xsi:type="As">
                     <operand localId="375" locator="149:13-149:80" name="seriesDoses" libraryName="Common" xsi:type="FunctionRef">
                        <operand localId="372" locator="149:13-149:66" name="mostRecent" libraryName="WC" xsi:type="FunctionRef">
                           <signature localId="373" xsi:type="ListTypeSpecifier">
                              <elementType localId="374" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                           </signature>
                           <operand localId="371" locator="149:13-149:53" name="Rotavirus Doses Administered to Patient" xsi:type="ExpressionRef"/>
                        </operand>
                     </operand>
                  </operand>
               </operand>
            </operand>
            <operand localId="387" locator="149:85" valueType="t:Integer" value="2" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="392" locator="157:1-158:62" name="Live vaccine was administered in last 4 weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Live vaccine was administered in 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 last 4 weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="392">
               <a:s>/*
@input: Live vaccine was administered in 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 last 4 weeks-92
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Live vaccine was administered in last 4 weeks&quot;:
  </a:s>
               <a:s r="394">
                  <a:s r="393">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="394">
                     <a:s>&quot;Live vaccine was administered in the last 4 weeks&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="394" locator="158:3-158:62" name="Live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="397" locator="166:1-167:86" name="The series contain less than or equal to two doses" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="The series contain less than or equal to two doses"/>
            <a:t name="pseudocode" value="&quot;Total doses in series&quot; ≤ 2"/>
            <a:t name="code" value="The series contain less than or equal to two doses-27"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="397">
               <a:s>/*
@input: The series contain less than or equal to two doses
@pseudocode: &quot;Total doses in series&quot; ≤ 2
@code: The series contain less than or equal to two doses-27
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;The series contain less than or equal to two doses&quot;:
  </a:s>
               <a:s r="398">
                  <a:s r="410">
                     <a:s>ToInteger(</a:s>
                     <a:s r="403">
                        <a:s r="400">
                           <a:s r="399">
                              <a:s>&quot;Rotavirus Doses Administered to Patient&quot;</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="400">
                              <a:s>mostRecent()</a:s>
                           </a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="403">
                           <a:s>seriesDoses()</a:s>
                        </a:s>
                     </a:s>
                     <a:s>)</a:s>
                  </a:s>
                  <a:s r="415"> &lt;= 2</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="398" locator="167:3-167:86" xsi:type="LessOrEqual">
            <signature localId="416" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="417" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="410" locator="167:3-167:81" xsi:type="ToInteger">
               <signature localId="414" name="t:String" xsi:type="NamedTypeSpecifier"/>
               <operand localId="412" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                  <signature localId="413" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="411" asType="fhir:string" xsi:type="As">
                     <operand localId="403" locator="167:13-167:80" name="seriesDoses" libraryName="Common" xsi:type="FunctionRef">
                        <operand localId="400" locator="167:13-167:66" name="mostRecent" libraryName="WC" xsi:type="FunctionRef">
                           <signature localId="401" xsi:type="ListTypeSpecifier">
                              <elementType localId="402" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                           </signature>
                           <operand localId="399" locator="167:13-167:53" name="Rotavirus Doses Administered to Patient" xsi:type="ExpressionRef"/>
                        </operand>
                     </operand>
                  </operand>
               </operand>
            </operand>
            <operand localId="415" locator="167:86" valueType="t:Integer" value="2" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="420" locator="175:1-176:61" name="Three rotavirus primary series doses were administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Three rotavirus primary series doses were administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 3"/>
            <a:t name="code" value="Three rotavirus primary series doses were administered-118"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="420">
               <a:s>/*
@input: Three rotavirus primary series doses were administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 3
@code: Three rotavirus primary series doses were administered-118
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Three rotavirus primary series doses were administered&quot;:
  </a:s>
               <a:s r="421">
                  <a:s r="422">
                     <a:s>&quot;Number of Rotavirus Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="423"> = 3</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="421" locator="176:3-176:61" xsi:type="Equal">
            <signature localId="424" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="425" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="422" locator="176:3-176:57" name="Number of Rotavirus Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="423" locator="176:61" valueType="t:Integer" value="3" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="428" locator="184:1-185:48" name="Client's age is more than 24 months" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is more than 24 months"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; > 24 months"/>
            <a:t name="code" value="Client's age is more than 24 months-27"/>
            <a:t name="decision" value="IMMZ.D2.DT.Rotavirus"/>
            <a:s r="428">
               <a:s>/*
@input: Client's age is more than 24 months
@pseudocode: &quot;Date of birth&quot; > 24 months
@code: Client's age is more than 24 months-27
@decision: IMMZ.D2.DT.Rotavirus
*/
define &quot;Client's age is more than 24 months&quot;:
  </a:s>
               <a:s r="429">
                  <a:s r="431">
                     <a:s r="430">
                        <a:s>Elements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="431">
                        <a:s>&quot;Current Patient Age In Months&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="432"> >= 24</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="429" locator="185:3-185:48" xsi:type="GreaterOrEqual">
            <signature localId="433" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="434" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="431" locator="185:3-185:42" name="Current Patient Age In Months" libraryName="Elements" xsi:type="ExpressionRef"/>
            <operand localId="432" locator="185:47-185:48" valueType="t:Integer" value="24" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="437" locator="190:1-191:99" name="Date of Latest Rotavirus Dose" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Date of Latest Rotavirus Dose"/>
            <a:s r="437">
               <a:s>/*
@internal: Date of Latest Rotavirus Dose
*/
define &quot;Date of Latest Rotavirus Dose&quot;:
  </a:s>
               <a:s r="438">
                  <a:s>date from </a:s>
                  <a:s r="439">
                     <a:s>start of </a:s>
                     <a:s r="445">
                        <a:s r="444">
                           <a:s r="441">
                              <a:s r="440">
                                 <a:s>&quot;Rotavirus Doses Administered to Patient&quot;</a:s>
                              </a:s>
                              <a:s>.</a:s>
                              <a:s r="441">
                                 <a:s>mostRecent()</a:s>
                              </a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="444">
                              <a:s>occurrence</a:s>
                           </a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="445">
                           <a:s>toInterval()</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="438" locator="191:3-191:99" xsi:type="DateFrom">
            <operand localId="439" locator="191:13-191:99" xsi:type="Start">
               <operand localId="445" locator="191:22-191:99" name="toInterval" libraryName="WC" xsi:type="FunctionRef">
                  <operand localId="444" locator="191:22-191:86" path="occurrence" xsi:type="Property">
                     <source localId="441" locator="191:22-191:75" name="mostRecent" libraryName="WC" xsi:type="FunctionRef">
                        <signature localId="442" xsi:type="ListTypeSpecifier">
                           <elementType localId="443" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/>
                        </signature>
                        <operand localId="440" locator="191:22-191:62" name="Rotavirus Doses Administered to Patient" xsi:type="ExpressionRef"/>
                     </source>
                  </operand>
               </operand>
            </operand>
         </expression>
      </def>
   </statements>
</library>
