{
  "resourceType": "Library",
  "id": "IMMZD2DTMeaslesEncounterElements",
  "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-3641cdf3-faea-4d7d-ab6c-104a2728d8df.html): Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '\n/*\n  * Library: IMMZD2DTMeaslesEncounterElements\n  */\nlibrary IMMZD2DTMeaslesEncounterElements\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 IMMZD2DTMeaslesElements called MeaslesElements\n\nparameter Today Date default Today()\nparameter EncounterId String\n\ncontext Patient\n\n/*\n@internal: Measles containing Doses Administered to Patient\n*/\ndefine &quot;Measles Doses Administered to Patient&quot;:\n\n  Encounter.&quot;Doses Administered to Patient&quot; I\n  where\n    I.vaccineCode in Concepts.&quot;Measles-containing vaccines&quot;\n\n/*\n@internal: Measles containing Doses Administered to Patient that are in the Primary series\n*/\ndefine &quot;Measles Primary Series Doses Administered to Patient&quot;:\n\n  &quot;Measles Doses Administered to Patient&quot;.seriesPrimary()\n\n/*\n@internal: Number of Measles Primary Series doses\n*/\ndefine &quot;Number of Measles Primary Series Doses Administered&quot;:\n\n  Count(&quot;Measles Primary Series Doses Administered to Patient&quot;)\n\n/*\n@input: Client's age is less than 9 months\n@pseudocode: Today's date − &quot;Date of birth&quot; ' at line 289 column 46</b></p></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
      "valueCode": "computable"
    }
  ],
  "url": "http://smart.who.int/immunizations/Library/IMMZD2DTMeaslesEncounterElements",
  "version": "1.0.0",
  "name": "IMMZD2DTMeaslesEncounterElements",
  "title": "IMMZD2DTMeaslesEncounterElements",
  "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 Measles 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 MeaslesElements",
      "resource": "http://smart.who.int/immunizations/Library/IMMZD2DTMeaslesElements"
    }
  ],
  "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": "Measles Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Measles Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Measles Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "Client's age is less than 9 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of MCV Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "No measles primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 9 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No live vaccine was administered in the last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Live vaccine was administered in the last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV1 was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 15 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 15 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV2 was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 12 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than or equal to 12 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is less than 6 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV Dose 0 Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of MCV Dose 0 Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "MCV0 was not administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is between 6 months and 9 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV0 was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV Supplementary Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of MCV Supplementary Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "Measles supplementary dose was not administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "MCV Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Measles routine immunization schedule is complete",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Live vaccine was administered in the past 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No live vaccine was administered in the past 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Measles supplementary dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date when the primary vaccination series completed",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Date of Latest Live Attenuated Vaccine",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZD2DTMeaslesEncounterElements.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZD2DTMeaslesEncounterElements.elm.xml"
    }
  ]
}
