WHO SMART Guidelines - Measles Immunization
0.1.0 - ci-build

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

Library: IMMZD2DTMeaslesOTLogic (Experimental)

Official URL: http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesOTLogic Version: 0.1.0
Draft as of 2024-08-12 Computable Name: IMMZD2DTMeaslesOTLogic

This library defines decision support logic for the D2.DT.Measles Dose 0 decision table in the Immunization CPG

Generated Narrative: Library IMMZD2DTMeaslesOTLogic

Related Artifacts

Depends OnLibrary WChttp://smart.who.int/immunizations-measles/Library/WHOCommon
Depends OnLibrary LogicIMMZD2DTMeaslesLogic

Parameters

Todayin01date
Patientout01Patient
Measles Routine Immunization Schedule Incompleteout01boolean
No Primary Series Doses Administeredout01boolean
One Primary Series Dose Administeredout01boolean
Two Primary Series Doses Administeredout01boolean
Client Age Less Than 9 Monthsout01boolean
Client Age Less Than 15 Monthsout01boolean
Last Live Vaccine Administered Within 4 Weeksout01boolean
MCV1 Statusout01string
MCV1 Schedule Dateout01date
MCV1 Due Dateout01date
Client Is Due For MCV1out01boolean
MCV2 Statusout01string
MCV2 Schedule Dateout01date
MCV2 Due Dateout01date
Client Is Due For MCV2out01boolean
MCV1 Expiration Dateout01date
MCV2 Expiration Dateout01date

Contents

text/cql

/*
@DecisionID: IMMZ.D2.DT.Measles.Ongoing transmission
@BusinessRule: Determine if the client is due for a measles vaccination according to the national immunization schedule
@Trigger: IMMZ.D2 Determine required vaccination(s) if any
@Description: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of MCV at 9 months and second dose of MCV at 15 months)
*/
library IMMZD2DTMeaslesOTLogic

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

include WHOCommon called WC
include IMMZD2DTMeaslesLogic called Logic

parameter Today default Today()

context Patient

/*
PlanDefinition Applicability Expressions
*/

define "Measles Routine Immunization Schedule Incomplete":
  Logic."Measles Routine Immunization Schedule Incomplete"

define "No Primary Series Doses Administered":
  Logic."Number Of Primary Series Doses Administered" = 0

define "One Primary Series Dose Administered":
  Logic."Number Of Primary Series Doses Administered" = 1

define "Two Primary Series Doses Administered":
  Logic."Number Of Primary Series Doses Administered" = 2

define "Client Age Less Than 9 Months":
  AgeInMonthsAt(Today) < 9

define "Client Age Less Than 15 Months":
  AgeInMonthsAt(Today) < 15

define "Last Live Vaccine Administered Within 4 Weeks":
  Logic."Date Last Live Vaccine Administered" + 4 weeks on or before Today

define "Client Is Due For MCV1":
  "MCV1 Status" = 'Needed'
    and "MCV1 Due Date" on or before Today

define "Client Is Due For MCV2":
  "MCV2 Status" = 'Needed'
    and "MCV2 Due Date" on or before Today

/*
Supporting Logic
*/

define "MCV1 Status":
  if Logic."Number Of Primary Series Doses Administered" = 0 then 
    'Needed'
  else
    'Complete'

define "MCV1 Schedule Date":
  Patient.birthDate + 9 months

define "MCV1 Expiration Date":
  Patient.birthDate + 15 months

define "MCV1 Due Date":
  if "MCV1 Status" = 'Needed' then
    WC.LatestOf({
        "MCV1 Schedule Date",
        Logic."Date Last Live Vaccine Administered" + 4 weeks,
        Today
    })
  else
    null

define "MCV2 Status":
  if Logic."Number Of Primary Series Doses Administered" = 1 then
    'Needed'
  else
    'Complete'

define "MCV2 Schedule Date":
  Patient.birthDate + 15 months

define "MCV2 Expiration Date":
  null as Date

define "MCV2 Due Date":
  if "MCV2 Status" = 'Needed' then
    WC.LatestOf({
        "MCV2 Schedule Date",
        Logic."Date Last Live Vaccine Administered" + 4 weeks,
        Today
    })
  else
    null

Content not shown - (application/elm+xml, size = 34Kb )

Content not shown - (application/elm+json, size = 62Kb )