Skip to content

Commit d70e1e5

Browse files
committed
Added in plandef for yellow fever contraindication. Updated plan defs and activity defs to use rulesets to simplify adding new antigens.
1 parent 4804ce0 commit d70e1e5

27 files changed

+427
-783
lines changed

input/cql/IMMZD18SYellowFever.cql

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Library: IMMZD18SYellowFever (IMMZ.D18.S.YellowFever)
3+
* Trigger: IMMZ.D18 Determine required vaccination(s) Schedule if any
4+
*/
5+
library IMMZD18SYellowFever
6+
// Start Skeleton CQL
7+
using FHIR version '4.0.1'
8+
include FHIRHelpers version '4.0.1'
9+
include IMMZCommon called IMMZCom
10+
include IMMZConcepts called IMMZc
11+
include IMMZConfig called IMMZCon
12+
include IMMZVaccineLibrary called IMMZvl
13+
include FHIRCommon called FC
14+
include IMMZD2DTYellowFeverInput called input
15+
16+
// End Skeleton CQL
17+
context Patient
18+
19+
20+
/*
21+
@output: Yellow fever dose 1
22+
@trigger: Child's birth
23+
*/
24+
define "Yellow fever dose 1":
25+
input."No yellow fever primary series doses were administered"
26+
27+
/*
28+
@output: Measles dose dose 1 Create
29+
@create: The client is due for measles dose 1 if the client is at least 9 months
30+
*/
31+
define "Yellow fever dose dose 1 Create":
32+
if "Yellow fever dose 1" then 'The client is due for yellow fever dose 1 if the client is at least 9 months and living in a yellow fever endemic area. Due Date is '
33+
+ ToString("Yellow fever dose 1 Due Date") + '. Overdue on ' + ToString("Yellow fever dose 1 Overdue")
34+
else ''
35+
36+
/*
37+
@dynamicValue: Yellow fever dose 1 Due Date
38+
@pseudocode: "Date of birth" + 9 'month'
39+
*/
40+
define "Yellow fever dose 1 Due Date":
41+
if "Yellow fever dose 1" then Patient.birthDate + 9 months
42+
else null
43+
44+
/*
45+
@dynamicValue: Yellow fever dose 1 Overdue
46+
@pseudocode: To be determined by Member States however there is no recommended overdue date and individuals are always eligible to be vaccinated
47+
*/
48+
define "Yellow fever dose 1 Overdue":
49+
if "Yellow fever dose 1" then Patient.birthDate + 12 months
50+
else null
51+
52+
/*
53+
@dynamicValue: Yellow fever dose 1 Expiration
54+
@pseudocode: To be determined by Member States however there is no recommended expiration date and individuals are always eligible to be vaccinated
55+
*/
56+
define "Yellow fever dose 1 Expiration":
57+
null
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
RuleSet: MedicationRequestActivityDefinition( antigen, version, date, doNotPerform, product )
2+
* extension[+]
3+
* url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"
4+
* valueCode = #computable
5+
* version = "{version}"
6+
* name = "IMMZ{antigen}MedicationRequest"
7+
* status = #draft
8+
* experimental = false
9+
* date = {date}
10+
* publisher = "World Health Organization (WHO)"
11+
* contact[+]
12+
* telecom[+]
13+
* system = #url
14+
* value = "https://who.int"
15+
* kind = #MedicationRequest
16+
* intent = #proposal
17+
* doNotPerform = {doNotPerform}
18+
* productCodeableConcept = {product}

input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,4 @@ Title: "IMMZ.D2.DT.Measles.MR"
44
Description: "Provide immunization"
55
Usage: #definition
66

7-
* extension[+]
8-
* url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"
9-
* valueCode = #computable
10-
* version = "0.1.0"
11-
* name = "IMMZD2DTMeaslesMedicationRequest"
12-
* status = #draft
13-
* experimental = false
14-
* date = 2023-10-03
15-
* publisher = "World Health Organization (WHO)"
16-
* contact[+]
17-
* telecom[+]
18-
* system = #url
19-
* value = "https://who.int"
20-
* kind = #MedicationRequest
21-
* intent = #proposal
22-
* doNotPerform = false
23-
* productCodeableConcept = $ICD11#XM61M7 "Measles vaccines"
7+
* insert MedicationRequestActivityDefinition( D2DTMeasles, 0.1.0, 2023-10-23, false, $ICD11#XM28X5 "Measles vaccines")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Instance: IMMZD2DTYellowFeverMR
2+
InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-immunizationactivity
3+
Title: "IMMZ.D2.DT.YellowFever.MR"
4+
Description: "Provide immunization"
5+
Usage: #definition
6+
7+
* insert MedicationRequestActivityDefinition( D2DTYellowFever, 0.1.0, 2023-10-23, false, $ICD11#XM0N24 "Yellow fever vaccine")

input/fsh/activitydefinitions/IMMZD5DTMeaslesMR.fsh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,4 @@ Title: "IMMZ.D5.DT.Measles.MR"
44
Description: "Immunization Contraindication"
55
Usage: #definition
66

7-
* extension[+]
8-
* url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"
9-
* valueCode = #computable
10-
* version = "0.1.0"
11-
* name = "IMMZD5DTMeaslesContraindicationMRUpdate"
12-
* status = #draft
13-
* experimental = false
14-
* date = 2023-10-03
15-
* publisher = "World Health Organization (WHO)"
16-
* contact[+]
17-
* telecom[+]
18-
* system = #url
19-
* value = "https://who.int"
20-
* kind = #MedicationRequest
21-
* intent = #proposal
22-
* doNotPerform = true
23-
* productCodeableConcept = $ICD11#XM28X5 "Measles vaccines"
7+
* insert MedicationRequestActivityDefinition( D5DTMeasles, 0.1.0, 2023-10-23, true, $ICD11#XM28X5 "Measles vaccines")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Instance: IMMZD5DTYellowFeverMR
2+
InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-immunizationactivity
3+
Title: "IMMZ.D5.DT.YellowFever.MR"
4+
Description: "Immunization Contraindication"
5+
Usage: #definition
6+
7+
* insert MedicationRequestActivityDefinition( D5DTYellowFever, 0.1.0, 2023-10-23, true, $ICD11#XM0N24 "Yellow fever vaccine")

input/fsh/plandefinitions/IMMZD18SMeaslesDose0HighTx.fsh

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,8 @@ Countries with ongoing transmission in which the risk of measles mortality remai
77
"""
88
Usage: #definition
99

10-
* library = "http://smart.who.int/ig/smart-immunizations/Library/IMMZD18SMeaslesDose0HighTx"
11-
* extension[+]
12-
* url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"
13-
* valueCode = #computable
14-
* version = "0.1.0"
15-
* name = "IMMZD18SMeaslesDose0HighTx"
16-
* status = #draft
17-
* experimental = false
18-
* publisher = "World Health Organization (WHO)"
19-
* action[+]
20-
* title = "Provision of the measles MCV0 dose (dose zero)."
21-
* description = """
10+
* insert PlanDefMain( IMMZD18SMeaslesDose0HighTx, 0.1.0 )
11+
* insert PlanDefCommunicationRequestAction([[Provision of the measles MCV0 dose (dose zero).]], [["""
2212
Provision of the measles MCV0 dose (dose zero).
2313
Countries with ongoing transmission in which the risk of measles mortality remains high.
24-
"""
25-
* condition[+]
26-
* kind = #applicability
27-
* expression
28-
* description = "Measles MCV0 dose"
29-
* language = #text/cql-identifier
30-
* expression = "Measles MCV0 dose"
31-
* definitionCanonical = Canonical(IMMZD2DTCR)
32-
* dynamicValue[+]
33-
* path = "status"
34-
* expression
35-
* language = #text-cql
36-
* expression = "'active'"
37-
* dynamicValue[+]
38-
* path = "payload.contentAttachment.title"
39-
* expression
40-
* language = #text/cql-identifier
41-
* expression = "Measles MCV0 dose Create"
42-
* dynamicValue[+]
43-
* path = "payload.contentAttachment.language"
44-
* expression
45-
* language = #text/cql
46-
* expression = "'en-US'"
47-
* dynamicValue[+]
48-
* path = "payload.contentAttachment.contentType"
49-
* expression
50-
* language = #text/cql
51-
* expression = "'text/plain'"
52-
* dynamicValue[+]
53-
* path = "category.coding"
54-
* expression
55-
* description = "Category of communication"
56-
* language = #text/cql
57-
* expression = "Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"
58-
* dynamicValue[+]
59-
* path = "priority"
60-
* expression
61-
* description = "Alert priority"
62-
* language = #text/cql
63-
* expression = "Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"
14+
"""]], Measles MCV0 dose, Measles MCV0 dose Create)

input/fsh/plandefinitions/IMMZD18SMeaslesDose0LowTx.fsh

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,8 @@ Countries with ongoing transmission in which the risk of measles mortality remai
77
"""
88
Usage: #definition
99

10-
* library = "http://smart.who.int/ig/smart-immunizations/Library/IMMZD18SMeaslesDose0LowTx"
11-
* extension[+]
12-
* url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"
13-
* valueCode = #computable
14-
* version = "0.1.0"
15-
* name = "IMMZD18SMeaslesDose0LowTx"
16-
* status = #draft
17-
* experimental = false
18-
* publisher = "World Health Organization (WHO)"
19-
* action[+]
20-
* title = "Provision of the measles MCV0 dose (dose zero)."
21-
* description = """
10+
* insert PlanDefMain( IMMZD18SMeaslesDose0LowTx, 0.1.0 )
11+
* insert PlanDefCommunicationRequestAction([[Provision of the measles MCV0 dose (dose zero).]], [["""
2212
Provision of the measles MCV0 dose (dose zero).
2313
Countries with ongoing transmission in which the risk of measles mortality remains low.
24-
"""
25-
* condition[+]
26-
* kind = #applicability
27-
* expression
28-
* description = "Measles MCV0 dose"
29-
* language = #text/cql-identifier
30-
* expression = "Measles MCV0 dose"
31-
* definitionCanonical = Canonical(IMMZD2DTCR)
32-
* dynamicValue[+]
33-
* path = "status"
34-
* expression
35-
* language = #text-cql
36-
* expression = "'active'"
37-
* dynamicValue[+]
38-
* path = "payload.contentAttachment.title"
39-
* expression
40-
* language = #text/cql-identifier
41-
* expression = "Measles MCV0 dose Create"
42-
* dynamicValue[+]
43-
* path = "payload.contentAttachment.language"
44-
* expression
45-
* language = #text/cql
46-
* expression = "'en-US'"
47-
* dynamicValue[+]
48-
* path = "payload.contentAttachment.contentType"
49-
* expression
50-
* language = #text/cql
51-
* expression = "'text/plain'"
52-
* dynamicValue[+]
53-
* path = "category.coding"
54-
* expression
55-
* description = "Category of communication"
56-
* language = #text/cql
57-
* expression = "Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"
58-
* dynamicValue[+]
59-
* path = "priority"
60-
* expression
61-
* description = "Alert priority"
62-
* language = #text/cql
63-
* expression = "Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"
14+
"""]], Measles MCV0 dose, Measles MCV0 dose Create)

input/fsh/plandefinitions/IMMZD18SMeaslesHighTx.fsh

Lines changed: 5 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -7,102 +7,12 @@ Countries with ongoing transmission in which the risk of measles mortality remai
77
"""
88
Usage: #definition
99

10-
* library = "http://smart.who.int/ig/smart-immunizations/Library/IMMZD18SMeaslesHighTx"
11-
* extension[+]
12-
* url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"
13-
* valueCode = #computable
14-
* version = "0.1.0"
15-
* name = "IMMZD18SMeaslesHighTx"
16-
* status = #draft
17-
* experimental = false
18-
* publisher = "World Health Organization (WHO)"
19-
* action[+]
20-
* title = "Provision of first measles dose from the primary schedule."
21-
* description = """
10+
* insert PlanDefMain( IMMZD18SMeaslesHighTx, 0.1.0 )
11+
* insert PlanDefCommunicationRequestAction([[Provision of first measles dose from the primary schedule.]], [["""
2212
Provision of first measles dose from the primary schedule.
2313
Countries with ongoing transmission in which the risk of measles mortality remains high.
24-
"""
25-
* condition[+]
26-
* kind = #applicability
27-
* expression
28-
* description = "Measles dose 1"
29-
* language = #text/cql-identifier
30-
* expression = "Measles dose 1"
31-
* definitionCanonical = Canonical(IMMZD2DTCR)
32-
* dynamicValue[+]
33-
* path = "status"
34-
* expression
35-
* language = #text-cql
36-
* expression = "'active'"
37-
* dynamicValue[+]
38-
* path = "payload.contentAttachment.title"
39-
* expression
40-
* language = #text/cql-identifier
41-
* expression = "Measles dose 1 Create"
42-
* dynamicValue[+]
43-
* path = "payload.contentAttachment.language"
44-
* expression
45-
* language = #text/cql
46-
* expression = "'en-US'"
47-
* dynamicValue[+]
48-
* path = "payload.contentAttachment.contentType"
49-
* expression
50-
* language = #text/cql
51-
* expression = "'text/plain'"
52-
* dynamicValue[+]
53-
* path = "category.coding"
54-
* expression
55-
* description = "Category of communication"
56-
* language = #text/cql
57-
* expression = "Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"
58-
* dynamicValue[+]
59-
* path = "priority"
60-
* expression
61-
* description = "Alert priority"
62-
* language = #text/cql
63-
* expression = "Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"
64-
* action[+]
65-
* title = "Provision of second measles dose from the primary schedule."
66-
* description = """
14+
"""]], Measles dose 1, Measles dose 1 Create)
15+
* insert PlanDefCommunicationRequestAction([[Provision of second measles dose from the primary schedule.]], [["""
6716
Provision of second measles dose from the primary schedule.
6817
Countries with ongoing transmission in which the risk of measles mortality remains high.
69-
"""
70-
* condition[+]
71-
* kind = #applicability
72-
* expression
73-
* description = "Measles dose 2"
74-
* language = #text/cql-identifier
75-
* expression = "Measles dose 2"
76-
* definitionCanonical = Canonical(IMMZD2DTCR)
77-
* dynamicValue[+]
78-
* path = "status"
79-
* expression
80-
* language = #text-cql
81-
* expression = "'active'"
82-
* dynamicValue[+]
83-
* path = "payload.contentAttachment.title"
84-
* expression
85-
* language = #text/cql-identifier
86-
* expression = "Measles dose 2 Create"
87-
* dynamicValue[+]
88-
* path = "payload.contentAttachment.language"
89-
* expression
90-
* language = #text/cql
91-
* expression = "'en-US'"
92-
* dynamicValue[+]
93-
* path = "payload.contentAttachment.contentType"
94-
* expression
95-
* language = #text/cql
96-
* expression = "'text/plain'"
97-
* dynamicValue[+]
98-
* path = "category.coding"
99-
* expression
100-
* description = "Category of communication"
101-
* language = #text/cql
102-
* expression = "Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }"
103-
* dynamicValue[+]
104-
* path = "priority"
105-
* expression
106-
* description = "Alert priority"
107-
* language = #text/cql
108-
* expression = "Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }"
18+
"""]], Measles dose 2, Measles dose 2 Create)

0 commit comments

Comments
 (0)