<?xml version="1.0" encoding="UTF-8"?><library xmlns="urn:hl7-org:elm:r1" xmlns:a="urn:hl7-org:cql-annotations:r1" xmlns:fhir="http://hl7.org/fhir" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" localId="0"><annotation signatureLevel="Overloads" translatorOptions="EnableAnnotations,EnableLocators,DisableListDemotion,DisableListPromotion" translatorVersion="4.9.0" xsi:type="a:CqlToElmInfo"/><annotation errorSeverity="warning" errorType="semantic" message="An operand identifier reference is hiding another identifier of the same name." xsi:type="a:CqlToElmError"/><annotation errorSeverity="warning" errorType="semantic" message="An operand identifier reference is hiding another identifier of the same name." xsi:type="a:CqlToElmError"/><annotation errorSeverity="warning" errorType="semantic" message="An operand identifier reference is hiding another identifier of the same name." xsi:type="a:CqlToElmError"/><annotation xsi:type="a:Annotation"><a:s r="372"><a:s>/*
  * Library: IMMZD2DTBCGEncounterElements
  */
library IMMZD2DTBCGEncounterElements</a:s></a:s></annotation><identifier id="IMMZD2DTBCGEncounterElements" 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" localIdentifier="FHIR" locator="7:1-7:26" 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" localIdentifier="FHIRHelpers" locator="8:1-8:35" 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" localIdentifier="WHOConcepts" locator="10:1-10:19" 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" localIdentifier="WC" locator="11:1-11:27" 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" localIdentifier="WE" locator="12:1-12:29" 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" localIdentifier="Common" locator="14:1-14:32" 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" localIdentifier="Concepts" locator="15:1-15:36" 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" localIdentifier="Encounter" locator="16:1-16:46" 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" localIdentifier="BCGElements" locator="18:1-18:46" path="http://smart.who.int/immunizations/IMMZD2DTBCGElements"><annotation xsi:type="a:Annotation"><a:s r="222"><a:s>include </a:s><a:s><a:s>IMMZD2DTBCGElements</a:s></a:s><a:s> called BCGElements</a:s></a:s></annotation></def></includes><parameters><def accessLevel="Public" localId="224" locator="20:1-20:36" name="Today"><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 accessLevel="Public" localId="230" locator="21:1-21:28" name="EncounterId"><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 context="Patient" localId="234" locator="23:1-23:15" name="Patient"><expression localId="235" xsi:type="SingletonFrom"><operand dataType="fhir:Patient" localId="233" locator="23:1-23:15" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/></expression></def><def accessLevel="Public" context="Patient" localId="239" locator="28:1-29:67" name="BCG Doses Administered to Patient"><annotation xsi:type="a:Annotation"><a:t name="internal" value="BCG containing Doses Administered to Patient"/><a:s r="239"><a:s>/*
@internal: BCG containing Doses Administered to Patient
*/
define "BCG Doses Administered to Patient":
  </a:s><a:s r="243"><a:s r="241"><a:s r="240"><a:s>BCGElements</a:s></a:s><a:s>.</a:s><a:s r="241"><a:s>"BCG Doses Administered to Patient"</a:s></a:s></a:s><a:s>.</a:s><a:s r="243"><a:s>onOrBefore(</a:s><a:s r="242"><a:s>Today</a:s></a:s><a:s>)</a:s></a:s></a:s></a:s></annotation><expression libraryName="Common" localId="243" locator="29:3-29:67" name="onOrBefore" xsi:type="FunctionRef"><operand libraryName="BCGElements" localId="241" locator="29:3-29:49" name="BCG Doses Administered to Patient" xsi:type="ExpressionRef"/><operand localId="242" locator="29:62-29:66" name="Today" xsi:type="ParameterRef"/></expression></def><def accessLevel="Public" context="Patient" localId="246" locator="34:1-35:82" name="BCG Primary Series Doses Administered to Patient"><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="246"><a:s>/*
@internal: BCG containing Doses Administered to Patient that are in the Primary series
*/
define "BCG Primary Series Doses Administered to Patient":
  </a:s><a:s r="250"><a:s r="248"><a:s r="247"><a:s>BCGElements</a:s></a:s><a:s>.</a:s><a:s r="248"><a:s>"BCG Primary Series Doses Administered to Patient"</a:s></a:s></a:s><a:s>.</a:s><a:s r="250"><a:s>onOrBefore(</a:s><a:s r="249"><a:s>Today</a:s></a:s><a:s>)</a:s></a:s></a:s></a:s></annotation><expression libraryName="Common" localId="250" locator="35:3-35:82" name="onOrBefore" xsi:type="FunctionRef"><operand libraryName="BCGElements" localId="248" locator="35:3-35:64" name="BCG Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/><operand localId="249" locator="35:77-35:81" name="Today" xsi:type="ParameterRef"/></expression></def><def accessLevel="Public" context="Patient" localId="253" locator="40:1-41:59" name="Number of BCG Primary Series Doses Administered"><annotation xsi:type="a:Annotation"><a:t name="internal" value="Number of BCG Primary Series doses"/><a:s r="253"><a:s>/*
@internal: Number of BCG Primary Series doses
*/
define "Number of BCG Primary Series Doses Administered":
  </a:s><a:s r="257"><a:s>Count(</a:s><a:s r="254"><a:s>"BCG Primary Series Doses Administered to Patient"</a:s></a:s><a:s>)</a:s></a:s></a:s></annotation><expression localId="257" locator="41:3-41:59" xsi:type="Count"><source localId="254" locator="41:9-41:58" name="BCG Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/></expression></def><def accessLevel="Public" context="Patient" localId="260" locator="49:1-50:55" name="No BCG primary series dose was administered"><annotation xsi:type="a:Annotation"><a:t name="input" value="No BCG primary series dose was administered"/><a:t name="pseudocode" value="&#34;Vaccine type&#34; = &#34;BCG vaccines&#34; and &#34;Type of dose&#34; = &#34;Primary series&#34;) = 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="260"><a:s>/*
@input: No BCG primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "BCG vaccines" and "Type of dose" = "Primary series") = 0
@code: No BCG primary series dose was administered-112
@decision: IMMZ.D2.DT.BCG
*/
define "No BCG primary series dose was administered":
  </a:s><a:s r="261"><a:s r="262"><a:s>"Number of BCG Primary Series Doses Administered"</a:s></a:s><a:s r="263"> = 0</a:s></a:s></a:s></annotation><expression localId="261" locator="50:3-50:55" xsi:type="Equal"><signature localId="264" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="265" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand localId="262" locator="50:3-50:51" name="Number of BCG Primary Series Doses Administered" xsi:type="ExpressionRef"/><operand localId="263" locator="50:55" value="0" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="268" locator="58:1-59:47" name="Client's age is less than or equal to 28 days"><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="&#34;Date of birth&#34; ≤ 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="268"><a:s>/*
@input: Client's age is less than or equal to 28 days
@pseudocode: Today's date − "Date of birth" ≤ 28 days
@code: Client's age is less than or equal to 28 days-40
@decision: IMMZ.D2.DT.BCG
*/
define "Client's age is less than or equal to 28 days":
  </a:s><a:s r="269"><a:s r="271"><a:s r="270"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="271"><a:s>"Current Patient Age In Days"</a:s></a:s></a:s><a:s r="272"> &lt;= 28</a:s></a:s></a:s></annotation><expression localId="269" locator="59:3-59:47" xsi:type="LessOrEqual"><signature localId="273" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="274" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Encounter" localId="271" locator="59:3-59:41" name="Current Patient Age In Days" xsi:type="ExpressionRef"/><operand localId="272" locator="59:46-59:47" value="28" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="277" locator="67:1-68:56" name="Client's HIV status is negative or unknown"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's HIV status is negative or unknown"/><a:t name="pseudocode" value="&#34;HIV status&#34; ≠ &#34;HIV-positive&#34;"/><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="277"><a:s>/*
@input: Client's HIV status is negative or unknown
@pseudocode: "HIV status" ≠ "HIV-positive"
@code: Client's HIV status is negative or unknown-29
@decision: IMMZ.D2.DT.BCG
*/
define "Client's HIV status is negative or unknown":
  </a:s><a:s r="279"><a:s r="278"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="279"><a:s>"Client's HIV status is negative or unknown"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="279" locator="68:3-68:56" name="Client's HIV status is negative or unknown" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="282" locator="76:1-77:46" name="No live vaccine was administered"><annotation xsi:type="a:Annotation"><a:t name="input" value="No live vaccine was administered"/><a:t name="pseudocode" value="&#34;Date and time of vaccination&#34; (where &#34;Live vaccine&#34; = 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="282"><a:s>/*
@input: No live vaccine was administered
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) IS NULL
@code: No live vaccine was administered-90
@decision: IMMZ.D2.DT.BCG
*/
define "No live vaccine was administered":
  </a:s><a:s r="284"><a:s r="283"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="284"><a:s>"No live vaccine was administered"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="284" locator="77:3-77:46" name="No live vaccine was administered" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="287" locator="85:1-86:63" name="Live vaccine was administered in the last four weeks"><annotation xsi:type="a:Annotation"><a:t name="input" value="Live vaccine was administered in the last four weeks"/><a:t name="pseudocode" value="&#34;Date and time of vaccination&#34; (where &#34;Live vaccine&#34; = 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="287"><a:s>/*
@input: Live vaccine was administered in the last four weeks
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) &lt; 4 weeks
@code: Live vaccine was administered in the last four weeks-92
@decision: IMMZ.D2.DT.BCG
*/
define "Live vaccine was administered in the last four weeks":
  </a:s><a:s r="289"><a:s r="288"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="289"><a:s>"Live vaccine was administered in the last 4 weeks"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="289" locator="86:3-86:63" name="Live vaccine was administered in the last 4 weeks" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="292" locator="94:1-95:45" name="Client's HIV status is positive"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's HIV status is positive"/><a:t name="pseudocode" value="&#34;HIV status&#34; = &#34;HIV-positive&#34;"/><a:t name="code" value="Client's HIV status is positive-29"/><a:t name="decision" value="IMMZ.D2.DT.BCG"/><a:s r="292"><a:s>/*
@input: Client's HIV status is positive
@pseudocode: "HIV status" = "HIV-positive"
@code: Client's HIV status is positive-29
@decision: IMMZ.D2.DT.BCG
*/
define "Client's HIV status is positive":
  </a:s><a:s r="294"><a:s r="293"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="294"><a:s>"Client's HIV status is positive"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="294" locator="95:3-95:45" name="Client's HIV status is positive" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="297" locator="103:1-104:66" name="Client is currently receiving antiretroviral therapy"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client is currently receiving antiretroviral therapy"/><a:t name="pseudocode" value="&#34;Currently on ART&#34; = 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="297"><a:s>/*
@input: Client is currently receiving antiretroviral therapy
@pseudocode: "Currently on ART" = TRUE
@code: Client is currently receiving antiretroviral therapy-25
@decision: IMMZ.D2.DT.BCG
*/
define "Client is currently receiving antiretroviral therapy":
  </a:s><a:s r="299"><a:s r="298"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="299"><a:s>"Client is currently receiving antiretroviral therapy"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="299" locator="104:3-104:66" name="Client is currently receiving antiretroviral therapy" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="302" locator="112:1-113:46" name="Client is immunologically stable"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client is immunologically stable"/><a:t name="pseudocode" value="&#34;Immunologically stable&#34; = TRUE"/><a:t name="code" value="Client is immunologically stable-31"/><a:t name="decision" value="IMMZ.D2.DT.BCG"/><a:s r="302"><a:s>/*
@input: Client is immunologically stable
@pseudocode: "Immunologically stable" = TRUE
@code: Client is immunologically stable-31
@decision: IMMZ.D2.DT.BCG
*/
define "Client is immunologically stable":
  </a:s><a:s r="304"><a:s r="303"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="304"><a:s>"Client is immunologically stable"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="304" locator="113:3-113:46" name="Client is immunologically stable" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="307" locator="121:1-122:50" name="Client is not immunologically stable"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client is not immunologically stable"/><a:t name="pseudocode" value="&#34;Immunologically stable&#34; = FALSE"/><a:t name="code" value="Client is not immunologically stable-32"/><a:t name="decision" value="IMMZ.D2.DT.BCG"/><a:s r="307"><a:s>/*
@input: Client is not immunologically stable
@pseudocode: "Immunologically stable" = FALSE
@code: Client is not immunologically stable-32
@decision: IMMZ.D2.DT.BCG
*/
define "Client is not immunologically stable":
  </a:s><a:s r="309"><a:s r="308"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="309"><a:s>"Client is not immunologically stable"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="309" locator="122:3-122:50" name="Client is not immunologically stable" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="312" locator="130:1-131:70" name="Client is currently not receiving antiretroviral therapy"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client is currently not receiving antiretroviral therapy"/><a:t name="pseudocode" value="&#34;Currently on ART&#34; = 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="312"><a:s>/*
@input: Client is currently not receiving antiretroviral therapy
@pseudocode: "Currently on ART" = FALSE
@code: Client is currently not receiving antiretroviral therapy-26
@decision: IMMZ.D2.DT.BCG
*/
define "Client is currently not receiving antiretroviral therapy":
  </a:s><a:s r="314"><a:s r="313"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="314"><a:s>"Client is currently not receiving antiretroviral therapy"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="314" locator="131:3-131:70" name="Client is currently not receiving antiretroviral therapy" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="317" locator="139:1-141:50" name="Client's age is between 28 days and 5 years"><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="&#34;Date of birth&#34; &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="317"><a:s>/*
@input: Client's age is between 28 days and 5 years
@pseudocode: 28 days &lt; Today's date − "Date of birth" &lt; 5 years
@code: Client's age is between 28 days and 5 years-50
@decision: IMMZ.D2.DT.BCG
*/
define "Client's age is between 28 days and 5 years":
  </a:s><a:s r="318"><a:s r="319"><a:s r="320">28 &lt; </a:s><a:s r="322"><a:s r="321"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="322"><a:s>"Current Patient Age In Days"</a:s></a:s></a:s></a:s><a:s>
  and </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>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="328"> &lt; 5</a:s></a:s></a:s></a:s></annotation><expression localId="318" locator="140:3-141:50" xsi:type="And"><operand localId="319" locator="140:3-140:46" xsi:type="Less"><signature localId="323" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="324" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand localId="320" locator="140:3-140:4" value="28" valueType="t:Integer" xsi:type="Literal"/><operand libraryName="Encounter" localId="322" locator="140:8-140:46" name="Current Patient Age In Days" xsi:type="ExpressionRef"/></operand><operand localId="325" locator="141:7-141:50" xsi:type="Less"><signature localId="329" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="330" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Encounter" localId="327" locator="141:7-141:46" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="328" locator="141:50" value="5" valueType="t:Integer" xsi:type="Literal"/></operand></expression></def><def accessLevel="Public" context="Patient" localId="333" locator="149:1-150:59" name="Client's TB infection test result is negative"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's TB infection test result is negative"/><a:t name="pseudocode" value="&#34;TB infection test result&#34; = &#34;Negative&#34;"/><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="333"><a:s>/*
@input: Client's TB infection test result is negative
@pseudocode: "TB infection test result" = "Negative"
@code: Client's TB infection test result is negative-39
@decision: IMMZ.D2.DT.BCG
*/
define "Client's TB infection test result is negative":
  </a:s><a:s r="335"><a:s r="334"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="335"><a:s>"Client's TB infection test result is negative"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="335" locator="150:3-150:59" name="Client's TB infection test result is negative" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="338" locator="158:1-159:66" name="No live vaccine was administered in the last four weeks"><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="&#34;Date and time of vaccination&#34; (where &#34;Live vaccine&#34; = 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="338"><a:s>/*
@input: No live vaccine was administered in the last four weeks
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) ≥ 4 weeks
@code: No live vaccine was administered in the last four weeks-92
@decision: IMMZ.D2.DT.BCG
*/
define "No live vaccine was administered in the last four weeks":
  </a:s><a:s r="340"><a:s r="339"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="340"><a:s>"No live vaccine was administered in the last 4 weeks"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="340" locator="159:3-159:66" name="No live vaccine was administered in the last 4 weeks" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="343" locator="167:1-168:91" name="Client's TB infection test result is unknown (test not done or no result yet)"><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="&#34;TB infection test result&#34; 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="343"><a:s>/*
@input: Client's TB infection test result is unknown (test not done or no result yet)
@pseudocode: "TB infection test result" 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 "Client's TB infection test result is unknown (test not done or no result yet)":
  </a:s><a:s r="345"><a:s r="344"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="345"><a:s>"Client's TB infection test result is unknown (test not done or no result yet)"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="345" locator="168:3-168:91" name="Client's TB infection test result is unknown (test not done or no result yet)" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="348" locator="176:1-177:59" name="Client's TB infection test result is positive"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's TB infection test result is positive"/><a:t name="pseudocode" value="&#34;TB infection test result&#34; = &#34;Positive&#34;"/><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="348"><a:s>/*
@input: Client's TB infection test result is positive
@pseudocode: "TB infection test result" = "Positive"
@code: Client's TB infection test result is positive-39
@decision: IMMZ.D2.DT.BCG
*/
define "Client's TB infection test result is positive":
  </a:s><a:s r="350"><a:s r="349"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="350"><a:s>"Client's TB infection test result is positive"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="350" locator="177:3-177:59" name="Client's TB infection test result is positive" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="353" locator="185:1-186:43" name="Client is not clinically well"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client is not clinically well"/><a:t name="pseudocode" value="&#34;Clinically well&#34; = FALSE"/><a:t name="code" value="Client is not clinically well-25"/><a:t name="decision" value="IMMZ.D2.DT.BCG"/><a:s r="353"><a:s>/*
@input: Client is not clinically well
@pseudocode: "Clinically well" = FALSE
@code: Client is not clinically well-25
@decision: IMMZ.D2.DT.BCG
*/
define "Client is not clinically well":
  </a:s><a:s r="355"><a:s r="354"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="355"><a:s>"Client is not clinically well"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="355" locator="186:3-186:43" name="Client is not clinically well" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="358" locator="194:1-195:39" name="Client is clinically well"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client is clinically well"/><a:t name="pseudocode" value="&#34;Clinically well&#34; = TRUE"/><a:t name="code" value="Client is clinically well-24"/><a:t name="decision" value="IMMZ.D2.DT.BCG"/><a:s r="358"><a:s>/*
@input: Client is clinically well
@pseudocode: "Clinically well" = TRUE
@code: Client is clinically well-24
@decision: IMMZ.D2.DT.BCG
*/
define "Client is clinically well":
  </a:s><a:s r="360"><a:s r="359"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="360"><a:s>"Client is clinically well"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="360" locator="195:3-195:39" name="Client is clinically well" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="363" locator="203:1-204:47" name="Client's age is more than 5 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is more than 5 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; ≥ 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="363"><a:s>/*
@input: Client's age is more than 5 years
@pseudocode: Today's date − "Date of birth" ≥ 5 years
@code: Client's age is more than 5 years-40
@decision: IMMZ.D2.DT.BCG
*/
define "Client's age is more than 5 years":
  </a:s><a:s r="364"><a:s r="366"><a:s r="365"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="366"><a:s>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="367"> &gt;= 5</a:s></a:s></a:s></annotation><expression localId="364" locator="204:3-204:47" xsi:type="GreaterOrEqual"><signature localId="368" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="369" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Encounter" localId="366" locator="204:3-204:42" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="367" locator="204:47" value="5" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="372" locator="212:1-213:55" name="One BCG primary series dose was administered"><annotation xsi:type="a:Annotation"><a:t name="input" value="One BCG primary series dose was administered"/><a:t name="pseudocode" value="&#34;Vaccine type&#34; = &#34;BCG vaccines&#34; and &#34;Type of dose&#34; = &#34;Primary series&#34;) = 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="372"><a:s>/*
@input: One BCG primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "BCG vaccines" and "Type of dose" = "Primary series") = 1
@code: One BCG primary series dose was administered-112
@decision: IMMZ.D2.DT.BCG
*/
define "One BCG primary series dose was administered":
  </a:s><a:s r="373"><a:s r="374"><a:s>"Number of BCG Primary Series Doses Administered"</a:s></a:s><a:s r="375"> = 1</a:s></a:s></a:s></annotation><expression localId="373" locator="213:3-213:55" xsi:type="Equal"><signature localId="376" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="377" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand localId="374" locator="213:3-213:51" name="Number of BCG Primary Series Doses Administered" xsi:type="ExpressionRef"/><operand localId="375" locator="213:55" value="1" valueType="t:Integer" xsi:type="Literal"/></expression></def></statements></library>