WHO SMART Guidelines - Example Workshop IG
0.1.0 - ci-build

WHO SMART Guidelines - Example Workshop IG, 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/brynrhodes/smart-workshop/ and changes regularly. See the Directory of published versions

Library: IMMZD2DTMeaslesLogic (Experimental)

Official URL: http://smart.who.int/example-workshop/Library/IMMZD2DTMeaslesLogic Version: 0.1.0
Draft as of 2024-12-02 Computable Name: IMMZD2DTMeaslesLogic

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

Generated Narrative: Library IMMZD2DTMeaslesLogic

Related Artifacts

Depends OnLibrary WChttp://smart.who.int/example-workshop/Library/WHOCommon
Depends OnLibrary ConceptsIMMZConcepts
Depends OnLibrary CommonIMMZCommon
Depends OnLibrary ConfigIMMZConfig
Depends OnLibrary ElementsIMMZEncounterElements

Parameters

Todayin01date
Individual is at high risk of contracting measlesin01boolean
Individual is travelling to a country experiencing measles outbreaksin01boolean
Individual is known to be HIV-infected or exposedin01boolean
Immune reconstitution was achievedin01boolean
Patientout01Patient
Most Recent Live Vaccine Doseout01Immunization
Date Last Live Vaccine Administeredout01date
No Live Vaccine Administeredout01boolean
Number Of MCV0 Doses Administeredout01integer
Number Of Primary Series Doses Administeredout01integer
Measles Routine Immunization Schedule Completeout01boolean
Measles Routine Immunization Schedule Incompleteout01boolean
Number Of Supplementary Doses Administeredout01integer
Draft Medication Request ID for MCV doseout01id

Contents

text/cql

/*
@Description: Common logic used in all the measles decisions
*/
library IMMZD2DTMeaslesLogic

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

include WHOCommon called WC
include IMMZConcepts called Concepts
include IMMZCommon called Common
include IMMZConfig called Config
include IMMZEncounterElements called Elements

parameter Today default Today()

// TODO: Should these be data elements?
parameter "Individual is at high risk of contracting measles" Boolean default false
parameter "Individual is travelling to a country experiencing measles outbreaks" Boolean default false
parameter "Individual is known to be HIV-infected or exposed" Boolean default false
parameter "Immune reconstitution was achieved" Boolean default false

context Patient

define "Most Recent Live Vaccine Dose":
  Elements."Live vaccine dose".mostRecent()

define "Date Last Live Vaccine Administered":
  date from start of "Most Recent Live Vaccine Dose".occurrence.toInterval()

define "No Live Vaccine Administered":
  "Date Last Live Vaccine Administered" is null

define "Number Of MCV0 Doses Administered":
  Count(Elements."MCV Dose 0 Dose")

define "Number Of Primary Series Doses Administered":
  Count(Elements."MCV Primary Series Dose")

define "Measles Routine Immunization Schedule Complete":
  "Number Of Primary Series Doses Administered" >= 2

define "Measles Routine Immunization Schedule Incomplete":
  not "Measles Routine Immunization Schedule Complete"

define "Number Of Supplementary Doses Administered":
  Count(Elements."MCV Supplementary Dose")

define "Draft Medication Request ID for MCV dose":
  Elements."Most Recent MCV Immunization Proposal".id

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

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