<?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="324">
         <a:s>/*
 * Library: IMMZD18SRabiesLogic (IMMZ.D18.S.Rabies schedule)
 * Schedule Table: Rabies schedule (2-dose scheme)
 */
library IMMZD18SRabiesLogic</a:s>
      </a:s>
   </annotation>
   <identifier id="IMMZD18SRabiesLogic" 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:27" localIdentifier="WC" 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" locator="12:1-12:32" localIdentifier="Common" 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" locator="13:1-13:36" localIdentifier="Concepts" 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" locator="15:1-15:39" localIdentifier="IE" 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" locator="16:1-16:56" localIdentifier="Encounter" path="http://smart.who.int/immunizations/IMMZD2DTRabiesEncounterElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="218">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZD2DTRabiesEncounterElements</a:s>
               </a:s>
               <a:s> called Encounter</a:s>
            </a:s>
         </annotation>
      </def>
   </includes>
   <parameters>
      <def localId="220" locator="18:1-18:36" name="Today" accessLevel="Public">
         <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 localId="227" locator="21:1-21:15" name="Patient" context="Patient">
         <expression localId="228" xsi:type="SingletonFrom">
            <operand localId="226" locator="21:1-21:15" dataType="fhir:Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def localId="239" locator="74:1-75:63" name="First rabies dose from the primary series was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="complete" value="First rabies dose from the primary series was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Rabies vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1"/>
            <a:s r="239">
               <a:s>/*
@complete: First rabies dose from the primary series was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1
*/
define &quot;First rabies dose from the primary series was administered&quot;:
  </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>&quot;One rabies primary series doses were administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="241" locator="75:3-75:63" name="One rabies primary series doses were administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="232" locator="31:1-33:70" name="Rabies dose 1" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Rabies dose 1"/>
            <a:t name="description" value="Provision of rabies dose 1"/>
            <a:t name="trigger" value="To be determined by Member States"/>
            <a:t name="pseudo"/>
            <a:t name="triggerDate" value="To be determined by Member States"/>
            <a:s r="232">
               <a:s>/*
@output: Rabies dose 1
@description: Provision of rabies dose 1
@trigger: To be determined by Member States
@pseudo: 
@triggerDate: To be determined by Member States
*/
define &quot;Rabies dose 1&quot;:
  </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>&quot;No rabies primary series doses were administered&quot;</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>&quot;First rabies dose from the primary series was administered&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="233" locator="32:3-33:70" xsi:type="And">
            <operand localId="235" locator="32:3-32:62" name="No rabies primary series doses were administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="236" locator="33:7-33:70" xsi:type="Not">
               <operand localId="242" locator="33:11-33:70" name="First rabies dose from the primary series was administered" xsi:type="ExpressionRef"/>
            </operand>
         </expression>
      </def>
      <def localId="245" locator="40:1-43:9" name="Rabies dose 1 Create" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Rabies dose 1 Create"/>
            <a:t name="create" value="Rabies dose 1 should be provided if the client is at a high risk of rabies virus exposure"/>
            <a:s r="245">
               <a:s>/*
@output: Rabies dose 1 Create
@create: Rabies dose 1 should be provided if the client is at a high risk of rabies virus exposure
*/
define &quot;Rabies dose 1 Create&quot;:
  </a:s>
               <a:s r="246">
                  <a:s>if </a:s>
                  <a:s r="247">
                     <a:s>&quot;Rabies dose 1&quot;</a:s>
                  </a:s>
                  <a:s>
  then </a:s>
                  <a:s r="248">
                     <a:s>'Rabies dose 1 should be provided if the client is at a high risk of rabies virus exposure'</a:s>
                  </a:s>
                  <a:s>
  else </a:s>
                  <a:s r="250">
                     <a:s>''</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="246" locator="41:3-43:9" xsi:type="If">
            <condition localId="247" locator="41:6-41:20" name="Rabies dose 1" xsi:type="ExpressionRef"/>
            <then localId="248" locator="42:8-42:98" valueType="t:String" value="Rabies dose 1 should be provided if the client is at a high risk of rabies virus exposure" xsi:type="Literal"/>
            <else localId="250" locator="43:8-43:9" valueType="t:String" value="" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="254" locator="50:1-51:6" name="Rabies dose 1 Due Date" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Rabies dose 1 Due Date"/>
            <a:t name="pseudocode" value="To be determined by Member States"/>
            <a:s r="254">
               <a:s r="255">/*
@dynamicValue: Rabies dose 1 Due Date
@pseudocode: To be determined by Member States
*/
define &quot;Rabies dose 1 Due Date&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="255" locator="51:3-51:6" xsi:type="Null"/>
      </def>
      <def localId="258" locator="58:1-59:6" name="Rabies dose 1 Overdue" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Rabies dose 1 Overdue"/>
            <a:t name="pseudocode" value="To be determined by Member States"/>
            <a:s r="258">
               <a:s r="259">/*
@dynamicValue: Rabies dose 1 Overdue
@pseudocode: To be determined by Member States
*/
define &quot;Rabies dose 1 Overdue&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="259" locator="59:3-59:6" xsi:type="Null"/>
      </def>
      <def localId="262" locator="66:1-67:6" name="Rabies dose 1 Expiration" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Rabies dose 1 Expiration"/>
            <a:t name="pseudocode" value="To be determined by Member States"/>
            <a:s r="262">
               <a:s r="263">/*
@dynamicValue: Rabies dose 1 Expiration
@pseudocode: To be determined by Member States
*/
define &quot;Rabies dose 1 Expiration&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="263" locator="67:3-67:6" xsi:type="Null"/>
      </def>
      <def localId="272" locator="131:1-132:63" name="Second rabies dose from the primary series was administered. The primary series has been completed" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="complete" value="Second rabies dose from the primary series was administered. The primary series has been completed"/>
            <a:t name="pseudocode" value="&quot;Completed the primary vaccination series&quot; = TRUE (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;)"/>
            <a:s r="272">
               <a:s>/*
@complete: Second rabies dose from the primary series was administered. The primary series has been completed
@pseudocode: &quot;Completed the primary vaccination series&quot; = TRUE (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;)
*/
define &quot;Second rabies dose from the primary series was administered. The primary series has been completed&quot;:
  </a:s>
               <a:s r="274">
                  <a:s r="273">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="274">
                     <a:s>&quot;Two rabies primary series doses were administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="274" locator="132:3-132:63" name="Two rabies primary series doses were administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="266" locator="86:1-88:110" name="Rabies dose 2" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Rabies dose 2"/>
            <a:t name="description" value="Provision of rabies dose 2"/>
            <a:t name="trigger" value="First rabies dose from the primary series was administered"/>
            <a:t name="pseudo" value="&quot;Vaccine type&quot; = &quot;Rabies vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1"/>
            <a:t name="triggerDate" value="&quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;)"/>
            <a:s r="266">
               <a:s>/*
@output: Rabies dose 2
@description: Provision of rabies dose 2
@trigger: First rabies dose from the primary series was administered
@pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1
@triggerDate: &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;)
*/
define &quot;Rabies dose 2&quot;:
  </a:s>
               <a:s r="267">
                  <a:s r="268">
                     <a:s>&quot;First rabies dose from the primary series was administered&quot;</a:s>
                  </a:s>
                  <a:s>
  and </a:s>
                  <a:s r="269">
                     <a:s>not </a:s>
                     <a:s r="275">
                        <a:s>&quot;Second rabies dose from the primary series was administered. The primary series has been completed&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="267" locator="87:3-88:110" xsi:type="And">
            <operand localId="268" locator="87:3-87:62" name="First rabies dose from the primary series was administered" xsi:type="ExpressionRef"/>
            <operand localId="269" locator="88:7-88:110" xsi:type="Not">
               <operand localId="275" locator="88:11-88:110" name="Second rabies dose from the primary series was administered. The primary series has been completed" xsi:type="ExpressionRef"/>
            </operand>
         </expression>
      </def>
      <def localId="292" locator="106:1-108:11" name="Rabies dose 2 Due Date" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Rabies dose 2 Due Date"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;) + 7 days"/>
            <a:s r="292">
               <a:s>/*
@dynamicValue: Rabies dose 2 Due Date
@pseudocode: &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;) + 7 days
*/
define &quot;Rabies dose 2 Due Date&quot;:
  </a:s>
               <a:s r="293">
                  <a:s>if </a:s>
                  <a:s r="294">
                     <a:s>&quot;Rabies dose 2&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="295">
                     <a:s r="297">
                        <a:s r="296">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="297">
                           <a:s>&quot;Date of Latest Rabies Dose&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="298">
                        <a:s>7 days</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="301">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="293" locator="107:3-108:11" xsi:type="If">
            <condition localId="294" locator="107:6-107:20" name="Rabies dose 2" xsi:type="ExpressionRef"/>
            <then localId="295" locator="107:27-107:73" xsi:type="Add">
               <signature localId="299" name="t:Date" xsi:type="NamedTypeSpecifier"/>
               <signature localId="300" name="t:Quantity" xsi:type="NamedTypeSpecifier"/>
               <operand localId="297" locator="107:27-107:64" name="Date of Latest Rabies Dose" libraryName="Encounter" xsi:type="ExpressionRef"/>
               <operand localId="298" locator="107:68-107:73" value="7" unit="days" xsi:type="Quantity"/>
            </then>
            <else localId="302" asType="t:Date" xsi:type="As">
               <operand localId="301" locator="108:8-108:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="278" locator="95:1-99:9" name="Rabies dose 2 Create" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Rabies dose 2 Create"/>
            <a:t name="create" value="Rabies dose 2 should be provided if previous dose was given more than 1 week ago"/>
            <a:s r="278">
               <a:s>/*
@output: Rabies dose 2 Create
@create: Rabies dose 2 should be provided if previous dose was given more than 1 week ago
*/
define &quot;Rabies dose 2 Create&quot;:
  </a:s>
               <a:s r="279">
                  <a:s>if </a:s>
                  <a:s r="280">
                     <a:s>&quot;Rabies dose 2&quot;</a:s>
                  </a:s>
                  <a:s>
  then </a:s>
                  <a:s r="311">
                     <a:s r="289">
                        <a:s r="283">
                           <a:s>'Rabies dose 2 should be provided if previous dose was given more than 1 week ago'</a:s>
                        </a:s>
                        <a:s> + </a:s>
                        <a:s r="285">
                           <a:s>'
Due Date: '</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="307">
                        <a:s>ToString(</a:s>
                        <a:s r="303">
                           <a:s>&quot;Rabies dose 2 Due Date&quot;</a:s>
                        </a:s>
                        <a:s>)</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  else </a:s>
                  <a:s r="312">
                     <a:s>''</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="279" locator="96:3-99:9" xsi:type="If">
            <condition localId="280" locator="96:6-96:20" name="Rabies dose 2" xsi:type="ExpressionRef"/>
            <then localId="311" locator="97:8-98:48" xsi:type="Concatenate">
               <operand localId="289" locator="97:8-97:105" xsi:type="Concatenate">
                  <operand localId="283" locator="97:8-97:89" valueType="t:String" value="Rabies dose 2 should be provided if previous dose was given more than 1 week ago" xsi:type="Literal"/>
                  <operand localId="285" locator="97:93-97:105" valueType="t:String" value="&#xa;Due Date: " xsi:type="Literal"/>
               </operand>
               <operand localId="307" locator="98:15-98:48" xsi:type="ToString">
                  <signature localId="308" name="t:Date" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="303" locator="98:24-98:47" name="Rabies dose 2 Due Date" xsi:type="ExpressionRef"/>
               </operand>
            </then>
            <else localId="312" locator="99:8-99:9" valueType="t:String" value="" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="316" locator="115:1-116:6" name="Rabies dose 2 Overdue" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Rabies dose 2 Overdue"/>
            <a:t name="pseudocode" value="To be determined by Member States"/>
            <a:s r="316">
               <a:s r="317">/*
@dynamicValue: Rabies dose 2 Overdue
@pseudocode: To be determined by Member States
*/
define &quot;Rabies dose 2 Overdue&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="317" locator="116:3-116:6" xsi:type="Null"/>
      </def>
      <def localId="320" locator="123:1-124:6" name="Rabies dose 2 Expiration" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Rabies dose 2 Expiration"/>
            <a:t name="pseudocode" value="To be determined by Member States"/>
            <a:s r="320">
               <a:s r="321">/*
@dynamicValue: Rabies dose 2 Expiration
@pseudocode: To be determined by Member States
*/
define &quot;Rabies dose 2 Expiration&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="321" locator="124:3-124:6" xsi:type="Null"/>
      </def>
      <def localId="324" locator="139:1-146:5" name="Test Validation" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="test" value="Test expected results based on example patients"/>
            <a:s r="324">
               <a:s>/*
@test: Test expected results based on example patients
*/
define &quot;Test Validation&quot;:
  </a:s>
               <a:s r="325">
                  <a:s>case
    </a:s>
                  <a:s r="326">
                     <a:s>when </a:s>
                     <a:s r="327">
                        <a:s r="329">
                           <a:s r="328">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="329">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="330">
                           <a:s>'Rabies08.1'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="336">
                        <a:s>&quot;Rabies dose 1&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="337">
                     <a:s>when </a:s>
                     <a:s r="338">
                        <a:s r="340">
                           <a:s r="339">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="340">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="341">
                           <a:s>'Rabies09.2'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="347">
                        <a:s>&quot;Rabies dose 2&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="348">
                     <a:s>when </a:s>
                     <a:s r="349">
                        <a:s r="351">
                           <a:s r="350">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="351">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="352">
                           <a:s>'Rabies10.2'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="358">
                        <a:s>&quot;Rabies dose 2&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="359">
                     <a:s>when </a:s>
                     <a:s r="360">
                        <a:s r="362">
                           <a:s r="361">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="362">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="363">
                           <a:s>'Rabies11.1'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="369">
                        <a:s>&quot;Second rabies dose from the primary series was administered. The primary series has been completed&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    else </a:s>
                  <a:s r="370">
                     <a:s>'No test case set'</a:s>
                  </a:s>
                  <a:s>
  end</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="325" locator="140:3-146:5" xsi:type="Case">
            <caseItem localId="326" locator="141:5-141:55">
               <when localId="327" locator="141:10-141:34" xsi:type="Equal">
                  <signature localId="334" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="335" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="332" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="333" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="329" locator="141:10-141:19" path="id" xsi:type="Property">
                        <source localId="328" locator="141:10-141:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="330" locator="141:23-141:34" valueType="t:String" value="Rabies08.1" xsi:type="Literal"/>
               </when>
               <then localId="372" xsi:type="As">
                  <operand localId="336" locator="141:41-141:55" name="Rabies dose 1" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="373" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="374" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="375" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="337" locator="142:5-142:55">
               <when localId="338" locator="142:10-142:34" xsi:type="Equal">
                  <signature localId="345" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="346" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="343" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="344" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="340" locator="142:10-142:19" path="id" xsi:type="Property">
                        <source localId="339" locator="142:10-142:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="341" locator="142:23-142:34" valueType="t:String" value="Rabies09.2" xsi:type="Literal"/>
               </when>
               <then localId="376" xsi:type="As">
                  <operand localId="347" locator="142:41-142:55" name="Rabies dose 2" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="377" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="378" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="379" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="348" locator="143:5-143:55">
               <when localId="349" locator="143:10-143:34" xsi:type="Equal">
                  <signature localId="356" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="357" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="354" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="355" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="351" locator="143:10-143:19" path="id" xsi:type="Property">
                        <source localId="350" locator="143:10-143:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="352" locator="143:23-143:34" valueType="t:String" value="Rabies10.2" xsi:type="Literal"/>
               </when>
               <then localId="380" xsi:type="As">
                  <operand localId="358" locator="143:41-143:55" name="Rabies dose 2" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="381" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="382" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="383" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="359" locator="144:5-144:140">
               <when localId="360" locator="144:10-144:34" xsi:type="Equal">
                  <signature localId="367" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="368" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="365" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="366" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="362" locator="144:10-144:19" path="id" xsi:type="Property">
                        <source localId="361" locator="144:10-144:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="363" locator="144:23-144:34" valueType="t:String" value="Rabies11.1" xsi:type="Literal"/>
               </when>
               <then localId="384" xsi:type="As">
                  <operand localId="369" locator="144:41-144:140" name="Second rabies dose from the primary series was administered. The primary series has been completed" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="385" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="386" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="387" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <else localId="388" xsi:type="As">
               <operand localId="370" locator="145:10-145:27" valueType="t:String" value="No test case set" xsi:type="Literal"/>
               <asTypeSpecifier localId="389" xsi:type="ChoiceTypeSpecifier">
                  <choice localId="390" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                  <choice localId="391" name="t:String" xsi:type="NamedTypeSpecifier"/>
               </asTypeSpecifier>
            </else>
         </expression>
      </def>
   </statements>
</library>
