WHO Immunization Implementation Guide
0.2.0 - ci-build

WHO Immunization Implementation Guide, published by WHO. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-immunizations/ and changes regularly. See the Directory of published versions

Library: IMMZD2DTMeningococcalElements

Official URL: http://smart.who.int/immunizations/Library/IMMZD2DTMeningococcalElements Version: 0.2.0
Draft as of 2025-08-08 Computable Name: IMMZD2DTMeningococcalElements

This library defines context-independent elements for Meningococcal used throughout the Immunization CPG

Title: IMMZD2DTMeningococcalElements
Id: IMMZD2DTMeningococcalElements
Version: 0.2.0
Url: IMMZD2DTMeningococcalElements
Status: draft
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2025-08-08 19:12:11+0000
Publisher: WHO
Description:

This library defines context-independent elements for Meningococcal used throughout the Immunization CPG

Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
Meningococcal Doses Administered to PatientImmunization0*Out
Date of Latest Meningococcal Dosedate01Out
Meningococcal Primary Series Doses Administered to PatientImmunization0*Out
Number of Meningococcal Primary Series Doses Administeredinteger01Out
Date of First Primary Series Meningococcal Dosedate01Out
Meningococcal Booster Series Doses Administered to PatientImmunization0*Out
Number of Meningococcal Booster Series Doses Administeredinteger01Out
No meningococcal primary series dose was administeredboolean01Out
One meningococcal primary series dose was administeredboolean01Out
Two meningococcal primary series doses were administeredboolean01Out
Client's age is less than 2 monthsboolean01Out
Client's age is more than or equal to 2 monthsboolean01Out
Client's age is less than 3 monthsboolean01Out
Client's age is more than or equal to 3 monthsboolean01Out
Client's age is less than 9 monthsboolean01Out
Client's age is more than 9 monthsboolean01Out
Client's age is more than or equal to 9 monthsboolean01Out
Client's age is less than 2 yearsboolean01Out
Client's age is more than or equal to 2 yearsboolean01Out
Client's age is more than 2 yearsboolean01Out
Client's age was less than or equal to 11 months when the primary series was startedboolean01Out
Client's age was more than 11 months when the primary series was startedboolean01Out
Client's age was less than or equal to 23 months when the primary series was startedboolean01Out
Client's age was more than 23 months when the primary series was startedboolean01Out
The latest meningococcal dose was administered less than 8 weeks agoboolean01Out
The latest meningococcal dose was administered more than 8 weeks agoboolean01Out
The latest meningococcal dose was administered less than 2 months agoboolean01Out
The latest meningococcal dose was administered more than 2 months agoboolean01Out
The latest meningococcal dose was administered less than 3 months agoboolean01Out
The latest meningococcal dose was administered more than 3 months agoboolean01Out
The latest meningococcal dose was administered less than 1 year agoboolean01Out
The latest meningococcal dose was administered more than 1 year agoboolean01Out
The latest meningococcal dose was administered less than 3 years agoboolean01Out
The latest meningococcal dose was administered more than 3 years agoboolean01Out
No meningococcal booster dose was administeredboolean01Out
Meningococcal booster dose was administeredboolean01Out
Content: text/cql

/*
  * Library: IMMZD2DTMeningococcalElements
  */
library IMMZD2DTMeningococcalElements

using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'

include WHOConcepts
include WHOCommon called WC
include WHOElements called WE

include IMMZCommon called Common
include IMMZConcepts called Concepts
include IMMZElements called Elements

context Patient

/*
@internal: Meningococcal containing Doses Administered to Patient
*/
define "Meningococcal Doses Administered to Patient":
  Elements."Doses Administered to Patient" I
  where
    I.vaccineCode in Concepts."Meningococcal vaccines"

/*
@internal: Date and time of last Meningococcal dose
*/
define "Date of Latest Meningococcal Dose":
  date from start of "Meningococcal Doses Administered to Patient".mostRecent().occurrence.toInterval()

/*
@internal: Meningococcal containing Doses Administered to Patient that are in the Primary series
*/
define "Meningococcal Primary Series Doses Administered to Patient":
  "Meningococcal Doses Administered to Patient".seriesPrimary()

/*
@internal: Number of Meningococcal Primary Series doses
*/
define "Number of Meningococcal Primary Series Doses Administered":
  Count("Meningococcal Primary Series Doses Administered to Patient")

/*
@internal: Date of First Primary Series Meningococcal Dose
*/
define "Date of First Primary Series Meningococcal Dose":
  date from start of "Meningococcal Primary Series Doses Administered to Patient".earliest().occurrence.toInterval()

/*
@internal: Meningococcal containing Doses Administered to Patient that are in the Booster series
*/
define "Meningococcal Booster Series Doses Administered to Patient":
  "Meningococcal Doses Administered to Patient".seriesBooster()

/*
@internal: Number of Meningococcal Booster Series doses
*/
define "Number of Meningococcal Booster Series Doses Administered":
  Count("Meningococcal Booster Series Doses Administered to Patient")

/*
@input: No meningococcal primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Meningococcal vaccines" and "Type of dose" = "Primary series") = 0
@decision: MenA conjugate vaccine, 1-dose schedule
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
@decision: Monovalent MenC conjugate vaccine schedule
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-CRM), 1-dose schedule
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
@decision: Polysaccharide vaccines schedule
*/
define "No meningococcal primary series dose was administered":
  "Number of Meningococcal Primary Series Doses Administered" = 0

/*
@input: One meningococcal primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Meningococcal vaccines" and "Type of dose" = "Primary series") = 1
@decision: MenA conjugate vaccine, 1-dose schedule
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
@decision: Monovalent MenC conjugate vaccine schedule
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-CRM), 1-dose schedule
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
@decision: Polysaccharide vaccines schedule
*/
define "One meningococcal primary series dose was administered":
  "Number of Meningococcal Primary Series Doses Administered" = 1

/*
@input: Two meningococcal primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Meningococcal vaccines" and "Type of dose" = "Primary series") = 2
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
@decision: Monovalent MenC conjugate vaccine schedule
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "Two meningococcal primary series doses were administered":
  "Number of Meningococcal Primary Series Doses Administered" = 2

/*
@input: Client's age is less than 2 months
@pseudocode: Today's date − "Date of birth" < 2 months
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "Client's age is less than 2 months":
  Elements."Current Patient Age In Months" < 2

/*
@input: Client's age is more than or equal to 2 months
@pseudocode: Today's date − "Date of birth" ≥ 2 months
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "Client's age is more than or equal to 2 months":
  Elements."Current Patient Age In Months" >= 2

/*
@input: Client's age is less than 3 months
@pseudocode: Today's date − "Date of birth" < 3 months
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
*/
define "Client's age is less than 3 months":
  Elements."Current Patient Age In Months" < 3

/*
@input: Client's age is more than or equal to 3 months
@pseudocode: Today's date − "Date of birth" ≥ 3 months
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
*/
define "Client's age is more than or equal to 3 months":
  Elements."Current Patient Age In Months" >= 3

/*
@input: Client's age is less than 9 months
@pseudocode: Today's date − "Date of birth" < 9 months
@decision: MenA conjugate vaccine, 1-dose schedule
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "Client's age is less than 9 months":
  Elements."Current Patient Age In Months" < 9

/*
@input: Client's age is more than 9 months
@pseudocode: Today's date − "Date of birth" ≥ 9 months
@decision: MenA conjugate vaccine, 1-dose schedule
*/
define "Client's age is more than 9 months":
  Elements."Current Patient Age In Months" >= 9

/*
@input: Client's age is more than or equal to 9 months
@pseudocode: Today's date − "Date of birth" ≥ 9 months
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "Client's age is more than or equal to 9 months":
  "Client's age is more than 9 months"

/*
@input: Client's age is less than 2 years
@pseudocode: Today's date − "Date of birth" < 2 years
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-CRM), 1-dose schedule
@decision: Polysaccharide vaccines schedule
*/
define "Client's age is less than 2 years":
  Elements."Current Patient Age In Years" < 2

/*
@input: Client's age is more than or equal to 2 years
@pseudocode: Today's date − "Date of birth" ≥ 2 years
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-CRM), 1-dose schedule
*/
define "Client's age is more than or equal to 2 years":
  Elements."Current Patient Age In Years" >= 2

/*
@input: Client's age is more than 2 years
@pseudocode: Today's date − "Date of birth" ≥ 2 years
@decision: Polysaccharide vaccines schedule
(Polysaccharide vaccines can be used to control outbreaks in countries where limited economic resources or insufficient supply restrict the use of meningococcal conjugate vaccine
s)
*/
define "Client's age is more than 2 years":
  "Client's age is more than or equal to 2 years"

/*
@input: Client's age was less than or equal to 11 months when the primary series was started
@pseudocode: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") - "Date of birth" ≤ 11 months
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "Client's age was less than or equal to 11 months when the primary series was started":
  AgeInMonthsAt("Date of First Primary Series Meningococcal Dose") <= 11

/*
@input: Client's age was more than 11 months when the primary series was started
@pseudocode: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") - "Date of birth" > 11 months
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "Client's age was more than 11 months when the primary series was started":
  AgeInMonthsAt("Date of First Primary Series Meningococcal Dose") > 11

/*
@input: Client's age was less than or equal to 23 months when the primary series was started
@pseudocode: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") - "Date of birth" ≤ 23 months
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "Client's age was less than or equal to 23 months when the primary series was started":
  AgeInMonthsAt("Date of First Primary Series Meningococcal Dose") <= 23

/*
@input: Client's age was more than 23 months when the primary series was started
@pseudocode: "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") - "Date of birth" > 23 months
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "Client's age was more than 23 months when the primary series was started":
  AgeInMonthsAt("Date of First Primary Series Meningococcal Dose") > 23

/*
@input: The latest meningococcal dose was administered less than 8 weeks ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") < 8 weeks
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
*/
define "The latest meningococcal dose was administered less than 8 weeks ago":
  "Date of Latest Meningococcal Dose" is not null
  and duration in weeks between "Date of Latest Meningococcal Dose" and Now() < 8

/*
@input: The latest meningococcal dose was administered more than 8 weeks ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") ≥ 8 weeks
@decision: MenA conjugate vaccine, 2-dose schedule (specific context where there is a compelling reason to vaccinate infants aged under 9 months)
*/
define "The latest meningococcal dose was administered more than 8 weeks ago":
  not "The latest meningococcal dose was administered less than 8 weeks ago"

/*
@input: The latest meningococcal dose was administered less than 2 months ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") < 2 months
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "The latest meningococcal dose was administered less than 2 months ago":
  "Date of Latest Meningococcal Dose" is not null
  and duration in months between "Date of Latest Meningococcal Dose" and Now() < 2

/*
@input: The latest meningococcal dose was administered more than 2 months ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") ≥ 2 months
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "The latest meningococcal dose was administered more than 2 months ago":
  not "The latest meningococcal dose was administered less than 2 months ago"

/*
@input: The latest meningococcal dose was administered less than 3 months ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") < 3 months
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "The latest meningococcal dose was administered less than 3 months ago":
  "Date of Latest Meningococcal Dose" is not null
  and duration in months between "Date of Latest Meningococcal Dose" and Now() < 3
/*
@input: The latest meningococcal dose was administered more than 3 months ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") ≥ 3 months
@decision: Quadrivalent conjugate vaccines (A,C,W135,Y-D), 2-dose schedule
*/
define "The latest meningococcal dose was administered more than 3 months ago":
  not "The latest meningococcal dose was administered less than 3 months ago"

/*
@input: The latest meningococcal dose was administered less than 1 year ago
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") < 1 year
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "The latest meningococcal dose was administered less than 1 year ago":
  "Date of Latest Meningococcal Dose" is not null
  and duration in years between "Date of Latest Meningococcal Dose" and Now() < 1

/*
@input: The latest meningococcal dose was administered more than 1 year ago
@pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") ≥ 1 year
@decision: Monovalent MenC conjugate vaccine schedule
*/
define "The latest meningococcal dose was administered more than 1 year ago":
  not "The latest meningococcal dose was administered less than 1 year ago"

/*
@input: The latest meningococcal dose was administered less than 3 years ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") < 3 years
@decision: Polysaccharide vaccines schedule
(Polysaccharide vaccines can be used to control outbreaks in countries where limited economic resources or insufficient supply restrict the use of meningococcal conjugate vaccine
s)
*/
define "The latest meningococcal dose was administered less than 3 years ago":
  "Date of Latest Meningococcal Dose" is not null
  and duration in years between "Date of Latest Meningococcal Dose" and Now() < 3
  
/*
@input: The latest meningococcal dose was administered more than 3 years ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Meningococcal vaccines") ≥ 3 years
@decision: Polysaccharide vaccines schedule
(Polysaccharide vaccines can be used to control outbreaks in countries where limited economic resources or insufficient supply restrict the use of meningococcal conjugate vaccine
s)
*/
define "The latest meningococcal dose was administered more than 3 years ago":
  not "The latest meningococcal dose was administered less than 3 years ago"

/*
@input: No meningococcal booster dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Meningococcal vaccines" and "Type of dose" = "Booster dose") = 0
@decision: Monovalent MenC conjugate vaccine schedule
@decision: Polysaccharide vaccines schedule
*/
define "No meningococcal booster dose was administered":
  "Number of Meningococcal Booster Series Doses Administered" = 0

/*
@input: Meningococcal booster dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Meningococcal vaccines" and "Type of dose" = "Booster dose") = 1
@decision: Monovalent MenC conjugate vaccine schedule
@decision: Polysaccharide vaccines schedule
*/
define "Meningococcal booster dose was administered":
  "Number of Meningococcal Booster Series Doses Administered" = 1
Content: application/elm+xml
Encoded data (111052 characters)