<?xml version="1.0" encoding="UTF-8"?><library xmlns="urn:hl7-org:elm:r1" xmlns:a="urn:hl7-org:cql-annotations:r1" xmlns:fhir="http://hl7.org/fhir" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" localId="0"><annotation signatureLevel="Overloads" translatorOptions="EnableAnnotations,EnableLocators,DisableListDemotion,DisableListPromotion" translatorVersion="4.9.0" xsi:type="a:CqlToElmInfo"/><annotation errorSeverity="warning" errorType="semantic" message="An operand identifier reference is hiding another identifier of the same name." xsi:type="a:CqlToElmError"/><annotation errorSeverity="warning" errorType="semantic" message="An operand identifier reference is hiding another identifier of the same name." xsi:type="a:CqlToElmError"/><annotation errorSeverity="warning" errorType="semantic" message="An operand identifier reference is hiding another identifier of the same name." xsi:type="a:CqlToElmError"/><annotation xsi:type="a:Annotation"><a:s r="386"><a:s>/*
 * Library: IMMZD18SDTPPregnancyStartingWith4DosesLogic (IMMZ.D18.S.DTP.Pregnancy starting with 4 doses schedule)
 * Schedule Table: Diphtheria and tetanus vaccination schedule in pregnant women who received 4 childhood diphtheria–tetanus–pertussis (DTP) doses
 */
library IMMZD18SDTPPregnancyStartingWith4DosesLogic</a:s></a:s></annotation><identifier id="IMMZD18SDTPPregnancyStartingWith4DosesLogic" system="http://smart.who.int/immunizations"/><schemaIdentifier id="urn:hl7-org:elm" version="r1"/><usings><def localId="1" localIdentifier="System" uri="urn:hl7-org:elm-types:r1" version="1.0.0"/><def localId="206" localIdentifier="FHIR" locator="7:1-7:26" uri="http://hl7.org/fhir" version="4.0.1"><annotation xsi:type="a:Annotation"><a:s r="206"><a:s>using </a:s><a:s><a:s>FHIR</a:s></a:s><a:s> version '4.0.1'</a:s></a:s></annotation></def></usings><includes><def localId="208" localIdentifier="FHIRHelpers" locator="8:1-8:35" path="http://hl7.org/fhir/FHIRHelpers" version="4.0.1"><annotation xsi:type="a:Annotation"><a:s r="208"><a:s>include </a:s><a:s><a:s>FHIRHelpers</a:s></a:s><a:s> version '4.0.1'</a:s></a:s></annotation></def><def localId="210" localIdentifier="WC" locator="10:1-10:27" path="http://smart.who.int/immunizations/WHOCommon"><annotation xsi:type="a:Annotation"><a:s r="210"><a:s>include </a:s><a:s><a:s>WHOCommon</a:s></a:s><a:s> called WC</a:s></a:s></annotation></def><def localId="212" localIdentifier="Common" locator="12:1-12:32" path="http://smart.who.int/immunizations/IMMZCommon"><annotation xsi:type="a:Annotation"><a:s r="212"><a:s>include </a:s><a:s><a:s>IMMZCommon</a:s></a:s><a:s> called Common</a:s></a:s></annotation></def><def localId="214" localIdentifier="Concepts" locator="13:1-13:36" path="http://smart.who.int/immunizations/IMMZConcepts"><annotation xsi:type="a:Annotation"><a:s r="214"><a:s>include </a:s><a:s><a:s>IMMZConcepts</a:s></a:s><a:s> called Concepts</a:s></a:s></annotation></def><def localId="216" localIdentifier="IE" locator="15:1-15:39" path="http://smart.who.int/immunizations/IMMZEncounterElements"><annotation xsi:type="a:Annotation"><a:s r="216"><a:s>include </a:s><a:s><a:s>IMMZEncounterElements</a:s></a:s><a:s> called IE</a:s></a:s></annotation></def><def localId="218" localIdentifier="Encounter" locator="16:1-16:53" 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 accessLevel="Public" localId="220" locator="18:1-18:36" name="Today"><annotation xsi:type="a:Annotation"><a:s r="220"><a:s>parameter Today </a:s><a:s r="224"><a:s>Date</a:s></a:s><a:s> default </a:s><a:s r="223"><a:s>Today()</a:s></a:s></a:s></annotation><default localId="223" locator="18:30-18:36" xsi:type="Today"/><parameterTypeSpecifier localId="224" locator="18:17-18:20" name="t:Date" xsi:type="NamedTypeSpecifier"/></def></parameters><contexts><def localId="229" locator="21:1-21:15" name="Patient"/></contexts><statements><def context="Patient" localId="227" locator="21:1-21:15" name="Patient"><expression localId="228" xsi:type="SingletonFrom"><operand dataType="fhir:Patient" localId="226" locator="21:1-21:15" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/></expression></def><def accessLevel="Public" context="Patient" localId="245" locator="84:1-85:72" name="Second tetanus and diphtheria booster dose was administered"><annotation xsi:type="a:Annotation"><a:t name="complete" value="Second tetanus and diphtheria booster dose was administered"/><a:t name="pseudocode" value="&#34;Vaccine type&#34; = &#34;Tetanus and diphtheria-containing vaccines&#34; and &#34;Type of dose&#34; = &#34;Booster dose&#34;) = 2"/><a:s r="245"><a:s>/*
@complete: Second tetanus and diphtheria booster dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 2
*/
define "Second tetanus and diphtheria booster dose was administered":
  </a:s><a:s r="247"><a:s r="246"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="247"><a:s>"Two tetanus and diphtheria booster doses were administered"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="247" locator="85:3-85:72" name="Two tetanus and diphtheria booster doses were administered" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="232" locator="32:1-36:67" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"><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 4 tetanus-containing vaccines doses during childhood or pre-adulthood"/><a:t name="trigger" value="The primary DTP series has been completed, first tetanus and diphtheria booster dose was administered and client is currently pregnant"/><a:t name="pseudo" value="&#34;Completed the primary vaccination series&#34; = TRUE (where &#34;Vaccine type&#34; = &#34;DTP-containing vaccines&#34;) AND Count of vaccines administered where &#34;Vaccine type&#34; = &#34;Tetanus and diphtheria-containing vaccines&#34; and &#34;Type of dose&#34; = &#34;Booster dose&#34;) = 1 AND &#34;Currently pregnant&#34; = TRUE"/><a:t name="triggerDate" value="&#34;Contact date&#34; WHEN &#34;ANC contact number&#34; = 1"/><a:s r="232"><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 4 tetanus-containing vaccines doses during childhood or pre-adulthood
@trigger: The primary DTP series has been completed, first tetanus and diphtheria booster dose was administered and client is currently pregnant
@pseudo: "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "DTP-containing vaccines") AND Count of vaccines administered where "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 1 AND "Currently pregnant" = TRUE
@triggerDate: First ANC contact date
"Contact date" WHEN "ANC contact number" = 1
*/
define "Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)":
  </a:s><a:s r="233"><a:s r="234"><a:s r="235"><a:s r="237"><a:s r="236"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="237"><a:s>"Three DTP primary series doses were administered"</a:s></a:s></a:s><a:s> and
  </a:s><a:s r="239"><a:s r="238"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="239"><a:s>"One tetanus and diphtheria booster dose was administered"</a:s></a:s></a:s></a:s><a:s> and
  </a:s><a:s r="241"><a:s r="240"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="241"><a:s>"Client is currently pregnant"</a:s></a:s></a:s></a:s><a:s> and
  </a:s><a:s r="242"><a:s>not </a:s><a:s r="248"><a:s>"Second tetanus and diphtheria booster dose was administered"</a:s></a:s></a:s></a:s></a:s></annotation><expression localId="233" locator="33:3-36:67" xsi:type="And"><operand localId="234" locator="33:3-35:42" xsi:type="And"><operand localId="235" locator="33:3-34:70" xsi:type="And"><operand libraryName="Encounter" localId="237" locator="33:3-33:62" name="Three DTP primary series doses were administered" xsi:type="ExpressionRef"/><operand libraryName="Encounter" localId="239" locator="34:3-34:70" name="One tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/></operand><operand libraryName="Encounter" localId="241" locator="35:3-35:42" name="Client is currently pregnant" xsi:type="ExpressionRef"/></operand><operand localId="242" locator="36:3-36:67" xsi:type="Not"><operand localId="248" locator="36:7-36:67" name="Second tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/></operand></expression></def><def accessLevel="Public" context="Patient" localId="269" locator="56:1-58:11" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date"><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="&#34;Contact date&#34; WHEN &#34;ANC contact number&#34; = 1"/><a:s r="269"><a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date
@pseudocode: "Contact date" WHEN "ANC contact number" = 1
*/
define "Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date":
  </a:s><a:s r="270"><a:s>if </a:s><a:s r="271"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"</a:s></a:s><a:s> then </a:s><a:s r="272"><a:s>Today</a:s></a:s><a:s r="273">
  else null</a:s></a:s></a:s></annotation><expression localId="270" locator="57:3-58:11" xsi:type="If"><condition localId="271" locator="57:6-57:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/><then localId="272" locator="57:89-57:93" name="Today" xsi:type="ParameterRef"/><else asType="t:Date" localId="274" xsi:type="As"><operand localId="273" locator="58:8-58:11" xsi:type="Null"/></else></expression></def><def accessLevel="Public" context="Patient" localId="291" locator="65:1-67:11" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue"><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="291"><a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue
@pseudocode: Every subsequent contact until 38 weeks
*/
define "Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue":
  </a:s><a:s r="292"><a:s>if </a:s><a:s r="293"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"</a:s></a:s><a:s> then </a:s><a:s r="294"><a:s>Today</a:s></a:s><a:s r="295">
  else null</a:s></a:s></a:s></annotation><expression localId="292" locator="66:3-67:11" xsi:type="If"><condition localId="293" locator="66:6-66:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/><then localId="294" locator="66:89-66:93" name="Today" xsi:type="ParameterRef"/><else asType="t:Date" localId="296" xsi:type="As"><operand localId="295" locator="67:8-67:11" xsi:type="Null"/></else></expression></def><def accessLevel="Public" context="Patient" localId="313" locator="75:1-77:11" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration"><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="&#34;Gestational age&#34; &lt; 38 weeks"/><a:s r="313"><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
"Gestational age" &lt; 38 weeks
*/
define "Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration":
  </a:s><a:s r="314"><a:s>if </a:s><a:s r="315"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"</a:s></a:s><a:s> then </a:s><a:s r="316"><a:s>'Two weeks before birth'</a:s></a:s><a:s r="318">
  else null</a:s></a:s></a:s></annotation><expression localId="314" locator="76:3-77:11" xsi:type="If"><condition localId="315" locator="76:6-76:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/><then localId="316" locator="76:89-76:112" value="Two weeks before birth" valueType="t:String" xsi:type="Literal"/><else asType="t:String" localId="319" xsi:type="As"><operand localId="318" locator="77:8-77:11" xsi:type="Null"/></else></expression></def><def accessLevel="Public" context="Patient" localId="251" locator="43:1-49:9" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create"><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="Women who received 4 tetanus-containing vaccine doses during childhood or pre-adulthood need only 1 booster dose, which should be given at the first opportunity."/><a:s r="251"><a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create
@create: Women who received 4 tetanus-containing vaccine doses during childhood or pre-adulthood need only 1 booster dose, which should be given at the first opportunity.
*/
define "Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Create":
  </a:s><a:s r="252"><a:s>if </a:s><a:s r="253"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"</a:s></a:s><a:s>
  then </a:s><a:s r="323"><a:s r="310"><a:s r="305"><a:s r="288"><a:s r="283"><a:s r="266"><a:s r="260"><a:s>'Women who received 4 tetanus-containing vaccine doses during childhood or pre-adulthood need only 1 booster dose, which should be given at the first opportunity.'</a:s></a:s><a:s> + </a:s><a:s r="262"><a:s>'
Due Date: '</a:s></a:s></a:s><a:s> + </a:s><a:s r="279"><a:s>ToString(</a:s><a:s r="275"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date"</a:s></a:s><a:s>)</a:s></a:s></a:s><a:s> + </a:s><a:s r="284"><a:s>'
Overdue: '</a:s></a:s></a:s><a:s> + </a:s><a:s r="301"><a:s>ToString(</a:s><a:s r="297"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue"</a:s></a:s><a:s>)</a:s></a:s></a:s><a:s> + </a:s><a:s r="306"><a:s>'
Expiration: '</a:s></a:s></a:s><a:s> + </a:s><a:s r="320"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration"</a:s></a:s></a:s><a:s>
  else </a:s><a:s r="324"><a:s>''</a:s></a:s></a:s></a:s></annotation><expression localId="252" locator="44:3-49:9" xsi:type="If"><condition localId="253" locator="44:6-44:82" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/><then localId="323" locator="45:8-48:104" xsi:type="Concatenate"><operand localId="310" locator="45:8-47:126" xsi:type="Concatenate"><operand localId="305" locator="45:8-47:108" xsi:type="Concatenate"><operand localId="288" locator="45:8-46:125" xsi:type="Concatenate"><operand localId="283" locator="45:8-46:110" xsi:type="Concatenate"><operand localId="266" locator="45:8-45:186" xsi:type="Concatenate"><operand localId="260" locator="45:8-45:170" value="Women who received 4 tetanus-containing vaccine doses during childhood or pre-adulthood need only 1 booster dose, which should be given at the first opportunity." valueType="t:String" xsi:type="Literal"/><operand localId="262" locator="45:174-45:186" value="&#xA;Due Date: " valueType="t:String" xsi:type="Literal"/></operand><operand localId="279" locator="46:15-46:110" xsi:type="ToString"><signature localId="280" name="t:Date" xsi:type="NamedTypeSpecifier"/><operand localId="275" locator="46:24-46:109" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Due Date" xsi:type="ExpressionRef"/></operand></operand><operand localId="284" locator="46:114-46:125" value="&#xA;Overdue: " valueType="t:String" xsi:type="Literal"/></operand><operand localId="301" locator="47:14-47:108" xsi:type="ToString"><signature localId="302" name="t:Date" xsi:type="NamedTypeSpecifier"/><operand localId="297" locator="47:23-47:107" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Overdue" xsi:type="ExpressionRef"/></operand></operand><operand localId="306" locator="47:112-47:126" value="&#xA;Expiration: " valueType="t:String" xsi:type="Literal"/></operand><operand localId="320" locator="48:17-48:104" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy) Expiration" xsi:type="ExpressionRef"/></then><else localId="324" locator="49:8-49:9" value="" valueType="t:String" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="334" locator="142:1-143:74" name="Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed."><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="&#34;Vaccine type&#34; = &#34;Tetanus and diphtheria-containing vaccines&#34; and &#34;Type of dose&#34; = &#34;Booster dose&#34;) = 3"/><a:s r="334"><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 "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 3
"Immunization recommendation status" = "Complete" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines")
*/
define "Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed.":
  </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>"Three tetanus and diphtheria booster doses were administered"</a:s></a:s></a:s></a:s></annotation><expression libraryName="Encounter" localId="336" locator="143:3-143:74" name="Three tetanus and diphtheria booster doses were administered" xsi:type="ExpressionRef"/></def><def accessLevel="Public" context="Patient" localId="328" locator="96:1-98:143" name="Tetanus and diphtheria-containing vaccine booster dose 3"><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 4 tetanus-containing vaccines doses during childhood or pre-adulthood"/><a:t name="trigger" value="Second tetanus and diphtheria booster dose was administered"/><a:t name="pseudo" value="&#34;Vaccine type&#34; = &#34;Tetanus and diphtheria-containing vaccines&#34; and &#34;Type of dose&#34; = &#34;Booster dose&#34;) = 2"/><a:t name="triggerDate" value="&#34;Date and time of vaccination&#34; where &#34;Vaccine type&#34; = &#34;Tetanus and diphtheria-containing vaccines&#34;"/><a:s r="328"><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 4 tetanus-containing vaccines doses during childhood or pre-adulthood
@trigger: Second tetanus and diphtheria booster dose was administered
@pseudo: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 2
@triggerDate: Latest "Date and time of vaccination" where "Vaccine type" = "Tetanus and diphtheria-containing vaccines"
*/
define "Tetanus and diphtheria-containing vaccine booster dose 3":
  </a:s><a:s r="329"><a:s r="330"><a:s>"Second tetanus and diphtheria booster dose was administered"</a:s></a:s><a:s> and
  </a:s><a:s r="331"><a:s>not </a:s><a:s r="337"><a:s>"Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed."</a:s></a:s></a:s></a:s></a:s></annotation><expression localId="329" locator="97:3-98:143" xsi:type="And"><operand localId="330" locator="97:3-97:63" name="Second tetanus and diphtheria booster dose was administered" xsi:type="ExpressionRef"/><operand localId="331" locator="98:3-98:143" xsi:type="Not"><operand localId="337" locator="98:7-98:143" 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 accessLevel="Public" context="Patient" localId="354" locator="116:1-118:11" name="Tetanus and diphtheria-containing vaccine booster dose 3 Due Date"><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="&#34;Date and time of vaccination&#34; (where &#34;Vaccine type&#34; = &#34;Tetanus and diphtheria-containing vaccines&#34;) + 1 year or during next pregnancy"/><a:s r="354"><a:s>/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 3 Due Date
@pseudocode: Latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") + 1 year or during next pregnancy
*/
define "Tetanus and diphtheria-containing vaccine booster dose 3 Due Date":
  </a:s><a:s r="355"><a:s>if </a:s><a:s r="356"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 3"</a:s></a:s><a:s> then </a:s><a:s r="357"><a:s r="359"><a:s r="358"><a:s>Encounter</a:s></a:s><a:s>.</a:s><a:s r="359"><a:s>"Date of Latest Td Dose"</a:s></a:s></a:s><a:s> + </a:s><a:s r="360"><a:s>1 year</a:s></a:s></a:s><a:s r="363">
  else null</a:s></a:s></a:s></annotation><expression localId="355" locator="117:3-118:11" xsi:type="If"><condition localId="356" locator="117:6-117:63" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/><then localId="357" locator="117:70-117:112" xsi:type="Add"><signature localId="361" name="t:Date" xsi:type="NamedTypeSpecifier"/><signature localId="362" name="t:Quantity" xsi:type="NamedTypeSpecifier"/><operand libraryName="Encounter" localId="359" locator="117:70-117:103" name="Date of Latest Td Dose" xsi:type="ExpressionRef"/><operand localId="360" locator="117:107-117:112" unit="year" value="1" xsi:type="Quantity"/></then><else asType="t:Date" localId="364" xsi:type="As"><operand localId="363" locator="118:8-118:11" xsi:type="Null"/></else></expression></def><def accessLevel="Public" context="Patient" localId="340" locator="105:1-109:9" name="Tetanus and diphtheria-containing vaccine booster dose 3 Create"><annotation xsi:type="a:Annotation"><a:t name="output" value="Tetanus and diphtheria-containing vaccine booster dose 3 Create"/><a:t name="create" value="To provide lifelong protection for tetanus, a sixth dose should be provided at least 1 year after the fifth dose, or in next pregnancy."/><a:s r="340"><a:s>/*
@output: Tetanus and diphtheria-containing vaccine booster dose 3 Create
@create: To provide lifelong protection for tetanus, a sixth dose should be provided at least 1 year after the fifth dose, or in next pregnancy.
*/
define "Tetanus and diphtheria-containing vaccine booster dose 3 Create":
  </a:s><a:s r="341"><a:s>if </a:s><a:s r="342"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 3"</a:s></a:s><a:s>
  then </a:s><a:s r="373"><a:s r="351"><a:s r="345"><a:s>'To provide lifelong protection for tetanus, a sixth dose should be provided at least 1 year after the fifth dose, or in next pregnancy.'</a:s></a:s><a:s> + </a:s><a:s r="347"><a:s>'
Due Date: '</a:s></a:s></a:s><a:s> + </a:s><a:s r="369"><a:s>ToString(</a:s><a:s r="365"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 3 Due Date"</a:s></a:s><a:s>)</a:s></a:s></a:s><a:s>
  else </a:s><a:s r="374"><a:s>''</a:s></a:s></a:s></a:s></annotation><expression localId="341" locator="106:3-109:9" xsi:type="If"><condition localId="342" locator="106:6-106:63" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/><then localId="373" locator="107:8-108:91" xsi:type="Concatenate"><operand localId="351" locator="107:8-107:160" xsi:type="Concatenate"><operand localId="345" locator="107:8-107:144" value="To provide lifelong protection for tetanus, a sixth dose should be provided at least 1 year after the fifth dose, or in next pregnancy." valueType="t:String" xsi:type="Literal"/><operand localId="347" locator="107:148-107:160" value="&#xA;Due Date: " valueType="t:String" xsi:type="Literal"/></operand><operand localId="369" locator="108:15-108:91" xsi:type="ToString"><signature localId="370" name="t:Date" xsi:type="NamedTypeSpecifier"/><operand localId="365" locator="108:24-108:90" name="Tetanus and diphtheria-containing vaccine booster dose 3 Due Date" xsi:type="ExpressionRef"/></operand></then><else localId="374" locator="109:8-109:9" value="" valueType="t:String" xsi:type="Literal"/></expression></def><def accessLevel="Public" context="Patient" localId="378" locator="125:1-126:6" name="Tetanus and diphtheria-containing vaccine booster dose 3 Overdue"><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="378"><a:s r="379">/*
@dynamicValue: Tetanus and diphtheria-containing vaccine booster dose 3 Overdue
@pseudocode: To be determined by Member States
*/
define "Tetanus and diphtheria-containing vaccine booster dose 3 Overdue":
  null</a:s></a:s></annotation><expression localId="379" locator="126:3-126:6" xsi:type="Null"/></def><def accessLevel="Public" context="Patient" localId="382" locator="133:1-134:6" name="Tetanus and diphtheria-containing vaccine booster dose 3 Expiration"><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="382"><a:s r="383">/*
@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 "Tetanus and diphtheria-containing vaccine booster dose 3 Expiration":
  null</a:s></a:s></annotation><expression localId="383" locator="134:3-134:6" xsi:type="Null"/></def><def accessLevel="Public" context="Patient" localId="386" locator="150:1-157:5" name="Test Validation"><annotation xsi:type="a:Annotation"><a:t name="test" value="Test expected results based on example patients"/><a:s r="386"><a:s>/*
@test: Test expected results based on example patients
*/
define "Test Validation":
  </a:s><a:s r="387"><a:s>case
    </a:s><a:s r="388"><a:s>when </a:s><a:s r="389"><a:s r="391"><a:s r="390"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="391"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="392"><a:s>'DTP79.3'</a:s></a:s></a:s><a:s> then </a:s><a:s r="398"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)"</a:s></a:s></a:s><a:s>
    </a:s><a:s r="399"><a:s>when </a:s><a:s r="400"><a:s r="402"><a:s r="401"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="402"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="403"><a:s>'DTP80.3'</a:s></a:s></a:s><a:s> then </a:s><a:s r="409"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 3"</a:s></a:s></a:s><a:s>
    </a:s><a:s r="410"><a:s>when </a:s><a:s r="411"><a:s r="413"><a:s r="412"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="413"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="414"><a:s>'DTP81.3'</a:s></a:s></a:s><a:s> then </a:s><a:s r="420"><a:s>"Tetanus and diphtheria-containing vaccine booster dose 3"</a:s></a:s></a:s><a:s>
    </a:s><a:s r="421"><a:s>when </a:s><a:s r="422"><a:s r="424"><a:s r="423"><a:s>Patient</a:s></a:s><a:s>.</a:s><a:s r="424"><a:s>id</a:s></a:s></a:s><a:s> = </a:s><a:s r="425"><a:s>'DTP82.2'</a:s></a:s></a:s><a:s> then </a:s><a:s r="431"><a:s>"Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed."</a:s></a:s></a:s><a:s>
    else </a:s><a:s r="432"><a:s>'No test case set'</a:s></a:s><a:s>
  end</a:s></a:s></a:s></annotation><expression localId="387" locator="151:3-157:5" xsi:type="Case"><caseItem localId="388" locator="152:5-152:114"><when localId="389" locator="152:10-152:31" xsi:type="Equal"><signature localId="396" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="397" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="394" name="ToString" xsi:type="FunctionRef"><signature localId="395" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="391" locator="152:10-152:19" path="id" xsi:type="Property"><source localId="390" locator="152:10-152:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="392" locator="152:23-152:31" value="DTP79.3" valueType="t:String" xsi:type="Literal"/></when><then localId="434" xsi:type="As"><operand localId="398" locator="152:38-152:114" name="Tetanus and diphtheria-containing vaccine booster dose 2 (during pregnancy)" xsi:type="ExpressionRef"/><asTypeSpecifier localId="435" xsi:type="ChoiceTypeSpecifier"><choice localId="436" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="437" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><caseItem localId="399" locator="153:5-153:95"><when localId="400" locator="153:10-153:31" xsi:type="Equal"><signature localId="407" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="408" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="405" name="ToString" xsi:type="FunctionRef"><signature localId="406" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="402" locator="153:10-153:19" path="id" xsi:type="Property"><source localId="401" locator="153:10-153:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="403" locator="153:23-153:31" value="DTP80.3" valueType="t:String" xsi:type="Literal"/></when><then localId="438" xsi:type="As"><operand localId="409" locator="153:38-153:95" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/><asTypeSpecifier localId="439" xsi:type="ChoiceTypeSpecifier"><choice localId="440" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="441" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><caseItem localId="410" locator="154:5-154:95"><when localId="411" locator="154:10-154:31" xsi:type="Equal"><signature localId="418" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="419" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="416" name="ToString" xsi:type="FunctionRef"><signature localId="417" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="413" locator="154:10-154:19" path="id" xsi:type="Property"><source localId="412" locator="154:10-154:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="414" locator="154:23-154:31" value="DTP81.3" valueType="t:String" xsi:type="Literal"/></when><then localId="442" xsi:type="As"><operand localId="420" locator="154:38-154:95" name="Tetanus and diphtheria-containing vaccine booster dose 3" xsi:type="ExpressionRef"/><asTypeSpecifier localId="443" xsi:type="ChoiceTypeSpecifier"><choice localId="444" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="445" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><caseItem localId="421" locator="155:5-155:174"><when localId="422" locator="155:10-155:31" xsi:type="Equal"><signature localId="429" name="t:String" xsi:type="NamedTypeSpecifier"/><signature localId="430" name="t:String" xsi:type="NamedTypeSpecifier"/><operand libraryName="FHIRHelpers" localId="427" name="ToString" xsi:type="FunctionRef"><signature localId="428" name="fhir:string" xsi:type="NamedTypeSpecifier"/><operand localId="424" locator="155:10-155:19" path="id" xsi:type="Property"><source localId="423" locator="155:10-155:16" name="Patient" xsi:type="ExpressionRef"/></operand></operand><operand localId="425" locator="155:23-155:31" value="DTP82.2" valueType="t:String" xsi:type="Literal"/></when><then localId="446" xsi:type="As"><operand localId="431" locator="155:38-155:174" name="Third tetanus and diphtheria-containing booster dose was administered. Tetanus and diphtheria immunization schedule has been completed." xsi:type="ExpressionRef"/><asTypeSpecifier localId="447" xsi:type="ChoiceTypeSpecifier"><choice localId="448" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="449" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></then></caseItem><else localId="450" xsi:type="As"><operand localId="432" locator="156:10-156:27" value="No test case set" valueType="t:String" xsi:type="Literal"/><asTypeSpecifier localId="451" xsi:type="ChoiceTypeSpecifier"><choice localId="452" name="t:Boolean" xsi:type="NamedTypeSpecifier"/><choice localId="453" name="t:String" xsi:type="NamedTypeSpecifier"/></asTypeSpecifier></else></expression></def></statements></library>