{
  "resourceType": "Library",
  "id": "IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic",
  "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-82378e3f-b2cb-45c3-841f-0f04920bd32a.html): Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '/*\n * Library: IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic (IMMZ.D18.S.Seasonal influenza schedule)\n * Schedule Table: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule for children aged under 9 years\n */\nlibrary IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic\n\nusing FHIR version '4.0.1'\ninclude FHIRHelpers version '4.0.1'\n\ninclude WHOCommon called WC\n\ninclude IMMZCommon called Common\ninclude IMMZConcepts called Concepts\n\ninclude IMMZEncounterElements called IE\ninclude IMMZD2DTSeasonalinfluenzaEncounterElements called Encounter\n\nparameter Today Date default Today()\n\n\ncontext Patient\n\n\n/*\n@output: Seasonal influenza dose 1\n@description: Provision of the seasonal influenza vaccine dose 1\n@trigger: Child's birth\n@pseudo: \n@triggerDate: &quot;Date of birth&quot;\n*/\ndefine &quot;Seasonal influenza dose 1&quot;:\n  Encounter.&quot;No seasonal influenza primary series doses were administered&quot;\n  and not &quot;First seasonal influenza dose from the primary series was administered&quot;\n\n\n/*\n@output: Seasonal influenza dose 1 Create\n@create: Influenza vaccines are safe and effective in children from 6 months of age\n*/\ndefine &quot;Seasonal influenza dose 1 Create&quot;:\n  if &quot;Seasonal influenza dose 1&quot;\n  then 'Influenza vaccines are safe and effective in children from 6 months of age' + '\nDue Date: ' + ToString(&quot;Seasonal influenza dose 1 Due Date&quot;)\n  else ''\n\n\n/*\n@dynamicValue: Seasonal influenza dose 1 Due Date\n@pseudocode: &quot;Date of birth&quot; + 6 months\n*/\ndefine &quot;Seasonal influenza dose 1 Due Date&quot;:\n  if &quot;Seasonal influenza dose 1&quot; then Patient.birthDate + 6 months\n  else null\n\n\n/*\n@dynamicValue: Seasonal influenza dose 1 Overdue\n@pseudocode: To be determined by Member States; however, there is no recommended overdue date and individuals are always eligible to be vaccinated\n*/\ndefine &quot;Seasonal influenza dose 1 Overdue&quot;:\n  null\n\n\n/*\n@dynamicValue: Seasonal influenza dose 1 Expiration\n@pseudocode: To be determined by Member States; however, there is no recommended expiration date and individuals are always eligible to be vaccinated\n*/\ndefine &quot;Seasonal influenza dose 1 Expiration&quot;:\n  null\n\n  \n/*\n@complete: First seasonal influenza dose from the primary series was administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Seasonal influenza vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1\n*/\ndefine &quot;First seasonal influenza dose from the primary series was administered&quot;:\n  Encounter.&quot;One seasonal influenza primary series doses were administered&quot;\n\n\n\n/*\n@output: Seasonal influenza dose 2\n@description: Provision of the seasonal influenza vaccine dose 2\n@trigger: First seasonal influenza dose from the primary series was administered and client is less than 9 years\n@pseudo: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Seasonal influenza vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1 AND (Today's date − &quot;Date of birth&quot; ' at line 292 column 175</b></p></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
      "valueCode": "computable"
    }
  ],
  "url": "http://smart.who.int/immunizations/Library/IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic",
  "version": "1.0.0",
  "name": "IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic",
  "title": "IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic",
  "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 decision support logic for the IMMZ.D18.S.Seasonal influenza schedule table in the Immunization CPG",
  "relatedArtifact": [
    {
      "type": "depends-on",
      "display": "Library WC",
      "resource": "http://smart.who.int/immunizations/Library/WHOCommon"
    },
    {
      "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 IE",
      "resource": "http://smart.who.int/immunizations/Library/IMMZEncounterElements"
    },
    {
      "type": "depends-on",
      "display": "Library Encounter",
      "resource": "http://smart.who.int/immunizations/Library/IMMZD2DTSeasonalinfluenzaEncounterElements"
    }
  ],
  "parameter": [
    {
      "name": "Today",
      "use": "in",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Patient",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Patient"
    },
    {
      "name": "First seasonal influenza dose from the primary series was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Seasonal influenza dose 1",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Seasonal influenza dose 1 Due Date",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Seasonal influenza dose 1 Create",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "string"
    },
    {
      "name": "Seasonal influenza dose 1 Overdue",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Resource"
    },
    {
      "name": "Seasonal influenza dose 1 Expiration",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Resource"
    },
    {
      "name": "Second seasonal influenza dose from the primary series was administered. The primary series has been completed",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Seasonal influenza dose 2",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Seasonal influenza dose 2 Due Date",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Seasonal influenza dose 2 Expiration",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Seasonal influenza dose 2 Create",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "string"
    },
    {
      "name": "Seasonal influenza dose 2 Overdue",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Resource"
    },
    {
      "name": "Seasonal influenza annual dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Seasonal influenza annual dose Due Date",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "Seasonal influenza annual dose Create",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "string"
    },
    {
      "name": "Seasonal influenza annual dose Overdue",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Resource"
    },
    {
      "name": "Seasonal influenza annual dose Expiration",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Resource"
    },
    {
      "name": "Seasonal influenza annual dose was administered less than 1 year ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Test Validation",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Resource"
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZD18SSeasonalinfluenzaSeasonalInfluenzaLogic.elm.xml"
    }
  ]
}
