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
Official URL: http://smart.who.int/example-workshop/Library/IMMZD2DTMeaslesSupplementaryLogic | Version: 0.1.0 | |||
Draft as of 2024-12-02 | 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
Depends On | Library WC | http://smart.who.int/example-workshop/Library/WHOCommon |
Depends On | Library Logic | IMMZD2DTMeaslesLogic |
Today | in | 0 | 1 | date |
Patient | out | 0 | 1 | Patient |
Measles Routine Immunization Schedule Complete | out | 0 | 1 | boolean |
No Supplementary Dose Administered | out | 0 | 1 | boolean |
Supplementary Dose Administered | out | 0 | 1 | boolean |
Last Live Vaccine Administered Within 4 Weeks | out | 0 | 1 | boolean |
Patient Is HIV-infected And Immune Reconstitution Has Been Achieved Or 6 To 12 Months Have Passed Since HAART Initiation | out | 0 | 1 | boolean |
MCV Supplementary Dose Status | out | 0 | 1 | string |
MCV Supplementary Dose Due Date | out | 0 | 1 | date |
Client Is Due For MCV Supplementary Dose | out | 0 | 1 | boolean |
MCV Supplementary Schedule Date | out | 0 | 1 | date |
MCV Supplementary Expiration Date | out | 0 | 1 | date |
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 )