Title: IMMZD18SMeningococcalPolysaccharideVaccinesLogic Id: IMMZD18SMeningococcalPolysaccharideVaccinesLogic Version: 0.2.0 Url: IMMZD18SMeningococcalPolysaccharideVaccinesLogic Status: draft Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-12-05 23:35:21+0000 Publisher: WHO Description: This library defines decision support logic for the IMMZ.D18.S.Meningococcal.Polysaccharide vaccines schedule table in the Immunization CPG Related Artifacts: Dependencies WHOCommon IMMZCommon IMMZConcepts IMMZEncounterElements IMMZD2DTMeningococcalEncounterElements Parameters: Name Type Min Max In/Out Today date 0 1 In Patient Patient 0 1 Out One meningococcal dose from primary series was administered. The primary series has been completed boolean 0 1 Out Meningococcal dose 1 boolean 0 1 Out Meningococcal dose 1 Due Date date 0 1 Out Meningococcal dose 1 Create string 0 1 Out Meningococcal dose 1 Overdue Resource 0 1 Out Meningococcal dose 1 Expiration Resource 0 1 Out Meningococcal booster dose was administered. The immunization schedule has been completed boolean 0 1 Out Meningococcal booster dose boolean 0 1 Out Meningococcal booster dose Due Date date 0 1 Out Meningococcal booster dose Overdue date 0 1 Out Meningococcal booster dose Create string 0 1 Out Meningococcal booster dose Expiration Resource 0 1 Out Test Validation Resource 0 1 Out Content: text/cql /* * Library: IMMZD18SMeningococcalPolysaccharideVaccinesLogic (IMMZ.D18.S.Meningococcal.Polysaccharide vaccines schedule) * Schedule Table: Polysaccharide vaccines, 1-dose and booster dose schedule */ library IMMZD18SMeningococcalPolysaccharideVaccinesLogic using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' include WHOCommon called WC include IMMZCommon called Common include IMMZConcepts called Concepts include IMMZEncounterElements called IE include IMMZD2DTMeningococcalEncounterElements called Encounter parameter Today Date default Today() context Patient /* @output: Meningococcal dose 1 @description: Provision of the meningococcal dose 1 @trigger: Child's birth @pseudo: @triggerDate: "Date of birth" */ define "Meningococcal dose 1": Encounter."No meningococcal primary series dose was administered" and not "One meningococcal dose from primary series was administered. The primary series has been completed" /* @output: Meningococcal dose 1 Create @create: Polysaccharide vaccines should be administered to individuals aged ≥ 2 years. */ define "Meningococcal dose 1 Create": if "Meningococcal dose 1" then 'Polysaccharide vaccines should be administered to individuals aged ≥ 2 years.' + ' Due Date: ' + ToString("Meningococcal dose 1 Due Date") else '' /* @dynamicValue: Meningococcal dose 1 Due Date @pseudocode: "Date of birth" + 2 years */ define "Meningococcal dose 1 Due Date": if "Meningococcal dose 1" then Patient.birthDate + 2 years else null /* @dynamicValue: Meningococcal dose 1 Overdue @pseudocode: To be determined by Member States; however, there is no recommended overdue date and individuals are always eligible to be vaccinated. */ define "Meningococcal dose 1 Overdue": null /* @dynamicValue: Meningococcal dose 1 Expiration @pseudocode: To be determined by Member States; however, there is no recommended expiration date and individuals are always eligible to be vaccinated. */ define "Meningococcal dose 1 Expiration": null /* @complete: One meningococcal dose from primary series was administered. The primary series has been completed @pseudocode: "Completed the primary vaccination series" (where "Vaccine type" = "Meningococcal vaccines") = TRUE */ define "One meningococcal dose from primary series was administered. The primary series has been completed": Encounter."One meningococcal primary series dose was administered" /* @output: Meningococcal booster dose @description: Provision of the meningococcal booster dose @trigger: Primary series has been completed @pseudo: "Completed the primary vaccination series" (where "Vaccine type" = "Meningococcal vaccines") = TRUE @triggerDate: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") */ define "Meningococcal booster dose": "One meningococcal dose from primary series was administered. The primary series has been completed" and not "Meningococcal booster dose was administered. The immunization schedule has been completed" /* @output: Meningococcal booster dose Create @create: One booster 3–5 years after the primary dose may be given to persons considered to be a continued high risk of exposure, including some health workers. */ define "Meningococcal booster dose Create": if "Meningococcal booster dose" then 'One booster 3–5 years after the primary dose may be given to persons considered to be a continued high risk of exposure, including some health workers.' + ' Due Date: ' + ToString("Meningococcal booster dose Due Date") + ' Overdue: ' + ToString("Meningococcal booster dose Overdue") else '' /* @dynamicValue: Meningococcal booster dose Due Date @pseudocode: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") + 3 years */ define "Meningococcal booster dose Due Date": if "Meningococcal booster dose" then Encounter."Date of Latest Primary Meningococcal Dose" + 3 years else null /* @dynamicValue: Meningococcal booster dose Overdue @pseudocode: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") + 5 years */ define "Meningococcal booster dose Overdue": if "Meningococcal booster dose" then Encounter."Date of Latest Primary Meningococcal Dose" + 5 years else null /* @dynamicValue: Meningococcal booster dose Expiration @pseudocode: To be determined by Member States; however, there is no recommended expiration date and individuals are always eligible to be vaccinated. */ define "Meningococcal booster dose Expiration": null /* @complete: Meningococcal booster dose was administered. The immunization schedule has been completed @pseudocode: Count of vaccines administered (where "Vaccine type" = "Meningococcal vaccines" AND "Type of dose" = "Booster dose") = 1 */ define "Meningococcal booster dose was administered. The immunization schedule has been completed": Encounter."Meningococcal booster dose was administered" /* @test: Test expected results based on example patients */ define "Test Validation": case when Patient.id = 'Meningococcal68.1' then "Meningococcal dose 1" when Patient.id = 'Meningococcal69.2' then "Meningococcal dose 1" when Patient.id = 'Meningococcal70.2' then "Meningococcal booster dose" when Patient.id = 'Meningococcal71.3' then "Meningococcal booster dose" when Patient.id = 'Meningococcal72.3' then "Meningococcal booster dose was administered. The immunization schedule has been completed" else 'No test case set' end Content: application/elm+xml Encoded data (59644 characters)
This library defines decision support logic for the IMMZ.D18.S.Meningococcal.Polysaccharide vaccines schedule table in the Immunization CPG
One meningococcal dose from primary series was administered. The primary series has been completed
Meningococcal booster dose was administered. The immunization schedule has been completed