Title: IMMZD2DTMeaslesElements Id: IMMZD2DTMeaslesElements Version: 0.2.0 Url: IMMZD2DTMeaslesElements Status: draft Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-11-25 20:07:03+0000 Publisher: WHO Description: This library defines context-independent elements for Measles used throughout the Immunization CPG Related Artifacts: Dependencies WHOConcepts WHOCommon WHOElements IMMZCommon IMMZConcepts IMMZElements Parameters: Name Type Min Max In/Out Patient Patient 0 1 Out Measles Doses Administered to Patient Immunization 0 * Out Measles Primary Series Doses Administered to Patient Immunization 0 * Out Number of Measles Primary Series Doses Administered integer 0 1 Out Client's age is less than 9 months boolean 0 1 Out MCV Doses Administered to Patient Immunization 0 * Out MCV Primary Series Doses Administered to Patient Immunization 0 * Out Number of MCV Primary Series Doses Administered integer 0 1 Out No measles primary series doses were administered boolean 0 1 Out Client's age is more than or equal to 9 months boolean 0 1 Out No live vaccine was administered in the last 4 weeks boolean 0 1 Out Live vaccine was administered in the last 4 weeks boolean 0 1 Out MCV1 was administered boolean 0 1 Out Client's age is less than 15 months boolean 0 1 Out Client's age is more than or equal to 15 months boolean 0 1 Out MCV2 was administered boolean 0 1 Out Client's age is less than 12 months boolean 0 1 Out Client's age is more than or equal to 12 months boolean 0 1 Out Client's age is less than 6 months boolean 0 1 Out MCV Dose 0 Doses Administered to Patient Immunization 0 * Out Number of MCV Dose 0 Doses Administered integer 0 1 Out MCV0 was not administered boolean 0 1 Out Client's age is between 6 months and 9 months boolean 0 1 Out MCV0 was administered boolean 0 1 Out MCV Supplementary Doses Administered to Patient Immunization 0 * Out Number of MCV Supplementary Doses Administered integer 0 1 Out Measles supplementary dose was not administered boolean 0 1 Out Measles routine immunization schedule is complete boolean 0 1 Out Live vaccine was administered in the past 4 weeks boolean 0 1 Out No live vaccine was administered in the past 4 weeks boolean 0 1 Out Measles supplementary dose was administered boolean 0 1 Out Date of Latest Live Attenuated Vaccine date 0 1 Out Content: text/cql /* * Library: IMMZD2DTMeaslesElements */ library IMMZD2DTMeaslesElements 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: Measles containing Doses Administered to Patient */ define "Measles Doses Administered to Patient": Elements."Doses Administered to Patient" I where I.vaccineCode in Concepts."Measles-containing vaccines" /* @internal: Measles containing Doses Administered to Patient that are in the Primary series */ define "Measles Primary Series Doses Administered to Patient": "Measles Doses Administered to Patient".seriesPrimary() /* @internal: Number of Measles Primary Series doses */ define "Number of Measles Primary Series Doses Administered": Count("Measles Primary Series Doses Administered to Patient") /* @input: Client's age is less than 9 months @pseudocode: Today's date − "Date of birth" < 9 months @code: Client's age is less than 9 months-41 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) */ define "Client's age is less than 9 months": Elements."Current Patient Age In Months" < 9 /* @input: No measles primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Primary series") = 0 @code: No measles primary series doses were administered-127 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "No measles primary series doses were administered": "Number of MCV Primary Series Doses Administered" = 0 /* @input: Client's age is more than or equal to 9 months @pseudocode: Today's date − "Date of birth" ≥ 9 months @code: Client's age is more than or equal to 9 months-41 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "Client's age is more than or equal to 9 months": Elements."Current Patient Age In Months" >= 9 /* @input: No live vaccine was administered in the last 4 weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) ≥ 4 weeks @code: No live vaccine was administered in the last 4 weeks-92 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "No live vaccine was administered in the last 4 weeks": Elements."No live vaccine was administered in the last 4 weeks" /* @input: Live vaccine was administered in the last 4 weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) < 4 weeks @code: Live vaccine was administered in the last 4 weeks-92 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "Live vaccine was administered in the last 4 weeks": Elements."Live vaccine was administered in the last 4 weeks" /* @input: MCV1 was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Primary series") = 1 @code: MCV1 was administered-127 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "MCV1 was administered": "Number of MCV Primary Series Doses Administered" = 1 /* @input: Client's age is less than 15 months @pseudocode: Today's date − "Date of birth" < 15 months @code: Client's age is less than 15 months-42 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "Client's age is less than 15 months": Elements."Current Patient Age In Months" < 15 /* @input: Client's age is more than or equal to 15 months @pseudocode: Today's date − "Date of birth" ≥ 15 months @code: Client's age is more than or equal to 15 months-42 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "Client's age is more than or equal to 15 months": Elements."Current Patient Age In Months" >= 15 /* @input: MCV2 was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Primary series") = 2 @code: MCV2 was administered-127 @decision: IMMZ.D2.DT.Measles.Ongoing transmission: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of measles-containing vaccine (MCV) at 9 months and second dose of MCV at 15 months) @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "MCV2 was administered": "Number of MCV Primary Series Doses Administered" = 2 /* @input: Client's age is less than 12 months @pseudocode: Today's date − "Date of birth" < 12 months @code: Client's age is less than 12 months-42 @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "Client's age is less than 12 months": Elements."Current Patient Age In Months" < 12 /* @input: Client's age is more than or equal to 12 months @pseudocode: Today's date − "Date of birth" ≥ 12 months @code: Client's age is more than or equal to 12 months-42 @decision: IMMZ.D2.DT.Measles.Low transmission: Countries with low levels of measles transmission (countries that provide first dose of measles-containing vaccine (MCV) at 12 months and second dose of MCV at 15 months) */ define "Client's age is more than or equal to 12 months": Elements."Current Patient Age In Months" >= 12 /* @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.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "Client's age is less than 6 months": Elements."Current Patient Age In Months" < 6 /* @input: MCV0 was not administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Dose 0") = 0 @code: MCV0 was not administered-119 @decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "MCV0 was not administered": "Number of MCV Dose 0 Doses Administered" = 0 /* @input: Client's age is between 6 months and 9 months @pseudocode: 6 months ≤ Today's date − "Date of birth" < 9 months @code: Client's age is between 6 months and 9 months-52 @decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "Client's age is between 6 months and 9 months": 6 <= Elements."Current Patient Age In Months" and Elements."Current Patient Age In Months" < 9 /* @input: MCV0 was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Dose 0") = 1 @code: MCV0 was administered-119 @decision: IMMZ.D2.DT.Measles.MCV dose 0: Measles-containing vaccine dose 0 (MCV0) administration */ define "MCV0 was administered": "Number of MCV Dose 0 Doses Administered" = 1 /* @input: Measles supplementary dose was not administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Supplementary dose") = 0 @code: Measles supplementary dose was not administered-131 @decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration */ define "Measles supplementary dose was not administered": "Number of MCV Supplementary Doses Administered" = 0 /* @input: Measles routine immunization schedule is complete @pseudocode: "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "Measles-containing vaccines") @code: Measles routine immunization schedule is complete-104 @decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration */ define "Measles routine immunization schedule is complete": "MCV2 was administered" or Coalesce( "MCV Doses Administered to Patient" Dose aggregate Result: Elements."Completed the primary vaccination series Observation".partOf.references(Dose) or Result, false ) /* @input: Live vaccine was administered in the past 4 weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) < 4 weeks @code: Live vaccine was administered in the past 4 weeks-92 @decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration */ define "Live vaccine was administered in the past 4 weeks": "Live vaccine was administered in the last 4 weeks" /* @input: No live vaccine was administered in the past 4 weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) ≥ 4 weeks @code: No live vaccine was administered in the past 4 weeks-92 @decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration */ define "No live vaccine was administered in the past 4 weeks": "No live vaccine was administered in the last 4 weeks" /* @input: Measles supplementary dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Measles-containing vaccines" and "Type of dose" = "Supplementary dose") = 1 @code: Measles supplementary dose was administered-131 @decision: IMMZ.D2.DT.Measles.Supplementary dose: Measles-containing vaccine (MCV) supplementary dose administration */ define "Measles supplementary dose was administered": "Number of MCV Supplementary Doses Administered" = 1 /* @internal: MCV Doses Administered to Patient */ define "MCV Doses Administered to Patient": Elements."Doses Administered to Patient" I where I.vaccineCode in Concepts."Measles-containing vaccines" /* @internal: MCV Primary Series Doses Administered to Patient */ define "MCV Primary Series Doses Administered to Patient": "MCV Doses Administered to Patient".seriesPrimary() /* @internal: MCV Dose 0 Doses Administered to Patient */ define "MCV Dose 0 Doses Administered to Patient": "MCV Doses Administered to Patient".seriesDose0() /* @internal: MCV Supplementary Doses Administered to Patient */ define "MCV Supplementary Doses Administered to Patient": "MCV Doses Administered to Patient".seriesSupplementary() /* @internal: Number of MCV Primary Series Doses Administered */ define "Number of MCV Primary Series Doses Administered": Count("MCV Primary Series Doses Administered to Patient") /* @internal: Number of MCV Dose 0 Doses Administered */ define "Number of MCV Dose 0 Doses Administered": Count("MCV Dose 0 Doses Administered to Patient") /* @internal: Number of MCV Supplementary Doses Administered */ define "Number of MCV Supplementary Doses Administered": Count("MCV Supplementary Doses Administered to Patient") /* @internal: Date of Latest Live Attenuated Vaccine */ define "Date of Latest Live Attenuated Vaccine": date from start of Elements."Live Attenuated Vaccines".mostRecent().occurrence.toInterval() Content: application/elm+xml Encoded data (98232 characters)
This library defines context-independent elements for Measles used throughout the Immunization CPG
Measles Primary Series Doses Administered to Patient
Number of Measles Primary Series Doses Administered
MCV Primary Series Doses Administered to Patient
Number of MCV Primary Series Doses Administered
No measles primary series doses were administered
Client's age is more than or equal to 9 months
No live vaccine was administered in the last 4 weeks
Live vaccine was administered in the last 4 weeks
Client's age is more than or equal to 15 months
Client's age is more than or equal to 12 months
MCV Dose 0 Doses Administered to Patient
Client's age is between 6 months and 9 months
MCV Supplementary Doses Administered to Patient
Number of MCV Supplementary Doses Administered
Measles supplementary dose was not administered
Measles routine immunization schedule is complete
Live vaccine was administered in the past 4 weeks
No live vaccine was administered in the past 4 weeks
Measles supplementary dose was administered