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: IMMZD2DTMeaslesSupplementaryLogic (Experimental)

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

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

Generated Narrative: Library IMMZD2DTMeaslesSupplementaryLogic

Related Artifacts

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

Parameters

Todayin01date
Patientout01Patient
Measles Routine Immunization Schedule Completeout01boolean
No Supplementary Dose Administeredout01boolean
Supplementary Dose Administeredout01boolean
Last Live Vaccine Administered Within 4 Weeksout01boolean
Patient Is HIV-infected And Immune Reconstitution Has Been Achieved Or 6 To 12 Months Have Passed Since HAART Initiationout01boolean
MCV Supplementary Dose Statusout01string
MCV Supplementary Dose Due Dateout01date
Client Is Due For MCV Supplementary Doseout01boolean
MCV Supplementary Schedule Dateout01date
MCV Supplementary Expiration Dateout01date

Contents

text/cql

/*
@DecisionID: IMMZ.D2.DT.Measles.Supplementary dose
@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: Measles supplementary dose administration
*/
library IMMZD2DTMeaslesSupplementaryLogic

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 Complete":
  Logic."Number Of Primary Series Doses Administered" >= 2

define "No Supplementary Dose Administered":
  Logic."Number Of Supplementary Doses Administered" = 0

define "Supplementary Dose Administered":
  Logic."Number Of Supplementary Doses Administered" = 1

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 MCV Supplementary Dose":
  "MCV Supplementary Dose Status" = 'Eligible'
    and "MCV Supplementary Dose Due Date" on or before Today

/*
Supporting Logic
*/

// TODO: Define these
define "Patient Is HIV-infected And Immune Reconstitution Has Been Achieved Or 6 To 12 Months Have Passed Since HAART Initiation":
  false

define "MCV Supplementary Dose Status":
  if "No Supplementary Dose Administered" and "Measles Routine Immunization Schedule Complete"
    and "Patient Is HIV-infected And Immune Reconstitution Has Been Achieved Or 6 To 12 Months Have Passed Since HAART Initiation" then
    'Eligible'
  else
    'Complete'

define "MCV Supplementary Schedule Date":
  null as Date

define "MCV Supplementary Expiration Date":
  null as Date

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

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

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