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/tree/main and changes regularly. See the Directory of published versions
Built from commit 31220c5a.

: IMMZD2DTMumpsEncounterElements - TTL Representation

Draft as of 2026-11-19

Raw ttl | Download

Loading TTL source…

CQL Source


/*
  * Library: IMMZD2DTMumpsEncounterElements
  */
library IMMZD2DTMumpsEncounterElements

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 IMMZD2DTMumpsElements called MumpsElements

parameter Today Date default Today()
parameter EncounterId String

context Patient

/*
@internal: Mumps containing Doses Administered to Patient
*/
define "Mumps Doses Administered to Patient":
  Encounter."Doses Administered to Patient" I
  where
    I.vaccineCode in Concepts."Mumps-containing vaccines"

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

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

/*
@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.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "Client's age is less than 12 months":
  Encounter."Current Patient Age In Months" < 12

/*
@input: No mumps primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Mumps-containing vaccines" and "Type of dose" = "Primary series") = 0
@code: No mumps primary series doses were administered-125
@decision: IMMZ.D2.DT.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "No mumps primary series doses were administered":
  "Number of Mumps Primary Series Doses Administered" = 0

/*
@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.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "Client's age is more than or equal to 12 months":
  Encounter."Current Patient Age In Months" >= 12

/*
@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.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "Live vaccine was administered in the past 4 weeks":
  Encounter."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.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "No live vaccine was administered in the past 4 weeks":
  Encounter."No live vaccine was administered in the last 4 weeks"

/*
@input: One mumps primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Mumps-containing vaccines" and "Type of dose" = "Primary series") = 1
@code: One mumps primary series dose was administered-125
@decision: IMMZ.D2.DT.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "One mumps primary series dose was administered":
  "Number of Mumps Primary Series Doses Administered" = 1

/*
@input: The latest mumps dose was administered less than 4 weeks ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Mumps-containing vaccines") < 4 weeks
@code: The latest mumps dose was administered less than 4 weeks ago-108
@decision: IMMZ.D2.DT.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "The latest mumps dose was administered less than 4 weeks ago":
  "Date of Latest Mumps Dose" is not null
  and duration in weeks between "Date of Latest Mumps Dose" and Today < 4

/*
@input: The latest mumps dose was administered more than 4 weeks ago
@pseudocode: Today's date − "Date and time of vaccination" (where "Vaccine type" = "Mumps-containing vaccines") ≥ 4 weeks
@code: The latest mumps dose was administered more than 4 weeks ago-108
@decision: IMMZ.D2.DT.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "The latest mumps dose was administered more than 4 weeks ago":
  not "The latest mumps dose was administered less than 4 weeks ago"

/*
@input: Two mumps primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Mumps-containing vaccines" and "Type of dose" = "Primary series") = 2
@code: Two mumps primary series doses were administered-125
@decision: IMMZ.D2.DT.Mumps: 2-dose schedule (countries with mumps in schedule and low transmission of measles)
*/
define "Two mumps primary series doses were administered":
  "Number of Mumps Primary Series Doses Administered" = 2

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

ELM Content

ELM binary data has been extracted to separate files: