{
  "resourceType": "Library",
  "id": "IMMZD2DTRabiesEncounterElements",
  "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-9d9a0a66-1a16-4240-a34a-a5651007c2a5.html): Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '\n/*\n  * Library: IMMZD2DTRabiesEncounterElements\n  */\nlibrary IMMZD2DTRabiesEncounterElements\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 IMMZD2DTRabiesElements called RabiesElements\n\nparameter Today Date default Today()\nparameter EncounterId String\n\ncontext Patient\n\n/*\n@internal: Rabies containing Doses Administered to Patient\n*/\ndefine &quot;Rabies Doses Administered to Patient&quot;:\n  Encounter.&quot;Doses Administered to Patient&quot; I\n  where\n    I.vaccineCode in Concepts.&quot;Rabies vaccines&quot;\n\n/*\n@internal: Rabies containing Doses Administered to Patient that are in the Primary series\n*/\ndefine &quot;Rabies Primary Series Doses Administered to Patient&quot;:\n  &quot;Rabies Doses Administered to Patient&quot;.seriesPrimary()\n\n/*\n@internal: Number of Rabies Primary Series doses\n*/\ndefine &quot;Number of Rabies Primary Series Doses Administered&quot;:\n  Count(&quot;Rabies Primary Series Doses Administered to Patient&quot;)\n\n/*\n@input: No rabies primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0\n@code: No rabies primary series doses were administered-115\n@decision: IMMZ.D2.DT.Rabies: Pre-exposure prophylaxis (PrEP), 2-dose scheme; high risk of rabies virus exposure\n*/\ndefine &quot;No rabies primary series doses were administered&quot;:\n  &quot;Number of Rabies Primary Series Doses Administered&quot; = 0\n\n/*\n@input: One rabies primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1\n@code: One rabies primary series doses were administered-115\n@decision: IMMZ.D2.DT.Rabies: Pre-exposure prophylaxis (PrEP), 2-dose scheme; high risk of rabies virus exposure\n*/\ndefine &quot;One rabies primary series doses were administered&quot;:\n  &quot;Number of Rabies Primary Series Doses Administered&quot; = 1\n\n/*\n@input: The latest rabies dose was administered less than 7 days ago\n@pseudocode: ''Today's date - Latest &quot;Date of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Rabies vaccines&quot;) ' at line 258 column 104</b></p></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
      "valueCode": "computable"
    }
  ],
  "url": "http://smart.who.int/immunizations/Library/IMMZD2DTRabiesEncounterElements",
  "version": "1.0.0",
  "name": "IMMZD2DTRabiesEncounterElements",
  "title": "IMMZD2DTRabiesEncounterElements",
  "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 Rabies 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 RabiesElements",
      "resource": "http://smart.who.int/immunizations/Library/IMMZD2DTRabiesElements"
    }
  ],
  "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": "Rabies Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Rabies Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Rabies Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "No rabies primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "One rabies primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date of Latest Rabies Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "The latest rabies dose was administered less than 7 days ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest rabies dose was administered more than 7 days ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Two rabies primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZD2DTRabiesEncounterElements.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZD2DTRabiesEncounterElements.elm.xml"
    }
  ]
}
