<?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="327"><a:s>/*
  * Library: IMMZD2DTTyphoidElements
  */
library IMMZD2DTTyphoidElements</a:s></a:s></annotation><identifier id="IMMZD2DTTyphoidElements" 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="Elements" locator="16:1-16:36" 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 context="Patient" localId="223" locator="19:1-19:15" name="Patient"><expression localId="224" xsi:type="SingletonFrom"><operand dataType="fhir:Patient" localId="222" locator="19:1-19:15" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/></expression></def><def accessLevel="Public" context="Patient" localId="228" locator="24:1-27:48" name="Typhoid Doses Administered to Patient"><annotation xsi:type="a:Annotation"><a:t name="internal" value="Typhoid containing Doses Administered to Patient"/><a:s r="228"><a:s>/*
@internal: Typhoid containing Doses Administered to Patient
*/
define "Typhoid Doses Administered to Patient":
  </a:s><a:s r="240"><a:s><a:s r="229"><a:s r="231"><a:s><a:s>Elements."Doses Administered to Patient"</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>"Typhoid vaccines"</a:s></a:s></a:s></a:s></a:s></a:s></a:s></annotation><expression localId="240" locator="25:3-27:48" xsi:type="Query"><source alias="I" localId="229" locator="25:3-25:44"><expression libraryName="Elements" localId="231" locator="25:3-25:42" name="Doses Administered to Patient" xsi:type="ExpressionRef"/></source><where localId="237" locator="26:3-27:48" xsi:type="InValueSet"><signature localId="239" name="t:Concept" xsi:type="NamedTypeSpecifier"/><code libraryName="FHIRHelpers" localId="238" name="ToConcept" xsi:type="FunctionRef"><operand localId="234" locator="27:5-27:17" path="vaccineCode" scope="I" xsi:type="Property"/></code><valueset libraryName="Concepts" localId="236" locator="27:22-27:48" name="Typhoid vaccines" preserve="true"/></where></expression></def><def accessLevel="Public" context="Patient" localId="243" locator="32:1-33:57" name="Typhoid Primary Series Doses Administered to Patient"><annotation xsi:type="a:Annotation"><a:t name="internal" value="Typhoid containing Doses Administered to Patient that are in the Primary series"/><a:s r="243"><a:s>/*
@internal: Typhoid containing Doses Administered to Patient that are in the Primary series
*/
define "Typhoid Primary Series Doses Administered to Patient":
  </a:s><a:s r="245"><a:s r="244"><a:s>"Typhoid Doses Administered to Patient"</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 libraryName="Common" localId="245" locator="33:3-33:57" name="seriesPrimary" xsi:type="FunctionRef"><operand localId="244" locator="33:3-33:41" name="Typhoid Doses Administered to Patient" xsi:type="ExpressionRef"/></expression></def><def accessLevel="Public" context="Patient" localId="248" locator="38:1-39:63" name="Number of Typhoid Primary Series Doses Administered"><annotation xsi:type="a:Annotation"><a:t name="internal" value="Number of Typhoid Primary Series doses"/><a:s r="248"><a:s>/*
@internal: Number of Typhoid Primary Series doses
*/
define "Number of Typhoid Primary Series Doses Administered":
  </a:s><a:s r="252"><a:s>Count(</a:s><a:s r="249"><a:s>"Typhoid Primary Series Doses Administered to Patient"</a:s></a:s><a:s>)</a:s></a:s></a:s></annotation><expression localId="252" locator="39:3-39:63" xsi:type="Count"><source localId="249" locator="39:9-39:62" name="Typhoid Primary Series Doses Administered to Patient" xsi:type="ExpressionRef"/></expression></def><def accessLevel="Public" context="Patient" localId="255" locator="47:1-48:46" name="Client's age is less than 6 months"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is less than 6 months"/><a:t name="pseudocode" value="&#34;Date of birth&#34; &lt; 6 months"/><a:t name="code" value="Client's age is less than 6 months-41"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule"/><a:s r="255"><a:s>/*
@input: Client's age is less than 6 months
@pseudocode: Today's date − "Date of birth" &lt; 6 months
@code: Client's age is less than 6 months-41
@decision: IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule
*/
define "Client's age is less than 6 months":
  </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>"Current Patient Age In Months"</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:46" xsi:type="Less"><signature localId="260" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="261" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="258" locator="48:3-48:42" name="Current Patient Age In Months" xsi:type="ExpressionRef"/><operand localId="259" locator="48:46" value="6" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="264" locator="57:1-58:59" name="No typhoid primary series doses were administered"><annotation xsi:type="a:Annotation"><a:t name="input" value="No typhoid primary series doses were administered"/><a:t name="pseudocode" value="&#34;Vaccine type&#34; = &#34;Typhoid vaccines&#34; and &#34;Type of dose&#34; = &#34;Primary series&#34;) = 0"/><a:t name="code" value="No typhoid primary series doses were administered-116"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule"/><a:s r="264"><a:s>/*
@input: No typhoid primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Typhoid vaccines" and "Type of dose" = "Primary series") = 0
@code: No typhoid primary series doses were administered-116
@decision: IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule
@decision: IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule
*/
define "No typhoid primary series doses were administered":
  </a:s><a:s r="265"><a:s r="266"><a:s>"Number of Typhoid Primary Series Doses Administered"</a:s></a:s><a:s r="267"> = 0</a:s></a:s></a:s></annotation><expression localId="265" locator="58:3-58:59" 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="58:3-58:55" name="Number of Typhoid Primary Series Doses Administered" xsi:type="ExpressionRef"/><operand localId="267" locator="58:59" value="0" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="272" locator="66:1-68:50" name="Client's age is between 6 months and 45 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is between 6 months and 45 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; &lt; 45 years"/><a:t name="code" value="Client's age is between 6 months and 45 years-52"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule"/><a:s r="272"><a:s>/*
@input: Client's age is between 6 months and 45 years
@pseudocode: 6 months ≤ Today's date − "Date of birth" &lt; 45 years
@code: Client's age is between 6 months and 45 years-52
@decision: IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule
*/
define "Client's age is between 6 months and 45 years":
  </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>"Current Patient Age In Months"</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>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="283"> &lt; 45</a:s></a:s></a:s></a:s></annotation><expression localId="273" locator="67:3-68:50" xsi:type="And"><operand localId="274" locator="67:3-67:47" 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="67:3" value="6" valueType="t:Integer" xsi:type="Literal"/><operand libraryName="Elements" localId="277" locator="67:8-67:47" name="Current Patient Age In Months" xsi:type="ExpressionRef"/></operand><operand localId="280" locator="68:7-68:50" xsi:type="Less"><signature localId="284" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="285" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="282" locator="68:7-68:45" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="283" locator="68:49-68:50" value="45" valueType="t:Integer" xsi:type="Literal"/></operand></expression></def><def accessLevel="Public" context="Patient" localId="288" locator="76:1-77:47" name="Client's age is more than or equal to 45 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is more than or equal to 45 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; ≥ 45 years"/><a:t name="code" value="Client's age is more than or equal to 45 years-41"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule"/><a:s r="288"><a:s>/*
@input: Client's age is more than or equal to 45 years
@pseudocode: Today's date − "Date of birth" ≥ 45 years
@code: Client's age is more than or equal to 45 years-41
@decision: IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule
*/
define "Client's age is more than or equal to 45 years":
  </a:s><a:s r="289"><a:s r="291"><a:s r="290"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="291"><a:s>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="292"> &gt;= 45</a:s></a:s></a:s></annotation><expression localId="289" locator="77:3-77:47" xsi:type="GreaterOrEqual"><signature localId="293" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="294" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="291" locator="77:3-77:41" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="292" locator="77:46-77:47" value="45" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="297" locator="86:1-87:59" name="One typhoid primary series dose was administered"><annotation xsi:type="a:Annotation"><a:t name="input" value="One typhoid primary series dose was administered"/><a:t name="pseudocode" value="&#34;Vaccine type&#34; = &#34;Typhoid vaccines&#34; and &#34;Type of dose&#34; = &#34;Primary series&#34;) = 1"/><a:t name="code" value="One typhoid primary series dose was administered-116"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule"/><a:s r="297"><a:s>/*
@input: One typhoid primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Typhoid vaccines" and "Type of dose" = "Primary series") = 1
@code: One typhoid primary series dose was administered-116
@decision: IMMZ.D2.DT.Typhoid.TCV: Typhoid conjugate vaccine (TCV) schedule
@decision: IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule
*/
define "One typhoid primary series dose was administered":
  </a:s><a:s r="298"><a:s r="299"><a:s>"Number of Typhoid Primary Series Doses Administered"</a:s></a:s><a:s r="300"> = 1</a:s></a:s></a:s></annotation><expression localId="298" locator="87:3-87:59" xsi:type="Equal"><signature localId="301" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="302" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand localId="299" locator="87:3-87:55" name="Number of Typhoid Primary Series Doses Administered" xsi:type="ExpressionRef"/><operand localId="300" locator="87:59" value="1" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="305" locator="95:1-96:45" name="Client's age is less than 2 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is less than 2 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; &lt; 2 years"/><a:t name="code" value="Client's age is less than 2 years-40"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule"/><a:s r="305"><a:s>/*
@input: Client's age is less than 2 years
@pseudocode: Today's date − "Date of birth" &lt; 2 years
@code: Client's age is less than 2 years-40
@decision: IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule
*/
define "Client's age is less than 2 years":
  </a:s><a:s r="306"><a:s r="308"><a:s r="307"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="308"><a:s>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="309"> &lt; 2</a:s></a:s></a:s></annotation><expression localId="306" locator="96:3-96:45" xsi:type="Less"><signature localId="310" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="311" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="308" locator="96:3-96:41" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="309" locator="96:45" value="2" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="314" locator="104:1-105:46" name="Client's age is more than or equal to 2 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is more than or equal to 2 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; ≥ 2 years"/><a:t name="code" value="Client's age is more than or equal to 2 years-40"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule"/><a:s r="314"><a:s>/*
@input: Client's age is more than or equal to 2 years
@pseudocode: Today's date − "Date of birth" ≥ 2 years
@code: Client's age is more than or equal to 2 years-40
@decision: IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule
*/
define "Client's age is more than or equal to 2 years":
  </a:s><a:s r="315"><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>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="318"> &gt;= 2</a:s></a:s></a:s></annotation><expression localId="315" locator="105:3-105:46" xsi:type="GreaterOrEqual"><signature localId="319" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="320" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="317" locator="105:3-105:41" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="318" locator="105:46" value="2" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="327" locator="189:1-190:97" name="Date of Latest Typhoid Dose"><annotation xsi:type="a:Annotation"><a:t name="internal" value="Date of Latest Typhoid Dose"/><a:s r="327"><a:s>/*
@internal: Date of Latest Typhoid Dose
*/
define "Date of Latest Typhoid Dose":
  </a:s><a:s r="328"><a:s>date from </a:s><a:s r="329"><a:s>start of </a:s><a:s r="335"><a:s r="334"><a:s r="331"><a:s r="330"><a:s>"Typhoid Doses Administered to Patient"</a:s></a:s><a:s>.</a:s><a:s r="331"><a:s>mostRecent()</a:s></a:s></a:s><a:s>.</a:s><a:s r="334"><a:s>occurrence</a:s></a:s></a:s><a:s>.</a:s><a:s r="335"><a:s>toInterval()</a:s></a:s></a:s></a:s></a:s></a:s></annotation><expression localId="328" locator="190:3-190:97" xsi:type="DateFrom"><operand localId="329" locator="190:13-190:97" xsi:type="Start"><operand libraryName="WC" localId="335" locator="190:22-190:97" name="toInterval" xsi:type="FunctionRef"><operand localId="334" locator="190:22-190:84" path="occurrence" xsi:type="Property"><source libraryName="WC" localId="331" locator="190:22-190:73" name="mostRecent" xsi:type="FunctionRef"><signature localId="332" xsi:type="ListTypeSpecifier"><elementType localId="333" name="fhir:Immunization" xsi:type="NamedTypeSpecifier"/></signature><operand localId="330" locator="190:22-190:60" name="Typhoid Doses Administered to Patient" xsi:type="ExpressionRef"/></source></operand></operand></operand></expression></def><def accessLevel="Public" context="Patient" localId="323" locator="114:1-116:77" name="The latest typhoid dose was administered less than 3 years ago"><annotation xsi:type="a:Annotation"><a:t name="input" value="The latest typhoid dose was administered less than 3 years ago"/><a:t name="pseudocode" value="&#34;Date and time of vaccination&#34; (where &#34;Vaccine type&#34; = &#34;Typhoid vaccines&#34;) &lt; 3 years"/><a:t name="code" value="The latest typhoid dose was administered less than 3 years ago-106"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="323"><a:s>/*
@input: The latest typhoid dose was administered less than 3 years ago
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Typhoid vaccines") &lt; 3 years
@code: The latest typhoid dose was administered less than 3 years ago-106
@decision: IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "The latest typhoid dose was administered less than 3 years ago":
  </a:s><a:s r="324"><a:s r="338"><a:s r="336"><a:s>"Date of Latest Typhoid Dose"</a:s></a:s><a:s> is not null</a:s></a:s><a:s>
    and </a:s><a:s r="339"><a:s r="340"><a:s>duration in years between </a:s><a:s r="341"><a:s>"Date of Latest Typhoid Dose"</a:s></a:s><a:s> and </a:s><a:s r="344"><a:s>Now()</a:s></a:s></a:s><a:s r="350"> &lt; 3</a:s></a:s></a:s></a:s></annotation><expression localId="324" locator="115:3-116:77" xsi:type="And"><operand localId="338" locator="115:3-115:43" xsi:type="Not"><operand localId="337" locator="115:3-115:43" xsi:type="IsNull"><operand localId="336" locator="115:3-115:31" name="Date of Latest Typhoid Dose" xsi:type="ExpressionRef"/></operand></operand><operand localId="339" locator="116:9-116:77" xsi:type="Less"><signature localId="351" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="352" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand localId="340" locator="116:9-116:73" precision="Year" xsi:type="DurationBetween"><signature localId="348" name="t:DateTime" xsi:type="NamedTypeSpecifier"/><signature localId="349" name="t:DateTime" xsi:type="NamedTypeSpecifier"/><operand localId="346" xsi:type="ToDateTime"><signature localId="347" name="t:Date" xsi:type="NamedTypeSpecifier"/><operand localId="341" locator="116:35-116:63" name="Date of Latest Typhoid Dose" xsi:type="ExpressionRef"/></operand><operand localId="344" locator="116:69-116:73" xsi:type="Now"/></operand><operand localId="350" locator="116:77" value="3" valueType="t:Integer" xsi:type="Literal"/></operand></expression></def><def accessLevel="Public" context="Patient" localId="355" locator="125:1-126:70" name="The latest typhoid dose was administered more than 3 years ago"><annotation xsi:type="a:Annotation"><a:t name="input" value="The latest typhoid dose was administered more than 3 years ago"/><a:t name="pseudocode" value="&#34;Date and time of vaccination&#34; (where &#34;Vaccine type&#34; = &#34;Typhoid vaccines&#34;) ≥ 3 years"/><a:t name="code" value="The latest typhoid dose was administered more than 3 years ago-106"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="355"><a:s>/*
@input: The latest typhoid dose was administered more than 3 years ago
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Typhoid vaccines") ≥ 3 years
@code: The latest typhoid dose was administered more than 3 years ago-106
@decision: IMMZ.D2.DT.Typhoid.ViPS: Unconjugated Vi polysaccharide (ViPS) schedule
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "The latest typhoid dose was administered more than 3 years ago":
  </a:s><a:s r="356"><a:s>not </a:s><a:s r="357"><a:s>"The latest typhoid dose was administered less than 3 years ago"</a:s></a:s></a:s></a:s></annotation><expression localId="356" locator="126:3-126:70" xsi:type="Not"><operand localId="357" locator="126:7-126:70" name="The latest typhoid dose was administered less than 3 years ago" xsi:type="ExpressionRef"/></expression></def><def accessLevel="Public" context="Patient" localId="360" locator="134:1-135:45" name="Client's age is less than 6 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is less than 6 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; &lt; 6 years"/><a:t name="code" value="Client's age is less than 6 years-40"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="360"><a:s>/*
@input: Client's age is less than 6 years
@pseudocode: Today's date − "Date of birth" &lt; 6 years
@code: Client's age is less than 6 years-40
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "Client's age is less than 6 years":
  </a:s><a:s r="361"><a:s r="363"><a:s r="362"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="363"><a:s>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="364"> &lt; 6</a:s></a:s></a:s></annotation><expression localId="361" locator="135:3-135:45" xsi:type="Less"><signature localId="365" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="366" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="363" locator="135:3-135:41" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="364" locator="135:45" value="6" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="369" locator="143:1-144:46" name="Client's age is more than or equal to 6 years"><annotation xsi:type="a:Annotation"><a:t name="input" value="Client's age is more than or equal to 6 years"/><a:t name="pseudocode" value="&#34;Date of birth&#34; ≥ 6 years"/><a:t name="code" value="Client's age is more than or equal to 6 years-40"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="369"><a:s>/*
@input: Client's age is more than or equal to 6 years
@pseudocode: Today's date − "Date of birth" ≥ 6 years
@code: Client's age is more than or equal to 6 years-40
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "Client's age is more than or equal to 6 years":
  </a:s><a:s r="370"><a:s r="372"><a:s r="371"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="372"><a:s>"Current Patient Age In Years"</a:s></a:s></a:s><a:s r="373"> &gt;= 6</a:s></a:s></a:s></annotation><expression localId="370" locator="144:3-144:46" xsi:type="GreaterOrEqual"><signature localId="374" name="t:Integer" xsi:type="NamedTypeSpecifier"/><signature localId="375" name="t:Integer" xsi:type="NamedTypeSpecifier"/><operand libraryName="Elements" localId="372" locator="144:3-144:41" name="Current Patient Age In Years" xsi:type="ExpressionRef"/><operand localId="373" locator="144:46" value="6" valueType="t:Integer" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="382" locator="179:1-184:11" name="Primary series is complete"><annotation xsi:type="a:Annotation"><a:t name="input" value="Primary series is complete"/><a:t name="pseudocode" value="&#34;Completed the primary vaccination series&#34; (where &#34;Vaccine type&#34; = &#34;Typhoid vaccines&#34;) = TRUE"/><a:t name="code" value="Primary series is complete-93"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="382"><a:s>/*
@input: Primary series is complete
@pseudocode: "Completed the primary vaccination series" (where "Vaccine type" = "Typhoid vaccines") = TRUE
@code: Primary series is complete-93
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "Primary series is complete":
  </a:s><a:s r="383"><a:s r="384"><a:s>"One typhoid primary series dose was administered"</a:s></a:s><a:s>
  or </a:s><a:s r="415"><a:s>Coalesce(
    </a:s><a:s r="411"><a:s><a:s r="385"><a:s r="386"><a:s><a:s>"Typhoid Doses Administered to Patient"</a:s></a:s></a:s><a:s> Dose</a:s></a:s></a:s><a:s>
    </a:s><a:s r="388"><a:s>aggregate Result: </a:s><a:s r="391"><a:s r="405"><a:s r="403"><a:s r="393"><a:s r="392"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="393"><a:s>"Completed the primary vaccination series Observation"</a:s></a:s></a:s><a:s>.</a:s><a:s r="403"><a:s>partOf</a:s></a:s></a:s><a:s>.</a:s><a:s r="405"><a:s>references(</a:s><a:s r="404"><a:s>Dose</a:s></a:s><a:s>)</a:s></a:s></a:s><a:s> or </a:s><a:s r="409"><a:s>Result</a:s></a:s></a:s></a:s></a:s><a:s r="412">,
    false )</a:s></a:s></a:s></a:s></annotation><expression localId="383" locator="180:3-184:11" xsi:type="Or"><operand localId="384" locator="180:3-180:52" name="One typhoid primary series dose was administered" xsi:type="ExpressionRef"/><operand localId="415" locator="181:6-184:11" xsi:type="Coalesce"><operand localId="411" locator="182:5-183:119" xsi:type="Query"><source alias="Dose" localId="385" locator="182:5-182:48"><expression localId="386" locator="182:5-182:43" name="Typhoid Doses Administered to Patient" xsi:type="ExpressionRef"/></source><aggregate identifier="Result" localId="388" locator="183:5-183:119"><expression localId="391" locator="183:23-183:119" xsi:type="Or"><operand libraryName="WC" localId="405" locator="183:23-183:109" name="references" xsi:type="FunctionRef"><signature localId="406" xsi:type="ListTypeSpecifier"><elementType localId="407" name="fhir:Reference" xsi:type="NamedTypeSpecifier"/></signature><signature localId="408" name="fhir:Resource" xsi:type="NamedTypeSpecifier"/><operand localId="403" locator="183:23-183:92" xsi:type="Flatten"><operand localId="401" xsi:type="Query"><source alias="$this" localId="400"><expression libraryName="Elements" localId="393" locator="183:23-183:85" name="Completed the primary vaccination series Observation" xsi:type="ExpressionRef"/></source><where localId="397" xsi:type="Not"><operand localId="396" xsi:type="IsNull"><operand localId="395" path="partOf" xsi:type="Property"><source localId="394" name="$this" xsi:type="AliasRef"/></operand></operand></where><return distinct="false" localId="402"><expression localId="399" path="partOf" xsi:type="Property"><source localId="398" name="$this" xsi:type="AliasRef"/></expression></return></operand></operand><operand localId="404" locator="183:105-183:108" name="Dose" xsi:type="AliasRef"/></operand><operand asType="t:Boolean" localId="410" xsi:type="As"><operand localId="409" locator="183:114-183:119" name="Result" xsi:type="QueryLetRef"/></operand></expression><starting localId="389" xsi:type="Null"/></aggregate></operand><operand localId="412" locator="184:5-184:9" value="false" valueType="t:Boolean" xsi:type="Literal"/></operand></expression></def><def accessLevel="Public" context="Patient" localId="378" locator="152:1-153:34" name="Primary series is not complete"><annotation xsi:type="a:Annotation"><a:t name="input" value="Primary series is not complete"/><a:t name="pseudocode" value="&#34;Completed the primary vaccination series&#34; (where &#34;Vaccine type&#34; = &#34;Typhoid vaccines&#34;) ≠ TRUE"/><a:t name="code" value="Primary series is not complete-93"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="378"><a:s>/*
@input: Primary series is not complete
@pseudocode: "Completed the primary vaccination series" (where "Vaccine type" = "Typhoid vaccines") ≠ TRUE
@code: Primary series is not complete-93
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "Primary series is not complete":
  </a:s><a:s r="379"><a:s>not </a:s><a:s r="416"><a:s>"Primary series is complete"</a:s></a:s></a:s></a:s></annotation><expression localId="379" locator="153:3-153:34" xsi:type="Not"><operand localId="416" locator="153:7-153:34" name="Primary series is complete" xsi:type="ExpressionRef"/></expression></def><def accessLevel="Public" context="Patient" localId="419" locator="161:1-162:65" name="No live vaccine, other than typhoid, was administered in the past 4 weeks"><annotation xsi:type="a:Annotation"><a:t name="input" value="No live vaccine, other than typhoid, was administered in the past 4 weeks"/><a:t name="pseudocode" value="&#34;Date and time of vaccination&#34; (where &#34;Live vaccine&#34; = TRUE AND &#34;Vaccine type&#34; ≠ &#34;Typhoid vaccines&#34;) ≥ 4 weeks"/><a:t name="code" value="No live vaccine, other than typhoid, was administered in the past 4 weeks-132"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="419"><a:s>/*
@input: No live vaccine, other than typhoid, was administered in the past 4 weeks
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE AND "Vaccine type" ≠ "Typhoid vaccines") ≥ 4 weeks
@code: No live vaccine, other than typhoid, was administered in the past 4 weeks-132
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "No live vaccine, other than typhoid, was administered in the past 4 weeks":
  </a:s><a:s r="421"><a:s r="420"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="421"><a:s>"No live vaccine was administered in the last 4 weeks"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Elements" localId="421" locator="162:3-162:65" name="No live vaccine was administered in the last 4 weeks" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="424" locator="170:1-171:62" name="Live vaccine, other than typhoid, was administered in the past 4 weeks"><annotation xsi:type="a:Annotation"><a:t name="input" value="Live vaccine, other than typhoid, was administered in the past 4 weeks"/><a:t name="pseudocode" value="&#34;Date and time of vaccination&#34; (where &#34;Live vaccine&#34; = TRUE AND &#34;Vaccine type&#34; ≠ &#34;Typhoid vaccines&#34;) &lt; 4 weeks"/><a:t name="code" value="Live vaccine, other than typhoid, was administered in the past 4 weeks-132"/><a:t name="decision" value="IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule"/><a:s r="424"><a:s>/*
@input: Live vaccine, other than typhoid, was administered in the past 4 weeks
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE AND "Vaccine type" ≠ "Typhoid vaccines") &lt; 4 weeks
@code: Live vaccine, other than typhoid, was administered in the past 4 weeks-132
@decision: IMMZ.D2.DT.Typhoid.Ty21a: Live attenuated Ty21a vaccine schedule
*/
define "Live vaccine, other than typhoid, was administered in the past 4 weeks":
  </a:s><a:s r="426"><a:s r="425"><a:s>Elements</a:s></a:s><a:s>.</a:s><a:s r="426"><a:s>"Live vaccine was administered in the last 4 weeks"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Elements" localId="426" locator="171:3-171:62" name="Live vaccine was administered in the last 4 weeks" xsi:type="ExpressionRef"/></def></statements></library>