Title: IMMZD2DTSeasonalinfluenzaEncounterElements Id: IMMZD2DTSeasonalinfluenzaEncounterElements Version: 0.2.0 Url: IMMZD2DTSeasonalinfluenzaEncounterElements Status: draft Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2026-03-03 13:07:11+0000 Publisher: WHO Description: This library defines encounter-based elements for Seasonal influenza used throughout the Immunization CPG Related Artifacts: Dependencies WHOConcepts WHOCommon WHOElements IMMZCommon IMMZConcepts IMMZEncounterElements IMMZD2DTSeasonalinfluenzaElements Parameters: Name Type Min Max In/Out Today date 0 1 In EncounterId string 0 1 In Patient Patient 0 1 Out Seasonal influenza Doses Administered to Patient Immunization 0 * Out Seasonal influenza Primary Series Doses Administered to Patient Immunization 0 * Out Number of Seasonal influenza Primary Series Doses Administered integer 0 1 Out Client's age is less than 6 months boolean 0 1 Out No seasonal influenza primary series doses were administered boolean 0 1 Out Client's age is more than or equal to 6 months boolean 0 1 Out One seasonal influenza primary series doses were administered boolean 0 1 Out Client's age is less than 9 years boolean 0 1 Out Date of Latest Seasonal influenza Dose date 0 1 Out The latest seasonal influenza dose was administered less than 4 weeks ago boolean 0 1 Out The latest seasonal influenza dose was administered more than 4 weeks ago boolean 0 1 Out Client's age is more than or equal to 9 years boolean 0 1 Out The latest seasonal influenza dose was administered less than 1 year ago boolean 0 1 Out The latest seasonal influenza dose was administered more than 1 year ago boolean 0 1 Out Two seasonal influenza primary series doses were administered boolean 0 1 Out Content: text/cql /* * Library: IMMZD2DTSeasonalinfluenzaEncounterElements */ library IMMZD2DTSeasonalinfluenzaEncounterElements 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 IMMZEncounterElements called Encounter include IMMZD2DTSeasonalinfluenzaElements called SeasonalinfluenzaElements parameter Today Date default Today() parameter EncounterId String context Patient /* @internal: Seasonal influenza containing Doses Administered to Patient */ define "Seasonal influenza Doses Administered to Patient": Encounter."Doses Administered to Patient" I where I.vaccineCode in Concepts."Seasonal influenza vaccines" /* @internal: Seasonal influenza containing Doses Administered to Patient that are in the Primary series */ define "Seasonal influenza Primary Series Doses Administered to Patient": "Seasonal influenza Doses Administered to Patient".seriesPrimary() /* @internal: Number of Seasonal influenza Primary Series doses */ define "Number of Seasonal influenza Primary Series Doses Administered": Count("Seasonal influenza Primary Series Doses Administered to Patient") /* @input: Client's age is less than 6 months @pseudocode: Today's date − "Date of birth" < 6 months @code: Client's age is less than 6 months-41 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "Client's age is less than 6 months": Encounter."Current Patient Age In Months" < 6 /* @input: No seasonal influenza primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Seasonal influenza vaccines" and "Type of dose" = "Primary series") = 0 @code: No seasonal influenza primary series doses were administered-127 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "No seasonal influenza primary series doses were administered": "Number of Seasonal influenza Primary Series Doses Administered" = 0 /* @input: Client's age is more than or equal to 6 months @pseudocode: Today's date − "Date of birth" ≥ 6 months @code: Client's age is more than or equal to 6 months-41 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "Client's age is more than or equal to 6 months": Encounter."Current Patient Age In Months" >= 6 /* @input: One seasonal influenza primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Seasonal influenza vaccines" and "Type of dose" = "Primary series") = 1 @code: One seasonal influenza primary series doses were administered-127 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "One seasonal influenza primary series doses were administered": "Number of Seasonal influenza Primary Series Doses Administered" = 1 /* @input: Client's age is less than 9 years @pseudocode: Today's date − "Date of birth" < 9 years @code: Client's age is less than 9 years-40 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "Client's age is less than 9 years": Encounter."Current Patient Age In Years" < 9 /* @input: The latest seasonal influenza dose was administered less than 4 weeks ago @pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Seasonal influenza vaccines") < 4 weeks @code: The latest seasonal influenza dose was administered less than 4 weeks ago-110 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "The latest seasonal influenza dose was administered less than 4 weeks ago": "Date of Latest Seasonal influenza Dose" is not null and duration in weeks between "Date of Latest Seasonal influenza Dose" and Today < 4 /* @input: The latest seasonal influenza dose was administered more than 4 weeks ago @pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Seasonal influenza vaccines") ≥ 4 weeks @code: The latest seasonal influenza dose was administered more than 4 weeks ago-110 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "The latest seasonal influenza dose was administered more than 4 weeks ago": not "The latest seasonal influenza dose was administered less than 4 weeks ago" /* @input: Client's age is more than or equal to 9 years @pseudocode: Today's date − "Date of birth" ≥ 9 years @code: Client's age is more than or equal to 9 years-40 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "Client's age is more than or equal to 9 years": Encounter."Current Patient Age In Years" >= 9 /* @input: The latest seasonal influenza dose was administered less than 1 year ago @pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Seasonal influenza vaccines") < 1 year @code: The latest seasonal influenza dose was administered less than 1 year ago-109 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "The latest seasonal influenza dose was administered less than 1 year ago": "Date of Latest Seasonal influenza Dose" is not null and duration in years between "Date of Latest Seasonal influenza Dose" and Today < 1 /* @input: The latest seasonal influenza dose was administered more than 1 year ago @pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Seasonal influenza vaccines") ≥ 1 year @code: The latest seasonal influenza dose was administered more than 1 year ago-109 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "The latest seasonal influenza dose was administered more than 1 year ago": not "The latest seasonal influenza dose was administered less than 1 year ago" /* @input: Two seasonal influenza primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Seasonal influenza vaccines" and "Type of dose" = "Primary series") = 2 @code: Two seasonal influenza primary series doses were administered-127 @decision: IMMZ.D2.DT.Seasonal influenza: Inactivated trivalent and quadrivalent vaccines, 2-dose schedule */ define "Two seasonal influenza primary series doses were administered": "Number of Seasonal influenza Primary Series Doses Administered" = 2 /* @internal: Date of Latest Seasonal influenza Dose */ define "Date of Latest Seasonal influenza Dose": date from start of "Seasonal influenza Doses Administered to Patient".mostRecent().occurrence.toInterval() Content: application/elm+xml Encoded data (53620 characters)
This library defines encounter-based elements for Seasonal influenza used throughout the Immunization CPG
Seasonal influenza Doses Administered to Patient
Seasonal influenza Primary Series Doses Administered to Patient
Number of Seasonal influenza Primary Series Doses Administered
No seasonal influenza primary series doses were administered
Client's age is more than or equal to 6 months
One seasonal influenza primary series doses were administered
The latest seasonal influenza dose was administered less than 4 weeks ago
The latest seasonal influenza dose was administered more than 4 weeks ago
Client's age is more than or equal to 9 years
The latest seasonal influenza dose was administered less than 1 year ago
The latest seasonal influenza dose was administered more than 1 year ago
Two seasonal influenza primary series doses were administered