<?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="292"><a:s>/*
 * Library: IMMZD18SRubellaLowIncidenceLogic (IMMZ.D18.S.Rubella.Low incidence schedule)
 * Schedule Table: Schedule for countries with low incidence of rubella
 */
library IMMZD18SRubellaLowIncidenceLogic</a:s></a:s></annotation><identifier id="IMMZD18SRubellaLowIncidenceLogic" 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="WC" locator="10:1-10:27" path="http://smart.who.int/immunizations/WHOCommon"><annotation xsi:type="a:Annotation"><a:s r="210"><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="212" localIdentifier="Common" locator="12:1-12:32" path="http://smart.who.int/immunizations/IMMZCommon"><annotation xsi:type="a:Annotation"><a:s r="212"><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="214" localIdentifier="Concepts" locator="13:1-13:36" path="http://smart.who.int/immunizations/IMMZConcepts"><annotation xsi:type="a:Annotation"><a:s r="214"><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="216" localIdentifier="IE" locator="15:1-15:39" path="http://smart.who.int/immunizations/IMMZEncounterElements"><annotation xsi:type="a:Annotation"><a:s r="216"><a:s>include </a:s><a:s><a:s>IMMZEncounterElements</a:s></a:s><a:s> called IE</a:s></a:s></annotation></def><def localId="218" localIdentifier="Encounter" locator="16:1-16:57" path="http://smart.who.int/immunizations/IMMZD2DTRubellaEncounterElements"><annotation xsi:type="a:Annotation"><a:s r="218"><a:s>include </a:s><a:s><a:s>IMMZD2DTRubellaEncounterElements</a:s></a:s><a:s> called Encounter</a:s></a:s></annotation></def></includes><parameters><def accessLevel="Public" localId="220" locator="18:1-18:36" name="Today"><annotation xsi:type="a:Annotation"><a:s r="220"><a:s>parameter Today </a:s><a:s r="224"><a:s>Date</a:s></a:s><a:s> default </a:s><a:s r="223"><a:s>Today()</a:s></a:s></a:s></annotation><default localId="223" locator="18:30-18:36" xsi:type="Today"/><parameterTypeSpecifier localId="224" locator="18:17-18:20" name="t:Date" xsi:type="NamedTypeSpecifier"/></def></parameters><contexts><def localId="229" locator="21:1-21:15" name="Patient"/></contexts><statements><def context="Patient" localId="227" locator="21:1-21:15" name="Patient"><expression localId="228" xsi:type="SingletonFrom"><operand dataType="fhir:Patient" localId="226" locator="21:1-21:15" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/></expression></def><def accessLevel="Public" context="Patient" localId="239" locator="76:1-77:62" name="One rubella dose from the primary series was administered. The primary series has been completed"><annotation xsi:type="a:Annotation"><a:t name="complete" value="One rubella dose from the primary series was administered. The primary series has been completed"/><a:t name="pseudocode" value="&#34;Completed the primary vaccination series&#34; = TRUE (where &#34;Vaccine type&#34; = &#34;Rubella-containing vaccines&#34;)"/><a:s r="239"><a:s>/*
@complete: One rubella dose from the primary series was administered. The primary series has been completed
@pseudocode: "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "Rubella-containing vaccines")
*/
define "One rubella dose from the primary series was administered. The primary series has been completed":
  </a:s><a:s r="241"><a:s r="240"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="241"><a:s>"One rubella primary series dose was administered"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="241" locator="77:3-77:62" name="One rubella primary series dose was administered" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="232" locator="31:1-33:108" name="Rubella dose 1"><annotation xsi:type="a:Annotation"><a:t name="output" value="Rubella dose 1"/><a:t name="description" value="Provision of the rubella dose 1"/><a:t name="trigger" value="Child's birth"/><a:t name="pseudo"/><a:t name="triggerDate" value="&#34;Date of birth&#34;"/><a:s r="232"><a:s>/*
@output: Rubella dose 1
@description: Provision of the rubella dose 1
@trigger: Child's birth
@pseudo: 
@triggerDate: "Date of birth"
*/
define "Rubella dose 1":
  </a:s><a:s r="233"><a:s r="235"><a:s r="234"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="235"><a:s>"No rubella primary series dose was administered"</a:s></a:s></a:s><a:s>
  and </a:s><a:s r="236"><a:s>not </a:s><a:s r="242"><a:s>"One rubella dose from the primary series was administered. The primary series has been completed"</a:s></a:s></a:s></a:s></a:s></annotation><expression localId="233" locator="32:3-33:108" xsi:type="And"><operand libraryName="Encounter" localId="235" locator="32:3-32:61" name="No rubella primary series dose was administered" xsi:type="ExpressionRef"/><operand localId="236" locator="33:7-33:108" xsi:type="Not"><operand localId="242" locator="33:11-33:108" name="One rubella dose from the primary series was administered. The primary series has been completed" xsi:type="ExpressionRef"/></operand></expression></def><def accessLevel="Public" context="Patient" localId="259" locator="51:1-53:11" name="Rubella dose 1 Due Date"><annotation xsi:type="a:Annotation"><a:t name="dynamicValue" value="Rubella dose 1 Due Date"/><a:t name="pseudocode" value="&#34;Date of birth&#34; + 12 months"/><a:s r="259"><a:s>/*
@dynamicValue: Rubella dose 1 Due Date
@pseudocode: "Date of birth" + 12 months
*/
define "Rubella dose 1 Due Date":
  </a:s><a:s r="260"><a:s>if </a:s><a:s r="261"><a:s>"Rubella dose 1"</a:s></a:s><a:s> then </a:s><a:s r="262"><a:s r="264"><a:s r="263"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="264"><a:s>birthDate</a:s></a:s></a:s><a:s> + </a:s><a:s r="265"><a:s>12 months</a:s></a:s></a:s><a:s r="269">
  else null</a:s></a:s></a:s></annotation><expression localId="260" locator="52:3-53:11" xsi:type="If"><condition localId="261" locator="52:6-52:21" name="Rubella dose 1" xsi:type="ExpressionRef"/><then localId="262" locator="52:28-52:56" xsi:type="Add"><signature localId="267" name="t:Date" xsi:type="NamedTypeSpecifier"/><signature localId="268" name="t:Quantity" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="266" name="ToDate" xsi:type="FunctionRef"><operand localId="264" locator="52:28-52:44" path="birthDate" xsi:type="Property"><source localId="263" locator="52:28-52:34" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="265" locator="52:48-52:56" unit="months" value="12" xsi:type="Quantity"/></then><else asType="t:Date" localId="270" xsi:type="As"><operand localId="269" locator="53:8-53:11" xsi:type="Null"/></else></expression></def><def accessLevel="Public" context="Patient" localId="245" locator="40:1-44:9" name="Rubella dose 1 Create"><annotation xsi:type="a:Annotation"><a:t name="output" value="Rubella dose 1 Create"/><a:t name="create" value="Rubella dose 1 should be provided if the client's age is at least 12 months"/><a:s r="245"><a:s>/*
@output: Rubella dose 1 Create
@create: Rubella dose 1 should be provided if the client's age is at least 12 months
*/
define "Rubella dose 1 Create":
  </a:s><a:s r="246"><a:s>if </a:s><a:s r="247"><a:s>"Rubella dose 1"</a:s></a:s><a:s>
  then </a:s><a:s r="279"><a:s r="256"><a:s r="250"><a:s>'Rubella dose 1 should be provided if the client\'s age is at least 12 months'</a:s></a:s><a:s> + </a:s><a:s r="252"><a:s>'
Due Date: '</a:s></a:s></a:s><a:s> + </a:s><a:s r="275"><a:s>ToString(</a:s><a:s r="271"><a:s>"Rubella dose 1 Due Date"</a:s></a:s><a:s>)</a:s></a:s></a:s><a:s>
  else </a:s><a:s r="280"><a:s>''</a:s></a:s></a:s></a:s></annotation><expression localId="246" locator="41:3-44:9" xsi:type="If"><condition localId="247" locator="41:6-41:21" name="Rubella dose 1" xsi:type="ExpressionRef"/><then localId="279" locator="42:8-43:49" xsi:type="Concatenate"><operand localId="256" locator="42:8-42:101" xsi:type="Concatenate"><operand localId="250" locator="42:8-42:85" value="Rubella dose 1 should be provided if the client's age is at least 12 months" valueType="t:String" xsi:type="Literal"/><operand localId="252" locator="42:89-42:101" value="&#xA;Due Date: " valueType="t:String" xsi:type="Literal"/></operand><operand localId="275" locator="43:15-43:49" xsi:type="ToString"><signature localId="276" name="t:Date" xsi:type="NamedTypeSpecifier"/><operand localId="271" locator="43:24-43:48" name="Rubella dose 1 Due Date" xsi:type="ExpressionRef"/></operand></then><else localId="280" locator="44:8-44:9" value="" valueType="t:String" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="284" locator="60:1-61:6" name="Rubella dose 1 Overdue"><annotation xsi:type="a:Annotation"><a:t name="dynamicValue" value="Rubella dose 1 Overdue"/><a:t name="pseudocode" value="To be determined by Member States; however, there is no recommended overdue date and individuals are always eligible to be vaccinated."/><a:s r="284"><a:s r="285">/*
@dynamicValue: Rubella dose 1 Overdue
@pseudocode: To be determined by Member States; however, there is no recommended overdue date and individuals are always eligible to be vaccinated.
*/
define "Rubella dose 1 Overdue":
  null</a:s></a:s></annotation><expression localId="285" locator="61:3-61:6" xsi:type="Null"/></def><def accessLevel="Public" context="Patient" localId="288" locator="68:1-69:6" name="Rubella dose 1 Expiration"><annotation xsi:type="a:Annotation"><a:t name="dynamicValue" value="Rubella dose 1 Expiration"/><a:t name="pseudocode" value="To be determined by Member States; however, there is no recommended expiration date and individuals are always eligible to be vaccinated."/><a:s r="288"><a:s r="289">/*
@dynamicValue: Rubella dose 1 Expiration
@pseudocode: To be determined by Member States; however, there is no recommended expiration date and individuals are always eligible to be vaccinated.
*/
define "Rubella dose 1 Expiration":
  null</a:s></a:s></annotation><expression localId="289" locator="69:3-69:6" xsi:type="Null"/></def><def accessLevel="Public" context="Patient" localId="292" locator="84:1-91:5" name="Test Validation"><annotation xsi:type="a:Annotation"><a:t name="test" value="Test expected results based on example patients"/><a:s r="292"><a:s>/*
@test: Test expected results based on example patients
*/
define "Test Validation":
  </a:s><a:s r="293"><a:s>case
    </a:s><a:s r="294"><a:s>when </a:s><a:s r="295"><a:s r="297"><a:s r="296"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="297"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="298"><a:s>'Rubella19.1'</a:s></a:s></a:s><a:s> then </a:s><a:s r="304"><a:s>"Rubella dose 1"</a:s></a:s></a:s><a:s>
    </a:s><a:s r="305"><a:s>when </a:s><a:s r="306"><a:s r="308"><a:s r="307"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="308"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="309"><a:s>'Rubella20.3'</a:s></a:s></a:s><a:s> then </a:s><a:s r="315"><a:s>"Rubella dose 1"</a:s></a:s></a:s><a:s>
    </a:s><a:s r="316"><a:s>when </a:s><a:s r="317"><a:s r="319"><a:s r="318"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="319"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="320"><a:s>'Rubella21.3'</a:s></a:s></a:s><a:s> then </a:s><a:s r="326"><a:s>"Rubella dose 1"</a:s></a:s></a:s><a:s>
    </a:s><a:s r="327"><a:s>when </a:s><a:s r="328"><a:s r="330"><a:s r="329"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="330"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="331"><a:s>'Rubella22.1'</a:s></a:s></a:s><a:s> then </a:s><a:s r="337"><a:s>"One rubella dose from the primary series was administered. The primary series has been completed"</a:s></a:s></a:s><a:s>
    else </a:s><a:s r="338"><a:s>'No test case set'</a:s></a:s><a:s>
  end</a:s></a:s></a:s></annotation><expression localId="293" locator="85:3-91:5" xsi:type="Case"><caseItem localId="294" locator="86:5-86:57"><when localId="295" locator="86:10-86:35" xsi:type="Equal"><signature localId="302" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="303" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="300" name="ToString" xsi:type="FunctionRef"><signature localId="301" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="297" locator="86:10-86:19" path="id" xsi:type="Property"><source localId="296" locator="86:10-86:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="298" locator="86:23-86:35" value="Rubella19.1" valueType="t:String" xsi:type="Literal"/></when><then localId="340" xsi:type="As"><operand localId="304" locator="86:42-86:57" name="Rubella dose 1" xsi:type="ExpressionRef"/><asTypeSpecifier localId="341" xsi:type="ChoiceTypeSpecifier"><choice localId="342" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="343" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><caseItem localId="305" locator="87:5-87:57"><when localId="306" locator="87:10-87:35" xsi:type="Equal"><signature localId="313" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="314" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="311" name="ToString" xsi:type="FunctionRef"><signature localId="312" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="308" locator="87:10-87:19" path="id" xsi:type="Property"><source localId="307" locator="87:10-87:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="309" locator="87:23-87:35" value="Rubella20.3" valueType="t:String" xsi:type="Literal"/></when><then localId="344" xsi:type="As"><operand localId="315" locator="87:42-87:57" name="Rubella dose 1" xsi:type="ExpressionRef"/><asTypeSpecifier localId="345" xsi:type="ChoiceTypeSpecifier"><choice localId="346" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="347" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><caseItem localId="316" locator="88:5-88:57"><when localId="317" locator="88:10-88:35" xsi:type="Equal"><signature localId="324" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="325" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="322" name="ToString" xsi:type="FunctionRef"><signature localId="323" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="319" locator="88:10-88:19" path="id" xsi:type="Property"><source localId="318" locator="88:10-88:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="320" locator="88:23-88:35" value="Rubella21.3" valueType="t:String" xsi:type="Literal"/></when><then localId="348" xsi:type="As"><operand localId="326" locator="88:42-88:57" name="Rubella dose 1" xsi:type="ExpressionRef"/><asTypeSpecifier localId="349" xsi:type="ChoiceTypeSpecifier"><choice localId="350" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="351" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><caseItem localId="327" locator="89:5-89:139"><when localId="328" locator="89:10-89:35" xsi:type="Equal"><signature localId="335" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="336" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="333" name="ToString" xsi:type="FunctionRef"><signature localId="334" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="330" locator="89:10-89:19" path="id" xsi:type="Property"><source localId="329" locator="89:10-89:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="331" locator="89:23-89:35" value="Rubella22.1" valueType="t:String" xsi:type="Literal"/></when><then localId="352" xsi:type="As"><operand localId="337" locator="89:42-89:139" name="One rubella dose from the primary series was administered. The primary series has been completed" xsi:type="ExpressionRef"/><asTypeSpecifier localId="353" xsi:type="ChoiceTypeSpecifier"><choice localId="354" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="355" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><else localId="356" xsi:type="As"><operand localId="338" locator="90:10-90:27" value="No test case set" valueType="t:String" xsi:type="Literal"/><asTypeSpecifier localId="357" xsi:type="ChoiceTypeSpecifier"><choice localId="358" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="359" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></else></expression></def></statements></library>