{
  "resourceType": "Library",
  "id": "IMMZD2DTPolioEncounterElements",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary",
      "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary",
      "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library",
      "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module"
    ]
  },
  "text": {
    "status": "extensions",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b style=\"color: maroon\">Exception parsing generated Narrative (see /tmp/liquid-72a690b1-0dd6-48e2-b545-447236c30e97.html): Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '\n/*\n  * Library: IMMZD2DTPolioEncounterElements\n  */\nlibrary IMMZD2DTPolioEncounterElements\n\nusing FHIR version '4.0.1'\ninclude FHIRHelpers version '4.0.1'\n\ninclude WHOConcepts\ninclude WHOCommon called WC\ninclude WHOElements called WE\n\ninclude IMMZCommon called Common\ninclude IMMZConcepts called Concepts\ninclude IMMZEncounterElements called Encounter\n\ninclude IMMZD2DTPolioElements called PolioElements\n\nparameter Today Date default Today()\nparameter EncounterId String\n\ncontext Patient\n\n/*\n@internal: Polio containing Doses Administered to Patient\n*/\ndefine &quot;Polio Doses Administered to Patient&quot;:\n  PolioElements.&quot;Polio Doses Administered to Patient&quot;.onOrBefore(Today)\n\n/*\n@internal: Polio containing Doses Administered to Patient that are in the Primary series\n*/\ndefine &quot;Polio Primary Series Doses Administered to Patient&quot;:\n  PolioElements.&quot;Polio Primary Series Doses Administered to Patient&quot;.onOrBefore(Today)\n\n/*\n@internal: Number of Polio Primary Series doses\n*/\ndefine &quot;Number of Polio Primary Series Doses Administered&quot;:\n  Count(&quot;Polio Primary Series Doses Administered to Patient&quot;)\n\n/*\n@input: bOPV birth dose (a zero dose) was not administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Poliovirus-containing vaccines&quot; and &quot;Type of dose&quot; = &quot;Dose 0&quot; AND &quot;Birth dose&quot; = TRUE) = 0\n@code: bOPV birth dose (a zero dose) was not administered-146\n@decision: IMMZ.D2.DT.Polio.Birth dose: Birth dose administration as part of &quot;bivalent oral polio vaccine (bOPV) plus inactivated polio vaccine (IPV)&quot; schedule (in countries that are poliomyelitis (polio)-endemic countries or at high risk of importation and subsequent spread of polio that follow the combined bOPV–IPV schedule)\n*/\ndefine &quot;bOPV birth dose (a zero dose) was not administered&quot;:\n  &quot;Number of Polio Dose 0 Doses Administered&quot; = 0\n\n/*\n@input: Client's age is less than 1 week\n@pseudocode: Today's date − &quot;Date of birth&quot; ' at line 345 column 46</b></p></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
      "valueCode": "computable"
    }
  ],
  "url": "http://smart.who.int/immunizations/Library/IMMZD2DTPolioEncounterElements",
  "version": "1.0.0",
  "name": "IMMZD2DTPolioEncounterElements",
  "title": "IMMZD2DTPolioEncounterElements",
  "status": "draft",
  "experimental": false,
  "type": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/library-type",
        "code": "logic-library"
      }
    ]
  },
  "date": "2026-10-02T09:24:37+00:00",
  "publisher": "WHO",
  "contact": [
    {
      "name": "WHO",
      "telecom": [
        {
          "system": "url",
          "value": "http://who.int"
        }
      ]
    }
  ],
  "description": "This library defines encounter-based elements for Polio used throughout the Immunization CPG",
  "relatedArtifact": [
    {
      "type": "depends-on",
      "display": "Library WHOConcepts",
      "resource": "http://smart.who.int/immunizations/Library/WHOConcepts"
    },
    {
      "type": "depends-on",
      "display": "Library WC",
      "resource": "http://smart.who.int/immunizations/Library/WHOCommon"
    },
    {
      "type": "depends-on",
      "display": "Library WE",
      "resource": "http://smart.who.int/immunizations/Library/WHOElements"
    },
    {
      "type": "depends-on",
      "display": "Library Common",
      "resource": "http://smart.who.int/immunizations/Library/IMMZCommon"
    },
    {
      "type": "depends-on",
      "display": "Library Concepts",
      "resource": "http://smart.who.int/immunizations/Library/IMMZConcepts"
    },
    {
      "type": "depends-on",
      "display": "Library Encounter",
      "resource": "http://smart.who.int/immunizations/Library/IMMZEncounterElements"
    },
    {
      "type": "depends-on",
      "display": "Library PolioElements",
      "resource": "http://smart.who.int/immunizations/Library/IMMZD2DTPolioElements"
    }
  ],
  "parameter": [
    {
      "name": "Today",
      "use": "in",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "EncounterId",
      "use": "in",
      "min": 0,
      "max": "1",
      "type": "string"
    },
    {
      "name": "Patient",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Patient"
    },
    {
      "name": "Polio Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Polio Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Polio Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "Polio Dose 0 Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Polio Dose 0 Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "bOPV birth dose (a zero dose) was not administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 1 week",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 1 week",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "bOPV birth dose (a zero dose) was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 6 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No poliovirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is between 6 weeks and 3 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than 3 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "One poliovirus primary series dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is between 6 weeks and 14 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "bOPV Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Date of Latest bOPV Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "The latest bOPV dose was administered less than 4 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest bOPV dose was administered more than 4 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Polio bOPV Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Polio bOPV Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "The poliovirus dose administered is bOPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 14 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The poliovirus dose administered is IPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "IPV Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Date of Latest IPV Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "The latest IPV dose was administered less than 4 months ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest IPV dose was administered more than 4 months ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Two poliovirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The two doses administered are bOPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "From the two doses administered one is bOPV and one is IPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The two doses administered are IPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Three poliovirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The three doses administered are bOPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 14 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "From the three doses administered, one is IPV and two are bOPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "From the three doses administered, one is bOPV and two are IPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Four poliovirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "From the four doses administered, one is IPV and three are bOPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "From the four doses administered, two are IPV and two are bOPV",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Five poliovirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 8 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 8 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date of Latest Polio Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "The latest poliovirus dose was administered less than 4 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest poliovirus dose was administered more than 4 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 6 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date of First Primary Series Polio Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Client's age was more than 6 weeks when the primary series was started",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age was 6 weeks when the primary series was started",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest poliovirus dose was administered less than 6 months ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest poliovirus dose was administered more than 6 months ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Polio Booster Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Polio Booster Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "No polio booster dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Polio booster dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Polio IPV Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Polio IPV Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZD2DTPolioEncounterElements.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZD2DTPolioEncounterElements.elm.xml"
    }
  ]
}
