Title: IMMZD2DTMalariaEncounterElements Id: IMMZD2DTMalariaEncounterElements Version: 0.2.0 Url: IMMZD2DTMalariaEncounterElements 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 encounter-based elements for Malaria used throughout the Immunization CPG Related Artifacts: Dependencies WHOConcepts WHOCommon WHOElements IMMZCommon IMMZConcepts IMMZEncounterElements IMMZD2DTMalariaElements Parameters: Name Type Min Max In/Out Today date 0 1 In EncounterId string 0 1 In Patient Patient 0 1 Out Malaria Doses Administered to Patient Immunization 0 * Out Malaria Primary Series Doses Administered to Patient Immunization 0 * Out Number of Malaria Primary Series Doses Administered integer 0 1 Out Client's age is less than 5 months boolean 0 1 Out No malaria primary series doses were administered boolean 0 1 Out Client's age is more than or equal to 5 months boolean 0 1 Out One malaria primary series dose was administered boolean 0 1 Out Date of Latest Malaria Dose date 0 1 Out The latest malaria dose was administered less than 4 weeks ago boolean 0 1 Out The latest malaria dose was administered more than 4 weeks ago boolean 0 1 Out Two malaria primary series doses were administered boolean 0 1 Out Three malaria primary series doses were administered boolean 0 1 Out Four malaria primary series doses were administered boolean 0 1 Out Content: text/cql /* * Library: IMMZD2DTMalariaEncounterElements */ library IMMZD2DTMalariaEncounterElements 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 IMMZD2DTMalariaElements called MalariaElements parameter Today Date default Today() parameter EncounterId String context Patient /* @internal: Malaria containing Doses Administered to Patient */ define "Malaria Doses Administered to Patient": Encounter."Doses Administered to Patient" I where I.vaccineCode in Concepts."Malaria vaccines" /* @internal: Malaria containing Doses Administered to Patient that are in the Primary series */ define "Malaria Primary Series Doses Administered to Patient": "Malaria Doses Administered to Patient".seriesPrimary() /* @internal: Number of Malaria Primary Series doses */ define "Number of Malaria Primary Series Doses Administered": Count("Malaria Primary Series Doses Administered to Patient") /* @input: Client's age is less than 5 months @pseudocode: Today's date − "Date of birth" < 5 months @code: Client's age is less than 5 months-41 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "Client's age is less than 5 months": Encounter."Current Patient Age In Months" < 5 /* @input: No malaria primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Malaria vaccines" and "Type of dose" = "Primary series") = 0 @code: No malaria primary series doses were administered-116 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "No malaria primary series doses were administered": "Number of Malaria Primary Series Doses Administered" = 0 /* @input: Client's age is more than or equal to 5 months @pseudocode: Today's date − "Date of birth" ≥ 5 months @code: Client's age is more than or equal to 5 months-41 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "Client's age is more than or equal to 5 months": Encounter."Current Patient Age In Months" >= 5 /* @input: One malaria primary series dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Malaria vaccines" and "Type of dose" = "Primary series") = 1 @code: One malaria primary series dose was administered-116 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "One malaria primary series dose was administered": "Number of Malaria Primary Series Doses Administered" = 1 /* @input: The latest malaria dose was administered less than 4 weeks ago @pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Malaria vaccines") < 4 weeks @code: The latest malaria dose was administered less than 4 weeks ago-99 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "The latest malaria dose was administered less than 4 weeks ago": "Date of Latest Malaria Dose" is not null and duration in weeks between "Date of Latest Malaria Dose" and Today < 4 /* @input: The latest malaria dose was administered more than 4 weeks ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Malaria vaccines") ≥ 4 weeks @code: The latest malaria dose was administered more than 4 weeks ago-106 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "The latest malaria dose was administered more than 4 weeks ago": not "The latest malaria dose was administered less than 4 weeks ago" /* @input: Two malaria primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Malaria vaccines" and "Type of dose" = "Primary series") = 2 @code: Two malaria primary series doses were administered-116 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "Two malaria primary series doses were administered": "Number of Malaria Primary Series Doses Administered" = 2 /* @input: Three malaria primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Malaria vaccines" and "Type of dose" = "Primary series") = 3 @code: Three malaria primary series doses were administered-116 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "Three malaria primary series doses were administered": "Number of Malaria Primary Series Doses Administered" = 3 /* @input: Four malaria primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Malaria vaccines" and "Type of dose" = "Primary series") = 4 @code: Four malaria primary series doses were administered-116 @decision: IMMZ.D2.DT.Malaria: 4-dose schedule (The RTS,S/AS01 malaria vaccine should be used for the prevention of Plasmodium falciparum malaria in children living in regions with moderate to high malaria transmission, as defined by WHO) */ define "Four malaria primary series doses were administered": "Number of Malaria Primary Series Doses Administered" = 4 /* @internal: Date of Latest Malaria Dose */ define "Date of Latest Malaria Dose": date from start of "Malaria Doses Administered to Patient".mostRecent().occurrence.toInterval() Content: application/elm+xml Encoded data (48308 characters)
This library defines encounter-based elements for Malaria used throughout the Immunization CPG
Malaria Primary Series Doses Administered to Patient
Number of Malaria Primary Series Doses Administered
No malaria primary series doses were administered
Client's age is more than or equal to 5 months
One malaria primary series dose was administered
The latest malaria dose was administered less than 4 weeks ago
The latest malaria dose was administered more than 4 weeks ago
Two malaria primary series doses were administered
Three malaria primary series doses were administered
Four malaria primary series doses were administered