<?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="367">
         <a:s>/*
  * Library: IMMZD2DTBCGElements
  */
library IMMZD2DTBCGElements</a:s>
      </a:s>
   </annotation>
   <identifier id="IMMZD2DTBCGElements" 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="18:1-18:15" name="Patient"/>
   </contexts>
   <statements>
      <def localId="223" locator="18:1-18:15" name="Patient" context="Patient">
         <expression localId="224" xsi:type="SingletonFrom">
            <operand localId="222" locator="18:1-18:15" dataType="fhir:Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def localId="228" locator="23:1-26:44" name="BCG Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="BCG containing Doses Administered to Patient"/>
            <a:s r="228">
               <a:s>/*
@internal: BCG containing Doses Administered to Patient
*/
define &quot;BCG 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;BCG vaccines&quot;</a:s>
                           </a:s>
                        </a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="240" locator="24:3-26:44" xsi:type="Query">
            <source localId="229" locator="24:3-24:44" alias="I">
               <expression localId="231" locator="24:3-24:42" name="Doses Administered to Patient" libraryName="Elements" xsi:type="ExpressionRef"/>
            </source>
            <where localId="237" locator="25:3-26:44" 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="26:5-26:17" path="vaccineCode" scope="I" xsi:type="Property"/>
               </code>
               <valueset localId="236" locator="26:22-26:44" name="BCG vaccines" libraryName="Concepts" preserve="true"/>
            </where>
         </expression>
      </def>
      <def localId="243" locator="31:1-32:53" name="BCG Primary Series Doses Administered to Patient" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="BCG containing Doses Administered to Patient that are in the Primary series"/>
            <a:s r="243">
               <a:s>/*
@internal: BCG containing Doses Administered to Patient that are in the Primary series
*/
define &quot;BCG Primary Series Doses Administered to Patient&quot;:
  </a:s>
               <a:s r="245">
                  <a:s r="244">
                     <a:s>&quot;BCG 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="32:3-32:53" name="seriesPrimary" libraryName="Common" xsi:type="FunctionRef">
            <operand localId="244" locator="32:3-32:37" name="BCG Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="248" locator="37:1-38:59" name="Number of BCG Primary Series Doses Administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="internal" value="Number of BCG Primary Series doses"/>
            <a:s r="248">
               <a:s>/*
@internal: Number of BCG Primary Series doses
*/
define &quot;Number of BCG Primary Series Doses Administered&quot;:
  </a:s>
               <a:s r="252">
                  <a:s>Count(</a:s>
                  <a:s r="249">
                     <a:s>&quot;BCG Primary Series Doses Administered to Patient&quot;</a:s>
                  </a:s>
                  <a:s>)</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="252" locator="38:3-38:59" xsi:type="Count">
            <source localId="249" locator="38:9-38:58" name="BCG Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="255" locator="46:1-47:55" name="No BCG primary series dose was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No BCG primary series dose was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;BCG vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0"/>
            <a:t name="code" value="No BCG primary series dose was administered-112"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="255">
               <a:s>/*
@input: No BCG primary series dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;BCG vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0
@code: No BCG primary series dose was administered-112
@decision: IMMZ.D2.DT.BCG
*/
define &quot;No BCG primary series dose was administered&quot;:
  </a:s>
               <a:s r="256">
                  <a:s r="257">
                     <a:s>&quot;Number of BCG Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="258"> = 0</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="256" locator="47:3-47:55" xsi:type="Equal">
            <signature localId="259" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="260" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="257" locator="47:3-47:51" name="Number of BCG Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="258" locator="47:55" valueType="t:Integer" value="0" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="263" locator="55:1-56:46" name="Client's age is less than or equal to 28 days" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is less than or equal to 28 days"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; ≤ 28 days"/>
            <a:t name="code" value="Client's age is less than or equal to 28 days-40"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="263">
               <a:s>/*
@input: Client's age is less than or equal to 28 days
@pseudocode: Today's date − &quot;Date of birth&quot; ≤ 28 days
@code: Client's age is less than or equal to 28 days-40
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's age is less than or equal to 28 days&quot;:
  </a:s>
               <a:s r="264">
                  <a:s r="266">
                     <a:s r="265">
                        <a:s>Elements</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="266">
                        <a:s>&quot;Current Patient Age In Days&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="267"> &lt;= 28</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="264" locator="56:3-56:46" xsi:type="LessOrEqual">
            <signature localId="268" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="269" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="266" locator="56:3-56:40" name="Current Patient Age In Days" libraryName="Elements" xsi:type="ExpressionRef"/>
            <operand localId="267" locator="56:45-56:46" valueType="t:Integer" value="28" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="272" locator="64:1-65:55" name="Client's HIV status is negative or unknown" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's HIV status is negative or unknown"/>
            <a:t name="pseudocode" value="&quot;HIV status&quot; ≠ &quot;HIV-positive&quot;"/>
            <a:t name="code" value="Client's HIV status is negative or unknown-29"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="272">
               <a:s>/*
@input: Client's HIV status is negative or unknown
@pseudocode: &quot;HIV status&quot; ≠ &quot;HIV-positive&quot;
@code: Client's HIV status is negative or unknown-29
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's HIV status is negative or unknown&quot;:
  </a:s>
               <a:s r="274">
                  <a:s r="273">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="274">
                     <a:s>&quot;Client's HIV status is negative or unknown&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="274" locator="65:3-65:55" name="Client's HIV status is negative or unknown" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="277" locator="73:1-74:45" name="No live vaccine was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No live vaccine was administered"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) IS NULL"/>
            <a:t name="code" value="No live vaccine was administered-90"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="277">
               <a:s>/*
@input: No live vaccine was administered
@pseudocode: Today's date − latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) IS NULL
@code: No live vaccine was administered-90
@decision: IMMZ.D2.DT.BCG
*/
define &quot;No live vaccine was administered&quot;:
  </a:s>
               <a:s r="279">
                  <a:s r="278">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="279">
                     <a:s>&quot;No live vaccine was administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="279" locator="74:3-74:45" name="No live vaccine was administered" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="282" locator="82:1-83:62" name="Live vaccine was administered in the last four weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Live vaccine was administered in the last four 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 four weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="282">
               <a:s>/*
@input: Live vaccine was administered in the last four 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 four weeks-92
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Live vaccine was administered in the last four weeks&quot;:
  </a:s>
               <a:s r="284">
                  <a:s r="283">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="284">
                     <a:s>&quot;Live vaccine was administered in the last 4 weeks&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="284" locator="83:3-83:62" name="Live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="287" locator="91:1-92:44" name="Client's HIV status is positive" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's HIV status is positive"/>
            <a:t name="pseudocode" value="&quot;HIV status&quot; = &quot;HIV-positive&quot;"/>
            <a:t name="code" value="Client's HIV status is positive-29"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="287">
               <a:s>/*
@input: Client's HIV status is positive
@pseudocode: &quot;HIV status&quot; = &quot;HIV-positive&quot;
@code: Client's HIV status is positive-29
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's HIV status is positive&quot;:
  </a:s>
               <a:s r="289">
                  <a:s r="288">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="289">
                     <a:s>&quot;Client's HIV status is positive&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="289" locator="92:3-92:44" name="Client's HIV status is positive" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="292" locator="100:1-101:65" name="Client is currently receiving antiretroviral therapy" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client is currently receiving antiretroviral therapy"/>
            <a:t name="pseudocode" value="&quot;Currently on ART&quot; = TRUE"/>
            <a:t name="code" value="Client is currently receiving antiretroviral therapy-25"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="292">
               <a:s>/*
@input: Client is currently receiving antiretroviral therapy
@pseudocode: &quot;Currently on ART&quot; = TRUE
@code: Client is currently receiving antiretroviral therapy-25
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client is currently receiving antiretroviral therapy&quot;:
  </a:s>
               <a:s r="294">
                  <a:s r="293">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="294">
                     <a:s>&quot;Client is currently receiving antiretroviral therapy&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="294" locator="101:3-101:65" name="Client is currently receiving antiretroviral therapy" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="297" locator="109:1-110:45" name="Client is immunologically stable" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client is immunologically stable"/>
            <a:t name="pseudocode" value="&quot;Immunologically stable&quot; = TRUE"/>
            <a:t name="code" value="Client is immunologically stable-31"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="297">
               <a:s>/*
@input: Client is immunologically stable
@pseudocode: &quot;Immunologically stable&quot; = TRUE
@code: Client is immunologically stable-31
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client is immunologically stable&quot;:
  </a:s>
               <a:s r="299">
                  <a:s r="298">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="299">
                     <a:s>&quot;Client is immunologically stable&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="299" locator="110:3-110:45" name="Client is immunologically stable" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="302" locator="118:1-119:49" name="Client is not immunologically stable" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client is not immunologically stable"/>
            <a:t name="pseudocode" value="&quot;Immunologically stable&quot; = FALSE"/>
            <a:t name="code" value="Client is not immunologically stable-32"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="302">
               <a:s>/*
@input: Client is not immunologically stable
@pseudocode: &quot;Immunologically stable&quot; = FALSE
@code: Client is not immunologically stable-32
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client is not immunologically stable&quot;:
  </a:s>
               <a:s r="304">
                  <a:s r="303">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="304">
                     <a:s>&quot;Client is not immunologically stable&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="304" locator="119:3-119:49" name="Client is not immunologically stable" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="307" locator="127:1-128:69" name="Client is currently not receiving antiretroviral therapy" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client is currently not receiving antiretroviral therapy"/>
            <a:t name="pseudocode" value="&quot;Currently on ART&quot; = FALSE"/>
            <a:t name="code" value="Client is currently not receiving antiretroviral therapy-26"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="307">
               <a:s>/*
@input: Client is currently not receiving antiretroviral therapy
@pseudocode: &quot;Currently on ART&quot; = FALSE
@code: Client is currently not receiving antiretroviral therapy-26
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client is currently not receiving antiretroviral therapy&quot;:
  </a:s>
               <a:s r="309">
                  <a:s r="308">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="309">
                     <a:s>&quot;Client is currently not receiving antiretroviral therapy&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="309" locator="128:3-128:69" name="Client is currently not receiving antiretroviral therapy" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="312" locator="136:1-138:49" name="Client's age is between 28 days and 5 years" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is between 28 days and 5 years"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; &lt; 5 years"/>
            <a:t name="code" value="Client's age is between 28 days and 5 years-50"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="312">
               <a:s>/*
@input: Client's age is between 28 days and 5 years
@pseudocode: 28 days &lt; Today's date − &quot;Date of birth&quot; &lt; 5 years
@code: Client's age is between 28 days and 5 years-50
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's age is between 28 days and 5 years&quot;:
  </a:s>
               <a:s r="313">
                  <a:s r="314">
                     <a:s r="315">28 &lt; </a:s>
                     <a:s r="317">
                        <a:s r="316">
                           <a:s>Elements</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="317">
                           <a:s>&quot;Current Patient Age In Days&quot;</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  and </a:s>
                  <a:s r="320">
                     <a:s r="322">
                        <a:s r="321">
                           <a:s>Elements</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="322">
                           <a:s>&quot;Current Patient Age In Years&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s r="323"> &lt; 5</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="313" locator="137:3-138:49" xsi:type="And">
            <operand localId="314" locator="137:3-137:45" xsi:type="Less">
               <signature localId="318" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <signature localId="319" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <operand localId="315" locator="137:3-137:4" valueType="t:Integer" value="28" xsi:type="Literal"/>
               <operand localId="317" locator="137:8-137:45" name="Current Patient Age In Days" libraryName="Elements" xsi:type="ExpressionRef"/>
            </operand>
            <operand localId="320" locator="138:7-138:49" xsi:type="Less">
               <signature localId="324" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <signature localId="325" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
               <operand localId="322" locator="138:7-138:45" name="Current Patient Age In Years" libraryName="Elements" xsi:type="ExpressionRef"/>
               <operand localId="323" locator="138:49" valueType="t:Integer" value="5" xsi:type="Literal"/>
            </operand>
         </expression>
      </def>
      <def localId="328" locator="146:1-147:58" name="Client's TB infection test result is negative" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's TB infection test result is negative"/>
            <a:t name="pseudocode" value="&quot;TB infection test result&quot; = &quot;Negative&quot;"/>
            <a:t name="code" value="Client's TB infection test result is negative-39"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="328">
               <a:s>/*
@input: Client's TB infection test result is negative
@pseudocode: &quot;TB infection test result&quot; = &quot;Negative&quot;
@code: Client's TB infection test result is negative-39
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's TB infection test result is negative&quot;:
  </a:s>
               <a:s r="330">
                  <a:s r="329">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="330">
                     <a:s>&quot;Client's TB infection test result is negative&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="330" locator="147:3-147:58" name="Client's TB infection test result is negative" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="333" locator="155:1-156:65" name="No live vaccine was administered in the last four weeks" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="No live vaccine was administered in the last four 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 four weeks-92"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="333">
               <a:s>/*
@input: No live vaccine was administered in the last four 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 four weeks-92
@decision: IMMZ.D2.DT.BCG
*/
define &quot;No live vaccine was administered in the last four weeks&quot;:
  </a:s>
               <a:s r="335">
                  <a:s r="334">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="335">
                     <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="335" locator="156:3-156:65" name="No live vaccine was administered in the last 4 weeks" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="338" locator="164:1-165:90" name="Client's TB infection test result is unknown (test not done or no result yet)" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's TB infection test result is unknown (test not done or no result yet)"/>
            <a:t name="pseudocode" value="&quot;TB infection test result&quot; IS NULL"/>
            <a:t name="code" value="Client's TB infection test result is unknown (test not done or no result yet)-34"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="338">
               <a:s>/*
@input: Client's TB infection test result is unknown (test not done or no result yet)
@pseudocode: &quot;TB infection test result&quot; IS NULL
@code: Client's TB infection test result is unknown (test not done or no result yet)-34
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's TB infection test result is unknown (test not done or no result yet)&quot;:
  </a:s>
               <a:s r="340">
                  <a:s r="339">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="340">
                     <a:s>&quot;Client's TB infection test result is unknown (test not done or no result yet)&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="340" locator="165:3-165:90" name="Client's TB infection test result is unknown (test not done or no result yet)" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="343" locator="173:1-174:58" name="Client's TB infection test result is positive" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's TB infection test result is positive"/>
            <a:t name="pseudocode" value="&quot;TB infection test result&quot; = &quot;Positive&quot;"/>
            <a:t name="code" value="Client's TB infection test result is positive-39"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="343">
               <a:s>/*
@input: Client's TB infection test result is positive
@pseudocode: &quot;TB infection test result&quot; = &quot;Positive&quot;
@code: Client's TB infection test result is positive-39
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's TB infection test result is positive&quot;:
  </a:s>
               <a:s r="345">
                  <a:s r="344">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="345">
                     <a:s>&quot;Client's TB infection test result is positive&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="345" locator="174:3-174:58" name="Client's TB infection test result is positive" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="348" locator="182:1-183:42" name="Client is not clinically well" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client is not clinically well"/>
            <a:t name="pseudocode" value="&quot;Clinically well&quot; = FALSE"/>
            <a:t name="code" value="Client is not clinically well-25"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="348">
               <a:s>/*
@input: Client is not clinically well
@pseudocode: &quot;Clinically well&quot; = FALSE
@code: Client is not clinically well-25
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client is not clinically well&quot;:
  </a:s>
               <a:s r="350">
                  <a:s r="349">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="350">
                     <a:s>&quot;Client is not clinically well&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="350" locator="183:3-183:42" name="Client is not clinically well" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="353" locator="191:1-192:38" name="Client is clinically well" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client is clinically well"/>
            <a:t name="pseudocode" value="&quot;Clinically well&quot; = TRUE"/>
            <a:t name="code" value="Client is clinically well-24"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="353">
               <a:s>/*
@input: Client is clinically well
@pseudocode: &quot;Clinically well&quot; = TRUE
@code: Client is clinically well-24
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client is clinically well&quot;:
  </a:s>
               <a:s r="355">
                  <a:s r="354">
                     <a:s>Elements</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="355">
                     <a:s>&quot;Client is clinically well&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="355" locator="192:3-192:38" name="Client is clinically well" libraryName="Elements" xsi:type="ExpressionRef"/>
      </def>
      <def localId="358" locator="200:1-201:46" name="Client's age is more than 5 years" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="Client's age is more than 5 years"/>
            <a:t name="pseudocode" value="&quot;Date of birth&quot; ≥ 5 years"/>
            <a:t name="code" value="Client's age is more than 5 years-40"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="358">
               <a:s>/*
@input: Client's age is more than 5 years
@pseudocode: Today's date − &quot;Date of birth&quot; ≥ 5 years
@code: Client's age is more than 5 years-40
@decision: IMMZ.D2.DT.BCG
*/
define &quot;Client's age is more than 5 years&quot;:
  </a:s>
               <a:s r="359">
                  <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;Current Patient Age In Years&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="362"> >= 5</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="359" locator="201:3-201:46" xsi:type="GreaterOrEqual">
            <signature localId="363" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="364" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="361" locator="201:3-201:41" name="Current Patient Age In Years" libraryName="Elements" xsi:type="ExpressionRef"/>
            <operand localId="362" locator="201:46" valueType="t:Integer" value="5" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="367" locator="209:1-210:55" name="One BCG primary series dose was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="input" value="One BCG primary series dose was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;BCG vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1"/>
            <a:t name="code" value="One BCG primary series dose was administered-112"/>
            <a:t name="decision" value="IMMZ.D2.DT.BCG"/>
            <a:s r="367">
               <a:s>/*
@input: One BCG primary series dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;BCG vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1
@code: One BCG primary series dose was administered-112
@decision: IMMZ.D2.DT.BCG
*/
define &quot;One BCG primary series dose was administered&quot;:
  </a:s>
               <a:s r="368">
                  <a:s r="369">
                     <a:s>&quot;Number of BCG Primary Series Doses Administered&quot;</a:s>
                  </a:s>
                  <a:s r="370"> = 1</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="368" locator="210:3-210:55" xsi:type="Equal">
            <signature localId="371" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <signature localId="372" name="t:Integer" xsi:type="NamedTypeSpecifier"/>
            <operand localId="369" locator="210:3-210:51" name="Number of BCG Primary Series Doses Administered" xsi:type="ExpressionRef"/>
            <operand localId="370" locator="210:55" valueType="t:Integer" value="1" xsi:type="Literal"/>
         </expression>
      </def>
   </statements>
</library>
