<?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="289">
         <a:s>/*
 * Library: IMMZD2DTHepatitisBBirthDoseLogic (IMMZ.D2.DT.Hepatitis B.Birth dose)
 * Rule: Determine if the client is due for a hepatitis B vaccination according to the national immunization schedule
 * Decision Table: Birth dose administration
 * Trigger: IMMZ.D2 Determine required vaccination(s) if any
 */
library IMMZD2DTHepatitisBBirthDoseLogic</a:s>
      </a:s>
   </annotation>
   <identifier id="IMMZD2DTHepatitisBBirthDoseLogic" 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="9:1-9: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="10:1-10: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="12:1-12:60" localIdentifier="Encounter" path="http://smart.who.int/immunizations/IMMZD2DTHepatitisBEncounterElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="210">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZD2DTHepatitisBEncounterElements</a:s>
               </a:s>
               <a:s> called Encounter</a:s>
            </a:s>
         </annotation>
      </def>
   </includes>
   <parameters>
      <def localId="212" locator="14:1-14:36" name="Today" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:s r="212">
               <a:s>parameter Today </a:s>
               <a:s r="216">
                  <a:s>Date</a:s>
               </a:s>
               <a:s> default </a:s>
               <a:s r="215">
                  <a:s>Today()</a:s>
               </a:s>
            </a:s>
         </annotation>
         <default localId="215" locator="14:30-14:36" xsi:type="Today"/>
         <parameterTypeSpecifier localId="216" locator="14:17-14:20" name="t:Date" xsi:type="NamedTypeSpecifier"/>
      </def>
   </parameters>
   <contexts>
      <def localId="221" locator="16:1-16:15" name="Patient"/>
   </contexts>
   <statements>
      <def localId="219" locator="16:1-16:15" name="Patient" context="Patient">
         <expression localId="220" xsi:type="SingletonFrom">
            <operand localId="218" locator="16:1-16:15" dataType="fhir:Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def localId="229" locator="37:1-39:81" name="Client is due for hepatitis B monovalent vaccine" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Client is due for hepatitis B monovalent vaccine"/>
            <a:t name="pseudocode" value="&quot;Immunization recommendation status&quot; = &quot;Due&quot; (where &quot;Type of hepatitis B dose&quot; = &quot;Hepatitis B monovalent vaccine&quot;)"/>
            <a:s r="229">
               <a:s>/*
@output: Client is due for hepatitis B monovalent vaccine
@pseudocode: &quot;Immunization recommendation status&quot; = &quot;Due&quot; (where &quot;Type of hepatitis B dose&quot; = &quot;Hepatitis B monovalent vaccine&quot;)
*/
define &quot;Client is due for hepatitis B monovalent vaccine&quot;:
  </a:s>
               <a:s r="230">
                  <a:s r="232">
                     <a:s r="231">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="232">
                        <a:s>&quot;Hepatitis B birth dose was not administered&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    and </a:s>
                  <a:s r="234">
                     <a:s r="233">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="234">
                        <a:s>&quot;Client's age is less than {Member States defined upper limit}&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="230" locator="38:3-39:81" xsi:type="And">
            <operand localId="232" locator="38:3-38:57" name="Hepatitis B birth dose was not administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="234" locator="39:9-39:81" name="Client's age is less than {Member States defined upper limit}" libraryName="Encounter" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="238" locator="45:1-46:107" name="Client is due for hepatitis B monovalent vaccine Guidance" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Client is due for hepatitis B monovalent vaccine Guidance"/>
            <a:t name="guidance" value="Should vaccinate client with hepatitis B birth dose, as a monovalent dose. Check for contraindications."/>
            <a:s r="238">
               <a:s>/*
@output: Client is due for hepatitis B monovalent vaccine Guidance
@guidance: Should vaccinate client with hepatitis B birth dose, as a monovalent dose. Check for contraindications.
*/
define &quot;Client is due for hepatitis B monovalent vaccine Guidance&quot;:
  </a:s>
               <a:s r="239">
                  <a:s>'Should vaccinate client with hepatitis B birth dose, as a monovalent dose. Check for contraindications.'</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="239" locator="46:3-46:107" valueType="t:String" value="Should vaccinate client with hepatitis B birth dose, as a monovalent dose. Check for contraindications." xsi:type="Literal"/>
      </def>
      <def localId="245" locator="52:1-54:81" name="Client should follow delayed-start decision logic" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Client should follow delayed-start decision logic"/>
            <a:t name="pseudocode"/>
            <a:s r="245">
               <a:s>/*
@output: Client should follow delayed-start decision logic
@pseudocode: 
*/
define &quot;Client should follow delayed-start decision logic&quot;:
  </a:s>
               <a:s r="246">
                  <a:s r="248">
                     <a:s r="247">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="248">
                        <a:s>&quot;Hepatitis B birth dose was not administered&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    and </a:s>
                  <a:s r="250">
                     <a:s r="249">
                        <a:s>Encounter</a:s>
                     </a:s>
                     <a:s>.</a:s>
                     <a:s r="250">
                        <a:s>&quot;Client's age is more than {Member States defined upper limit}&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="246" locator="53:3-54:81" xsi:type="And">
            <operand localId="248" locator="53:3-53:57" name="Hepatitis B birth dose was not administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
            <operand localId="250" locator="54:9-54:81" name="Client's age is more than {Member States defined upper limit}" libraryName="Encounter" xsi:type="ExpressionRef"/>
         </expression>
      </def>
      <def localId="254" locator="60:1-61:77" name="Client should follow delayed-start decision logic Guidance" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Client should follow delayed-start decision logic Guidance"/>
            <a:t name="guidance" value="The client has a delayed start. Please follow the delayed start schedule."/>
            <a:s r="254">
               <a:s>/*
@output: Client should follow delayed-start decision logic Guidance
@guidance: The client has a delayed start. Please follow the delayed start schedule.
*/
define &quot;Client should follow delayed-start decision logic Guidance&quot;:
  </a:s>
               <a:s r="255">
                  <a:s>'The client has a delayed start. Please follow the delayed start schedule.'</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="255" locator="61:3-61:77" valueType="t:String" value="The client has a delayed start. Please follow the delayed start schedule." xsi:type="Literal"/>
      </def>
      <def localId="261" locator="67:1-68:53" name="Client is not due for the hepatitis B birth dose" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Client is not due for the hepatitis B birth dose"/>
            <a:t name="pseudocode" value="&quot;Immunization recommendation status&quot; = &quot;Not due&quot;"/>
            <a:s r="261">
               <a:s>/*
@output: Client is not due for the hepatitis B birth dose
@pseudocode: &quot;Immunization recommendation status&quot; = &quot;Not due&quot;
*/
define &quot;Client is not due for the hepatitis B birth dose&quot;:
  </a:s>
               <a:s r="263">
                  <a:s r="262">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="263">
                     <a:s>&quot;Hepatitis B birth dose was administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="263" locator="68:3-68:53" name="Hepatitis B birth dose was administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="267" locator="74:1-75:93" name="Client is not due for the hepatitis B birth dose Guidance" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Client is not due for the hepatitis B birth dose Guidance"/>
            <a:t name="guidance" value="Hepatitis B birth dose was already administered. Check hepatitis B immunization schedule."/>
            <a:s r="267">
               <a:s>/*
@output: Client is not due for the hepatitis B birth dose Guidance
@guidance: Hepatitis B birth dose was already administered. Check hepatitis B immunization schedule.
*/
define &quot;Client is not due for the hepatitis B birth dose Guidance&quot;:
  </a:s>
               <a:s r="268">
                  <a:s>'Hepatitis B birth dose was already administered. Check hepatitis B immunization schedule.'</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="268" locator="75:3-75:93" valueType="t:String" value="Hepatitis B birth dose was already administered. Check hepatitis B immunization schedule." xsi:type="Literal"/>
      </def>
      <def localId="224" locator="22:1-28:5" name="Guidance" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Guidance"/>
            <a:s r="224">
               <a:s>/*
@dynamicValue: Guidance
*/
define &quot;Guidance&quot;:
  </a:s>
               <a:s r="225">
                  <a:s>case 
    </a:s>
                  <a:s r="226">
                     <a:s>when </a:s>
                     <a:s r="235">
                        <a:s>&quot;Client is due for hepatitis B monovalent vaccine&quot;</a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="241">
                        <a:s>&quot;Client is due for hepatitis B monovalent vaccine Guidance&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="242">
                     <a:s>when </a:s>
                     <a:s r="251">
                        <a:s>&quot;Client should follow delayed-start decision logic&quot;</a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="257">
                        <a:s>&quot;Client should follow delayed-start decision logic Guidance&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="258">
                     <a:s>when </a:s>
                     <a:s r="264">
                        <a:s>&quot;Client is not due for the hepatitis B birth dose&quot;</a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="270">
                        <a:s>&quot;Client is not due for the hepatitis B birth dose Guidance&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s> 
    else </a:s>
                  <a:s r="271">
                     <a:s>''</a:s>
                  </a:s>
                  <a:s>
  end</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="225" locator="23:3-28:5" xsi:type="Case">
            <caseItem localId="226" locator="24:5-24:124">
               <when localId="235" locator="24:10-24:59" name="Client is due for hepatitis B monovalent vaccine" xsi:type="ExpressionRef"/>
               <then localId="241" locator="24:66-24:124" name="Client is due for hepatitis B monovalent vaccine Guidance" xsi:type="ExpressionRef"/>
            </caseItem>
            <caseItem localId="242" locator="25:5-25:126">
               <when localId="251" locator="25:10-25:60" name="Client should follow delayed-start decision logic" xsi:type="ExpressionRef"/>
               <then localId="257" locator="25:67-25:126" name="Client should follow delayed-start decision logic Guidance" xsi:type="ExpressionRef"/>
            </caseItem>
            <caseItem localId="258" locator="26:5-26:124">
               <when localId="264" locator="26:10-26:59" name="Client is not due for the hepatitis B birth dose" xsi:type="ExpressionRef"/>
               <then localId="270" locator="26:66-26:124" name="Client is not due for the hepatitis B birth dose Guidance" xsi:type="ExpressionRef"/>
            </caseItem>
            <else localId="271" locator="27:10-27:11" valueType="t:String" value="" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="275" locator="30:1-31:45" name="Has Guidance" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:s r="275">
               <a:s>define &quot;Has Guidance&quot;:
  </a:s>
               <a:s r="276">
                  <a:s r="279">
                     <a:s r="277">
                        <a:s>&quot;Guidance&quot;</a:s>
                     </a:s>
                     <a:s> is not null</a:s>
                  </a:s>
                  <a:s> and </a:s>
                  <a:s r="286">
                     <a:s r="281">
                        <a:s>&quot;Guidance&quot;</a:s>
                     </a:s>
                     <a:s> != </a:s>
                     <a:s r="282">
                        <a:s>''</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="276" locator="31:3-31:45" xsi:type="And">
            <operand localId="279" locator="31:3-31:24" xsi:type="Not">
               <operand localId="278" locator="31:3-31:24" xsi:type="IsNull">
                  <operand localId="277" locator="31:3-31:12" name="Guidance" xsi:type="ExpressionRef"/>
               </operand>
            </operand>
            <operand localId="286" locator="31:30-31:45" xsi:type="Not">
               <operand localId="280" locator="31:30-31:45" xsi:type="Equal">
                  <signature localId="284" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="285" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="281" locator="31:30-31:39" name="Guidance" xsi:type="ExpressionRef"/>
                  <operand localId="282" locator="31:44-31:45" valueType="t:String" value="" xsi:type="Literal"/>
               </operand>
            </operand>
         </expression>
      </def>
      <def localId="289" locator="81:1-87: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="289">
               <a:s>/*
@test: Test expected results based on example patients
*/
define &quot;Test Validation&quot;:
  </a:s>
               <a:s r="290">
                  <a:s>case
    </a:s>
                  <a:s r="291">
                     <a:s>when </a:s>
                     <a:s r="292">
                        <a:s r="294">
                           <a:s r="293">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="294">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="295">
                           <a:s>'HepatitisB08.2'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="301">
                        <a:s r="302">
                           <a:s>&quot;Client is due for hepatitis B monovalent vaccine&quot;</a:s>
                        </a:s>
                        <a:s> and </a:s>
                        <a:s r="303">
                           <a:s r="304">
                              <a:s>&quot;Guidance&quot;</a:s>
                           </a:s>
                           <a:s> = </a:s>
                           <a:s r="305">
                              <a:s>'Should vaccinate client with hepatitis B birth dose, as a monovalent dose. Check for contraindications.'</a:s>
                           </a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="309">
                     <a:s>when </a:s>
                     <a:s r="310">
                        <a:s r="312">
                           <a:s r="311">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="312">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="313">
                           <a:s>'HepatitisB09.2'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="319">
                        <a:s r="320">
                           <a:s>&quot;Client should follow delayed-start decision logic&quot;</a:s>
                        </a:s>
                        <a:s> and </a:s>
                        <a:s r="321">
                           <a:s r="322">
                              <a:s>&quot;Guidance&quot;</a:s>
                           </a:s>
                           <a:s> = </a:s>
                           <a:s r="323">
                              <a:s>'The client has a delayed start. Please follow the delayed start schedule.'</a:s>
                           </a:s>
                        </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>'HepatitisB10.1'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="337">
                        <a:s r="338">
                           <a:s>&quot;Client is not due for the hepatitis B birth dose&quot;</a:s>
                        </a:s>
                        <a:s> and </a:s>
                        <a:s r="339">
                           <a:s r="340">
                              <a:s>&quot;Guidance&quot;</a:s>
                           </a:s>
                           <a:s> = </a:s>
                           <a:s r="341">
                              <a:s>'Hepatitis B birth dose was already administered. Check hepatitis B immunization schedule.'</a:s>
                           </a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    else </a:s>
                  <a:s r="345">
                     <a:s>'No test case set'</a:s>
                  </a:s>
                  <a:s>
  end</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="290" locator="82:3-87:5" xsi:type="Case">
            <caseItem localId="291" locator="83:5-83:217">
               <when localId="292" locator="83:10-83:38" xsi:type="Equal">
                  <signature localId="299" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="300" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="297" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="298" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="294" locator="83:10-83:19" path="id" xsi:type="Property">
                        <source localId="293" locator="83:10-83:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="295" locator="83:23-83:38" valueType="t:String" value="HepatitisB08.2" xsi:type="Literal"/>
               </when>
               <then localId="347" xsi:type="As">
                  <operand localId="301" locator="83:45-83:217" xsi:type="And">
                     <operand localId="302" locator="83:45-83:94" name="Client is due for hepatitis B monovalent vaccine" xsi:type="ExpressionRef"/>
                     <operand localId="303" locator="83:100-83:217" xsi:type="Equal">
                        <signature localId="307" name="t:String" xsi:type="NamedTypeSpecifier"/>
                        <signature localId="308" name="t:String" xsi:type="NamedTypeSpecifier"/>
                        <operand localId="304" locator="83:100-83:109" name="Guidance" xsi:type="ExpressionRef"/>
                        <operand localId="305" locator="83:113-83:217" valueType="t:String" value="Should vaccinate client with hepatitis B birth dose, as a monovalent dose. Check for contraindications." xsi:type="Literal"/>
                     </operand>
                  </operand>
                  <asTypeSpecifier localId="348" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="349" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="350" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="309" locator="84:5-84:188">
               <when localId="310" locator="84:10-84:38" xsi:type="Equal">
                  <signature localId="317" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="318" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="315" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="316" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="312" locator="84:10-84:19" path="id" xsi:type="Property">
                        <source localId="311" locator="84:10-84:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="313" locator="84:23-84:38" valueType="t:String" value="HepatitisB09.2" xsi:type="Literal"/>
               </when>
               <then localId="351" xsi:type="As">
                  <operand localId="319" locator="84:45-84:188" xsi:type="And">
                     <operand localId="320" locator="84:45-84:95" name="Client should follow delayed-start decision logic" xsi:type="ExpressionRef"/>
                     <operand localId="321" locator="84:101-84:188" xsi:type="Equal">
                        <signature localId="325" name="t:String" xsi:type="NamedTypeSpecifier"/>
                        <signature localId="326" name="t:String" xsi:type="NamedTypeSpecifier"/>
                        <operand localId="322" locator="84:101-84:110" name="Guidance" xsi:type="ExpressionRef"/>
                        <operand localId="323" locator="84:114-84:188" valueType="t:String" value="The client has a delayed start. Please follow the delayed start schedule." xsi:type="Literal"/>
                     </operand>
                  </operand>
                  <asTypeSpecifier localId="352" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="353" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="354" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="327" locator="85:5-85:203">
               <when localId="328" locator="85:10-85:38" xsi:type="Equal">
                  <signature localId="335" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="336" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="333" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="334" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="330" locator="85:10-85:19" path="id" xsi:type="Property">
                        <source localId="329" locator="85:10-85:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="331" locator="85:23-85:38" valueType="t:String" value="HepatitisB10.1" xsi:type="Literal"/>
               </when>
               <then localId="355" xsi:type="As">
                  <operand localId="337" locator="85:45-85:203" xsi:type="And">
                     <operand localId="338" locator="85:45-85:94" name="Client is not due for the hepatitis B birth dose" xsi:type="ExpressionRef"/>
                     <operand localId="339" locator="85:100-85:203" xsi:type="Equal">
                        <signature localId="343" name="t:String" xsi:type="NamedTypeSpecifier"/>
                        <signature localId="344" name="t:String" xsi:type="NamedTypeSpecifier"/>
                        <operand localId="340" locator="85:100-85:109" name="Guidance" xsi:type="ExpressionRef"/>
                        <operand localId="341" locator="85:113-85:203" valueType="t:String" value="Hepatitis B birth dose was already administered. Check hepatitis B immunization schedule." xsi:type="Literal"/>
                     </operand>
                  </operand>
                  <asTypeSpecifier localId="356" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="357" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="358" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <else localId="359" xsi:type="As">
               <operand localId="345" locator="86:10-86:27" valueType="t:String" value="No test case set" xsi:type="Literal"/>
               <asTypeSpecifier localId="360" xsi:type="ChoiceTypeSpecifier">
                  <choice localId="361" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                  <choice localId="362" name="t:String" xsi:type="NamedTypeSpecifier"/>
               </asTypeSpecifier>
            </else>
         </expression>
      </def>
   </statements>
</library>
