<?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="485">
         <a:s>/*
 * Library: IMMZD18SDTPPregnancyStartingWith3DosesLogic (IMMZ.D18.S.DTP.Pregnancy starting with 3 doses schedule)
 * Schedule Table: Diphtheria and tetanus vaccination schedule in pregnant women who received 3 childhood diphtheria–tetanus–pertussis (DTP) doses
 */
library IMMZD18SDTPPregnancyStartingWith3DosesLogic</a:s>
      </a:s>
   </annotation>
   <identifier id="IMMZD18SDTPPregnancyStartingWith3DosesLogic" 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:53" localIdentifier="Encounter" path="http://smart.who.int/immunizations/IMMZD2DTDTPEncounterElements">
         <annotation xsi:type="a:Annotation">
            <a:s r="218">
               <a:s>include </a:s>
               <a:s>
                  <a:s>IMMZD2DTDTPEncounterElements</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="242" locator="82:1-83:70" name="First tetanus and diphtheria booster dose was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="complete" value="First tetanus and diphtheria booster dose was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 1"/>
            <a:s r="242">
               <a:s>/*
@complete: First tetanus and diphtheria booster dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 1
*/
define &quot;First tetanus and diphtheria booster dose was administered&quot;:
  </a:s>
               <a:s r="244">
                  <a:s r="243">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="244">
                     <a:s>&quot;One tetanus and diphtheria booster dose was administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="244" locator="83:3-83:70" name="One tetanus and diphtheria booster dose was administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="232" locator="31:1-34:71" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)"/>
            <a:t name="description" value="Provision of tetanus and diphtheria booster dose 1 for pregnant women who received only 3 doses of DTP during childhood without booster doses"/>
            <a:t name="trigger" value="The primary DTP series has been completed and client is currently pregnant"/>
            <a:t name="pseudo" value="&quot;Completed the primary vaccination series&quot; = TRUE (where &quot;Vaccine type&quot; = &quot;DTP-containing vaccines&quot;) AND &quot;Currently pregnant&quot; = TRUE"/>
            <a:t name="triggerDate" value="&quot;Contact date&quot; WHEN &quot;ANC contact number&quot; = 1"/>
            <a:s r="232">
               <a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)
@description: Provision of tetanus and diphtheria booster dose 1 for pregnant women who received only 3 doses of DTP during childhood without booster doses
@trigger: The primary DTP series has been completed and client is currently pregnant
@pseudo: &quot;Completed the primary vaccination series&quot; = TRUE (where &quot;Vaccine type&quot; = &quot;DTP-containing vaccines&quot;) AND &quot;Currently pregnant&quot; = TRUE
@triggerDate: &quot;Contact date&quot; WHEN &quot;ANC contact number&quot; = 1
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)&quot;:
  </a:s>
               <a:s r="233">
                  <a:s r="234">
                     <a:s r="236">
                        <a:s r="235">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="236">
                           <a:s>&quot;Three DTP primary series doses were administered&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s>
  and </a:s>
                     <a:s r="238">
                        <a:s r="237">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="238">
                           <a:s>&quot;Client is currently pregnant&quot;</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  and </a:s>
                  <a:s r="239">
                     <a:s>not</a:s>
                     <a:s r="245">
                        <a:s>(</a:s>
                        <a:s r="245">
                           <a:s>&quot;First tetanus and diphtheria booster dose was administered&quot;</a:s>
                        </a:s>
                        <a:s>)</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="233" locator="32:3-34:71" xsi:type="And">
            <operand localId="234" locator="32:3-33:46" xsi:type="And">
               <operand localId="236" locator="32:3-32:62" name="Three DTP primary series doses were administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
               <operand localId="238" locator="33:7-33:46" name="Client is currently pregnant" libraryName="Encounter" xsi:type="ExpressionRef"/>
            </operand>
            <operand localId="239" locator="34:7-34:71" xsi:type="Not">
               <operand localId="245" locator="34:10-34:71" name="First tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/>
            </operand>
         </expression>
      </def>
      <def localId="266" locator="54:1-56:11" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Due Date" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Due Date"/>
            <a:t name="pseudocode" value="&quot;Contact date&quot; WHEN &quot;ANC contact number&quot; = 1"/>
            <a:s r="266">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Due Date
@pseudocode: &quot;Contact date&quot; WHEN &quot;ANC contact number&quot; = 1
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Due Date&quot;:
  </a:s>
               <a:s r="267">
                  <a:s>if </a:s>
                  <a:s r="268">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="269">
                     <a:s>Today</a:s>
                  </a:s>
                  <a:s r="270">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="267" locator="55:3-56:11" xsi:type="If">
            <condition localId="268" locator="55:6-55:82" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="269" locator="55:89-55:93" name="Today" xsi:type="ParameterRef"/>
            <else localId="271" asType="t:Date" xsi:type="As">
               <operand localId="270" locator="56:8-56:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="288" locator="63:1-65:11" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Overdue" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Overdue"/>
            <a:t name="pseudocode" value="Every subsequent contact until 38 weeks"/>
            <a:s r="288">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Overdue
@pseudocode: Every subsequent contact until 38 weeks
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Overdue&quot;:
  </a:s>
               <a:s r="289">
                  <a:s>if </a:s>
                  <a:s r="290">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="291">
                     <a:s>Today</a:s>
                  </a:s>
                  <a:s r="292">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="289" locator="64:3-65:11" xsi:type="If">
            <condition localId="290" locator="64:6-64:82" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="291" locator="64:89-64:93" name="Today" xsi:type="ParameterRef"/>
            <else localId="293" asType="t:Date" xsi:type="As">
               <operand localId="292" locator="65:8-65:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="310" locator="73:1-75:11" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Expiration" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Expiration"/>
            <a:t name="pseudocode" value="&quot;Gestational age&quot; &lt; 38 weeks"/>
            <a:s r="310">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Expiration
@pseudocode: Two weeks before birth for the pregnancy; however, individuals remain eligible to be vaccinated.
&quot;Gestational age&quot; &lt; 38 weeks
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Expiration&quot;:
  </a:s>
               <a:s r="311">
                  <a:s>if </a:s>
                  <a:s r="312">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="313">
                     <a:s>'Two weeks before birth'</a:s>
                  </a:s>
                  <a:s r="315">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="311" locator="74:3-75:11" xsi:type="If">
            <condition localId="312" locator="74:6-74:82" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="313" locator="74:89-74:112" valueType="t:String" value="Two weeks before birth" xsi:type="Literal"/>
            <else localId="316" asType="t:String" xsi:type="As">
               <operand localId="315" locator="75:8-75:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="248" locator="41:1-47:9" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Create" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Create"/>
            <a:t name="create" value="Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth."/>
            <a:s r="248">
               <a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Create
@create: Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth.
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Create&quot;:
  </a:s>
               <a:s r="249">
                  <a:s>if </a:s>
                  <a:s r="250">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s>
  then </a:s>
                  <a:s r="320">
                     <a:s r="307">
                        <a:s r="302">
                           <a:s r="285">
                              <a:s r="280">
                                 <a:s r="263">
                                    <a:s r="257">
                                       <a:s>'Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth.'</a:s>
                                    </a:s>
                                    <a:s> + </a:s>
                                    <a:s r="259">
                                       <a:s>'
Due Date: '</a:s>
                                    </a:s>
                                 </a:s>
                                 <a:s> + </a:s>
                                 <a:s r="276">
                                    <a:s>ToString(</a:s>
                                    <a:s r="272">
                                       <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Due Date&quot;</a:s>
                                    </a:s>
                                    <a:s>)</a:s>
                                 </a:s>
                              </a:s>
                              <a:s> + </a:s>
                              <a:s r="281">
                                 <a:s>'
Overdue: '</a:s>
                              </a:s>
                           </a:s>
                           <a:s> + </a:s>
                           <a:s r="298">
                              <a:s>ToString(</a:s>
                              <a:s r="294">
                                 <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Overdue&quot;</a:s>
                              </a:s>
                              <a:s>)</a:s>
                           </a:s>
                        </a:s>
                        <a:s> + </a:s>
                        <a:s r="303">
                           <a:s>'
Expiration: '</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="317">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Expiration&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  else </a:s>
                  <a:s r="321">
                     <a:s>''</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="249" locator="42:3-47:9" xsi:type="If">
            <condition localId="250" locator="42:6-42:82" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="320" locator="43:8-46:104" xsi:type="Concatenate">
               <operand localId="307" locator="43:8-45:126" xsi:type="Concatenate">
                  <operand localId="302" locator="43:8-45:108" xsi:type="Concatenate">
                     <operand localId="285" locator="43:8-44:125" xsi:type="Concatenate">
                        <operand localId="280" locator="43:8-44:110" xsi:type="Concatenate">
                           <operand localId="263" locator="43:8-43:346" xsi:type="Concatenate">
                              <operand localId="257" locator="43:8-43:330" valueType="t:String" value="Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth." xsi:type="Literal"/>
                              <operand localId="259" locator="43:334-43:346" valueType="t:String" value="&#xa;Due Date: " xsi:type="Literal"/>
                           </operand>
                           <operand localId="276" locator="44:15-44:110" xsi:type="ToString">
                              <signature localId="277" name="t:Date" xsi:type="NamedTypeSpecifier"/>
                              <operand localId="272" locator="44:24-44:109" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Due Date" xsi:type="ExpressionRef"/>
                           </operand>
                        </operand>
                        <operand localId="281" locator="44:114-44:125" valueType="t:String" value="&#xa;Overdue: " xsi:type="Literal"/>
                     </operand>
                     <operand localId="298" locator="45:14-45:108" xsi:type="ToString">
                        <signature localId="299" name="t:Date" xsi:type="NamedTypeSpecifier"/>
                        <operand localId="294" locator="45:23-45:107" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Overdue" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="303" locator="45:112-45:126" valueType="t:String" value="&#xa;Expiration: " xsi:type="Literal"/>
               </operand>
               <operand localId="317" locator="46:17-46:104" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy) Expiration" xsi:type="ExpressionRef"/>
            </then>
            <else localId="321" locator="47:8-47:9" valueType="t:String" value="" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="334" locator="145:1-146:72" name="Second tetanus and diphtheria booster dose was administered" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="complete" value="Second tetanus and diphtheria booster dose was administered"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 2"/>
            <a:s r="334">
               <a:s>/*
@complete: Second tetanus and diphtheria booster dose was administered
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 2
*/
define &quot;Second tetanus and diphtheria booster dose was administered&quot;:
  </a:s>
               <a:s r="336">
                  <a:s r="335">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="336">
                     <a:s>&quot;Two tetanus and diphtheria booster doses were administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="336" locator="146:3-146:72" name="Two tetanus and diphtheria booster doses were administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="325" locator="94:1-97:67" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"/>
            <a:t name="description" value="Provision of tetanus and diphtheria booster dose 2 for pregnant women who received only 3 doses of DTP during childhood without booster doses"/>
            <a:t name="trigger" value="First tetanus and diphtheria booster dose was administered"/>
            <a:t name="pseudo" value="&quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 1"/>
            <a:t name="triggerDate" value="&quot;Date and time of vaccination&quot; where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;"/>
            <a:s r="325">
               <a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)
@description: Provision of tetanus and diphtheria booster dose 2 for pregnant women who received only 3 doses of DTP during childhood without booster doses
@trigger: First tetanus and diphtheria booster dose was administered
@pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 1
@triggerDate: Latest &quot;Date and time of vaccination&quot; where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;:
  </a:s>
               <a:s r="326">
                  <a:s r="327">
                     <a:s r="328">
                        <a:s>&quot;First tetanus and diphtheria booster dose was administered&quot;</a:s>
                     </a:s>
                     <a:s> and
  </a:s>
                     <a:s r="330">
                        <a:s r="329">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="330">
                           <a:s>&quot;Client is currently pregnant&quot;</a:s>
                        </a:s>
                     </a:s>
                  </a:s>
                  <a:s> and
  </a:s>
                  <a:s r="331">
                     <a:s>not </a:s>
                     <a:s r="337">
                        <a:s>&quot;Second tetanus and diphtheria booster dose was administered&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="326" locator="95:3-97:67" xsi:type="And">
            <operand localId="327" locator="95:3-96:42" xsi:type="And">
               <operand localId="328" locator="95:3-95:62" name="First tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/>
               <operand localId="330" locator="96:3-96:42" name="Client is currently pregnant" libraryName="Encounter" xsi:type="ExpressionRef"/>
            </operand>
            <operand localId="331" locator="97:3-97:67" xsi:type="Not">
               <operand localId="337" locator="97:7-97:67" name="Second tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/>
            </operand>
         </expression>
      </def>
      <def localId="358" locator="117:1-119:11" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;) + 4 'week'"/>
            <a:s r="358">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;) + 4 'week'
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date&quot;:
  </a:s>
               <a:s r="359">
                  <a:s>if </a:s>
                  <a:s r="360">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="361">
                     <a:s r="363">
                        <a:s r="362">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="363">
                           <a:s>&quot;Date of Latest Td Dose&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="364">
                        <a:s>4 weeks</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="367">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="359" locator="118:3-119:11" xsi:type="If">
            <condition localId="360" locator="118:6-118:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="361" locator="118:89-118:132" xsi:type="Add">
               <signature localId="365" name="t:Date" xsi:type="NamedTypeSpecifier"/>
               <signature localId="366" name="t:Quantity" xsi:type="NamedTypeSpecifier"/>
               <operand localId="363" locator="118:89-118:122" name="Date of Latest Td Dose" libraryName="Encounter" xsi:type="ExpressionRef"/>
               <operand localId="364" locator="118:126-118:132" value="4" unit="weeks" xsi:type="Quantity"/>
            </then>
            <else localId="368" asType="t:Date" xsi:type="As">
               <operand localId="367" locator="119:8-119:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="385" locator="126:1-128:11" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue"/>
            <a:t name="pseudocode" value="Every subsequent contact until 38 weeks"/>
            <a:s r="385">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue
@pseudocode: Every subsequent contact until 38 weeks
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue&quot;:
  </a:s>
               <a:s r="386">
                  <a:s>if </a:s>
                  <a:s r="387">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="388">
                     <a:s r="390">
                        <a:s r="389">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="390">
                           <a:s>&quot;Date of Latest Td Dose&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="391">
                        <a:s>4 weeks</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="394">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="386" locator="127:3-128:11" xsi:type="If">
            <condition localId="387" locator="127:6-127:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="388" locator="127:89-127:132" xsi:type="Add">
               <signature localId="392" name="t:Date" xsi:type="NamedTypeSpecifier"/>
               <signature localId="393" name="t:Quantity" xsi:type="NamedTypeSpecifier"/>
               <operand localId="390" locator="127:89-127:122" name="Date of Latest Td Dose" libraryName="Encounter" xsi:type="ExpressionRef"/>
               <operand localId="391" locator="127:126-127:132" value="4" unit="weeks" xsi:type="Quantity"/>
            </then>
            <else localId="395" asType="t:Date" xsi:type="As">
               <operand localId="394" locator="128:8-128:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="412" locator="136:1-138:11" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration"/>
            <a:t name="pseudocode" value="&quot;Gestational age&quot; &lt; 38 weeks"/>
            <a:s r="412">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration
@pseudocode: Two weeks before birth for the pregnancy; however, individuals remain eligible to be vaccinated after giving birth.
&quot;Gestational age&quot; &lt; 38 weeks
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration&quot;:
  </a:s>
               <a:s r="413">
                  <a:s>if </a:s>
                  <a:s r="414">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="415">
                     <a:s>'Two weeks before birth'</a:s>
                  </a:s>
                  <a:s r="417">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="413" locator="137:3-138:11" xsi:type="If">
            <condition localId="414" locator="137:6-137:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="415" locator="137:89-137:112" valueType="t:String" value="Two weeks before birth" xsi:type="Literal"/>
            <else localId="418" asType="t:String" xsi:type="As">
               <operand localId="417" locator="138:8-138:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="340" locator="104:1-110:9" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create"/>
            <a:t name="create" value="Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth."/>
            <a:s r="340">
               <a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create
@create: Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth.
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create&quot;:
  </a:s>
               <a:s r="341">
                  <a:s>if </a:s>
                  <a:s r="342">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;</a:s>
                  </a:s>
                  <a:s>
  then </a:s>
                  <a:s r="422">
                     <a:s r="409">
                        <a:s r="404">
                           <a:s r="382">
                              <a:s r="377">
                                 <a:s r="355">
                                    <a:s r="349">
                                       <a:s>'Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth.'</a:s>
                                    </a:s>
                                    <a:s> + </a:s>
                                    <a:s r="351">
                                       <a:s>'
Due Date: '</a:s>
                                    </a:s>
                                 </a:s>
                                 <a:s> + </a:s>
                                 <a:s r="373">
                                    <a:s>ToString(</a:s>
                                    <a:s r="369">
                                       <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date&quot;</a:s>
                                    </a:s>
                                    <a:s>)</a:s>
                                 </a:s>
                              </a:s>
                              <a:s> + </a:s>
                              <a:s r="378">
                                 <a:s>'
Overdue: '</a:s>
                              </a:s>
                           </a:s>
                           <a:s> + </a:s>
                           <a:s r="400">
                              <a:s>ToString(</a:s>
                              <a:s r="396">
                                 <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue&quot;</a:s>
                              </a:s>
                              <a:s>)</a:s>
                           </a:s>
                        </a:s>
                        <a:s> + </a:s>
                        <a:s r="405">
                           <a:s>'
Expiration: '</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="419">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  else </a:s>
                  <a:s r="423">
                     <a:s>''</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="341" locator="105:3-110:9" xsi:type="If">
            <condition localId="342" locator="105:6-105:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/>
            <then localId="422" locator="106:8-109:104" xsi:type="Concatenate">
               <operand localId="409" locator="106:8-108:126" xsi:type="Concatenate">
                  <operand localId="404" locator="106:8-108:108" xsi:type="Concatenate">
                     <operand localId="382" locator="106:8-107:125" xsi:type="Concatenate">
                        <operand localId="377" locator="106:8-107:110" xsi:type="Concatenate">
                           <operand localId="355" locator="106:8-106:346" xsi:type="Concatenate">
                              <operand localId="349" locator="106:8-106:330" valueType="t:String" value="Pregnant women who have received only 3 doses of tetanus-containing vaccines during childhood without booster doses should receive 2 doses of tetanus-containing vaccines at the earliest opportunity during pregnancy with a minimal interval of 4 weeks between doses and the second dose at least 2 weeks before giving birth." xsi:type="Literal"/>
                              <operand localId="351" locator="106:334-106:346" valueType="t:String" value="&#xa;Due Date: " xsi:type="Literal"/>
                           </operand>
                           <operand localId="373" locator="107:15-107:110" xsi:type="ToString">
                              <signature localId="374" name="t:Date" xsi:type="NamedTypeSpecifier"/>
                              <operand localId="369" locator="107:24-107:109" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date" xsi:type="ExpressionRef"/>
                           </operand>
                        </operand>
                        <operand localId="378" locator="107:114-107:125" valueType="t:String" value="&#xa;Overdue: " xsi:type="Literal"/>
                     </operand>
                     <operand localId="400" locator="108:14-108:108" xsi:type="ToString">
                        <signature localId="401" name="t:Date" xsi:type="NamedTypeSpecifier"/>
                        <operand localId="396" locator="108:23-108:107" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="405" locator="108:112-108:126" valueType="t:String" value="&#xa;Expiration: " xsi:type="Literal"/>
               </operand>
               <operand localId="419" locator="109:17-109:104" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration" xsi:type="ExpressionRef"/>
            </then>
            <else localId="423" locator="110:8-110:9" valueType="t:String" value="" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="433" locator="203:1-204:74" name="Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="complete" value="Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed"/>
            <a:t name="pseudocode" value="&quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 3"/>
            <a:s r="433">
               <a:s>/*
@complete: Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed
@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 3
&quot;Immunization recommendation status&quot; = &quot;Complete&quot; (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;)
*/
define &quot;Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed&quot;:
  </a:s>
               <a:s r="435">
                  <a:s r="434">
                     <a:s>Encounter</a:s>
                  </a:s>
                  <a:s>.</a:s>
                  <a:s r="435">
                     <a:s>&quot;Three tetanus and diphtheria booster doses were administered&quot;</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="435" locator="204:3-204:74" name="Three tetanus and diphtheria booster doses were administered" libraryName="Encounter" xsi:type="ExpressionRef"/>
      </def>
      <def localId="427" locator="157:1-159:142" name="Tetanus and diphtheria-containing vaccine booster dose 3" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 3"/>
            <a:t name="description" value="Provision of tetanus and diphtheria booster dose 3 for pregnant women who received only 3 doses of DTP during childhood without booster doses"/>
            <a:t name="trigger" value="Second tetanus and diphtheria booster dose was administered"/>
            <a:t name="pseudo" value="&quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 2"/>
            <a:t name="triggerDate" value="&quot;Date and time of vaccination&quot; where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;"/>
            <a:s r="427">
               <a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 3
@description: Provision of tetanus and diphtheria booster dose 3 for pregnant women who received only 3 doses of DTP during childhood without booster doses
@trigger: Second tetanus and diphtheria booster dose was administered
@pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 2
@triggerDate: Latest &quot;Date and time of vaccination&quot; where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 3&quot;:
  </a:s>
               <a:s r="428">
                  <a:s r="429">
                     <a:s>&quot;Second tetanus and diphtheria booster dose was administered&quot;</a:s>
                  </a:s>
                  <a:s> and
  </a:s>
                  <a:s r="430">
                     <a:s>not </a:s>
                     <a:s r="436">
                        <a:s>&quot;Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed&quot;</a:s>
                     </a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="428" locator="158:3-159:142" xsi:type="And">
            <operand localId="429" locator="158:3-158:63" name="Second tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/>
            <operand localId="430" locator="159:3-159:142" xsi:type="Not">
               <operand localId="436" locator="159:7-159:142" name="Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed" xsi:type="ExpressionRef"/>
            </operand>
         </expression>
      </def>
      <def localId="453" locator="177:1-179:11" name="Tetanus and diphtheria-containing vaccine booster dose 3 Due Date" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 3 Due Date"/>
            <a:t name="pseudocode" value="&quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;) + 1 year or during next pregnancy"/>
            <a:s r="453">
               <a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 3 Due Date
@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Tetanus and diphtheria-containing vaccines&quot;) + 1 year or during next pregnancy
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 3 Due Date&quot;:
  </a:s>
               <a:s r="454">
                  <a:s>if </a:s>
                  <a:s r="455">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 3&quot;</a:s>
                  </a:s>
                  <a:s> then </a:s>
                  <a:s r="456">
                     <a:s r="458">
                        <a:s r="457">
                           <a:s>Encounter</a:s>
                        </a:s>
                        <a:s>.</a:s>
                        <a:s r="458">
                           <a:s>&quot;Date of Latest Td Dose&quot;</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="459">
                        <a:s>1 year</a:s>
                     </a:s>
                  </a:s>
                  <a:s r="462">
  else null</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="454" locator="178:3-179:11" xsi:type="If">
            <condition localId="455" locator="178:6-178:63" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/>
            <then localId="456" locator="178:70-178:112" xsi:type="Add">
               <signature localId="460" name="t:Date" xsi:type="NamedTypeSpecifier"/>
               <signature localId="461" name="t:Quantity" xsi:type="NamedTypeSpecifier"/>
               <operand localId="458" locator="178:70-178:103" name="Date of Latest Td Dose" libraryName="Encounter" xsi:type="ExpressionRef"/>
               <operand localId="459" locator="178:107-178:112" value="1" unit="year" xsi:type="Quantity"/>
            </then>
            <else localId="463" asType="t:Date" xsi:type="As">
               <operand localId="462" locator="179:8-179:11" xsi:type="Null"/>
            </else>
         </expression>
      </def>
      <def localId="439" locator="166:1-170:9" name="Tetanus and diphtheria-containing vaccine booster dose 3 Create" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 3 Create"/>
            <a:t name="create" value="A sixth dose would be needed at least 1 year after the fifth dose, or during the next pregnancy."/>
            <a:s r="439">
               <a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 3 Create
@create: A sixth dose would be needed at least 1 year after the fifth dose, or during the next pregnancy.
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 3 Create&quot;:
  </a:s>
               <a:s r="440">
                  <a:s>if </a:s>
                  <a:s r="441">
                     <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 3&quot;</a:s>
                  </a:s>
                  <a:s>
  then </a:s>
                  <a:s r="472">
                     <a:s r="450">
                        <a:s r="444">
                           <a:s>'A sixth dose would be needed at least 1 year after the fifth dose, or during the next pregnancy.'</a:s>
                        </a:s>
                        <a:s> + </a:s>
                        <a:s r="446">
                           <a:s>'
Due Date: '</a:s>
                        </a:s>
                     </a:s>
                     <a:s> + </a:s>
                     <a:s r="468">
                        <a:s>ToString(</a:s>
                        <a:s r="464">
                           <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 3 Due Date&quot;</a:s>
                        </a:s>
                        <a:s>)</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
  else </a:s>
                  <a:s r="473">
                     <a:s>''</a:s>
                  </a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="440" locator="167:3-170:9" xsi:type="If">
            <condition localId="441" locator="167:6-167:63" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/>
            <then localId="472" locator="168:8-169:91" xsi:type="Concatenate">
               <operand localId="450" locator="168:8-168:121" xsi:type="Concatenate">
                  <operand localId="444" locator="168:8-168:105" valueType="t:String" value="A sixth dose would be needed at least 1 year after the fifth dose, or during the next pregnancy." xsi:type="Literal"/>
                  <operand localId="446" locator="168:109-168:121" valueType="t:String" value="&#xa;Due Date: " xsi:type="Literal"/>
               </operand>
               <operand localId="468" locator="169:15-169:91" xsi:type="ToString">
                  <signature localId="469" name="t:Date" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="464" locator="169:24-169:90" name="Tetanus and diphtheria-containing vaccine booster dose 3 Due Date" xsi:type="ExpressionRef"/>
               </operand>
            </then>
            <else localId="473" locator="170:8-170:9" valueType="t:String" value="" xsi:type="Literal"/>
         </expression>
      </def>
      <def localId="477" locator="186:1-187:6" name="Tetanus and diphtheria-containing vaccine booster dose 3 Overdue" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 3 Overdue"/>
            <a:t name="pseudocode" value="To be determined by Member States"/>
            <a:s r="477">
               <a:s r="478">/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 3 Overdue
@pseudocode: To be determined by Member States
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 3 Overdue&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="478" locator="187:3-187:6" xsi:type="Null"/>
      </def>
      <def localId="481" locator="194:1-195:6" name="Tetanus and diphtheria-containing vaccine booster dose 3 Expiration" context="Patient" accessLevel="Public">
         <annotation xsi:type="a:Annotation">
            <a:t name="dynamicValue" value="Tetanus and diphtheria-containing vaccine booster dose 3 Expiration"/>
            <a:t name="pseudocode" value="To be determined by Member States. However, there is no recommended expiration date and individuals remain eligible to be vaccinated."/>
            <a:s r="481">
               <a:s r="482">/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 3 Expiration
@pseudocode: To be determined by Member States. However, there is no recommended expiration date and individuals remain eligible to be vaccinated.
*/
define &quot;Tetanus and diphtheria-containing vaccine booster dose 3 Expiration&quot;:
  null</a:s>
            </a:s>
         </annotation>
         <expression localId="482" locator="195:3-195:6" xsi:type="Null"/>
      </def>
      <def localId="485" locator="211:1-220: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="485">
               <a:s>/*
@test: Test expected results based on example patients
*/
define &quot;Test Validation&quot;:
  </a:s>
               <a:s r="486">
                  <a:s>case
    </a:s>
                  <a:s r="487">
                     <a:s>when </a:s>
                     <a:s r="488">
                        <a:s r="490">
                           <a:s r="489">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="490">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="491">
                           <a:s>'DTP66.3'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="497">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="498">
                     <a:s>when </a:s>
                     <a:s r="499">
                        <a:s r="501">
                           <a:s r="500">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="501">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="502">
                           <a:s>'DTP67.4'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="508">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="509">
                     <a:s>when </a:s>
                     <a:s r="510">
                        <a:s r="512">
                           <a:s r="511">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="512">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="513">
                           <a:s>'DTP68.4'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="519">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="520">
                     <a:s>when </a:s>
                     <a:s r="521">
                        <a:s r="523">
                           <a:s r="522">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="523">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="524">
                           <a:s>'DTP69.3'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="530">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 3&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="531">
                     <a:s>when </a:s>
                     <a:s r="532">
                        <a:s r="534">
                           <a:s r="533">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="534">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="535">
                           <a:s>'DTP70.3'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="541">
                        <a:s>&quot;Tetanus and diphtheria-containing vaccine booster dose 3&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    </a:s>
                  <a:s r="542">
                     <a:s>when </a:s>
                     <a:s r="543">
                        <a:s r="545">
                           <a:s r="544">
                              <a:s>Patient</a:s>
                           </a:s>
                           <a:s>.</a:s>
                           <a:s r="545">
                              <a:s>id</a:s>
                           </a:s>
                        </a:s>
                        <a:s> = </a:s>
                        <a:s r="546">
                           <a:s>'DTP71.2'</a:s>
                        </a:s>
                     </a:s>
                     <a:s> then </a:s>
                     <a:s r="552">
                        <a:s>&quot;Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed&quot;</a:s>
                     </a:s>
                  </a:s>
                  <a:s>
    else </a:s>
                  <a:s r="553">
                     <a:s>'No test case set'</a:s>
                  </a:s>
                  <a:s>
  end</a:s>
               </a:s>
            </a:s>
         </annotation>
         <expression localId="486" locator="212:3-220:5" xsi:type="Case">
            <caseItem localId="487" locator="213:5-213:114">
               <when localId="488" locator="213:10-213:31" xsi:type="Equal">
                  <signature localId="495" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="496" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="493" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="494" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="490" locator="213:10-213:19" path="id" xsi:type="Property">
                        <source localId="489" locator="213:10-213:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="491" locator="213:23-213:31" valueType="t:String" value="DTP66.3" xsi:type="Literal"/>
               </when>
               <then localId="555" xsi:type="As">
                  <operand localId="497" locator="213:38-213:114" name="Tetanus and diphtheria-containing vaccine booster dose 1 (during pregnancy)" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="556" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="557" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="558" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="498" locator="214:5-214:114">
               <when localId="499" locator="214:10-214:31" xsi:type="Equal">
                  <signature localId="506" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="507" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="504" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="505" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="501" locator="214:10-214:19" path="id" xsi:type="Property">
                        <source localId="500" locator="214:10-214:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="502" locator="214:23-214:31" valueType="t:String" value="DTP67.4" xsi:type="Literal"/>
               </when>
               <then localId="559" xsi:type="As">
                  <operand localId="508" locator="214:38-214:114" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="560" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="561" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="562" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="509" locator="215:5-215:114">
               <when localId="510" locator="215:10-215:31" xsi:type="Equal">
                  <signature localId="517" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="518" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="515" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="516" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="512" locator="215:10-215:19" path="id" xsi:type="Property">
                        <source localId="511" locator="215:10-215:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="513" locator="215:23-215:31" valueType="t:String" value="DTP68.4" xsi:type="Literal"/>
               </when>
               <then localId="563" xsi:type="As">
                  <operand localId="519" locator="215:38-215:114" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="564" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="565" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="566" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="520" locator="216:5-216:95">
               <when localId="521" locator="216:10-216:31" xsi:type="Equal">
                  <signature localId="528" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="529" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="526" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="527" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="523" locator="216:10-216:19" path="id" xsi:type="Property">
                        <source localId="522" locator="216:10-216:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="524" locator="216:23-216:31" valueType="t:String" value="DTP69.3" xsi:type="Literal"/>
               </when>
               <then localId="567" xsi:type="As">
                  <operand localId="530" locator="216:38-216:95" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="568" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="569" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="570" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="531" locator="217:5-217:95">
               <when localId="532" locator="217:10-217:31" xsi:type="Equal">
                  <signature localId="539" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="540" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="537" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="538" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="534" locator="217:10-217:19" path="id" xsi:type="Property">
                        <source localId="533" locator="217:10-217:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="535" locator="217:23-217:31" valueType="t:String" value="DTP70.3" xsi:type="Literal"/>
               </when>
               <then localId="571" xsi:type="As">
                  <operand localId="541" locator="217:38-217:95" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="572" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="573" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="574" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <caseItem localId="542" locator="218:5-218:173">
               <when localId="543" locator="218:10-218:31" xsi:type="Equal">
                  <signature localId="550" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <signature localId="551" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  <operand localId="548" name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                     <signature localId="549" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
                     <operand localId="545" locator="218:10-218:19" path="id" xsi:type="Property">
                        <source localId="544" locator="218:10-218:16" name="Patient" xsi:type="ExpressionRef"/>
                     </operand>
                  </operand>
                  <operand localId="546" locator="218:23-218:31" valueType="t:String" value="DTP71.2" xsi:type="Literal"/>
               </when>
               <then localId="575" xsi:type="As">
                  <operand localId="552" locator="218:38-218:173" name="Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed" xsi:type="ExpressionRef"/>
                  <asTypeSpecifier localId="576" xsi:type="ChoiceTypeSpecifier">
                     <choice localId="577" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                     <choice localId="578" name="t:String" xsi:type="NamedTypeSpecifier"/>
                  </asTypeSpecifier>
               </then>
            </caseItem>
            <else localId="579" xsi:type="As">
               <operand localId="553" locator="219:10-219:27" valueType="t:String" value="No test case set" xsi:type="Literal"/>
               <asTypeSpecifier localId="580" xsi:type="ChoiceTypeSpecifier">
                  <choice localId="581" name="t:Boolean" xsi:type="NamedTypeSpecifier"/>
                  <choice localId="582" name="t:String" xsi:type="NamedTypeSpecifier"/>
               </asTypeSpecifier>
            </else>
         </expression>
      </def>
   </statements>
</library>
