Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added in Rubella, Mumps, and DTP antigens #86

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c14684b
Added in CQL/plandefs and supporting files for Rubella.
lukeaduncan Mar 14, 2024
38281aa
Added in files for Mumps for CQL/plandefs for decision tables and con…
lukeaduncan Mar 15, 2024
a61096c
Added in updated Library resources for mumps cql.
lukeaduncan Mar 15, 2024
ef2858b
Updated vaccine valuesets based on latest updates to the DAK.
lukeaduncan Mar 18, 2024
caf40a3
Added in DTP files. Still have a pending question on how to handle m…
lukeaduncan Mar 19, 2024
6412ba6
Updated issue with DTP where the boosters messages could happen with …
lukeaduncan Mar 21, 2024
816beae
Merge pull request #87 from WorldHealthOrganization/clean-dtp
lukeaduncan Mar 22, 2024
23cfaa0
fix typo in SCT code
costateixeira Mar 29, 2024
771e3b2
Added generic comment for all narrower mappings to avoid QA error
costateixeira Mar 29, 2024
48fe418
fix duplicate linkids
costateixeira Mar 29, 2024
5f07bc0
fix linkId typos and remove duplicate entry on single answer
costateixeira Mar 29, 2024
b116c41
add status active to codesystems
costateixeira Mar 29, 2024
d4f1246
add ignorewarnings
costateixeira Mar 29, 2024
a926d70
remove broken links
costateixeira Mar 29, 2024
ed5d163
fix name
costateixeira Mar 29, 2024
481bf6d
add license page, and change display errors to warnings
costateixeira Mar 29, 2024
7bd69f6
add names to structuremaps
costateixeira Mar 29, 2024
2451397
license - lower case
costateixeira Mar 29, 2024
4d61d93
license - lower case
costateixeira Mar 29, 2024
eef9cc7
fix missing system in code
costateixeira Mar 29, 2024
7a67e61
Merge branch 'cleanup' of https://github.com/WorldHealthOrganization/…
costateixeira Mar 29, 2024
460583f
fix cardinality in questionnaire (typo)
costateixeira Mar 29, 2024
984cf08
fix typo
costateixeira Mar 29, 2024
b139e07
fix response to "birth" question which is no longer the question asked
costateixeira Mar 29, 2024
b0734f4
fix questionnaire issues
costateixeira Mar 29, 2024
ced13b3
ignore icd-11 warning
costateixeira Mar 29, 2024
adc1450
Fixed issues with language type in measures and plandefs f9r CQL expr…
lukeaduncan Apr 1, 2024
f1d5677
Fixed location of populationbasis extension.
lukeaduncan Apr 1, 2024
9466fcd
use right valueset?
costateixeira Apr 2, 2024
3dc6eea
cleanup qa
costateixeira Apr 2, 2024
95f54ab
Bump build to use updated publisher
costateixeira Apr 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ Using a CQL plugin in Atom or [VSCode](https://github.com/PuraJuniper/bulk-fsh),

After running the _testMagick.sh script this should produce an output file with the results of how each CQL file executed against your test patients.


15 changes: 15 additions & 0 deletions input/cql/IMMZCommon.cql
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,30 @@ define "Doses Administered to Patient":
/**
* Contraindications
*/
define "Planning to get pregnant in the next month Condition":
[Condition: IMMZc."Planning to get pregnant in the next month"]

define "Severely Immunosuppressed Condition":
[Condition: IMMZc."Severely immunosuppressed"]

define "Exposed to immunosuppressive treatment Condition":
[Condition: IMMZc."Exposed to immunosuppressive treatment"]

define "Receiving blood products Condition":
[Condition: IMMZc."Receiving blood products"]

define "TB disease Condition":
[Condition: IMMZc."TB disease"]

define "History of Anaphylactic Reactions Condition":
[Condition: IMMZc."History of anaphylactic reactions"]

define "Severe Allergic Reactions Condition":
[Condition: IMMZc."Severe allergic reactions"]

define "Severe Acute Illness Condition":
[Condition: IMMZc."Severe acute illness" ]

define "Symptomatic HIV Infection Condition":
[Condition: IMMZc."Symptomatic HIV infection"]

Expand Down
17 changes: 14 additions & 3 deletions input/cql/IMMZConcepts.cql
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@ valueset "ARV Drugs": 'http://smart.who.int/ig/smart-immunizations/ValueSet/ARVD
valueset "MCV Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE9'
valueset "Yellow Fever Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE23'
valueset "Polio Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE14'
valueset "Polio Vaccine - bOPV": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE14.bOPV'
valueset "Polio Vaccine - IPV": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE14.IPV'
valueset "Polio Vaccine - bOPV": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE30'
valueset "Polio Vaccine - IPV": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE31'
valueset "Hepatitis B Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE6'
valueset "DTP Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE24'
valueset "Tetanus and Diphtheria Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE28'
valueset "Pertussis Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE12'
valueset "Rubella Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE17'
valueset "Measles and Rubella Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE32'
valueset "Mumps Vaccine": 'http://smart.who.int/ig/smart-immunizations/ValueSet/IMMZ.Z.DE11'


/*
Expand All @@ -59,10 +65,15 @@ code "Adverse Event Severity": '246112005' from "SNOMED-CT" display 'Severity (a
code "Adverse Event Manifestation": '246112005' from "SNOMED-CT" display 'Severity (attribute)'

code "Currently Pregnant": 'DE162' from "IMMZ.D" display 'Currently Pregnant'
code "Severely immunosuppressed": 'DE165' from "IMMZ.D" display 'Severely immunosuppressed'
code "Planning to get pregnant in the next month": 'DE169' from "IMMZ.D" display 'Planning to get pregnant in the next month'
code "Receiving blood products": 'DE170' from "IMMZ.D" display 'Receiving blood products'
code "Severely immunosuppressed": 'DE165' from "IMMZ.D" display 'Severely immunosuppressed'
code "Exposed to immunosuppressive treatment": 'DE164' from "IMMZ.D" display 'Exposed to immunosuppressive treatment'
code "History of anaphylactic reactions": 'DE166' from "IMMZ.D" display 'History of anaphylactic reactions'
code "Severe allergic reactions": 'DE167' from "IMMZ.D" display 'Severe allergic reactions'
code "Symptomatic HIV infection": 'DE168' from "IMMZ.D" display 'Symptomatic HIV infection'
code "TB disease": 'DE190' from "IMMZ.D" display 'TB disease'
code "Immunodeficiency syndromes": 'DE187' from "IMMZ.D" display 'Immunodeficiency syndromes'
code "Severely immunocompromised": 'DE200' from "IMMZ.D" display 'Severely immunocompromised'
code "Breastfeeding": 'DE191' from "IMMZ.D" display 'Breastfeeding'
code "Severe acute illness": 'DE188' from "IMMZ.D" display 'Severe acute illness'
309 changes: 309 additions & 0 deletions input/cql/IMMZD2DTDTPDelayed.cql

Large diffs are not rendered by default.

318 changes: 318 additions & 0 deletions input/cql/IMMZD2DTDTPInput.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
/*
* Library: IMMZD2DTDTPInput (IMMZ.D2.DT.DTPInput)
*/
library IMMZD2DTDTPInput
// Start Skeleton CQL
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include IMMZCommon called IMMZCom
include IMMZConcepts called IMMZc
include IMMZConfig called IMMZCon
include IMMZVaccineLibrary called IMMZvl
include FHIRCommon called FC

// End Skeleton CQL
context Patient


/*
@internal: DTP containing Doses Administered to Patient
*/
define "DTP Doses Administered to Patient":
IMMZCom."Doses Administered to Patient" I
where
I.vaccineCode in IMMZc."DTP Vaccine"

/*
@internal: Date of latest DTP Vaccine
*/
define "Date of latest DTP Vaccine":
First("DTP Doses Administered to Patient").occurrence as dateTime

/*
@internal: Tetanus and Diphtheria containing Doses Administered to Patient
*/
define "Tetanus and Diphtheria containing Doses Administered to Patient":
IMMZCom."Doses Administered to Patient" I where I.vaccineCode in IMMZc."Tetanus and Diphtheria Vaccine"

/*
@internal: Tetanus and Diphtheria containing Booster Doses Administered to Patient
*/
define "Tetanus and Diphtheria Booster Doses Administered to Patient":
Take( "Tetanus and Diphtheria containing Doses Administered to Patient", Count("Tetanus and Diphtheria containing Doses Administered to Patient") - 3 )

/*
@internal: Date of latest Tetanus and Diphtheria Vaccine
*/
define "Date of latest Tetanus and Diphtheria Vaccine":
First("Tetanus and Diphtheria containing Doses Administered to Patient").occurrence as dateTime

/*
@internal: Pertussis containing Doses Administered to Patient
*/
define "Pertussis Doses Administered to Patient":
IMMZCom."Doses Administered to Patient" I where I.vaccineCode in IMMZc."Pertussis Vaccine"

/*
@internal: Pertussis containing Booster Doses Administered to Patient
*/
define "Pertussis Booster Doses Administered to Patient":
Take( "Pertussis Doses Administered to Patient", Count("Pertussis Doses Administered to Patient") - 3 )

/*
@input: No DTP primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "'Diphtheria-tetanus-pertussis containing vaccines" and "Type of dose" = "Primary series") = 0
*/
define "No DTP primary series doses were administered":
not exists("DTP Doses Administered to Patient")

/*
@input: One DTP primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "'Diphtheria-tetanus-pertussis containing vaccines" and "Type of dose" = "Primary series") = 1
*/
define "One DTP primary series dose was administered":
Count("DTP Doses Administered to Patient") = 1

/*
@input: Two DTP primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Diphtheria-tetanus-pertussis containing vaccines' and "Type of dose" = 'Primary series') = 2
*/
define "Two DTP primary series doses were administered":
Count("DTP Doses Administered to Patient") = 2

/*
@input: Three DTP primary series doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Diphtheria-tetanus-pertussis containing vaccines' and "Type of dose" = 'Primary series') = 3
*/
define "Three DTP primary series doses were administered":
Count("DTP Doses Administered to Patient") >= 3

/*
@input: No tetanus and diphtheria booster doses were administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria containing vaccines" and "Type of dose" = "Booster dose") = 0
*/
define "No tetanus and diphtheria booster doses were administered":
not exists( "Tetanus and Diphtheria Booster Doses Administered to Patient" )

/*
@input: No tetanus and diphtheria booster dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria containing vaccines" and "Type of dose" = "Booster dose") = 0
*/
define "No tetanus and diphtheria booster dose was administered":
"No tetanus and diphtheria booster doses were administered"

/*
@input: One tetanus and diphtheria booster dose was administered
@pseudocode: Count of vaccines administered where "Vaccine type" = "Tetanus and diphtheria containing vaccines" and "Type of dose" = "Booster dose" ) = 1
*/
define "One tetanus and diphtheria booster dose was administered":
Count("Tetanus and Diphtheria Booster Doses Administered to Patient") = 1

/*
@input: Two tetanus and diphtheria booster doses were administered
@pseudocode: Count of vaccines administered where "Vaccine type" = "Tetanus and diphtheria containing vaccines" and "Type of dose" = "Booster dose" ) = 2
*/
define "Two tetanus and diphtheria booster doses were administered":
Count("Tetanus and Diphtheria Booster Doses Administered to Patient") = 2

/*
@input: Three tetanus and diphtheria booster doses were administered
@pseudocode: Count of vaccines administered where "Vaccine type" = "Tetanus and diphtheria containing vaccines" and "Type of dose" = "Booster dose" ) = 3
*/
define "Three tetanus and diphtheria booster doses were administered":
Count("Tetanus and Diphtheria Booster Doses Administered to Patient") >= 3

/*
@input: No pertussis booster doses were administered
@pseudocode: Count of vaccines administered where "Vaccine type" = "Pertussis containing vaccines" and "Type of dose" = "Booster dose" ) = 0
*/
define "No pertussis booster doses were administered":
not exists( "Pertussis Booster Doses Administered to Patient" )

/*
@input: One pertussis booster dose was administered
@pseudocode: Count of vaccines administered where "Vaccine type" = "Pertussis containing vaccines" and "Type of dose" = "Booster dose" =1
*/
define "One pertussis booster dose was administered":
Count("Pertussis Booster Doses Administered to Patient") = 1

/*
@input: Client's age is less than 6 weeks
@pseudocode: Today's date - "Date of birth" < 6 'week'
*/
define "Client's age is less than 6 weeks":
IMMZCom."Current Patient Age In Weeks" < 6

/*
@input: Client's age is between 6 weeks and 1 year
@pseudocode: 6 'week' ≤ Today's date - "Date of birth" < 1 'year'
*/
define "Client's age is between 6 weeks and 1 year":
not("Client's age is less than 6 weeks") and "Client's age is less than 1 year"

/*
@input: Client's age is less than 12 months
@pseudocode: Today's date - "Date of birth" < 12 'month'
*/
define "Client's age is less than 12 months":
IMMZCom."Current Patient Age In Months" < 12

/*
@input: Client's age is more than or equal to 12 months
@pseudocode: Today's date - "Date of birth" ≥ 12 'month'
*/
define "Client's age is more than or equal to 12 months":
not("Client's age is less than 12 months")

/*
@input: Client's age is less than 4 years
@pseudocode: Today's date - "Date of birth" < 4 'year'
*/
define "Client's age is less than 4 years":
IMMZCom."Current Patient Age In Years" < 4

/*
@input: Client's age is more than or equal to 4 years
@pseudocode: Today's date - "Date of birth" ≥ 4 'year'
*/
define "Client's age is more than or equal to 4 years":
not("Client's age is less than 4 years")

/*
@input: Client's age is less than 9 years
@pseudocode: Today's date - "Date of birth" < 9 'year'
*/
define "Client's age is less than 9 years":
IMMZCom."Current Patient Age In Years" < 9

/*
@input: Client's age is more than or equal to 9 years
@pseudocode: Today's date - "Date of birth" ≥ 9 'year'
*/
define "Client's age is more than or equal to 9 years":
not("Client's age is less than 9 years")

/*
@input: Client's age is less than 1 year
@pseudocode: Today's date - "Date of birth" < 1 'year'
*/
define "Client's age is less than 1 year":
IMMZCom."Current Patient Age In Years" < 1

/*
@input: Client's age is more than 1 year
@pseudocode: Today's date - "Date of birth" > 1 year
*/
define "Client's age is more than 1 year":
not( "Client's age is less than 1 year" )

/*
@input: Client's age is between 1 year and 6 years
@pseudocode: 1 'year' ≤ Today's date - "Date of birth" ≤ 6 'year'
*/
define "Client's age is between 1 year and 6 years":
not("Client's age is less than 1 year") and not("Client's age is more than 6 years")

/*
@input: Client's age is between 1 year and 6 years old
@pseudocode: 1 year ≤ Today's date - "Date of birth" ≤ 6 years
*/
define "Client's age is between 1 year and 6 years old":
"Client's age is between 1 year and 6 years"

/*
@input: Client's age is more than 6 years
@pseudocode: Today's date - "Date of birth" > 6 'year'
*/
define "Client's age is more than 6 years":
IMMZCom."Current Patient Age In Years" > 6

/*
@input: The latest DTP dose was administered less than 4 weeks ago
@pseudocode: Today's date - latest "Date and time of vaccination" (where "Vaccine type" = 'Diphtheria-tetanus-pertussis containing vaccines') < 4 'week'
*/
define "The latest DTP dose was administered less than 4 weeks ago":
"Date of latest DTP Vaccine" is not null and duration in weeks between "Date of latest DTP Vaccine" and Now() < 4
/*
@input: The latest DTP dose was administered more than 4 weeks ago
@pseudocode: Today's date - latest "Date and time of vaccination" (where "Vaccine type" = 'Diphtheria-tetanus-pertussis containing vaccines') ≥ 4 'week'
*/
define "The latest DTP dose was administered more than 4 weeks ago":
not("The latest DTP dose was administered less than 4 weeks ago")

/*
@input: The latest DTP dose was administered less than 6 months ago
@pseudocode: Today's date - latest "Date and time of vaccination" (where "Vaccine type" = 'Diphtheria-tetanus-pertussis containing vaccines') < 6 'month'
*/
define "The latest DTP dose was administered less than 6 months ago":
"Date of latest DTP Vaccine" is not null and duration in months between "Date of latest DTP Vaccine" and Now() < 6

/*
@input: The latest DTP dose was administered more than 6 months ago
@pseudocode: Today's date - latest "Date and time of vaccination" (where "Vaccine type" = 'Diphtheria-tetanus-pertussis containing vaccines') ≥ 6 'month'
*/
define "The latest DTP dose was administered more than 6 months ago":
not("The latest DTP dose was administered less than 6 months ago")

/*
@input: The latest DTP dose was administered less than 1 year ago
@pseudocode: Today's date - latest "Date and time of vaccination" (where "Vaccine type" = "Diphtheria-tetanus-pertussis containing vaccines") < 1 year
*/
define "The latest DTP dose was administered less than 1 year ago":
"Date of latest DTP Vaccine" is not null and duration in years between "Date of latest DTP Vaccine" and Now() < 1

/*
@input: The latest DTP dose was administered more than 1 year ago
@pseudocode: Today's date - latest "Date and time of vaccination" (where "Vaccine type" = "Diphtheria-tetanus-pertussis containing vaccines") ≥ 1 year
*/
define "The latest DTP dose was administered more than 1 year ago":
not("The latest DTP dose was administered less than 1 year ago")

/*
@input: The latest tetanus and diphtheria dose was administered less than 4 weeks ago
@pseudocode: Today's date - Latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria containing vaccines") < 4 weeks
*/
define "The latest tetanus and diphtheria dose was administered less than 4 weeks ago":
"Date of latest Tetanus and Diphtheria Vaccine" is not null and duration in weeks between "Date of latest Tetanus and Diphtheria Vaccine" and Now() < 4

/*
@input: The latest tetanus and diphtheria dose was administered more than 4 weeks ago
@pseudocode: Today's date - Latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria containing vaccines") > 4 weeks
*/
define "The latest tetanus and diphtheria dose was administered more than 4 weeks ago":
not("The latest tetanus and diphtheria dose was administered less than 4 weeks ago")

/*
@input: The latest tetanus and diphtheria dose was administered less than 1 year ago
@pseudocode: Today's date - Latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria containing vaccines") < 1 year
*/
define "The latest tetanus and diphtheria dose was administered less than 1 year ago":
"Date of latest Tetanus and Diphtheria Vaccine" is not null and duration in years between "Date of latest Tetanus and Diphtheria Vaccine" and Now() < 1

/*
@input: The latest tetanus and diphtheria dose was administered more than 1 year ago
@pseudocode: Today's date - Latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria containing vaccines") ≥ 1 year
*/
define "The latest tetanus and diphtheria dose was administered more than 1 year ago":
not("The latest tetanus and diphtheria dose was administered less than 1 year ago")

/*
@input: Client is currently pregnant
@pseudocode: "Currently pregnant" = TRUE
*/
define "Client is currently pregnant":
IMMZCom."Pregnant"

/*
@input: The client has a history of anaphylactic reactions
@pseudocode: "Potential contraindications" = "History of anaphylactic reactions"
*/
define "The client has a history of anaphylactic reactions":
exists(IMMZCom."History of Anaphylactic Reactions Condition")

/*
@input: The client currently has a severe acute illness
@pseudocode: "Potential contraindications" = "Severe acute illness"
*/
define "The client currently has a severe acute illness":
exists(IMMZCom."Severe Acute Illness Condition")
Loading
Loading