diff --git a/input/cql/IMMZCommon.cql b/input/cql/IMMZCommon.cql index c3c39af533..b55d9e528d 100644 --- a/input/cql/IMMZCommon.cql +++ b/input/cql/IMMZCommon.cql @@ -2,232 +2,7 @@ library IMMZCommon using FHIR version '4.0.1' -include WHOCommon called WCom -include WHOConcepts called Wcon include FHIRHelpers version '4.0.1' -include FHIRCommon called FC -include IMMZConcepts called IMMZc - - -code "[#] Births total": '11640-0' from IMMZc."LOINC" display 'Pregnancy outcome' -code "[#] Births.preterm": '11637-6' from IMMZc."LOINC" display 'Preterm' -context Patient - -//TODO: Check patient is alive - -//Get patient immunizations -define "Get Immunization": - [Immunization] - -// check vaccine status -define "Immunization Status": - [Immunization] I - return I.status - -//check Immunization.status for not-done -define "Immunization Completed": - [Immunization] I - where I.status in {'completed'} - -//check Immunization.status for not-done -define "Immunization Not Done": - [Immunization] I - where I.status in {'not-done'} - -//how do we handle entered-in-error? It seems like it should be different from not-done in how it should be handled? These should be ignored so we likely don't need to check for them. We should maybe set these to check for statuses like complete, or amended - -//check vaccine status reason - e.g. if vaccine was not given -define "Immunization StatusReason": - [Immunization] I - return I.statusReason - -//define statusReason Immunizations for when it was not given - -//Procedure for vaccine administration - -//Get patient observations. Do we need this statement to get all Observations? -define "Get Observations": - [Observation] - -//Check if patient is pregnant -//not sure if pregnancy is an Observation -define "Pregnant Observation": - [Observation] O - //IPS Uses Observation - https://hl7.org/fhir/uv/ips/StructureDefinition-observation-pregnancy-status-uv-ips.html - where (O.value as CodeableConcept) in Wcon."Pregnancy Status Pregnant" -/* -Need to figure out how to add the OR Condition in case pregnancy is stored in a condition instead of an Observation -or [Condition] C - where (C.code as CodeableConcept) in Wcon."Pregnancy Status Pregnant" -*/ - -/* -define "Patient Has Active Sickle-cell disease": - exists([Condition: code = IMMZc."Sickle-cell Disease Condition"] C - where C.clinicalStatus in FC."Active Condition" - and C.abatement is null) -*/ - -define "Pregnant Condition": - [Condition] C - where (C.code as CodeableConcept) in Wcon."Pregnancy Status Pregnant" or (C.code as CodeableConcept) ~ IMMZc."Currently Pregnant" - -define "Pregnant": - exists - ( "Pregnant Observation") - or exists ("Pregnant Condition") - -//Seronegative. Relevant for Dengue -/* -define "Individual is Seronegative for Dengue": - [Observation] O - where (O.value as CodeableConcept) in IMMZc.Seronegative -*/ - -//Total number of births including abortions, stillbirths and live births. -define "Patient mother's pregnancy outcome observation": - [Observation: code = "[#] Births total"] O - return O.value - -// Total number of children whose birth occurred through the end of the last day of the 37th week (259th day) -// following onset of the last menstrual period -define "Preterm": - [Observation: code = "[#] Births.preterm"] O - return O.value - -//Observed Preterm birth -define "Preterm Birth": - [Observation] O - where (O.value as CodeableConcept) in IMMZc.PretermBirth - -//@dataElement Adverse Event: -define "Adverse Event": - from [Immunization] I, [Observation] O - where O.id in (I.reaction R return Last(Split(R.detail.reference, '/'))) - return O - -/* - * @dataElement Allergy = True - */ -define "Allergy = True": - [AllergyIntolerance] A - where - A.clinicalStatus ~ FC."allergy-active" - and - A.verificationStatus ~ FC."allergy-confirmed" - -/* - * @dataElement Immunocompromised = True - */ -define "Immunocompromised = True": - exists([Condition] C - where C.code in IMMZc."Immunocompromised" - and - C.clinicalStatus in FC."Active Condition" - and - C.verificationStatus ~ FC."confirmed") - -/** - * @dataElement All Doses Administered to Patient to patient ordered newest to oldest - */ -define "Doses Administered to Patient": - [Immunization] I - where I.status = 'completed' - sort by date from (occurrence as FHIR.dateTime) desc -/** - * Contraindications - */ -define "Severely Immunosuppressed Condition": - [Condition: IMMZc."Severely immunosuppressed"] - -define "History of Anaphylactic Reactions Condition": - [Condition: IMMZc."History of anaphylactic reactions"] - -define "Severe Allergic Reactions Condition": - [Condition: IMMZc."Severe allergic reactions"] - -define "Symptomatic HIV Infection Condition": - [Condition: IMMZc."Symptomatic HIV infection"] - - -/****************************** - * Test Results - */ - - -define "Patient birth weight observation value": -[Observation: code in IMMZc."Patient birth weight observation value"] O - return O.value as FHIR.Quantity - -/** - * @dataElement Patient age in years - */ -define "Current Patient Age In Years": - AgeInYearsAt(Today()) - //Today() - (Patient.birthDate as System.Date) - -/** - * @dataElement Patient age in weeks - */ -define "Current Patient Age In Weeks": - AgeInWeeksAt(Today()) - -/** - * @dataElement Patient age in months - */ -define "Current Patient Age In Months": - AgeInMonthsAt(Today()) - -/** - * @dataElement Patient biological sex used for deciding vaccine eligibility - * TODO: "Gender" of patient in FHIR is the administrative gender - or can we expect that this will be biological sex and administrative - * gender identity will be captured using the gender identity extension? - */ -define "Patient Biological Sex": - Patient.gender - -define "Patient HAART Treatment Start Date": - Last([MedicationAdministration] A - where - ExtractMedicationCode(A.medication) in IMMZc."ARV Drugs" - and A.status in { 'active', 'complete' } - and ExtractMedicationInitiationDate(A.effective) less than 12 'month' before Today() - return ExtractMedicationInitiationDate(A.effective)) - -define "Patient HAART Treatment Started 6 to 12 Months Ago": - "Patient HAART Treatment Start Date" between Now() - 12 months and Now() - 6 months - -/** - * @dataElement The patient has a medication record which indicates that they are receiving ARV - */ -define "Patient is receiving HAART": - //exists([MedicationStatement] S where ExtractMedicationCode(S.medication) in IMMZc."ARV Drugs" and S.status = 'active') - //or - exists([MedicationAdministration] A where ExtractMedicationCode(A.medication) in IMMZc."ARV Drugs" and A.status = 'in-progress') - //union - // - -/* - @dataElement HIV Status observations of the patient most recent first -*/ -define "HIV Status": - [Observation: IMMZc."HIV status"] O - where O.status in { 'final', 'amended', 'corrected' } - and Coalesce(WCom.ModifierExtension(O, 'who-notDone').value, false) is false - return O.value as FHIR.CodeableConcept - -/* - @dataElement Date and time of last live attenuated vaccine -*/ -define "Live Attenuated Vaccines": - "Doses Administered to Patient" I where I.vaccineCode in IMMZc."Live Attenuated" - -define "Date of Latest Live Attenuated Vaccine": - First("Live Attenuated Vaccines").occurrence as dateTime - -/****************************** - * CQL Helper Functions - */ /** * @description Fetches a singleton protocol applied from an immunization diff --git a/input/cql/IMMZCommonIzDataElements.cql b/input/cql/IMMZCommonIzDataElements.cql deleted file mode 100644 index d855d9dff0..0000000000 --- a/input/cql/IMMZCommonIzDataElements.cql +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Immunization Common Stratifiers by Patients as Context - */ - -library IMMZCommonIzDataElements - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.0.1' -include WHOCommon called WCom -include IMMZCommon called IMMZCom -include IMMZConcepts called IMMZc -include IMMZVaccineLibrary called IMMZvl - -codesystem "Vaccines Administered": 'http://hl7.org/fhir/ValueSet/vaccine-code' - -// Vaccines administered -code "BCG": 'BCG' from "Vaccines Administered" display 'BCG' -//should this reference the BCG valueset from IMMZConcepts.cql? - -context Immunization - -// @dataElement: Geographic Region where the vaccination was provided -define "Geographic Region of Vaccine Administration": - WCom.Official([Location] L - where L.id = Last(Split(Immunization.location.reference, '/')) - return L.address).state - -// @dataElement: The vaccination dose sequence -define "Dose Number of Vaccine Administration": - IMMZCom.Only(Immunization.protocolApplied).doseNumber as FHIR.positiveInt diff --git a/input/cql/IMMZConcepts.cql b/input/cql/IMMZConcepts.cql index 77b2167e5e..c1e99fa84e 100644 --- a/input/cql/IMMZConcepts.cql +++ b/input/cql/IMMZConcepts.cql @@ -12,44 +12,45 @@ codesystem "ICHI": 'https://mitel.dimi.uniud.it/ichi/#http://id.who.int/ichi' codesystem "ICF": 'http://hl7.org/fhir/sid/icf-nl' codesystem "Extended Codes CodeSystem codes": 'http://fhir.org/guides/who/anc-cds/CodeSystem/anc-custom-codes' -codesystem "IMMZ.C": 'http://smart.who.int/smart-immunizations-measles/CodeSystem/IMMZ.C' -codesystem "IMMZ.D1": 'http://smart.who.int/smart-immunizations-measles/CodeSystem/IMMZ.D1' -codesystem "IMMZ.D4": 'http://smart.who.int/smart-immunizations-measles/CodeSystem/IMMZ.D4' +codesystem "IMMZConcepts": 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZConcepts' //WHO ATC IPS Valueset valueset "WHO ATC": 'http://hl7.org/fhir/uv/ips/ValueSet/whoatc-uv-ips' // General use ValueSets -valueset "Negative Result": 'http://smart.who.int/smart-immunizations-measles/ValueSet/Negativetestresult-values' -valueset "Positive Result": 'http://smart.who.int/smart-immunizations-measles/ValueSet/PositiveTestResult-values' -valueset "Immunocompromised": 'http://smart.who.int/smart-immunizations-measles/ValueSet/Immunocompromised-values' -valueset "Patient birth weight observation value": 'http://smart.who.int/smart-immunizations-measles/ValueSet/Birthweight-values' -valueset "PretermBirth": 'http://smart.who.int/smart-immunizations-measles/ValueSet/Preterm-values' -valueset "Live Attenuated": 'http://smart.who.int/smart-immunizations-measles/ValueSet/LiveAttenduatedVaccines' +valueset "Negative Result": 'http://smart.who.int/immunizations-measles/ValueSet/Negativetestresult-values' +valueset "Positive Result": 'http://smart.who.int/immunizations-measles/ValueSet/PositiveTestResult-values' +valueset "Immunocompromised": 'http://smart.who.int/immunizations-measles/ValueSet/Immunocompromised-values' +valueset "Patient birth weight observation": 'http://smart.who.int/immunizations-measles/ValueSet/Birthweight-values' +valueset "PretermBirth": 'http://smart.who.int/immunizations-measles/ValueSet/Preterm-values' +valueset "Live Attenuated": 'http://smart.who.int/immunizations-measles/ValueSet/LiveAttenduatedVaccines' //valueset "Target Disease": 'http://hl7.org/fhir/ValueSet/immunization-target-disease' -valueset "HIV status": 'http://smart.who.int/smart-immunizations-measles/ValueSet/HIVstatus-values' +valueset "HIV status": 'http://smart.who.int/immunizations-measles/ValueSet/HIVstatus-values' valueset "HIV status - HIV positive Choices": 'http://fhir.org/guides/who/anc-cds/ValueSet/anc-b9-de46' valueset "HIV status - HIV negative Choices": 'http://fhir.org/guides/who/anc-cds/ValueSet/anc-b9-de47' -valueset "ARV Drugs": 'http://smart.who.int/smart-immunizations-measles/ValueSet/ARVDrugs-values' +valueset "ARV Drugs": 'http://smart.who.int/immunizations-measles/ValueSet/ARVDrugs-values' // Vaccine Value Sets -valueset "MCV Vaccine": 'http://smart.who.int/smart-immunizations-measles/ValueSet/IMMZ.Z.DE9' +valueset "MCV Vaccine": 'http://smart.who.int/immunizations-measles/ValueSet/IMMZ.Z.DE9' // Plugin is complaining about not finding these so that should be resolved, but here until it can be fixed -valueset "BCG Vaccine": 'http://smart.who.int/smart-immunizations-measles/ValueSet/IMMZ.Z.DE1' -valueset "Cholera Vaccine": 'http://smart.who.int/smart-immunizations-measles/ValueSet/IMMZ.Z.DE2' - - +valueset "BCG Vaccine": 'http://smart.who.int/immunizations-measles/ValueSet/IMMZ.Z.DE1' +valueset "Cholera Vaccine": 'http://smart.who.int/immunizations-measles/ValueSet/IMMZ.Z.DE2' code "Adverse Event Severity": '246112005' from "SNOMED-CT" display 'Severity (attribute)' code "Adverse Event Manifestation": '246112005' from "SNOMED-CT" display 'Severity (attribute)' -code "Currently Pregnant": 'DE161' from "IMMZ.D4" display 'Currently Pregnant' -code "Severely immunosuppressed": 'DE165' from "IMMZ.D4" display 'Severely immunosuppressed' -code "History of anaphylactic reactions": 'DE166' from "IMMZ.D4" display 'History of anaphylactic reactions' -code "Severe allergic reactions": 'DE167' from "IMMZ.D4" display 'Severe allergic reactions' -code "Symptomatic HIV infection": 'DE168' from "IMMZ.D4" display 'Symptomatic HIV infection' \ No newline at end of file +code "Potential contraindications": 'D4.DE161' from "IMMZConcepts" display 'Potential contraindications' +code "Currently pregnant": 'D4.DE162' from "IMMZConcepts" display 'Currently pregnant' +code "Severely immunosuppressed": 'D4.DE165' from "IMMZConcepts" display 'Severely immunosuppressed' +code "History of anaphylactic reactions": 'D4.DE166' from "IMMZConcepts" display 'History of anaphylactic reactions' +code "Severe allergic reactions": 'D4.DE167' from "IMMZConcepts" display 'Severe allergic reactions' +code "Symptomatic HIV infection": 'D4.DE168' from "IMMZConcepts" display 'Symptomatic HIV infection' + +code "[#] Births total": '11640-0' from "LOINC" display 'Pregnancy outcome' +code "[#] Births.preterm": '11637-6' from "LOINC" display 'Preterm' + diff --git a/input/cql/IMMZConfig.cql b/input/cql/IMMZConfig.cql index 42a58d63de..2f665818f9 100644 --- a/input/cql/IMMZConfig.cql +++ b/input/cql/IMMZConfig.cql @@ -1,8 +1,6 @@ library IMMZConfig -using FHIR version '4.0.1' -include IMMZConcepts called IMMZc -context Patient +using FHIR version '4.0.1' define "High incidence of TB and/or high leprosy burden": true define "Polio-endemic country with high risk of spread": true diff --git a/input/cql/IMMZD2DTMeaslesLogic.cql b/input/cql/IMMZD2DTMeaslesLogic.cql index 7f79e93592..50e261ba71 100644 --- a/input/cql/IMMZD2DTMeaslesLogic.cql +++ b/input/cql/IMMZD2DTMeaslesLogic.cql @@ -1,348 +1,184 @@ /* - * Library: IMMZD2DTMeaslesLogic (IMMZ.D2.DT.Measles) - * Rule: If the child or patient has not been given MCV1 (at 9 months) and MCV2 (between 15-18 months) vaccination - * Trigger: Patient has never received measles vaccination - */ -library IMMZD2DTMeaslesLogic -// Start Skeleton CQL +@DecisionID: IMMZ.D2.DT.Measles.Ongoing transmission +@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: Countries with ongoing transmission in which the risk of measles mortality remains high (countries that provide first dose of MCV at 9 months and second dose of MCV at 15 months) + +@DecisionID: IMMZ.D2.DT.Measles.Low transmission +@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: Countries with low levels of measles transmission (countries that provide first dose of MCV at 12 months and second dose of MCV at 15 months) + +@DecisionID: IMMZ.D2.DT.Measles.MCV dose 0 +@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: MCV dose 0 (MCV0) administration + +@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 + +@DecisionID: IMMZ.D5.DT.Measles contraindications +@BusinessRule: Check for contraindications before administering the vaccine(s) due +@Trigger: IMMZ.D5 Determine vaccine(s) to be administered based on contraindications +*/ +library IMMZMeaslesLogic + 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 +include WHOCommon called WC +include IMMZConcepts called Concepts +include IMMZCommon called Common +include IMMZConfig called Config +include IMMZEncounterElements called Elements + +parameter AsOf 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 -// End Skeleton CQL context Patient +define "Age of MCV0": 6 months +define "Age of MCV1": if Config."In a setting where there is high transmission of Measles" then 9 months else 12 months +define "Age of MCV2": 15 months -/** - * @dataElement Should provision MCV Dose - */ -define "Provision of the MCV dose": - //not("MCV Dose Contraindicated") and - if exists(IMMZCom."Live Attenuated Vaccines") then IMMZCom."Date of Latest Live Attenuated Vaccine" + 4 weeks <= Now() else true - and ( - "Second MCV Dose Administered to Patient" is null - //or ( - // "Needs Supplementary MCV Dose" and "Supplementary MCV Dose Administered to Patient" is null - //) - ) - //and IMMZCom."Current Patient Age In Years" < 15 - -define "Schedule Due Date for MCV dose": - if IMMZCom."Date of Latest Live Attenuated Vaccine" is null or "Expected Due Date for MCV dose" > IMMZCom."Date of Latest Live Attenuated Vaccine" + 4 weeks - then "Expected Due Date for MCV dose" - else IMMZCom."Date of Latest Live Attenuated Vaccine" + 4 weeks - -define "Expected Due Date for MCV dose": - case - //when "Needs Zero MCV Dose" - // then Patient.birthDate + 6 months - when "No MCV Doses Administered to Patient" - then if "High Transmission Setting" then Patient.birthDate + 9 months else Patient.birthDate + 12 months - //when "Second MCV Dose Administered to Patient" is not null and "Needs Supplementary MCV Dose" - // then "Date Second MCV Dose Administered to Patient" + 4 weeks - when "First MCV Dose Administered to Patient" is not null - then Patient.birthDate + 15 months - else null - end - - -define "MCV Next Dose Number": - //if "Needs Zero MCV Dose" or "Zero MCV Dose Administered to Patient" is not null - //then - // case - // when "Second MCV Dose Administered to Patient" is not null and "Needs Supplementary MCV Dose" then 'booster' - // when "First MCV Dose Administered to Patient" is not null then 2 - // when "Zero MCV Dose Administered to Patient" is not null then 1 - // else 'zero' - // end - //else - case - //when "Second MCV Dose Administered to Patient" is not null and "Needs Supplementary MCV Dose" then 'booster' - when "First MCV Dose Administered to Patient" is not null then 2 - else 1 - end - -define "Number of Required MCV Doses": - 2 - -define "Expiration Date for MCV dose": - //case - //when "Needs Zero MCV Dose" - // then Patient.birthDate + 9 months - //else null - //end - null - -define "Overdue Date for MCV dose": - null - -define "Date Last Valid MCV Dose": - case - //when "Supplementary MCV Dose Administered to Patient" is not null then "Date Supplementary MCV Dose Administered to Patient" - when "Second MCV Dose Administered to Patient" is not null then "Date Second MCV Dose Administered to Patient" - when "First MCV Dose Administered to Patient" is not null then "Date First MCV Dose Administered to Patient" - //when "Zero MCV Dose Administered to Patient" is not null then "Date Zero MCV Dose Administered to Patient" - else null - end - -define "Should vaccinate patient for MCV": - "Provision of the MCV dose" and ("Schedule Due Date for MCV dose" <= (Now())) - -define "MCV Dose Contraindicated": - IMMZCom."Pregnant" - or exists(IMMZCom."Severely Immunosuppressed Condition") - -define "Contraindication Evaluation of the MCV dose": - not("MCV Dose Contraindicated") and ( - exists(IMMZCom."History of Anaphylactic Reactions Condition") - or exists(IMMZCom."Severe Allergic Reactions Condition") - or exists(IMMZCom."Symptomatic HIV Infection Condition") - ) - -/** - * @dataElement MCV containing Doses Administered to Patient - */ -define "MCV Doses Administered to Patient": - IMMZCom."Doses Administered to Patient" I - where - I.vaccineCode in IMMZc."MCV Vaccine" - -/** - * @define The patient has no MCV doses administered - */ -define "No MCV Doses Administered to Patient": - not exists("MCV Doses Administered to Patient") - - -/** - * @dataElement Date of last MCV dose administration - */ -define "Date Last MCV Dose Administered to Patient": - date from (First("MCV Doses Administered to Patient").occurrence as FHIR.dateTime) - -/** - * @define The number of MCV doses administerd to the patient - */ -define "Number of MCV Doses Administered to Patient": - Count("MCV Doses Administered to Patient") - -define "High Transmission Setting": - ( - IMMZCon."Country currently has a measles outbreak" or - IMMZCon."In a setting where the risk of measles among infants < 9 months of age remains high" or - IMMZCon."Population is in conflict zones internally displaced populations and refugees" or - "Individual is at high risk of contracting measles" or - "Individual is travelling to a country experiencing measles outbreaks" or - "Individual is known to be HIV-infected or exposed" - ) +define "Age In Months": + AgeInMonthsAt(AsOf) -/* -define "Needs Zero MCV Dose": - "No MCV Doses Administered to Patient" - and ( - if "High Transmission Setting" - then IMMZCom."Current Patient Age In Months" between 6 and 9 - else IMMZCom."Current Patient Age In Months" between 6 and 12 - ) - and IMMZCom."Date of Latest Live Attenuated Vaccine" +4 weeks <= Now() - and - ( - ( - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" - and ( - not(IMMZCom."Patient is receiving HAART") - or "Immune reconstitution was achieved" - ) - ) - or "Individual is known to be HIV-infected or exposed" - ) - -define "Needs Supplementary MCV Dose": - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" - and IMMZCom."Current Patient Age In Years" < 15 - and IMMZCom."Patient is receiving HAART" - and "Immune reconstitution was achieved" - and "Supplementary MCV Dose Administered to Patient" is null - and IMMZCom."Date of Latest Live Attenuated Vaccine" +4 weeks <= Now() -*/ +define "Number Of Primary Series Doses Administered": + Count( + Elements."MCV Primary Series Dose" PrimaryDose + where PrimaryDose.occurrence.toInterval() starts on or before AsOf + ) + +define "Most Recent Live Vaccine Dose": + Elements."Live vaccine dose".mostRecent() -/** - * @dataElement Zero MCV dose given to Patient - */ -//define "Zero MCV Dose Administered to Patient": -// Last("MCV Doses Administered to Patient" I where I.occurrence between Patient.birthDate + 6 months and Patient.birthDate + 9 months) - -/** - * @dataElement Date Zero MCV dose administered - */ -//define "Date Zero MCV Dose Administered to Patient": -// date from ("Zero MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/** - * @dataElement First MCV dose given to Patient - */ -define "First MCV Dose Administered to Patient": - if "High Transmission Setting" - then Last("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months) - else Last("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 12 months) -/** - * @dataElement Date first MCV dose administered - */ -define "Date First MCV Dose Administered to Patient": - date from ("First MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/** - * @dataElement "Second MCV Dose Administered to Patient" - * only valid if 4 weeks after first dose - */ -define "Second MCV Dose Administered to Patient": - Last("MCV Doses Administered to Patient" I - where I.occurrence after "Date First MCV Dose Administered to Patient" + 4 weeks - and I.occurrence after Patient.birthDate + 15 months) - -/** - * @dataElement Date second MCV dose administered - */ -define "Date Second MCV Dose Administered to Patient": - date from ("Second MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/** - * @dataElement "Second MCV Dose Administered to Patient" - * only valid if 4 weeks after first dose - */ -//define "Supplementary MCV Dose Administered to Patient": -// Last("MCV Doses Administered to Patient" I where I.occurrence after "Date Second MCV Dose Administered to Patient") - -/** - * @dataElement Date second MCV dose administered - */ -//define "Date Supplementary MCV Dose Administered to Patient": -// date from ("Supplementary MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - - -define "Draft Medication Request for MCV dose": - [MedicationRequest] MR where MR.status = 'draft' and MR.intent = 'proposal' - sort by date from (authoredOn as FHIR.dateTime) desc - -define "Draft Medication Request ID for MCV dose": - First("Draft Medication Request for MCV dose").id +define "Date Last Live Vaccine Administered": + date from start of "Most Recent Live Vaccine Dose".occurrence.toInterval() /* - * Rule: Should vaccinate patient for measles (Supplementary) because no doses - * Annotations: - * - Provide measles immunization Supplementary dose - Using the "MCV0 Vaccine immunization - NO Previous" schedule (Supplementary dose zero) - * - - * Outputs: - * - Immunize patient for Measles - No doses - * - - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * - - * Logic: - * ((((((((((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("HIV Status" = "Positive" = true)) and ("Current Patient Age in Months" < 9)) and ("Patient is receiving HAART" = false)) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Country currently has a measles outbreak" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("In a setting where the risk of measles among infants < 9 months of age remains high" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Population is in conflict zones internally displaced populations and refugees" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Individual is at high risk of contracting measles (e.g. contacts of known measles cases or in settings with increased risk of exposure during outbreaks suck as day-care facilities" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Individual is travelling to a country experiencing measles outbreaks" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Individual is known to be HIV-infected or exposed (i.e. born to an HIV-infected woman" = true)) and ("Current Patient Age in Months" < 9))) - */ - /* -define "Should vaccinate patient for measles (Supplementary) because no doses": - IMMZCom."No MCV Doses Administered to Patient" and - ( - IMMZCom."Current Patient Age In Months" between 6 and 9 and - ( - ( - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" and - not(IMMZCom."Patient is receiving HAART") - ) - or - ( - IMMZCon."Country currently has a measles outbreak" or - IMMZCon."In a setting where the risk of measles among infants < 9 months of age remains high" or - IMMZCon."Population is in conflict zones internally displaced populations and refugees" or - "Individual is at high risk of contracting measles" or - "Individual is travelling to a country experiencing measles outbreaks" or - "Individual is known to be HIV-infected or exposed" - ) - ) - ) +IMMZ.D2.DT.Measles.Ongoing transmission +IMMZ.D2.DT.Measles.Low transmission */ +define "MCV1 Status": + if "Number Of Primary Series Doses Administered" = 0 then + 'Needed' + else + 'Complete' + +define "MCV1 Due Date": + if "MCV1 Status" = 'Needed' then + WC.LatestOf({ + Patient.birthDate + "Age of MCV1", + "Date Last Live Vaccine Administered" + 4 weeks, + AsOf + }) + else + null + +define "Client Is Due For MCV1": + "MCV1 Status" = 'Needed' + and "MCV1 Due Date" >= AsOf + +define "MCV2 Status": + if "Number Of Primary Series Doses Administered" = 1 then + 'Needed' + else + 'Complete' + +define "MCV2 Due Date": + if "MCV2 Status" = 'Needed' then + WC.LatestOf({ + Patient.birthDate + "Age of MCV2", + "Date Last Live Vaccine Administered" + 4 weeks, + AsOf + }) + else + null + +define "Client Is Due For MCV2": + "MCV2 Status" = 'Needed' + and "MCV2 Due Date" >= AsOf + +define "MCV Primary Series Status": + if "Number Of Primary Series Doses Administered" >= 2 then + 'Complete' + else + 'Incomplete' + /* - * Rule: Should vaccinate patient for measles because no doses in a 2 dose scheme - * Annotations: - * - Provide measles immunization 1st dose - Using the "MCV1 Vaccine immunization - NO Previous" schedule (2 doses scheme) - * - - * Outputs: - * - Immunize patient for Measles - No doses - * - - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * - - * Logic: - * ((((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" >= 9)) and ("In a setting where there is high transmission of Measles" = true)) and ("Pregnancy Status" = false)) or ((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" >= 12)) and ("In a setting where there is low transmission of Measles" = true))) - */ - /* -define "Should vaccinate patient for measles because no doses in a 2 dose scheme": - IMMZCom."No MCV Doses Administered to Patient" and not(IMMZCom."Pregnant") and - ( - ( - IMMZCom."Current Patient Age In Months" >= 9 and - IMMZCon."In a setting where there is high transmission of Measles" - ) or ( - IMMZCom."Current Patient Age In Months" >= 12 and - IMMZCon."In a setting where there is low transmission of Measles" - ) - ) +IMMZ.D2.DT.Measles.MCV dose 0 */ +define "Number Of Dose 0 Doses Administered": + 0 + +define "MCV0 Status": + if "Number Of Dose 0 Doses Administered" = 0 and "Age In Months" between 6 and 9 then + 'Needed' + else + 'Complete' + +define "MCV0 Due Date": + if "MCV0 Status" = 'Needed' then + WC.LatestOf({ + Patient.birthDate + "Age of MCV0", + "Date Last Live Vaccine Administered" + 4 weeks, + AsOf + }) + else + null + /* - * Rule: Should vaccinate patient for measles because 1 dose in a 2 dose scheme - * Annotations: - * - Provide measles immunization 1st dose - Using the "MCV2 Vaccine immunization - 1 Previous" schedule (2 doses scheme) - * Outputs: - * - Immunize patient for Measles - 1 Dose - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * Logic: - * (((("Measles vaccine immunization history" = "1-dose" = true) and ("Current Patient Age in Months" >= 15)) and ("Date last Measles dose given" >= "4 weeks")) and ("Pregnancy Status" = false)) - */ - /* -define "Should vaccinate patient for measles because 1 dose in a 2 dose scheme": - IMMZCom."Number of MCV Doses Administered to Patient" = 1 and - IMMZCom."Current Patient Age In Months" >= 15 and - IMMZCom."Date Last MCV Dose Administered to Patient" more than 4 'week' before Today() and - not (IMMZCom."Pregnant") +IMMZ.D2.DT.Measles.Supplementary dose */ +define "Number Of Supplementary Doses Administered": + 0 + +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 "Number Of Supplementary Doses Administered" = 0 and "MCV Primary Series Status" = '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 Dose Due Date": + if "MCV Supplementary Dose Status" = 'Eligible' then + WC.LatestOf({ + "Date Last Live Vaccine Administered" + 4 weeks, + AsOf + }) + else + null + +define "Client Is Due For MCV Supplementary Dose": + "MCV Supplementary Dose Status" = 'Eligible' + and "MCV Supplementary Dose Due Date" >= AsOf + /* - * Rule: Should vaccinate patient for measles Supplementary dose because HIV positive and started HAART - * Annotations: - * - Provide measles immunization Supplementary dose - Using the "MCV Vaccine immunization" schedule (additional Supplementary dose) - * - - * Outputs: - * - Immunize patient for Measles Supplementary - * - - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * - - * Logic: - * ((((("HIV Status" = "Positive" = true) and ("Patient is receiving HAART" = true)) and ("Immune reconstitution was achieved" = true)) and ("Pregnancy Status" = false)) or (((((("HIV Status" = "Positive" = true) and ("Patient is receiving HAART" = true)) and ("CD4+ T Lymphocyte monitoring is available" = false)) and ("Time since HAART was initiated in Months" >= 6)) and ("Time since HAART was initiated in Months" <= 12)) and ("Pregnancy Status" = false))) - */ - /* -define "Should vaccinate patient for measles Supplementary dose because HIV positive and started HAART": - not(IMMZCom."Pregnant") and - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" and - IMMZCom."Patient is receiving HAART" and - ( - - "Immune reconstitution was achieved" or - not exists(IMMZCom."Observed CD4% Measurements") - and IMMZCom."Patient HAART Treatment Started 6 to 12 Months Ago" - ) +IMMZ.D5.DT.Measles contraindications */ +define "Measles Vaccination Could Be Contraindicated": + Elements."History Of Anaphylactic Reactions" + or Elements."Severe Allergic Reactions" + or Elements."Symptomatic HIV Infection" + +define "Measles Vaccination Contraindicated": + Elements."Currently Pregnant" + or Elements."Severely Immunosuppressed" + + + diff --git a/input/cql/IMMZDT08.cql b/input/cql/IMMZDT08.cql deleted file mode 100644 index a3724368f2..0000000000 --- a/input/cql/IMMZDT08.cql +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Library: IMMZDT08 (IMMZ.DT.08.Measles) - * Rule: If the child or patient has not been given MCV1 (at 9 months) and MCV2 (between 15-18 months) vaccination - * Trigger: Patient has never received measles vaccination - */ -library IMMZDT08 -// 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 - -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 - -// End Skeleton CQL -context Patient - - -/** - * @dataElement Should provision MCV Dose - */ -define "Provision of the MCV dose": - not("MCV Dose Contraindicated") - and if exists(IMMZCom."Live Attenuated Vaccines") then IMMZCom."Date of Latest Live Attenuated Vaccine" + 4 weeks <= Now() else true - and ( - "Second MCV Dose Administered to Patient" is null or - ( - "Needs Supplementary MCV Dose" and "Supplementary MCV Dose Administered to Patient" is null - ) - ) - and IMMZCom."Current Patient Age In Years" < 15 - -define "Schedule Due Date for MCV dose": - if "Expected Due Date for MCV dose" > IMMZCom."Date of Latest Live Attenuated Vaccine" + 4 weeks - then "Expected Due Date for MCV dose" - else IMMZCom."Date of Latest Live Attenuated Vaccine" + 4 weeks - -define "Expected Due Date for MCV dose": - case - when "Needs Birth MCV Dose" - then Patient.birthDate + 6 months - when "No MCV Doses Administered to Patient" - then if "High Transmission Setting" then Patient.birthDate + 9 months else Patient.birthDate + 12 months - when "Second MCV Dose Administered to Patient" is not null and "Needs Supplementary MCV Dose" - then "Date Second MCV Dose Administered to Patient" + 4 weeks - when "First MCV Dose Administered to Patient" is not null - then Patient.birthDate + 15 months - else null - end - - -define "MCV Next Dose Number": - if "Needs Birth MCV Dose" or "Birth MCV Dose Administered to Patient" is not null - then - case - when "Second MCV Dose Administered to Patient" is not null and "Needs Supplementary MCV Dose" then 'booster' - when "First MCV Dose Administered to Patient" is not null then 3 - when "Birth MCV Dose Administered to Patient" is not null then 2 - else 1 - end - else - case - when "Second MCV Dose Administered to Patient" is not null and "Needs Supplementary MCV Dose" then 'booster' - when "First MCV Dose Administered to Patient" is not null then 2 - else 1 - end - -define "Number of Required MCV Doses": - if "Needs Birth MCV Dose" or "Birth MCV Dose Administered to Patient" is not null - then 3 - else 2 - -define "Expiration Date for MCV dose": - case - when "Needs Birth MCV Dose" - then Patient.birthDate + 9 months - else null - end - -define "Overdue Date for MCV dose": - null - -define "Date Last Valid MCV Dose": - case - when "Supplementary MCV Dose Administered to Patient" is not null then "Date Supplementary MCV Dose Administered to Patient" - when "Second MCV Dose Administered to Patient" is not null then "Date Second MCV Dose Administered to Patient" - when "First MCV Dose Administered to Patient" is not null then "Date First MCV Dose Administered to Patient" - when "Birth MCV Dose Administered to Patient" is not null then "Date Birth MCV Dose Administered to Patient" - else null - end - -define "Should vaccinate patient for MCV": - "Provision of the MCV dose" and ("Schedule Due Date for MCV dose" <= (Now())) - -define "MCV Dose Contraindicated": - IMMZCom."Pregnant" - -/** - * @dataElement MCV containing Doses Administered to Patient - */ -define "MCV Doses Administered to Patient": - IMMZCom."Doses Administered to Patient" I - where - I.vaccineCode in IMMZc."MCV Vaccine" - -/** - * @define The patient has no MCV doses administered - */ -define "No MCV Doses Administered to Patient": - not exists("MCV Doses Administered to Patient") - - -/** - * @dataElement Date of last MCV dose administration - */ -define "Date Last MCV Dose Administered to Patient": - date from (First("MCV Doses Administered to Patient").occurrence as FHIR.dateTime) - -/** - * @define The number of MCV doses administerd to the patient - */ -define "Number of MCV Doses Administered to Patient": - Count("MCV Doses Administered to Patient") - -define "High Transmission Setting": - ( - IMMZCon."Country currently has a measles outbreak" or - IMMZCon."In a setting where the risk of measles among infants < 9 months of age remains high" or - IMMZCon."Population is in conflict zones internally displaced populations and refugees" or - "Individual is at high risk of contracting measles" or - "Individual is travelling to a country experiencing measles outbreaks" or - "Individual is known to be HIV-infected or exposed" - ) - -define "Needs Birth MCV Dose": - "No MCV Doses Administered to Patient" - and ( - if "High Transmission Setting" - then IMMZCom."Current Patient Age In Months" between 6 and 9 - else IMMZCom."Current Patient Age In Months" between 6 and 12 - ) - and IMMZCom."Date of Latest Live Attenuated Vaccine" +4 weeks <= Now() - and - ( - ( - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" - and ( - not(IMMZCom."Patient is receiving HAART") - or "Immune reconstitution was achieved" - ) - ) - or "Individual is known to be HIV-infected or exposed" - ) - -define "Needs Supplementary MCV Dose": - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" - and IMMZCom."Current Patient Age In Years" < 15 - and IMMZCom."Patient is receiving HAART" - and "Immune reconstitution was achieved" - and "Supplementary MCV Dose Administered to Patient" is null - and IMMZCom."Date of Latest Live Attenuated Vaccine" +4 weeks <= Now() - - -/** - * @dataElement Birth MCV dose given to Patient - */ -define "Birth MCV Dose Administered to Patient": - Last("MCV Doses Administered to Patient" I where I.occurrence between Patient.birthDate + 6 months and Patient.birthDate + 9 months) - -/** - * @dataElement Date Birth MCV dose administered - */ -define "Date Birth MCV Dose Administered to Patient": - date from ("Birth MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/** - * @dataElement First MCV dose given to Patient - */ -define "First MCV Dose Administered to Patient": - if "High Transmission Setting" - then Last("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months) - else Last("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 12 months) -/** - * @dataElement Date first MCV dose administered - */ -define "Date First MCV Dose Administered to Patient": - date from ("First MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/** - * @dataElement "Second MCV Dose Administered to Patient" - * only valid if 4 weeks after first dose - */ -define "Second MCV Dose Administered to Patient": - Last("MCV Doses Administered to Patient" I - where I.occurrence after "Date First MCV Dose Administered to Patient" + 4 weeks - and I.occurrence after Patient.birthDate + 15 months) - -/** - * @dataElement Date second MCV dose administered - */ -define "Date Second MCV Dose Administered to Patient": - date from ("Second MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/** - * @dataElement "Second MCV Dose Administered to Patient" - * only valid if 4 weeks after first dose - */ -define "Supplementary MCV Dose Administered to Patient": - Last("MCV Doses Administered to Patient" I where I.occurrence after "Date Second MCV Dose Administered to Patient") - -/** - * @dataElement Date second MCV dose administered - */ -define "Date Supplementary MCV Dose Administered to Patient": - date from ("Supplementary MCV Dose Administered to Patient".occurrence as FHIR.dateTime) - -/* - * Rule: Should vaccinate patient for measles (Supplementary) because no doses - * Annotations: - * - Provide measles immunization Supplementary dose - Using the "MCV0 Vaccine immunization - NO Previous" schedule (Supplementary dose zero) - * - - * Outputs: - * - Immunize patient for Measles - No doses - * - - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * - - * Logic: - * ((((((((((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("HIV Status" = "Positive" = true)) and ("Current Patient Age in Months" < 9)) and ("Patient is receiving HAART" = false)) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Country currently has a measles outbreak" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("In a setting where the risk of measles among infants < 9 months of age remains high" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Population is in conflict zones internally displaced populations and refugees" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Individual is at high risk of contracting measles (e.g. contacts of known measles cases or in settings with increased risk of exposure during outbreaks suck as day-care facilities" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Individual is travelling to a country experiencing measles outbreaks" = true)) and ("Current Patient Age in Months" < 9))) or (((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" > 6)) and ("Individual is known to be HIV-infected or exposed (i.e. born to an HIV-infected woman" = true)) and ("Current Patient Age in Months" < 9))) - */ - /* -define "Should vaccinate patient for measles (Supplementary) because no doses": - IMMZCom."No MCV Doses Administered to Patient" and - ( - IMMZCom."Current Patient Age In Months" between 6 and 9 and - ( - ( - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" and - not(IMMZCom."Patient is receiving HAART") - ) - or - ( - IMMZCon."Country currently has a measles outbreak" or - IMMZCon."In a setting where the risk of measles among infants < 9 months of age remains high" or - IMMZCon."Population is in conflict zones internally displaced populations and refugees" or - "Individual is at high risk of contracting measles" or - "Individual is travelling to a country experiencing measles outbreaks" or - "Individual is known to be HIV-infected or exposed" - ) - ) - ) -*/ - -/* - * Rule: Should vaccinate patient for measles because no doses in a 2 dose scheme - * Annotations: - * - Provide measles immunization 1st dose - Using the "MCV1 Vaccine immunization - NO Previous" schedule (2 doses scheme) - * - - * Outputs: - * - Immunize patient for Measles - No doses - * - - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * - - * Logic: - * ((((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" >= 9)) and ("In a setting where there is high transmission of Measles" = true)) and ("Pregnancy Status" = false)) or ((("Measles vaccine immunization history" = "No-doses" = true) and ("Current Patient Age in Months" >= 12)) and ("In a setting where there is low transmission of Measles" = true))) - */ - /* -define "Should vaccinate patient for measles because no doses in a 2 dose scheme": - IMMZCom."No MCV Doses Administered to Patient" and not(IMMZCom."Pregnant") and - ( - ( - IMMZCom."Current Patient Age In Months" >= 9 and - IMMZCon."In a setting where there is high transmission of Measles" - ) or ( - IMMZCom."Current Patient Age In Months" >= 12 and - IMMZCon."In a setting where there is low transmission of Measles" - ) - ) -*/ - -/* - * Rule: Should vaccinate patient for measles because 1 dose in a 2 dose scheme - * Annotations: - * - Provide measles immunization 1st dose - Using the "MCV2 Vaccine immunization - 1 Previous" schedule (2 doses scheme) - * Outputs: - * - Immunize patient for Measles - 1 Dose - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * Logic: - * (((("Measles vaccine immunization history" = "1-dose" = true) and ("Current Patient Age in Months" >= 15)) and ("Date last Measles dose given" >= "4 weeks")) and ("Pregnancy Status" = false)) - */ - /* -define "Should vaccinate patient for measles because 1 dose in a 2 dose scheme": - IMMZCom."Number of MCV Doses Administered to Patient" = 1 and - IMMZCom."Current Patient Age In Months" >= 15 and - IMMZCom."Date Last MCV Dose Administered to Patient" more than 4 'week' before Today() and - not (IMMZCom."Pregnant") -*/ - -/* - * Rule: Should vaccinate patient for measles Supplementary dose because HIV positive and started HAART - * Annotations: - * - Provide measles immunization Supplementary dose - Using the "MCV Vaccine immunization" schedule (additional Supplementary dose) - * - - * Outputs: - * - Immunize patient for Measles Supplementary - * - - * References: - * - WHO recommendations for routine immunization - summary tables: https://www.who.int/teams/immunization-vaccines-and-biologicals/policies/who-recommendations-for-routine-immunization---summary-tables - * - - * Logic: - * ((((("HIV Status" = "Positive" = true) and ("Patient is receiving HAART" = true)) and ("Immune reconstitution was achieved" = true)) and ("Pregnancy Status" = false)) or (((((("HIV Status" = "Positive" = true) and ("Patient is receiving HAART" = true)) and ("CD4+ T Lymphocyte monitoring is available" = false)) and ("Time since HAART was initiated in Months" >= 6)) and ("Time since HAART was initiated in Months" <= 12)) and ("Pregnancy Status" = false))) - */ - /* -define "Should vaccinate patient for measles Supplementary dose because HIV positive and started HAART": - not(IMMZCom."Pregnant") and - IMMZCom."HIV Status" in IMMZc."HIV status - HIV positive Choices" and - IMMZCom."Patient is receiving HAART" and - ( - - "Immune reconstitution was achieved" or - not exists(IMMZCom."Observed CD4% Measurements") - and IMMZCom."Patient HAART Treatment Started 6 to 12 Months Ago" - ) -*/ diff --git a/input/cql/IMMZElements.cql b/input/cql/IMMZElements.cql new file mode 100644 index 0000000000..bfa8b5b56c --- /dev/null +++ b/input/cql/IMMZElements.cql @@ -0,0 +1,317 @@ +library IMMZElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' +include FHIRCommon called FC + +include WHOConcepts +include WHOCommon called WC +include WHOElements called WE + +include IMMZConcepts called Concepts +include IMMZCommon called IC + +context Patient + +/* + * Measles elements + */ +define "MCV Dose": + [Immunization: Concepts."MCV Vaccine"] MCV + where MCV.status = 'completed' + and MCV.isSubpotent is not true + +define "MCV Primary Series Dose": + "MCV Dose" MCV + where exists ( + MCV.protocolApplied Protocol + where Protocol.series = 'primary' + ) + +define "MCV Supplementary Dose": + "MCV Dose" MCV + where exists ( + MCV.protocolApplied Protocol + where Protocol.series = 'supplementary' + ) + +define "MCV Dose 0 Dose": + "MCV Dose" MCV + where exists ( + MCV.protocolApplied Protocol + where Protocol.series = 'dose 0' + ) + +//TODO: Check patient is alive + +// Givens: +// "Currently Pregnant" Data Element +// Modeled as part of +// IMMZ.D.DE161: Potential contraindications + // D.DE162: Currently pregnant + // D.DE165: Severly immunosuppressed + // D.DE166: History of anaphylactic reactions + // D.DE168: Sympotmatic HIV infection +// ANC.B4.DE1: Pregnancy confirmed +// UV.IPS.PregnancyStatus: + // LOINC#82810-3 Pregnancy status + // LOINC#LA15173-0 Pregnant + // LOINC#LA26683-5 Not pregnant + // LOINC#LA4489-6 Unknown +// "Pregnancy Status" Observations in IPS + +/* +@dataElement: IMMZConcepts#D4.DE161 +*/ +define "Potential Contraindications": + "Currently Pregnant" + or "Severely Immunosuppressed" + or "History Of Anaphylactic Reactions" + or "Severe Allergic Reactions" + or "Symptomatic HIV Infection" + +/* +@dataElement: IMMZConcepts#D4.DE162 +*/ +define "Currently Pregnant": + exists "Currently Pregnant Observation" + or exists "Currently Pregnant Condition" + or exists WE."Pregnant Observation" + +// TODO: Should this be related to the mother's record? +define "Currently Pregnant Observation": + [Observation: Concepts."Potential contraindications"] O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."Currently pregnant" + +// TODO: Should this be related to the mother's record? +define "Currently Pregnant Condition": + [Condition: Concepts."Currently pregnant"] C + +/* +define "Patient Has Active Sickle-cell disease": + exists([Condition: code = Concepts."Sickle-cell Disease Condition"] C + where C.clinicalStatus in FC."Active Condition" + and C.abatement is null) +*/ + +//Seronegative. Relevant for Dengue +/* +define "Individual is Seronegative for Dengue": + [Observation] O + where (O.value as CodeableConcept) in Concepts.Seronegative +*/ + +// TODO: Should this be related to the mother's record? +//Total number of births including abortions, stillbirths and live births. +define "Patient Mother's Pregnancy Outcome Observation": + [Observation: code ~ Concepts."[#] Births total"] O + where O.status in { 'final', 'amended', 'corrected' } + +define "Patient Mother's Pregnancy Outcome Observation Value": + Last( + "Patient Mother's Pregnancy Outcome Observation" O + sort by start of effective.toInterval() + ).value + +// TODO: Should this be related to the mother's record +// Total number of children whose birth occurred through the end of the last day of the 37th week (259th day) +// following onset of the last menstrual period +define "Preterm Births Observation": + [Observation: code ~ Concepts."[#] Births.preterm"] O + where O.status in { 'final', 'amended', 'corrected' } + +define "Preterm": + Last( + "Preterm Births Observation" O + sort by start of effective.toInterval() + ).value + +// TODO: This does not seem right, what is the code of the observation? +//Observed Preterm birth +define "Preterm Birth": + [Observation] O + where O.status in { 'final', 'amended', 'corrected' } + and O.value in Concepts.PretermBirth + +//@dataElement Adverse Event: +define "Adverse Event": + from [Immunization] I, [Observation] O + where I.reaction.detail.references(O) + return O + +/* + * @dataElement Allergy = True + */ +define "Allergy = True": + exists "Active Confirmed Allergy" + +define "Active Confirmed Allergy": + [AllergyIntolerance] A + where A.clinicalStatus ~ FC."allergy-active" + and A.verificationStatus ~ FC."allergy-confirmed" + +/* + * @dataElement Immunocompromised = True + */ +define "Immunocompromised = True": + exists "Immunocompromised Condition" + +define "Immunocompromised Condition": + [Condition: Concepts."Immunocompromised"] C + where C.clinicalStatus in FC."Active Condition" + and C.verificationStatus ~ FC."confirmed" + +/** + * @dataElement All Doses Administered to Patient to patient ordered newest to oldest + */ +define "Doses Administered to Patient": + [Immunization] I + where I.status = 'completed' + sort by start of occurrence.toInterval() desc + +/** + * Contraindications + */ +define "Severely Immunosuppressed": + exists "Severely Immunosuppressed Observation" + or exists "Severely Immunosuppressed Condition" + +define "Severely Immunosuppressed Observation": + [Observation: Concepts."Potential contraindications"] O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."Severely immunosuppressed" + +define "Severely Immunosuppressed Condition": + [Condition: Concepts."Severely immunosuppressed"] + +define "History Of Anaphylactic Reactions": + exists "History Of Anaphylactic Reactions Condition" + +define "History Of Anaphylactic Reactions Observation": + [Observation: Concepts."Potential contraindications"] O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."History of anaphylactic reactions" + +define "History Of Anaphylactic Reactions Condition": + [Condition: Concepts."History of anaphylactic reactions"] + +define "Severe Allergic Reactions": + exists "Severe Allergic Reactions Observation" + or exists "Severe Allergic Reactions Condition" + +define "Severe Allergic Reactions Observation": + [Observation: Concepts."Potential contraindications"] O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."Severe allergic reactions" + +define "Severe Allergic Reactions Condition": + [Condition: Concepts."Severe allergic reactions"] + +define "Symptomatic HIV Infection": + exists "Symptomatic HIV Infection Observation" + or exists "Symptomatic HIV Infection Condition" + +define "Symptomatic HIV Infection Observation": + [Observation: Concepts."Potential contraindications"] O + where O.status in { 'final', 'amended', 'corrected' } + and O.value ~ Concepts."Symptomatic HIV infection" + +define "Symptomatic HIV Infection Condition": + [Condition: Concepts."Symptomatic HIV infection"] + +/****************************** + * Test Results + */ + +define "Patient Birth Weight Observation": + [Observation: Concepts."Patient birth weight observation"] O + where O.status in { 'final', 'amended', 'corrected' } + +define "Patient Birth Weight Observation Value": + Last( + "Patient Birth Weight Observation" O + sort by start of effective.toInterval() + ).value as FHIR.Quantity + +/** + * @dataElement Patient age in years + */ +define "Current Patient Age In Years": + AgeInYearsAt(Today()) + +/** + * @dataElement Patient age in weeks + */ +define "Current Patient Age In Weeks": + AgeInWeeksAt(Today()) + +/** + * @dataElement Patient age in months + */ +define "Current Patient Age In Months": + AgeInMonthsAt(Today()) + +/** + * @dataElement Patient biological sex used for deciding vaccine eligibility + * TODO: "Gender" of patient in FHIR is the administrative gender - or can we expect that this will be biological sex and administrative + * gender identity will be captured using the gender identity extension? + */ +define "Patient Biological Sex": + Patient.gender + +define "HAART Medication Administration": + [MedicationAdministration] A + where IC.ExtractMedicationCode(A.medication) in Concepts."ARV Drugs" + and A.status in { 'active', 'complete' } + +define "Patient HAART Treatment Start Date": + Last( + "HAART Medication Administration" A + sort by start of effective.toInterval() + ).effective.toInterval().low + +define "Patient HAART Treatment Started 6 to 12 Months Ago": + "Patient HAART Treatment Start Date" between Now() - 12 months and Now() - 6 months + +/** + * @dataElement The patient has a medication record which indicates that they are receiving ARV + */ +define "Patient is receiving HAART": + exists( + [MedicationAdministration] A + where IC.ExtractMedicationCode(A.medication) in Concepts."ARV Drugs" + and A.status = 'in-progress' + ) + +/* + @dataElement HIV Status observations of the patient most recent first +*/ +define "HIV Status": + Last( + "HIV Status Observation" O + sort by start of effective.toInterval() + ).value as FHIR.CodeableConcept + +define "HIV Status Observation": + [Observation: Concepts."HIV status"] O + where O.status in { 'final', 'amended', 'corrected' } + +define "Live vaccine dose": + [Immunization: Concepts."Live Attenuated"] LV + where LV.status = 'completed' + and LV.isSubpotent is not true + +/* + @dataElement Date and time of last live attenuated vaccine +*/ +define "Live Attenuated Vaccines": + "Doses Administered to Patient" I where I.vaccineCode in Concepts."Live Attenuated" + +define "Date of Latest Live Attenuated Vaccine": + Last( + "Live Attenuated Vaccines" V + sort by start of occurrence.toInterval() + ).occurrence as FHIR.dateTime + diff --git a/input/cql/IMMZEncounterElements.cql b/input/cql/IMMZEncounterElements.cql new file mode 100644 index 0000000000..4669cd6e98 --- /dev/null +++ b/input/cql/IMMZEncounterElements.cql @@ -0,0 +1,274 @@ +library IMMZEncounterElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' +include FHIRCommon called FC + +include WHOConcepts +include WHOCommon called WC +include WHOEncounterElements called WE + +include IMMZConcepts called Concepts +include IMMZCommon called Common +include IMMZElements called Elements + +parameter AsOf Date default Today() +parameter EncounterId String + +context Patient + +/* + * Measles elements + */ +define "MCV Dose": + Elements."MCV Dose" MCV + where MCV.occurrence.toInterval() on or before AsOf + +define "MCV Primary Series Dose": + Elements."MCV Primary Series Dose" MCV + where MCV.occurrence.toInterval() on or before AsOf + +define "MCV Supplementary Dose": + Elements."MCV Supplementary Dose" MCV + where MCV.occurrence.toInterval() on or before AsOf + +define "MCV Dose 0 Dose": + Elements."MCV Dose 0 Dose" MCV + where MCV.occurrence.toInterval() on or before AsOf + +/* + * Contraindications + */ +define "Potential Contraindications": + "Currently Pregnant" + or "Severely Immunosuppressed" + or "History Of Anaphylactic Reactions" + or "Severe Allergic Reactions" + or "Symptomatic HIV Infection" + +define "Currently Pregnant": + exists "Currently Pregnant Observation" + or exists "Currently Pregnant Condition" + or exists WE."Pregnant Observation" + +define "Currently Pregnant Observation": + Elements."Currently Pregnant Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts 9 months on or before day of AsOf + +define "Currently Pregnant Condition": + Elements."Currently Pregnant Condition" C + where C.prevalenceInterval() includes AsOf + +// TODO: Should this be related to the mother's record? +//Total number of births including abortions, stillbirths and live births. +define "Patient Mother's Pregnancy Outcome Observation": + [Observation: code ~ Concepts."[#] Births total"] O + where O.status in { 'final', 'amended', 'corrected' } + +define "Patient Mother's Pregnancy Outcome Observation Value": + Last( + "Patient Mother's Pregnancy Outcome Observation" O + sort by start of effective.toInterval() + ).value + +// TODO: Should this be related to the mother's record +// Total number of children whose birth occurred through the end of the last day of the 37th week (259th day) +// following onset of the last menstrual period +define "Preterm Births Observation": + Elements."Preterm Births Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() on or before AsOf + +define "Preterm": + Last( + "Preterm Births Observation" O + sort by start of effective.toInterval() + ).value + +// TODO: This does not seem right, what is the code of the observation? +//Observed Preterm birth +define "Preterm Birth": + Elements."Preterm Birth" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() on or before AsOf + +// TODO: How does/should this relate to the encounter? +//@dataElement Adverse Event: +define "Adverse Event": + from [Immunization] I, [Observation] O + where I.reaction.detail.references(O) + return O + +/* + * @dataElement Allergy = True + */ +define "Allergy = True": + exists "Active Confirmed Allergy" + +define "Active Confirmed Allergy": + Elements."Active Confirmed Allergy" A + where A.onset.toInterval() starts on or before AsOf + +/* + * @dataElement Immunocompromised = True + */ +define "Immunocompromised = True": + exists "Immunocompromised Condition" + +define "Immunocompromised Condition": + Elements."Immunocompromised Condition" C + where C.prevalenceInterval() starts on or before AsOf + +/** + * @dataElement All Doses Administered to Patient to patient ordered newest to oldest + */ +define "Doses Administered to Patient": + Elements."Doses Administered to Patient" + +/** + * Contraindications + */ +define "Severely Immunosuppressed": + exists "Severely Immunosuppressed Observation" + or exists "Severely Immunosuppressed Condition" + +define "Severely Immunosuppressed Observation": + Elements."Severely Immunosuppressed Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts on or before AsOf + +define "Severely Immunosuppressed Condition": + Elements."Severely Immunosuppressed Condition" C + where C.prevalenceInterval() starts on or before AsOf + +define "History Of Anaphylactic Reactions": + exists "History Of Anaphylactic Reactions Condition" + +define "History Of Anaphylactic Reactions Observation": + Elements."History Of Anaphylactic Reactions Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts on or before AsOf + +define "History Of Anaphylactic Reactions Condition": + Elements."History Of Anaphylactic Reactions Condition" C + where C.prevalenceInterval() starts on or before AsOf + +define "Severe Allergic Reactions": + exists "Severe Allergic Reactions Observation" + or exists "Severe Allergic Reactions Condition" + +define "Severe Allergic Reactions Observation": + Elements."Severe Allergic Reactions Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts on or before AsOf + +define "Severe Allergic Reactions Condition": + Elements."Severe Allergic Reactions Condition" C + where C.prevalenceInterval() starts on or before AsOf + +define "Symptomatic HIV Infection": + exists "Symptomatic HIV Infection Observation" + or exists "Symptomatic HIV Infection Condition" + +define "Symptomatic HIV Infection Observation": + Elements."Symptomatic HIV Infection Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts on or before AsOf + +define "Symptomatic HIV Infection Condition": + Elements."Symptomatic HIV Infection Condition" C + where C.prevalenceInterval() starts on or before AsOf + +/****************************** + * Test Results + */ + +define "Patient Birth Weight Observation": + Elements."Patient Birth Weight Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() on or before AsOf + +define "Patient Birth Weight Observation Value": + Last( + "Patient Birth Weight Observation" O + sort by start of effective.toInterval() + ).value as FHIR.Quantity + +/** + * @dataElement Patient age in years + */ +define "Current Patient Age In Years": + AgeInYearsAt(AsOf) + +/** + * @dataElement Patient age in weeks + */ +define "Current Patient Age In Weeks": + AgeInWeeksAt(AsOf) + +/** + * @dataElement Patient age in months + */ +define "Current Patient Age In Months": + AgeInMonthsAt(AsOf) + +/** + * @dataElement Patient biological sex used for deciding vaccine eligibility + * TODO: "Gender" of patient in FHIR is the administrative gender - or can we expect that this will be biological sex and administrative + * gender identity will be captured using the gender identity extension? + */ +define "Patient Biological Sex": + Patient.gender + +define "HAART Medication Administration": + Elements."HAART Medication Administration" A + where A.effective.toInterval() starts less than 12 months before AsOf + +define "Patient HAART Treatment Start Date": + Last( + "HAART Medication Administration" A + sort by start of effective.toInterval() + ).effective.toInterval().low + +define "Patient HAART Treatment Started 6 to 12 Months Ago": + "Patient HAART Treatment Start Date" between AsOf - 12 months and AsOf - 6 months + +/** + * @dataElement The patient has a medication record which indicates that they are receiving ARV + */ +define "Patient is receiving HAART": + Elements."Patient is receiving HAART" + +/* + @dataElement HIV Status observations of the patient most recent first +*/ +define "HIV Status": + Last( + "HIV Status Observation" O + sort by start of effective.toInterval() + ).value as FHIR.CodeableConcept + +define "HIV Status Observation": + Elements."HIV Status Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts on or before AsOf + +define "Live vaccine dose": + Elements."Live vaccine dose" V + where V.occurrence.toInterval() starts on or before AsOf + +/* + @dataElement Date and time of last live attenuated vaccine +*/ +define "Live Attenuated Vaccines": + Elements."Live Attenuated Vaccines" + +define "Date of Latest Live Attenuated Vaccine": + Last( + "Live Attenuated Vaccines" V + where V.occurrence.toInterval() starts on or before AsOf + sort by start of occurrence.toInterval() + ).occurrence as FHIR.dateTime + diff --git a/input/cql/IMMZIND08.cql b/input/cql/IMMZIND08.cql index 2addb9c18f..e076a40d5f 100644 --- a/input/cql/IMMZIND08.cql +++ b/input/cql/IMMZIND08.cql @@ -16,53 +16,78 @@ * * References: WHO Immunization Facility Analysis Guide (1), WHO / UNICEF Joint Reporting Form (3 - elements 4240 and 4260 ) */ - library IMMZIND08 -// Start Skeleton CQL +/* +NOTE: This is an estimated denominator measure, meaning that all we are contributing from the site perspective is a count +towards the numerator, actual processing of this data to determine a proportion measure would be done by downstream analytics + +For this reason, this measure is modeled as a continuous variable measure where the contribution from each patient is the count of events (1) +*/ + 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 IMMZIndicatorCommon called IMMZIndCom -include IMMZVaccineLibrary called IMMZvl include FHIRCommon called FC -// End Skeleton CQL + +include IMMZCommon called Common +include IMMZConcepts called Concepts +include IMMZConfig called Config +include IMMZIndicatorElements called Elements +include IMMZVaccineLibrary called VaccineLibrary + parameter "Measurement Period" Interval context Patient +/* + * As defined by Member States + */ +define "Initial Population": + true + +define "Measure Population": + exists Elements."MCV Doses Administered to Patient During Measurement Period" + /* * Numerator: Number of administrations of vaccinations containing a Measles component during reporting period * Numerator Computation: COUNT immunization events WHERE administered product is a Measles vaccine (IMMZ.A1.DE9) during reporting period + * NOTE: Modeled as a Continuous Variable measure because this is an estimated denominator proportion measure */ -define "measure-population": - exists(IMMZIndCom."MCV Doses Administered to Patient During Measurement Period") +define function "Measure Observation"(Patient "Patient"): + 1 /* * Disaggregator: Dose Sequence (1, 2) */ -define "Dose Sequence Stratifier": - IMMZIndCom."MCV Doses Administered to Patient During Measurement Period" I +define "Dose Sequence Stratifier": + Elements."MCV Doses Administered to Patient During Measurement Period" I return (singleton from I.protocolApplied).doseNumber /* * Disaggregator: Age Group (<24H of Birth, < 2 weeks) */ define "Age Group Stratifier": - IMMZIndCom."Infant By Age Stratifier" + Elements."Infant By Age Stratifier" /* * Disaggregator: Geographic Region */ define "Geographic Region Stratifier": - IMMZIndCom."By Geographic Region Stratifier" + Elements."By Geographic Region Stratifier" /* * Disaggregator: Administrative Gender (or Biological Sex) */ define "Administrative Gender Stratifier": - IMMZIndCom."By Administrative Gender Stratifier" + Elements."By Administrative Gender Stratifier" + +/* + * Combined stratifiers + */ +define "Stratification": + Elements."By Administrative Gender Stratifier".code + + ':' + Elements."Toddler By Age Stratifier".code + + ':' + Elements."By Geographic Region Stratifier" /* End of IMMZ.IND.08 */ diff --git a/input/cql/IMMZIND12.cql b/input/cql/IMMZIND12.cql new file mode 100644 index 0000000000..9ef9a2a3bd --- /dev/null +++ b/input/cql/IMMZIND12.cql @@ -0,0 +1,64 @@ +/* + * Library: IMMZ.IND.12 + * Immunization coverage for Measles and rubella containing vaccine, 1st dose + * The percentage in the target population who have received one dose of measles and rubella vaccine during reporting period + * + * Numerator: Number of measles and rubella doses (1st dose) administered through routine services during reporting period + * Numerator Computation: COUNT of immunization events WHERE "Vaccine type" = "Measles and rubella containing vaccines" for the first dose in the primary series AND "Date and time of vaccination" is during the reporting period + * Denominator: Number in target group + * Denominator Computation: As defined by the Member States + * + * Disaggregation: + * - Administrative area + * - Sex + * - Age in years + * - Age group (depending on schedule) + * + * References: WHO Immunization facility analysis guide;WHO Handbook on immunization data + */ +library IMMZIND08 + +/* +NOTE: This is an estimated denominator measure, meaning that all we are contributing from the site perspective is a count +towards the numerator, actual processing of this data to determine a proportion measure would be done by downstream analytics + +For this reason, this measure is modeled as a cohort measure where membership in the cohort is determine by administration of +a measles containing vaccine. +*/ + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' +include FHIRCommon called FC + +include IMMZCommon called Common +include IMMZConcepts called Concepts +include IMMZConfig called Config +include IMMZIndicatorElements called Elements +include IMMZVaccineLibrary called VaccineLibrary + +parameter "Measurement Period" Interval + +context Patient + +/* + * As defined by Member State + */ +define "Initial Population": + true + +/* + * As defined by Member State + */ +define "Denominator": + true + +/* + * Numerator: Number of measles and rubella doses (1st dose) administered through routine services during reporting period + * Numerator Computation: COUNT of immunization events WHERE "Vaccine type" = "Measles and rubella containing vaccines" for the first dose in the primary series AND "Date and time of vaccination" is during the reporting period + */ +define "Numerator": + exists ( + Elements."MCV Doses Administered to Patient During Measurement Period" I + where I.protocolApplied.only().doseNumber = 1 + ) diff --git a/input/cql/IMMZIND13.cql b/input/cql/IMMZIND13.cql new file mode 100644 index 0000000000..41a07c07eb --- /dev/null +++ b/input/cql/IMMZIND13.cql @@ -0,0 +1,64 @@ +/* + * Library: IMMZ.IND.13 + * Immunization coverage for Measles and rubella containing vaccine, 2nd dose + * The percentage in the target population who have received second dose of measles and rubella vaccine during reporting period + * + * Numerator: Number of measles and rubella doses (2nd dose) administered through routine services during reporting period + * Numerator COUNT of immunization events WHERE "Vaccine type" = "Measles and rubella containing vaccines" for the second dose in the primary series AND "Date and time of vaccination" is during the reporting period + * Denominator: Number in target group + * Denominator Computation: As defined by the Member States + * + * Disaggregation: + * - Administrative area + * - Sex + * - Age in years + * - Age group (depending on schedule) + * + * References: WHO Immunization facility analysis guide;WHO Handbook on immunization data + */ +library IMMZIND08 + +/* +NOTE: This is an estimated denominator measure, meaning that all we are contributing from the site perspective is a count +towards the numerator, actual processing of this data to determine a proportion measure would be done by downstream analytics + +For this reason, this measure is modeled as a cohort measure where membership in the cohort is determine by administration of +a measles containing vaccine. +*/ + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' +include FHIRCommon called FC + +include IMMZCommon called Common +include IMMZConcepts called Concepts +include IMMZConfig called Config +include IMMZIndicatorElements called Elements +include IMMZVaccineLibrary called VaccineLibrary + +parameter "Measurement Period" Interval + +context Patient + +/* + * As defined by Member State + */ +define "Initial Population": + true + +/* + * As defined by Member State + */ +define "Denominator": + true + +/* + * Numerator: Number of measles and rubella doses (2nd dose) administered through routine services during reporting period + * Numerator COUNT of immunization events WHERE "Vaccine type" = "Measles and rubella containing vaccines" for the second dose in the primary series AND "Date and time of vaccination" is during the reporting period + */ +define "Numerator": + exists ( + Elements."MCV Doses Administered to Patient During Measurement Period" I + where I.protocolApplied.only().doseNumber = 2 + ) diff --git a/input/cql/IMMZINDMeasles.cql b/input/cql/IMMZINDMeasles.cql deleted file mode 100644 index 3b16fc084b..0000000000 --- a/input/cql/IMMZINDMeasles.cql +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Library: IMMZ.IND.Measles - * Immunization coverage for Measles containing vaccine (Estimated Denominator) - * Compares the administered doses of measles containing vaccines (MCV) with the estimated number of surviving infants (if dose 1) or a country supplied denominator (if dose 2) expressed as a percentage. - * - * Numerator: Number of administrations of vaccinations containing a Measles component during reporting period - * Numerator Computation: COUNT immunization events WHERE administered product is a Measles vaccine (IMMZ.Z.DE9) during reporting period - * Denominator: Estimated number of surviving infants (for dose 1) and country supplied denominator for dose sequence 2 (see comments) - * Denominator Computation: PARAMETER number of surviving infants (if Dose Sequence = 1) or PARAMETER of country supplied denominator (if Dose Sequence = 2) - * - * Disaggregation: - * - Dose Sequence (1, 2) - * - Age Group (< 1 year or > 1 year) - * - Geographic Region - * - Administrative Gender (or Biological Sex) - * - * References: WHO Immunization Facility Analysis Guide (1), WHO / UNICEF Joint Reporting Form (3 - elements 4240 and 4260 ) - */ - -library IMMZINDMeasles - -// 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 IMMZIndicatorCommon called IMMZIndCom -include IMMZVaccineLibrary called IMMZvl -include FHIRCommon called FC -include IMMZD2DTMeaslesLogic called Measles -// End Skeleton CQL -parameter "Measurement Period" Interval - -context Patient - - -define "MCV Doses Administered to Patient During Measurement Period": - Measles."MCV Doses Administered to Patient" I - where IMMZCom.ToDate(I.occurrence) during "Measurement Period" - - -define function "Measure Observation" (Patient "Patient"): - 1 - -/* - * Target population for first dose: Any one over 9 (in high transmission area) or 12 (in low transmission area) months old - */ -define "Initial Population 05": - Measles."First MCV Dose Administered to Patient" I where IMMZCom.ToDate(I.occurrence) during "Measurement Period" - -/* - * Numerator for first dose: Anyone having received the first dose - */ -define "Measure Population 05": - "Initial Population 05" - -/* - * Target population for second dose: Any one over 15 months - */ -define "Initial Population 40": - Measles."Second MCV Dose Administered to Patient" I where IMMZCom.ToDate(I.occurrence) during "Measurement Period" - -/* - * Numerator for second dose: Anyone having received the first dose - */ -define "Measure Population 40": - "Initial Population 40" - - -/* - * Combined stratifiers - */ -define "Stratification": - IMMZIndCom."By Administrative Gender Stratifier".code + ':' + IMMZIndCom."Toddler By Age Stratifier".code + ':' + IMMZIndCom."By Geographic Region Stratifier" - - diff --git a/input/cql/IMMZIndicatorCommon.cql b/input/cql/IMMZIndicatorElements.cql similarity index 84% rename from input/cql/IMMZIndicatorCommon.cql rename to input/cql/IMMZIndicatorElements.cql index 4420c646c9..a0f07e593e 100644 --- a/input/cql/IMMZIndicatorCommon.cql +++ b/input/cql/IMMZIndicatorElements.cql @@ -1,222 +1,240 @@ -/** - * Immunization Common Stratifiers by Patients as Context - */ - -library IMMZIndicatorCommon - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.0.1' -include FHIRCommon called FC -include IMMZCommon called IMMZCom -include IMMZConcepts called IMMZc -include WHOCommon called WCom -include WHOConcepts called WC -codesystem "ISO-8601-Derived Periods": 'http://ohie.org/CodeSystem/iso-8601-derived-periods' -parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] - -// Age Groups for Vaccines for infants -code "P0Y--P1Y": 'P0Y--P1Y' from "ISO-8601-Derived Periods" display '< 1 year' -code "P1Y--P9999Y": 'P1Y--P9999Y' from "ISO-8601-Derived Periods" display '> 1 year' - -// Age Groups for Vaccines for Toddlers -code "P0Y--P2Y": 'P0Y--P2Y' from "ISO-8601-Derived Periods" display '< 2 years' -code "P1Y--P2Y": 'P1Y--P2Y' from "ISO-8601-Derived Periods" display '1 year' -code "P2Y--P9999Y": 'P2Y--P9999Y' from "ISO-8601-Derived Periods" display '> 2 years' - -// Age groups for newborns -code "PT0H--PT24H": 'PT0H--PT24H' from "ISO-8601-Derived Periods" display 'Within 24H of Birth' -code "PT24H--P2W": 'PT24H--P2W' from "ISO-8601-Derived Periods" display '< 2 Weeks' -code "P2W--P9999Y": 'P2W--P9999Y' from "ISO-8601-Derived Periods" display '> 2 Weeks' - -// Age groups for adolescent -code "P0Y--P9Y": 'P0Y--P9Y' from "ISO-8601-Derived Periods" display '< 9 years' -code "P9Y--P14Y": 'P9Y--P14Y' from "ISO-8601-Derived Periods" display '9 - 14 years' -code "P15Y--P9999Y": 'P15Y--P9999Y' from "ISO-8601-Derived Periods" display '> 15 years' - -// RCV Startifiers -code "P0M--P9M": 'P0M--P9M' from "ISO-8601-Derived Periods" display '< 9 months' -code "P9M--P18M": 'P9M--P18M' from "ISO-8601-Derived Periods" display '9 - 18 months' -code "P18M--P15Y": 'P18M--P15Y' from "ISO-8601-Derived Periods" display '18 months - 15 years' - -// Varicella Age groups -code "P0M--P12M": 'P0M--P12M' from "ISO-8601-Derived Periods" display '< 12 months' -code "P12M--P18M": 'P12M--P18M' from "ISO-8601-Derived Periods" display '12 - 18 months' -code "P18M--P36M": 'P18M--P36M' from "ISO-8601-Derived Periods" display '18 - 36 months' -code "P36M--P12Y": 'P36M--P12Y' from "ISO-8601-Derived Periods" display '36 months - 12 years' -code "P12Y--P9999Y": 'P12Y--P9999Y' from "ISO-8601-Derived Periods" display '> 12 years' - -// Influenza Age Groups -code "P1Y--P15Y": 'P1Y--P15Y' from "ISO-8601-Derived Periods" display '1 year - 15 years' -code "P15Y--P60Y": 'P15Y--P60Y' from "ISO-8601-Derived Periods" display '15 years - 60 years' -code "P60Y--P9999Y": 'P60Y--P9999Y' from "ISO-8601-Derived Periods" display '> 60 years' - -codesystem "Administrative Gender Codes": 'http://hl7.org/fhir/administrative-gender' -code "Males" : 'male' from "Administrative Gender Codes" display 'Males' -code "Females" : 'female' from "Administrative Gender Codes" display 'Females' -code "Other" : 'other' from "Administrative Gender Codes" display 'Other/NA' -context Patient - - -/** - * Infant disaggregations by age - */ -define "Newborn By Age Stratifier": - case - when AgeInHoursAt(start of "Measurement Period") <= 24 then "PT0H--PT24H" - when AgeInWeeksAt(start of "Measurement Period") <= 2 then "PT24H--P2W" - when AgeInWeeksAt(start of "Measurement Period") > 2 then "P2W--P9999Y" - else null - end - -/** - * Infant disaggregations by age - */ -define "Infant By Age Stratifier": - case - when AgeInYearsAt(start of "Measurement Period") < 1 then "P0Y--P1Y" - when AgeInYearsAt(start of "Measurement Period") >= 1 then "P1Y--P9999Y" - else null - end - -/** - * Toddler By Age Stratifiers - */ -define "Toddler By Age Stratifier": - case - when AgeInYearsAt(start of "Measurement Period") < 1 then "P0Y--P1Y" - when AgeInYearsAt(start of "Measurement Period") < 2 then "P1Y--P2Y" - when AgeInYearsAt(start of "Measurement Period") >= 2 then "P2Y--P9999Y" - else null - end - - -/** - * Toddler By Age Stratifiers - */ -define "Adolescent By Age Stratifier": - case - when AgeInYearsAt(start of "Measurement Period") < 9 then "P0Y--P9Y" - when AgeInYearsAt(start of "Measurement Period") <= 14 then "P9Y--P14Y" - when AgeInYearsAt(start of "Measurement Period") > 14 then "P15Y--P9999Y" - else null - end - -/** - * RCV age disaggregators - */ -define "RCV By Age Stratifier": - case - when AgeInMonthsAt(start of "Measurement Period") < 9 then "P0M--P9M" - when AgeInMonthsAt(start of "Measurement Period") < 18 then "P9M--P18M" - when AgeInYearsAt(start of "Measurement Period") < 15 then "P18M--P15Y" - when AgeInYearsAt(start of "Measurement Period") >= 15 then "P15Y--P9999Y" - else null - end - -/** - * Varicella age disaggregators - */ -define "Varicella By Age Stratifier": - case - when AgeInMonthsAt(start of "Measurement Period") < 12 then "P0M--P12M" - when AgeInMonthsAt(start of "Measurement Period") < 18 then "P12M--P18M" - when AgeInMonthsAt(start of "Measurement Period") < 36 then "P18M--P36M" - when AgeInYearsAt(start of "Measurement Period") < 12 then "P36M--P12Y" - when AgeInYearsAt(start of "Measurement Period") >= 12 then "P12Y--P9999Y" - else null - end - - -/** - * Seasonal Influenza age disaggregators - */ -define "Seasonal Influenza By Age Stratifier": - case - when AgeInYearsAt(start of "Measurement Period") < 1 then "P0Y--P1Y" - when AgeInYearsAt(start of "Measurement Period") < 15 then "P1Y--P15Y" - when AgeInYearsAt(start of "Measurement Period") < 60 then "P15Y--P60Y" - when AgeInYearsAt(start of "Measurement Period") >= 60 then "P60Y--P9999Y" - else null - end - -/** - * By Administrative Gender of Patient Stratifier - */ -define "By Administrative Gender Stratifier": - case - when Patient.gender = 'male' then "Males" - when Patient.gender = 'female' then "Females" - else "Other" - end - -/** - * By Administrative Gender of Patient Stratifier - */ -define "By Geographic Region Stratifier": - First(Patient.address A where A.use in { 'home' }).state - -/** - * @dataElement Patient is deceased - */ -define "Patient Deceased During Measurement Period": - case - when Patient.deceased is FHIR.boolean then Patient.deceased as FHIR.boolean - when Patient.deceased is FHIR.dateTime then Patient.deceased as FHIR.dateTime before end of "Measurement Period" - else false - end - -/** - * Patient was born during measurement period - */ -define "Patient Born During Measurement Period": - Patient.birthDate during "Measurement Period" - -/** - * Patient is < 12 months old at the end of the measurement period - */ -define "Patient Under 12 Months Old During Measurement Period": - Patient.birthDate more than 12 month before end of "Measurement Period" - -/** - * Patient is < 12 years old at the end of the measurement period - */ -define "Patient Under 2 Years Old During Measurement Period": - Patient.birthDate more than 2 year before end of "Measurement Period" - - -/** - * @define Adverse events for immunizations which occurred during (or observed) during measurement period - */ -define "Immunizations with Adverse Events During Measurement Period": - IMMZCom."Doses Administered to Patient" I - with [Observation: code in WC."Adverse Events"] O - such that exists(I.reaction R where O.id = Last(Split(R.detail.reference, '/'))) - and FC.ToInterval(O.effective) during "Measurement Period" - - -/** - * @define Adverse events for immunizations which occurred during (or observed) during measurement period - */ -define "Adverse Event Reactions During Measurement Period": - [Observation: code in WC."Adverse Events"] O - with IMMZCom."Doses Administered to Patient" I - such that exists(I.reaction R where O.id = Last(Split(R.detail.reference, '/'))) - where FC.ToInterval(O.effective) during "Measurement Period" - -/** - * @define Doses which were - */ -define "Doses Administered to Patient During Measurement Period": - IMMZCom."Doses Administered to Patient" I - where IMMZCom.ToDate(I.occurrence) during "Measurement Period" - -/** - * @function - * @param immunization The immunization record for which the location should be retrieved - * @return FHIR.address The location that the immunization event occurred - */ -define function GetGeographicRegionForImmunization(immunization Immunization): - WCom.Official([Location] L - where L.id = Last(Split(immunization.location.reference, '/')) - return L.address).state \ No newline at end of file +/** + * Immunization Indicator Elements by Patients as Context + */ + +library IMMZIndicatorElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' +include FHIRCommon called FC + +include WHOConcepts +include WHOCommon called WC + +include IMMZConcepts called Concepts +include IMMZCommon called Common +include IMMZElements called Elements + +codesystem "ISO-8601-Derived Periods": 'http://ohie.org/CodeSystem/iso-8601-derived-periods' + +// Age Groups for Vaccines for infants +code "P0Y--P1Y": 'P0Y--P1Y' from "ISO-8601-Derived Periods" display '< 1 year' +code "P1Y--P9999Y": 'P1Y--P9999Y' from "ISO-8601-Derived Periods" display '> 1 year' + +// Age Groups for Vaccines for Toddlers +code "P0Y--P2Y": 'P0Y--P2Y' from "ISO-8601-Derived Periods" display '< 2 years' +code "P1Y--P2Y": 'P1Y--P2Y' from "ISO-8601-Derived Periods" display '1 year' +code "P2Y--P9999Y": 'P2Y--P9999Y' from "ISO-8601-Derived Periods" display '> 2 years' + +// Age groups for newborns +code "PT0H--PT24H": 'PT0H--PT24H' from "ISO-8601-Derived Periods" display 'Within 24H of Birth' +code "PT24H--P2W": 'PT24H--P2W' from "ISO-8601-Derived Periods" display '< 2 Weeks' +code "P2W--P9999Y": 'P2W--P9999Y' from "ISO-8601-Derived Periods" display '> 2 Weeks' + +// Age groups for adolescent +code "P0Y--P9Y": 'P0Y--P9Y' from "ISO-8601-Derived Periods" display '< 9 years' +code "P9Y--P14Y": 'P9Y--P14Y' from "ISO-8601-Derived Periods" display '9 - 14 years' +code "P15Y--P9999Y": 'P15Y--P9999Y' from "ISO-8601-Derived Periods" display '> 15 years' + +// RCV Startifiers +code "P0M--P9M": 'P0M--P9M' from "ISO-8601-Derived Periods" display '< 9 months' +code "P9M--P18M": 'P9M--P18M' from "ISO-8601-Derived Periods" display '9 - 18 months' +code "P18M--P15Y": 'P18M--P15Y' from "ISO-8601-Derived Periods" display '18 months - 15 years' + +// Varicella Age groups +code "P0M--P12M": 'P0M--P12M' from "ISO-8601-Derived Periods" display '< 12 months' +code "P12M--P18M": 'P12M--P18M' from "ISO-8601-Derived Periods" display '12 - 18 months' +code "P18M--P36M": 'P18M--P36M' from "ISO-8601-Derived Periods" display '18 - 36 months' +code "P36M--P12Y": 'P36M--P12Y' from "ISO-8601-Derived Periods" display '36 months - 12 years' +code "P12Y--P9999Y": 'P12Y--P9999Y' from "ISO-8601-Derived Periods" display '> 12 years' + +// Influenza Age Groups +code "P1Y--P15Y": 'P1Y--P15Y' from "ISO-8601-Derived Periods" display '1 year - 15 years' +code "P15Y--P60Y": 'P15Y--P60Y' from "ISO-8601-Derived Periods" display '15 years - 60 years' +code "P60Y--P9999Y": 'P60Y--P9999Y' from "ISO-8601-Derived Periods" display '> 60 years' + +codesystem "Administrative Gender Codes": 'http://hl7.org/fhir/administrative-gender' +code "Males" : 'male' from "Administrative Gender Codes" display 'Males' +code "Females" : 'female' from "Administrative Gender Codes" display 'Females' +code "Other" : 'other' from "Administrative Gender Codes" display 'Other/NA' + +parameter "Measurement Period" Interval default Interval[@2020-01-01, @2020-12-31] + +context Patient + +/** + * Infant disaggregations by age + */ +define "Newborn By Age Stratifier": + case + when AgeInHoursAt(start of "Measurement Period") <= 24 then "PT0H--PT24H" + when AgeInWeeksAt(start of "Measurement Period") <= 2 then "PT24H--P2W" + when AgeInWeeksAt(start of "Measurement Period") > 2 then "P2W--P9999Y" + else null + end + +/** + * Infant disaggregations by age + */ +define "Infant By Age Stratifier": + case + when AgeInYearsAt(start of "Measurement Period") < 1 then "P0Y--P1Y" + when AgeInYearsAt(start of "Measurement Period") >= 1 then "P1Y--P9999Y" + else null + end + +/** + * Toddler By Age Stratifiers + */ +define "Toddler By Age Stratifier": + case + when AgeInYearsAt(start of "Measurement Period") < 1 then "P0Y--P1Y" + when AgeInYearsAt(start of "Measurement Period") < 2 then "P1Y--P2Y" + when AgeInYearsAt(start of "Measurement Period") >= 2 then "P2Y--P9999Y" + else null + end + + +/** + * Toddler By Age Stratifiers + */ +define "Adolescent By Age Stratifier": + case + when AgeInYearsAt(start of "Measurement Period") < 9 then "P0Y--P9Y" + when AgeInYearsAt(start of "Measurement Period") <= 14 then "P9Y--P14Y" + when AgeInYearsAt(start of "Measurement Period") > 14 then "P15Y--P9999Y" + else null + end + +/** + * RCV age disaggregators + */ +define "RCV By Age Stratifier": + case + when AgeInMonthsAt(start of "Measurement Period") < 9 then "P0M--P9M" + when AgeInMonthsAt(start of "Measurement Period") < 18 then "P9M--P18M" + when AgeInYearsAt(start of "Measurement Period") < 15 then "P18M--P15Y" + when AgeInYearsAt(start of "Measurement Period") >= 15 then "P15Y--P9999Y" + else null + end + +/** + * Varicella age disaggregators + */ +define "Varicella By Age Stratifier": + case + when AgeInMonthsAt(start of "Measurement Period") < 12 then "P0M--P12M" + when AgeInMonthsAt(start of "Measurement Period") < 18 then "P12M--P18M" + when AgeInMonthsAt(start of "Measurement Period") < 36 then "P18M--P36M" + when AgeInYearsAt(start of "Measurement Period") < 12 then "P36M--P12Y" + when AgeInYearsAt(start of "Measurement Period") >= 12 then "P12Y--P9999Y" + else null + end + + +/** + * Seasonal Influenza age disaggregators + */ +define "Seasonal Influenza By Age Stratifier": + case + when AgeInYearsAt(start of "Measurement Period") < 1 then "P0Y--P1Y" + when AgeInYearsAt(start of "Measurement Period") < 15 then "P1Y--P15Y" + when AgeInYearsAt(start of "Measurement Period") < 60 then "P15Y--P60Y" + when AgeInYearsAt(start of "Measurement Period") >= 60 then "P60Y--P9999Y" + else null + end + +/** + * By Administrative Gender of Patient Stratifier + */ +define "By Administrative Gender Stratifier": + case + when Patient.gender = 'male' then "Males" + when Patient.gender = 'female' then "Females" + else "Other" + end + +/** + * By Administrative Gender of Patient Stratifier + */ +define "By Geographic Region Stratifier": + First(Patient.address A where A.use in { 'home' }).state + +/** + * @dataElement Patient is deceased + */ +define "Patient Deceased During Measurement Period": + case + when Patient.deceased is FHIR.boolean then Patient.deceased as FHIR.boolean + when Patient.deceased is FHIR.dateTime then Patient.deceased as FHIR.dateTime before end of "Measurement Period" + else false + end + +/** + * Patient was born during measurement period + */ +define "Patient Born During Measurement Period": + Patient.birthDate during "Measurement Period" + +/** + * Patient is < 12 months old at the end of the measurement period + */ +define "Patient Under 12 Months Old During Measurement Period": + Patient.birthDate more than 12 month before end of "Measurement Period" + +/** + * Patient is < 12 years old at the end of the measurement period + */ +define "Patient Under 2 Years Old During Measurement Period": + Patient.birthDate more than 2 year before end of "Measurement Period" + +/** + * MCV doses which were administered during the measurement period + */ +define "MCV Doses Administered to Patient During Measurement Period": + Elements."MCV Dose" I + where I.occurrence.toInterval() starts during "Measurement Period" + +/** + * @define Doses which were administered during the measurement period + */ +define "Doses Administered to Patient During Measurement Period": + Elements."Doses Administered to Patient" I + where I.occurrence.toInterval() starts during "Measurement Period" + +define "Adverse Events During Measurement Period": + [Observation: WHOConcepts."Adverse Events"] O + where O.effective.toInterval() during "Measurement Period" + +define "Immunizations And Adverse Events During Measurement Period": + from + "Doses Administered to Patient During Measurement Period" I, + "Adverse Events During Measurement Period" O + where I.reaction.detail.references(O) + return { immunization: I, adverseEvent: O } + +/** + * @define Adverse events for immunizations which occurred during (or observed) during measurement period + */ +define "Immunizations with Adverse Events During Measurement Period": + "Immunizations And Adverse Events During Measurement Period" I + return I.immunization + +/** + * @define Adverse events for immunizations which occurred during (or observed) during measurement period + */ +define "Adverse Event Reactions During Measurement Period": + "Immunizations And Adverse Events During Measurement Period" I + return I.adverseEvent + +/** + * @function + * @param immunization The immunization record for which the location should be retrieved + * @return FHIR.address The location that the immunization event occurred + */ +define function GetGeographicRegionForImmunization(immunization Immunization): + ( + [Location] L + where immunization.location.references(L) + ).only().address.state diff --git a/input/cql/WHOCommon.cql b/input/cql/WHOCommon.cql index b69e1d5c7d..62fdc63c23 100644 --- a/input/cql/WHOCommon.cql +++ b/input/cql/WHOCommon.cql @@ -4,164 +4,239 @@ using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' -include FHIRCommon called FC +codesystem "ConditionClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-clinical' + +// Condition Clinical Status Codes - Consider value sets for these +code "active": 'active' from "ConditionClinicalStatusCodes" +code "recurrence": 'recurrence' from "ConditionClinicalStatusCodes" +code "relapse": 'relapse' from "ConditionClinicalStatusCodes" +code "inactive": 'inactive' from "ConditionClinicalStatusCodes" +code "remission": 'remission' from "ConditionClinicalStatusCodes" +code "resolved": 'resolved' from "ConditionClinicalStatusCodes" context Patient -define function Official(identifiers List): +define fluent function official(identifiers List): singleton from (identifiers I where I.use = 'official') -define function Official(addresses List
): +define fluent function official(addresses List
): singleton from (addresses A where A.use = 'official') -define function Official(names List): +define fluent function official(names List): singleton from (names N where N.use = 'official') -define function Mobile(contactPoints List): +define fluent function mobile(contactPoints List): singleton from (contactPoints P where P.use = 'mobile') -define function Only(allergies List): +define fluent function only(allergies List): singleton from allergies -define function Only(appointments List): +define fluent function only(appointments List): singleton from appointments -define function Only(careplans List): +define fluent function only(careplans List): singleton from careplans -define function Only(conditions List): +define fluent function only(conditions List): singleton from conditions -define function Only(encounters List): +define fluent function only(encounters List): singleton from encounters -define function Only(immunizations List): +define fluent function only(immunizations List): singleton from immunizations -define function Only(medicationrequests List): +define fluent function only(locations List): + singleton from locations + +define fluent function only(medicationrequests List): singleton from medicationrequests -define function Only(observations List): +define fluent function only(observations List): singleton from observations -define function Only(procedures List): +define fluent function only(procedures List): singleton from procedures -define function Only(serviceRequests List): +define fluent function only(serviceRequests List): singleton from serviceRequests -define function Only(dosages List): +define fluent function only(dosages List): singleton from dosages -define function Only(doses List): +define fluent function only(doses List): singleton from doses -define function Earliest(observations List): +define fluent function earliest(observations List): First( observations O sort by issued ) -define function Latest(observations List): +define fluent function latest(observations List): Last( observations O sort by issued ) -define function MostRecent(observations List): +define fluent function mostRecent(observations List): Last( observations O sort by issued ) -define function MostRecent(procedures List): +define fluent function mostRecent(procedures List): Last( procedures P - sort by start of FC.ToInterval(performed) - ) + sort by start of performed.toInterval() + ) -define function Lowest(observations List): +define fluent function mostRecent(immunizations List): + Last( + immunizations I + sort by start of occurrence.toInterval() + ) + +define fluent function lowest(observations List): First( observations O - sort by (value as FHIR.Quantity) + sort by FHIRHelpers.ToQuantity(value as FHIR.Quantity) ) -define function Highest(observations List): +define fluent function highest(observations List): Last( observations O - sort by (value as FHIR.Quantity) + sort by FHIRHelpers.ToQuantity(value as FHIR.Quantity) ) +define function EarliestOf(dates List): + Min(dates) + +define function LatestOf(dates List): + Max(dates) + /* -@description: Returns any WHO core extensions defined on the given resource with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the -CQL model info. +From FHIRCommon 4.1.0: */ -define function Extensions(domainResource DomainResource, id String): - domainResource.extension E - where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id) - return E /* -@description: Returns the single WHO core extension (if present) on the given resource with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified id. +@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval +@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types +to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible +representations for timing-valued elements in FHIR, allowing this function to be used across any resource. + +The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range. +The intent of this function is to provide a clear and concise mechanism to treat single +elements that have multiple possible representations as intervals so that logic doesn't have to account +for the variability. More complex calculations (such as medication request period or dispense period +calculation) need specific guidance and consideration. That guidance may make use of this function, but +the focus of this function is on single element calculations where the semantics are unambiguous. +If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime. +If the input is a Period, the result is a DateTime Interval. +If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing. +If the input is an instant, the result is a DateTime Interval beginning and ending on that instant. +If the input is a string, an error is raised indicating a single interval cannot be computed from a string. +If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age, +and ending immediately prior to when the patient was the given Age plus one year. +If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given +by the low end of the Range, and ending immediately prior to when the patient was the Age given by the +high end of the Range plus one year. + +NOTE: Due to the +complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used +with a Timing or String. */ -define function Extension(domainResource DomainResource, id String): - singleton from "Extensions"(domainResource, id) +define fluent function toInterval(choice Choice): + case + when choice is FHIR.dateTime then + Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)] + when choice is FHIR.Period then + FHIRHelpers.ToInterval(choice as FHIR.Period) + when choice is FHIR.instant then + Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)] + when choice is FHIR.Age then + Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age), + FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year) + when choice is FHIR.Range then + Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low), + FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year) + when choice is FHIR.Timing then + Message(null as Interval, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') + when choice is FHIR.string then + Message(null as Interval, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported') + else + null as Interval + end /* -@description: Returns any WHO core extensions defined on the given element with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. +@description: Returns an interval representing the normalized Abatement of a given Condition resource. +@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw +a run-time exception if used with a Condition instance that has a String as the abatement value. */ -define function Extensions(element Element, id String): - element.extension E - where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id) - return E +define fluent function abatementInterval(condition Condition): + if condition.abatement is FHIR.dateTime then + Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)] + else if condition.abatement is FHIR.Period then + FHIRHelpers.ToInterval(condition.abatement as FHIR.Period) + else if condition.abatement is FHIR.string then + Message(null as Interval, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported') + else if condition.abatement is FHIR.Age then + Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age), + FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year) + else if condition.abatement is FHIR.Range then + Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low), + FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year) + else if condition.abatement is FHIR.boolean then + Interval[end of condition.onset.toInterval(), condition.recordedDate) + else + null /* -@description: Returns the single WHO core extension (if present) on the given element with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. +@description: Returns an interval representing the normalized prevalence period of a given Condition resource. +@comment: Uses the toInterval and toAbatementInterval functions to determine the widest potential interval from +onset to abatement as specified in the given Condition. */ -define function Extension(element Element, id String): - singleton from Extensions(element, id) +define fluent function prevalenceInterval(condition Condition): +if condition.clinicalStatus ~ "active" + or condition.clinicalStatus ~ "recurrence" + or condition.clinicalStatus ~ "relapse" then + Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()] +else + (end of condition.abatementInterval()) abatementDate + return + if abatementDate is null then + Interval[start of condition.onset.toInterval(), abatementDate) + else + Interval[start of condition.onset.toInterval(), abatementDate] /* -@description: Returns any WHO core modifier extensions defined on the given resource with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the -CQL model info. +@description: Returns true if the given reference is to the given resource +@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference. +NOTE: This function assumes resources from the same source server. */ -define function ModifierExtensions(domainResource DomainResource, id String): - domainResource.modifierExtension E - where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id) - return E +define fluent function references(reference FHIR.Reference, resource FHIR.Resource): + resource.id = Last(Split(reference.reference, '/')) /* -@description: Returns the single WHO core modifier extension (if present) on the given resource with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. +@description: Returns true if the given reference is to the given resourceId +@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference. +NOTE: This function assumes resources from the same source server. */ -define function ModifierExtension(domainResource DomainResource, id String): - singleton from ModifierExtensions(domainResource, id) +define fluent function references(reference FHIR.Reference, resourceId String): + resourceId = Last(Split(reference.reference, '/')) /* -@description: Returns any WHO core modifier extensions defined on the given element with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. +@description: Returns true if any of the given references are to the given resource +@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references. +NOTE: This function assumes resources from the same source server. */ -define function ModifierExtensions(element BackboneElement, id String): - element.modifierExtension E - where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id) - return E - +define fluent function references(references List, resource FHIR.Resource): + exists (references R where R.references(resource)) + /* -@description: Returns the single WHO core modifier extension (if present) on the given element with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. +@description: Returns true if any of the given references are to the given resourceId +@comment: Returns true if the `resourceId` parameter exactly equals the tail of any of the given references. +NOTE: This function assumes resources from the same source server. */ -define function ModifierExtension(element BackboneElement, id String): - singleton from ModifierExtensions(element, id) +define fluent function references(references List, resourceId String): + exists (references R where R.references(resourceId)) diff --git a/input/cql/WHOConcepts.cql b/input/cql/WHOConcepts.cql index 072b886715..a71963d46a 100644 --- a/input/cql/WHOConcepts.cql +++ b/input/cql/WHOConcepts.cql @@ -9,8 +9,12 @@ codesystem "CIEL": 'http://hl7.org/fhir/sid/ciel' codesystem "ICD-11": 'http://id.who.int/icd/release/11/mms' codesystem "ICHI": 'https://mitel.dimi.uniud.it/ichi/#http://id.who.int/ichi' codesystem "ICF": 'http://hl7.org/fhir/sid/icf-nl' -codesystem "Extended Codes CodeSystem codes": 'http://fhir.org/guides/who/anc-cds/CodeSystem/anc-custom-codes' // ValuSets valueset "Pregnancy Status Pregnant": 'http://fhir.org/guides/who/core/ValueSet/pregnancystatus-values' valueset "Adverse Events": 'http://hl7.org/fhir/ValueSet/adverse-event-type' + +code "Pregnancy status": '82810-3' from "LOINC" display 'Pregnancy status' +code "Pregnant": 'LA15173-0' from "LOINC" display 'Pregnant' +code "Not pregnant": 'LA26683-5' from "LOINC" display 'Not pregnant' +code "Unknown": 'LA4489-6' from "LOINC" display 'Unknown' diff --git a/input/cql/WHOElements.cql b/input/cql/WHOElements.cql new file mode 100644 index 0000000000..adc93f7350 --- /dev/null +++ b/input/cql/WHOElements.cql @@ -0,0 +1,19 @@ +library WHOElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOConcepts called Concepts +include WHOCommon called Common + +context Patient + +define "Pregnancy Status Observation": + [Observation: Concepts."Pregnancy status"] O + where O.status in { 'final', 'amended', 'corrected' } + +define "Pregnant Observation": + "Pregnancy Status Observation" O + where O.value ~ Concepts."Pregnant" + diff --git a/input/cql/WHOEncounterElements.cql b/input/cql/WHOEncounterElements.cql new file mode 100644 index 0000000000..503d2cc6c0 --- /dev/null +++ b/input/cql/WHOEncounterElements.cql @@ -0,0 +1,19 @@ +library WHOEncounterElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOConcepts called Concepts +include WHOCommon called Common +include WHOElements called Elements + +parameter AsOf Date default Today() +parameter EncounterId String + +context Patient + +define "Pregnant Observation": + Elements."Pregnant Observation" O + where O.encounter.references(EncounterId) + or O.effective.toInterval() starts 9 months on or before day of AsOf diff --git a/input/cql/cql-options.json b/input/cql/cql-options.json index 386dddeacf..53c235c9ea 100644 --- a/input/cql/cql-options.json +++ b/input/cql/cql-options.json @@ -11,8 +11,8 @@ "validateUnits":true, "verifyOnly":false, "errorLevel":"Info", - "signatureLevel":"None", - "compatibilityLevel":"1.4", + "signatureLevel":"Overloads", + "compatibilityLevel":"1.5", "analyzeDataRequirements":false, "collapseDataRequirements":true } diff --git a/input/fsh/activitydefinitions/IMMZD2DTMeaslesCIMR.fsh b/input/fsh/activitydefinitions/IMMZD2DTMeaslesCIMR.fsh index 5ae9398a1f..af55c7a3c2 100644 --- a/input/fsh/activitydefinitions/IMMZD2DTMeaslesCIMR.fsh +++ b/input/fsh/activitydefinitions/IMMZD2DTMeaslesCIMR.fsh @@ -8,7 +8,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesContraindication" * status = #draft * experimental = false diff --git a/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh b/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh index 0388f5dffa..0ec480d88f 100644 --- a/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh +++ b/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh @@ -8,7 +8,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesContraindicationEvaluation" * status = #draft * experimental = false diff --git a/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh b/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh index dde2c8f2da..fbffd3c3cb 100644 --- a/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh +++ b/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh @@ -8,7 +8,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesMedicationRequest" * status = #draft * experimental = false diff --git a/input/fsh/codesystems/ICD11.fsh b/input/fsh/codesystems/ICD11.fsh index 8cbe404aa6..b2b2ce0d46 100644 --- a/input/fsh/codesystems/ICD11.fsh +++ b/input/fsh/codesystems/ICD11.fsh @@ -1,5 +1,4 @@ CodeSystem: ICD11 -Id: ICD11 Title: "ICD-11" Description: "ICD-11." diff --git a/input/fsh/codesystems/IMMZ.C.fsh b/input/fsh/codesystems/IMMZ.C.fsh deleted file mode 100644 index 8ef149087a..0000000000 --- a/input/fsh/codesystems/IMMZ.C.fsh +++ /dev/null @@ -1,25 +0,0 @@ -CodeSystem: IMMZ.C -Title: "IMMZ.C CodeSystem for Data Elements" -Description: "CodeSystem for IMMZ.C Data Elements" - -* ^experimental = false -* ^caseSensitive = false -* ^name = "IMMZ_C" -* #DE1 "Unique identifier" "Unique identifier for the client, according to the policies applicable to each country. There can be more than one unique identifier used to link records (e.g. national ID, health ID, immunization information system ID, medical record ID)." -* #DE2 "Name" "The full name of the client" -* #DE3 "First name" "Client's first name or given name" -* #DE4 "Family name" "Client's family name or last name" -* #DE5 "Sex" "Documentation of a specific instance of sex information for the client" -* #DE6 "Male" "Client's biological sex is male" -* #DE7 "Female" "Client's biological sex is female" -* #DE8 "Biological sex not specified" "Client's biological sex is not specified" -* #DE9 "Intersex" "Client's biological sex is intersex" -* #DE10 "Date of birth" "Client's date of birth (DOB) if known; if unknown, use assigned DOB for administrative purposes" -* #DE13 "Age" "The client's calculated age (presented as number of years, months, days) based on the date of birth (DOB) and the visit date" -* #DE14 "Caregivers (multiple)" "The client's caregiver (person) which could be next of kin (e.g. partner, husband, mother, sibling, etc.)" -* #DE15 "Caregiver's full name" "The full name of the client's caregiver" -* #DE16 "Caregiver's first name" "First or given name of the client's caregiver" -* #DE17 "Caregiver's family name" "Family name or last name of the client's caregiver" -* #DE18 "Contact phone number" "Client's phone number" -* #DE19 "Administrative area" "The name of the city/municipality/town/village of where the client lives" -* #DE20 "Active health worker" "Is the client an active and participating health worker. This data element is used mainly for reporting and indicators purposes." diff --git a/input/fsh/codesystems/IMMZ.D1.fsh b/input/fsh/codesystems/IMMZ.D1.fsh deleted file mode 100644 index fbe588dd38..0000000000 --- a/input/fsh/codesystems/IMMZ.D1.fsh +++ /dev/null @@ -1,20 +0,0 @@ -CodeSystem: IMMZ.D1 -Title: "IMMZ.D1 CodeSystem for Data Elements" -Description: "CodeSystem for IMMZ.C Data Elements" - -* ^experimental = false -* ^caseSensitive = false -* ^name = "IMMZ_D1" - -* #DE80 "Dose 0 administered" "Indicates if the client has received a birth dose and/or supplementary dose" -* #DE8 "Completed the primary vaccination series" "Indicates if the client has completed the primary vaccination series of a product/antigen. If the client has not yet completed their primary series, it means they may be expected to receive more doses to complete their vaccination regimen for the respective product/antigen." -* #DE81 "Date when primary vaccination series was completed" "The date when the client completed the primary vaccination series (per product/antigen)" -* #DE10 "HIV status" "The current human immunodeficiency virus (HIV) status of the client" -* #DE11 "HIV-positive" "The client is known to be HIV positive" -* #DE12 "HIV-negative" "The client is known to be HIV negative" -* #DE13 "Unknown" "The client's HIV status is unknown" -* #DE15 "Preterm birth" "The infant was preterm; the mother gave birth to the infant when gestational age was less than 37 weeks" -* #DE92 "Severely immunosuppressed" "The client is known to be severely immunocompromised or immunosuppressed" -* #DE49 "ART start date" "The date on which the client started or restarted antiretroviral therapy (ART)" -* #DE19 "Vaccine type" "Vaccine type/category that was administered or was to be administered. Any vaccine code available in the IMMZ.Z Vaccine Library list of codes applies in this data element" -* #DE20 "Date and time of vaccination" "Represents the visit/encounter date, which is the date and time when the vaccine was administered to the client" \ No newline at end of file diff --git a/input/fsh/codesystems/IMMZ.D4.fsh b/input/fsh/codesystems/IMMZ.D4.fsh deleted file mode 100644 index 86c27a3510..0000000000 --- a/input/fsh/codesystems/IMMZ.D4.fsh +++ /dev/null @@ -1,14 +0,0 @@ -CodeSystem: IMMZ.D4 -Title: "IMMZ.D4 CodeSystem for Check Contraindications Data Elements" -Description: "CodeSystem for IMMZ.D4 Check Contraindications Data Elements" - -* ^experimental = false -* ^caseSensitive = false -* ^name = "IMMZ_D4" - -* #DE161 "Potential contraindications" "Specific situations or medical conditions in which it is advised or recommended to avoid or delay administering a particular vaccine" -* #DE162 "Currently pregnant" "The client is currently pregnant" -* #DE165 "Severely immunosuppressed" "The client is known to be severely immunocompromised or immunosuppressed" -* #DE166 "History of anaphylactic reactions" "The client is known to have history of anaphylaxis in the past. Anaphylaxis is a severe and potentially life-threatening allergic reaction that can occur rapidly after exposure to an allergen or vaccine component." -* #DE167 "Severe allergic reactions" "The client is known to have severe allergic reaction to vaccine" -* #DE168 "Symptomatic HIV infection" "The client is experiencing HIV-related symptoms" diff --git a/input/fsh/codesystems/IMMZConcepts.fsh b/input/fsh/codesystems/IMMZConcepts.fsh new file mode 100644 index 0000000000..f02d2298d2 --- /dev/null +++ b/input/fsh/codesystems/IMMZConcepts.fsh @@ -0,0 +1,60 @@ +CodeSystem: IMMZConcepts +Title: "Immunizations Concepts CodeSystem" +Description: "This code system defines concepts used in SMART Immunizations" + +* ^experimental = false +* ^caseSensitive = false +* #C.DE1 "Unique identifier" "Unique identifier for the client, according to the policies applicable to each country. There can be more than one unique identifier used to link records (e.g. national ID, health ID, immunization information system ID, medical record ID)." +* #C.DE2 "Name" "The full name of the client" +* #C.DE3 "First name" "Client's first name or given name" +* #C.DE4 "Family name" "Client's family name or last name" +* #C.DE5 "Sex" "Documentation of a specific instance of sex information for the client" +* #C.DE6 "Male" "Client's biological sex is male" +* #C.DE7 "Female" "Client's biological sex is female" +* #C.DE8 "Biological sex not specified" "Client's biological sex is not specified" +* #C.DE9 "Intersex" "Client's biological sex is intersex" +* #C.DE10 "Date of birth" "Client's date of birth (DOB) if known; if unknown, use assigned DOB for administrative purposes" +* #C.DE13 "Age" "The client's calculated age (presented as number of years, months, days) based on the date of birth (DOB) and the visit date" +* #C.DE14 "Caregivers (multiple)" "The client's caregiver (person) which could be next of kin (e.g. partner, husband, mother, sibling, etc.)" +* #C.DE15 "Caregiver's full name" "The full name of the client's caregiver" +* #C.DE16 "Caregiver's first name" "First or given name of the client's caregiver" +* #C.DE17 "Caregiver's family name" "Family name or last name of the client's caregiver" +* #C.DE18 "Contact phone number" "Client's phone number" +* #C.DE19 "Administrative area" "The name of the city/municipality/town/village of where the client lives" +* #C.DE20 "Active health worker" "Is the client an active and participating health worker. This data element is used mainly for reporting and indicators purposes." + +* #D.DE2 "Completed" "The immunization event was successfully carried out as intended" +* #D.DE3 "Entered in error" "Immunization event record has been mistakenly created or entered into system. Recorded information is incorrect or should not have been documented, though it is possible that real-world decisions were based on it" +* #D.DE4 "Not Done" "Planned immunization event was not carried out for some reason" +* #D.DE6 "Immunity Testing has shown that the client already has immunity to the agent targeted by the immunization" +* #D.DE7 "Medical precaution" "The client currently has a medical condition for which the vaccine is contraindicated or for which precaution is warranted" +* #D.DE8 "Product out of stock" "There was no supply of the product on hand to perform the service" +* #D.DE9 "Client objection" "The client or their guardian objects to receiving the vaccine" +* #D.DE10 "Caregiver refusal" "The client's caregiver refused the vaccine" +* #D.DE11 "Unspecified reason" "The immunization event was not carried out for an unspecified reason" +* #D.DE12 "Client allergy to vaccine or component" "The immunization event was not carried out because of client allergy to vaccine or component" +* #D.DE13 "Immunocompromised" "The immunization event was not carried out because the client is immunocompromised" +* #D.DE14 "Chronic illness or condition" "The immunization event was not carried out due a chronic illness or condition of the client" +* #D.DE15 "Acute illness" "The immunization event was not carried out due to an acute illness present in the client" +* #D.DE16 "Had the disease" "The immunization event was not carried out due to the client having had the disease" +* #D.DE17 "Immunization not carried out for other reasons" "The immunization event was not carried out for other reasons" + +* #D1.DE80 "Dose 0 administered" "Indicates if the client has received a birth dose and/or supplementary dose" +* #D1.DE8 "Completed the primary vaccination series" "Indicates if the client has completed the primary vaccination series of a product/antigen. If the client has not yet completed their primary series, it means they may be expected to receive more doses to complete their vaccination regimen for the respective product/antigen." +* #D1.DE81 "Date when primary vaccination series was completed" "The date when the client completed the primary vaccination series (per product/antigen)" +* #D1.DE10 "HIV status" "The current human immunodeficiency virus (HIV) status of the client" +* #D1.DE11 "HIV-positive" "The client is known to be HIV positive" +* #D1.DE12 "HIV-negative" "The client is known to be HIV negative" +* #D1.DE13 "Unknown" "The client's HIV status is unknown" +* #D1.DE15 "Preterm birth" "The infant was preterm; the mother gave birth to the infant when gestational age was less than 37 weeks" +* #D1.DE92 "Severely immunosuppressed" "The client is known to be severely immunocompromised or immunosuppressed" +* #D1.DE49 "ART start date" "The date on which the client started or restarted antiretroviral therapy (ART)" +* #D1.DE19 "Vaccine type" "Vaccine type/category that was administered or was to be administered. Any vaccine code available in the IMMZ.Z Vaccine Library list of codes applies in this data element" +* #D1.DE20 "Date and time of vaccination" "Represents the visit/encounter date, which is the date and time when the vaccine was administered to the client" + +* #D4.DE161 "Potential contraindications" "Specific situations or medical conditions in which it is advised or recommended to avoid or delay administering a particular vaccine" +* #D4.DE162 "Currently pregnant" "The client is currently pregnant" +* #D4.DE165 "Severely immunosuppressed" "The client is known to be severely immunocompromised or immunosuppressed" +* #D4.DE166 "History of anaphylactic reactions" "The client is known to have history of anaphylaxis in the past. Anaphylaxis is a severe and potentially life-threatening allergic reaction that can occur rapidly after exposure to an allergen or vaccine component." +* #D4.DE167 "Severe allergic reactions" "The client is known to have severe allergic reaction to vaccine" +* #D4.DE168 "Symptomatic HIV infection" "The client is experiencing HIV-related symptoms" diff --git a/input/fsh/codesystems/VaccineProducts.fsh b/input/fsh/codesystems/VaccineProducts.fsh index ffd3976519..928d465ab2 100644 --- a/input/fsh/codesystems/VaccineProducts.fsh +++ b/input/fsh/codesystems/VaccineProducts.fsh @@ -1,5 +1,5 @@ CodeSystem: VaccineProducts -Title: "Vaccine Product codes CodeSet" +Title: "Vaccine Product codes CodeSet" Description: "Vaccine Product codes, containing the different available products." * ^experimental = true diff --git a/input/fsh/conceptmaps/IMMZ.C.ConceptMap.fsh b/input/fsh/conceptmaps/IMMZ.C.ConceptMap.fsh deleted file mode 100644 index ceef137bb7..0000000000 --- a/input/fsh/conceptmaps/IMMZ.C.ConceptMap.fsh +++ /dev/null @@ -1,66 +0,0 @@ - -Instance: IMMZCConceptMap -InstanceOf: ConceptMap -Description: "Mapping to and from IMMZ.C Data Dictionary to other codesystems." -Usage: #definition - -* name = "IMMZ_C_ConceptMap" -* title = "ConceptMap to and from IMMZ.C DataElements" -* status = #active -* experimental = false -* date = "2023-08-04" - -* group[+] - * source = Canonical(IMMZ.C) - * target = $ICD11 - * insert ElementMap(DE6, XX2UQ8, equivalent) - * insert ElementMap(DE7, XX2V25, equivalent) - * insert ElementMap(DE8, XX2PX3, equivalent) - * insert ElementMap(DE9, XX45B7, equivalent) - -* group[+] - * source = $ICD11 - * target = Canonical(IMMZ.C) - * insert ElementMap(XX2UQ8, DE6, equivalent) - * insert ElementMap(XX2V25, DE7, equivalent) - * insert ElementMap(XX2PX3, DE8, equivalent) - * insert ElementMap(XX45B7, DE9, equivalent) - -* group[+] - * source = Canonical(IMMZ.C) - * target = $LNC - * insert ElementMap(DE2, 54125-0, equivalent) - * insert ElementMap(DE3, 45392-8, relatedto) - * insert ElementMap(DE4, 45394-4, relatedto) - * insert ElementMap(DE5, 46098-0, equivalent) - * insert ElementMap(DE10, 21112-8, equivalent) - * insert ElementMap(DE13, 63900-5, wider) - * insert ElementMap(DE18, 42077-8, equivalent) - * insert ElementMap(DE19, 56799-0, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" - -* group[+] - * source = Canonical(IMMZ.C) - * target = $SCT - * insert ElementMap(DE2, 371484003, equivalent) - * insert ElementMap(DE3, 184095009, relatedto) - * insert ElementMap(DE4, 184096005, relatedto) - * insert ElementMap(DE5, 184100006, equivalent) - * insert ElementMap(DE6, 248153007, equivalent) - * insert ElementMap(DE7, 248152002, equivalent) - * insert ElementMap(DE8, 772004004, relatedto) - * insert ElementMap(DE9, 15867007, equivalent) - * insert ElementMap(DE10, 184099003, equivalent) - * insert ElementMap(DE14, 184140000, wider) - * insert ElementMap(DE15, 184140000, wider) - * insert ElementMap(DE18, 184103008, equivalent) - * insert ElementMap(DE19, 184097001, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" - -* group[+] - * source = $SCT - * target = Canonical(IMMZ.C) - * insert ElementMap(248153007, DE6, equivalent) - * insert ElementMap(248152002, DE7, equivalent) - * insert ElementMap(772004004, DE8, relatedto) - * insert ElementMap(15867007, DE9, equivalent) diff --git a/input/fsh/conceptmaps/IMMZ.D1.ConceptMap.fsh b/input/fsh/conceptmaps/IMMZ.D1.ConceptMap.fsh deleted file mode 100644 index 5534fa2452..0000000000 --- a/input/fsh/conceptmaps/IMMZ.D1.ConceptMap.fsh +++ /dev/null @@ -1,68 +0,0 @@ -Instance: IMMZD1ConceptMap -InstanceOf: ConceptMap -Description: "Mapping to and from IMMZ.D1 Data Dictionary to other codesystems." -Usage: #definition - -* name = "IMMZ_D1_ConceptMap" -* title = "ConceptMap to and from IMMZ.D1 DataElements" -* status = #active -* experimental = false -* date = "2023-08-09" - -* group[+] - * source = Canonical(IMMZ.D1) - * target = $ICD11 - * insert ElementMap(DE11, 1C62.Z, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" - - * insert ElementMap(DE12, QA02.Y, relatedto) - * insert ElementMap(DE15, KA21.4, equivalent) - -* group[+] - * source = $ICD11 - * target = Canonical(IMMZ.D1) - * insert ElementMap(1C62.Z, DE11, wider) - * insert ElementMap(QA02.Y, DE12, relatedto) - * insert ElementMap(KA21.4, DE15, equivalent) - - -* group[+] - * source = Canonical(IMMZ.D1) - * target = $LNC - * insert ElementMap(DE11, 45683-0, equivalent) - * insert ElementMap(DE10, 55277-8, equivalent) - * insert ElementMap(DE92, 96381-9, relatedto) - * insert ElementMap(DE15, 76517-2, equivalent) - * insert ElementMap(DE19, 39236-5, equivalent) - * insert ElementMap(DE20, 30952-6, equivalent) - -* group[+] - * source = $LNC - * target = Canonical(IMMZ.D1) - * insert ElementMap(45683-0, DE11, equivalent) - * insert ElementMap(55277-8, DE10, equivalent) - * insert ElementMap(96381-9, DE92, relatedto) - * insert ElementMap(76517-2, DE15, equivalent) - * insert ElementMap(39236-5, DE19, equivalent) - * insert ElementMap(30952-6, DE20, equivalent) - -* group[+] - * source = Canonical(IMMZ.D1) - * target = $SCT - * insert ElementMap(DE12, 165815009, equivalent) - * insert ElementMap(DE11, 165816005, equivalent) - * insert ElementMap(DE13, 261665006, wider) - * insert ElementMap(DE10, 278977008, equivalent) - * insert ElementMap(DE15, 395507008, equivalent) - - -* group[+] - * source = $SCT - * target = Canonical(IMMZ.D1) - * insert ElementMap(165815009, DE12, equivalent) - * insert ElementMap(165816005, DE11, equivalent) - * insert ElementMap(261665006, DE13, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" - * insert ElementMap(278977008, DE10, equivalent) - * insert ElementMap(395507008, DE15, equivalent) - diff --git a/input/fsh/conceptmaps/IMMZ.D4.ConceptMap.fsh b/input/fsh/conceptmaps/IMMZ.D4.ConceptMap.fsh deleted file mode 100644 index c7f57fc11a..0000000000 --- a/input/fsh/conceptmaps/IMMZ.D4.ConceptMap.fsh +++ /dev/null @@ -1,63 +0,0 @@ -Instance: IMMZD4ConceptMap -InstanceOf: ConceptMap -Description: "Mapping to and from IMMZ.D4 Data Dictionary to other codesystems." -Usage: #definition - -* name = "IMMZ_D4_ConceptMap" -* title = "ConceptMap to and from IMMZ.D4 DataElements" -* status = #active -* experimental = false -* date = "2023-10-09" - -* group[+] - * source = Canonical(IMMZ.D4) - * target = $ICD11 - * insert ElementMap(DE162, QA41, equivalent) - * insert ElementMap(DE165, 4B4Z, relatedto) - * insert ElementMap(DE166, QC44.0, equivalent) - * insert ElementMap(DE167, QC44.2, relatedto) - * insert ElementMap(DE168, 1C62.1, equivalent) - -* group[+] - * source = $ICD11 - * target = Canonical(IMMZ.D4) - * insert ElementMap(QA41, DE162, equivalent) - * insert ElementMap(4B4Z, DE165, relatedto) - * insert ElementMap(QC44.0, DE166, equivalent) - * insert ElementMap(QC44.2, DE167, relatedto) - * insert ElementMap(1C62.1, DE168, equivalent) - -* group[+] - * source = Canonical(IMMZ.D4) - * target = $LNC - * insert ElementMap(DE162, 82810-3, equivalent) - * insert ElementMap(DE165, 96381-9, relatedto) - * insert ElementMap(DE168, 47244-9, wider) - -* group[+] - * source = $LNC - * target = Canonical(IMMZ.D4) - * insert ElementMap(82810-3, DE162, equivalent) - * insert ElementMap(96381-9, DE165, relatedto) - * insert ElementMap(47244-9, DE168, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" - -* group[+] - * source = Canonical(IMMZ.D4) - * target = $SCT - * insert ElementMap(DE162, 77386006, equivalent) - * insert ElementMap(DE165, 370388006, equivalent) - * insert ElementMap(DE166, 10839421000119100, equivalent) - * insert ElementMap(DE167, 419076005, wider) - * insert ElementMap(DE168, 86406008, equivalent) - - -* group[+] - * source = $SCT - * target = Canonical(IMMZ.D4) - * insert ElementMap(77386006, DE162, equivalent) - * insert ElementMap(370388006, DE165, equivalent) - * insert ElementMap(10839421000119100, DE166, equivalent) - * insert ElementMap(419076005, DE167, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" - * insert ElementMap(86406008, DE168, equivalent) diff --git a/input/fsh/conceptmaps/IMMZ.C.SexToAdministrativeGender.fsh b/input/fsh/conceptmaps/IMMZConceptsToAdministrativeGender.fsh similarity index 73% rename from input/fsh/conceptmaps/IMMZ.C.SexToAdministrativeGender.fsh rename to input/fsh/conceptmaps/IMMZConceptsToAdministrativeGender.fsh index 13f6efb14a..fe2aca1a4a 100644 --- a/input/fsh/conceptmaps/IMMZ.C.SexToAdministrativeGender.fsh +++ b/input/fsh/conceptmaps/IMMZConceptsToAdministrativeGender.fsh @@ -1,16 +1,15 @@ -Instance: IMMZCSexToAdministrativeGender +Instance: IMMZConceptsToAdministrativeGender InstanceOf: ConceptMap Description: "Mapping to and from IMMZ.C sex coding to FHIR Administrative Gender." Usage: #definition -* name = "IMMZ_C_SexToAdministrativeGender" -* title = "ConceptMap to and From IMMZ.C sex to administrative gender" +* name = "IMMZConceptsToAdministrativeGender" +* title = "ConceptMap to and from Immunization Concepts to administrative gender" * status = #active * experimental = false -* date = "2023-08-09" * group[+] - * source = Canonical(IMMZ.C) + * source = Canonical(IMMZConcepts) * target = $GENDER * insert ElementMap(DE6, male, equivalent) * insert ElementMap(DE7, female, equivalent) @@ -19,7 +18,7 @@ Usage: #definition * group[+] * source = $GENDER - * target = Canonical(IMMZ.C) + * target = Canonical(IMMZConcepts) * insert ElementMap(male, DE6, equivalent) * insert ElementMap(female, DE7, equivalent) * insert ElementMap(unknown, DE8, equivalent) diff --git a/input/fsh/conceptmaps/IMMZConceptsToICD11.fsh b/input/fsh/conceptmaps/IMMZConceptsToICD11.fsh new file mode 100644 index 0000000000..764f056153 --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToICD11.fsh @@ -0,0 +1,60 @@ +Instance: IMMZConceptsToICD11 +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ Concepts to ICD-11" +Usage: #definition + +* name = "IMMZConceptsToICD11" +* title = "ConceptMap to and from ICD-11" +* status = #active +* experimental = false + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $ICD11 + * insert ElementMap(C.DE6, XX2UQ8, equivalent) + * insert ElementMap(C.DE7, XX2V25, equivalent) + * insert ElementMap(C.DE8, XX2PX3, equivalent) + * insert ElementMap(C.DE9, XX45B7, equivalent) + +* group[+] + * source = $ICD11 + * target = Canonical(IMMZConcepts) + * insert ElementMap(XX2UQ8, C.DE6, equivalent) + * insert ElementMap(XX2V25, C.DE7, equivalent) + * insert ElementMap(XX2PX3, C.DE8, equivalent) + * insert ElementMap(XX45B7, C.DE9, equivalent) + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $ICD11 + * insert ElementMap(D1.DE11, 1C62.Z, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" + + * insert ElementMap(D1.DE12, QA02.Y, relatedto) + * insert ElementMap(D1.DE15, KA21.4, equivalent) + +* group[+] + * source = $ICD11 + * target = Canonical(IMMZConcepts) + * insert ElementMap(1C62.Z, D1.DE11, wider) + * insert ElementMap(QA02.Y, D1.DE12, relatedto) + * insert ElementMap(KA21.4, D1.DE15, equivalent) + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $ICD11 + * insert ElementMap(D4.DE162, QA41, equivalent) + * insert ElementMap(D4.DE165, 4B4Z, relatedto) + * insert ElementMap(D4.DE166, QC44.0, equivalent) + * insert ElementMap(D4.DE167, QC44.2, relatedto) + * insert ElementMap(D4.DE168, 1C62.1, equivalent) + +* group[+] + * source = $ICD11 + * target = Canonical(IMMZConcepts) + * insert ElementMap(QA41, D4.DE162, equivalent) + * insert ElementMap(4B4Z, D4.DE165, relatedto) + * insert ElementMap(QC44.0, D4.DE166, equivalent) + * insert ElementMap(QC44.2, D4.DE167, relatedto) + * insert ElementMap(1C62.1, D4.DE168, equivalent) + diff --git a/input/fsh/conceptmaps/IMMZConceptsToLOINC.fsh b/input/fsh/conceptmaps/IMMZConceptsToLOINC.fsh new file mode 100644 index 0000000000..be28a7c67d --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToLOINC.fsh @@ -0,0 +1,59 @@ +Instance: IMMZConceptsToLOINC +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ Concepts to LOINC" +Usage: #definition + +* name = "IMMZConceptsToLOINC" +* title = "ConceptMap to and from LOINC" +* status = #active +* experimental = false + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $LNC + * insert ElementMap(C.DE2, 54125-0, equivalent) + * insert ElementMap(C.DE3, 45392-8, relatedto) + * insert ElementMap(C.DE4, 45394-4, relatedto) + * insert ElementMap(C.DE5, 46098-0, equivalent) + * insert ElementMap(C.DE10, 21112-8, equivalent) + * insert ElementMap(C.DE13, 63900-5, wider) + * insert ElementMap(C.DE18, 42077-8, equivalent) + * insert ElementMap(C.DE19, 56799-0, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" + + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $LNC + * insert ElementMap(D1.DE11, 45683-0, equivalent) + * insert ElementMap(D1.DE10, 55277-8, equivalent) + * insert ElementMap(D1.DE92, 96381-9, relatedto) + * insert ElementMap(D1.DE15, 76517-2, equivalent) + * insert ElementMap(D1.DE19, 39236-5, equivalent) + * insert ElementMap(D1.DE20, 30952-6, equivalent) + +* group[+] + * source = $LNC + * target = Canonical(IMMZConcepts) + * insert ElementMap(45683-0, D1.DE11, equivalent) + * insert ElementMap(55277-8, D1.DE10, equivalent) + * insert ElementMap(96381-9, D1.DE92, relatedto) + * insert ElementMap(76517-2, D1.DE15, equivalent) + * insert ElementMap(39236-5, D1.DE19, equivalent) + * insert ElementMap(30952-6, D1.DE20, equivalent) + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $LNC + * insert ElementMap(D4.DE162, 82810-3, equivalent) + * insert ElementMap(D4.DE165, 96381-9, relatedto) + * insert ElementMap(D4.DE168, 47244-9, wider) + +* group[+] + * source = $LNC + * target = Canonical(IMMZConcepts) + * insert ElementMap(82810-3, D4.DE162, equivalent) + * insert ElementMap(96381-9, D4.DE165, relatedto) + * insert ElementMap(47244-9, D4.DE168, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" + diff --git a/input/fsh/conceptmaps/IMMZConceptsToSNOMED.fsh b/input/fsh/conceptmaps/IMMZConceptsToSNOMED.fsh new file mode 100644 index 0000000000..62e12a3c10 --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToSNOMED.fsh @@ -0,0 +1,76 @@ +Instance: IMMZConceptsToSNOMED +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ Concepts to SNOMED" +Usage: #definition + +* name = "IMMZConceptsToSNOMED" +* title = "ConceptMap to and from SNOMED" +* status = #active +* experimental = false + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $SCT + * insert ElementMap(C.DE2, 371484003, equivalent) + * insert ElementMap(C.DE3, 184095009, relatedto) + * insert ElementMap(C.DE4, 184096005, relatedto) + * insert ElementMap(C.DE5, 184100006, equivalent) + * insert ElementMap(C.DE6, 248153007, equivalent) + * insert ElementMap(C.DE7, 248152002, equivalent) + * insert ElementMap(C.DE8, 772004004, relatedto) + * insert ElementMap(C.DE9, 15867007, equivalent) + * insert ElementMap(C.DE10, 184099003, equivalent) + * insert ElementMap(C.DE14, 184140000, wider) + * insert ElementMap(C.DE15, 184140000, wider) + * insert ElementMap(C.DE18, 184103008, equivalent) + * insert ElementMap(C.DE19, 184097001, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" + +* group[+] + * source = $SCT + * target = Canonical(IMMZConcepts) + * insert ElementMap(248153007, C.DE6, equivalent) + * insert ElementMap(248152002, C.DE7, equivalent) + * insert ElementMap(772004004, C.DE8, relatedto) + * insert ElementMap(15867007, C.DE9, equivalent) + + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $SCT + * insert ElementMap(D1.DE12, 165815009, equivalent) + * insert ElementMap(D1.DE11, 165816005, equivalent) + * insert ElementMap(D1.DE13, 261665006, wider) + * insert ElementMap(D1.DE10, 278977008, equivalent) + * insert ElementMap(D1.DE15, 395507008, equivalent) + + +* group[+] + * source = $SCT + * target = Canonical(IMMZConcepts) + * insert ElementMap(165815009, D1.DE12, equivalent) + * insert ElementMap(165816005, D1.DE11, equivalent) + * insert ElementMap(261665006, D1.DE13, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" + * insert ElementMap(278977008, D1.DE10, equivalent) + * insert ElementMap(395507008, D1.DE15, equivalent) + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $SCT + * insert ElementMap(D4.DE162, 77386006, equivalent) + * insert ElementMap(D4.DE165, 370388006, equivalent) + * insert ElementMap(D4.DE166, 10839421000119100, equivalent) + * insert ElementMap(D4.DE167, 419076005, wider) + * insert ElementMap(D4.DE168, 86406008, equivalent) + + +* group[+] + * source = $SCT + * target = Canonical(IMMZConcepts) + * insert ElementMap(77386006, D4.DE162, equivalent) + * insert ElementMap(370388006, D4.DE165, equivalent) + * insert ElementMap(10839421000119100, D4.DE166, equivalent) + * insert ElementMap(419076005, D4.DE167, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" + * insert ElementMap(86406008, D4.DE168, equivalent) diff --git a/input/fsh/examples/IMMZ.C.QuestionnaireResponse.1.fsh b/input/fsh/examples/IMMZ.C.QuestionnaireResponse.1.fsh index b48bd937d0..91a1e16f65 100644 --- a/input/fsh/examples/IMMZ.C.QuestionnaireResponse.1.fsh +++ b/input/fsh/examples/IMMZ.C.QuestionnaireResponse.1.fsh @@ -27,7 +27,7 @@ Usage: #example * item[+] * linkId = "sex" * text = "Sex" - * answer.valueCoding = IMMZ.C#DE7 "Female" + * answer.valueCoding = IMMZConcepts#C.DE7 "Female" * item[+] * linkId = "birthDate" * text = "Birth Date" diff --git a/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.1.fsh b/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.1.fsh index d2408bfc32..b9b0a4273d 100644 --- a/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.1.fsh +++ b/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.1.fsh @@ -16,7 +16,7 @@ Usage: #example * answer.valueBoolean = false * item[+] * linkId = "hivStatus" - * answer.valueCoding = IMMZ.D1#DE12 + * answer.valueCoding = IMMZConcepts#D1.DE12 * item[+] * linkId = "pretermBirth" * answer.valueBoolean = false diff --git a/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.2.fsh b/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.2.fsh index 3a54ea27cf..300da43f26 100644 --- a/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.2.fsh +++ b/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.2.fsh @@ -16,7 +16,7 @@ Usage: #example * answer.valueBoolean = false * item[+] * linkId = "hivStatus" - * answer.valueCoding = IMMZ.D1#DE12 + * answer.valueCoding = IMMZConcepts#D1.DE12 * item[+] * linkId = "pretermBirth" * answer.valueBoolean = false diff --git a/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.3.fsh b/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.3.fsh index c7daecf826..a43c0afaaa 100644 --- a/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.3.fsh +++ b/input/fsh/examples/IMMZ.D1.QuestionnaireResponse.3.fsh @@ -19,7 +19,7 @@ Usage: #example * answer.valueDate = "2023-01-01" * item[+] * linkId = "hivStatus" - * answer.valueCoding = IMMZ.D1#DE11 + * answer.valueCoding = IMMZConcepts#D1.DE11 * item[+] * linkId = "pretermBirth" * answer.valueBoolean = false diff --git a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.1.fsh b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.1.fsh index 913642427d..25da9231b2 100644 --- a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.1.fsh +++ b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.1.fsh @@ -11,4 +11,4 @@ Usage: #example * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE162 "Currently pregnant" \ No newline at end of file + * answer.valueCoding = IMMZConcepts#D4.DE162 "Currently pregnant" \ No newline at end of file diff --git a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.2.fsh b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.2.fsh index 178e2dfdd6..e243205e02 100644 --- a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.2.fsh +++ b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.2.fsh @@ -11,4 +11,4 @@ Usage: #example * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE165 "Severely immunosuppressed" \ No newline at end of file + * answer.valueCoding = IMMZConcepts#D4.DE165 "Severely immunosuppressed" \ No newline at end of file diff --git a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.3.fsh b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.3.fsh index fa5164721b..e84e401857 100644 --- a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.3.fsh +++ b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.3.fsh @@ -12,4 +12,4 @@ Usage: #example * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE167 "Severe allergic reactions" \ No newline at end of file + * answer.valueCoding = IMMZConcepts#D4.DE167 "Severe allergic reactions" \ No newline at end of file diff --git a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.4.fsh b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.4.fsh index ecaa75a5d4..b9d9c66523 100644 --- a/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.4.fsh +++ b/input/fsh/examples/IMMZ.D4.QuestionnaireResponse.4.fsh @@ -10,16 +10,16 @@ Usage: #example * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE162 "Currently pregnant" + * answer.valueCoding = IMMZConcepts#D4.DE162 "Currently pregnant" * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE167 "Severe allergic reactions" + * answer.valueCoding = IMMZConcepts#D4.DE167 "Severe allergic reactions" * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE168 "Symptomatic HIV infection" + * answer.valueCoding = IMMZConcepts#D4.DE168 "Symptomatic HIV infection" * item[+] * linkId = "contraindications" * text = "Contraindications" - * answer.valueCoding = IMMZ.D4#DE165 "Severely immunosuppressed" + * answer.valueCoding = IMMZConcepts#D4.DE165 "Severely immunosuppressed" diff --git a/input/fsh/libraries/FHIRCommon.fsh b/input/fsh/libraries/FHIRCommon.fsh index a22dd16e6c..9b424c3e92 100644 --- a/input/fsh/libraries/FHIRCommon.fsh +++ b/input/fsh/libraries/FHIRCommon.fsh @@ -3,11 +3,11 @@ InstanceOf: Library Title: "FHIRCommon" Description: "This library defines terminologies and functions commonly used in FHIR-based CQL artifacts" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/FHIRCommon" +* url = "http://fhir.org/guides/cqf/common/Library/FHIRCommon" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" +* version = "4.0.1" * name = "FHIRCommon" * status = #draft * experimental = false diff --git a/input/fsh/libraries/FHIRHelpers.fsh b/input/fsh/libraries/FHIRHelpers.fsh index 4d575bb360..5d20086fd4 100644 --- a/input/fsh/libraries/FHIRHelpers.fsh +++ b/input/fsh/libraries/FHIRHelpers.fsh @@ -3,11 +3,11 @@ InstanceOf: Library Title: "FHIRHelpers" Description: "This library defines functions to convert between FHIR data types and CQL system-defined types, as well as functions to support FHIRPath implementation. For more information, the FHIRHelpers wiki page: https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/FHIRHelpers" +* url = "http://fhir.org/guides/cqf/common/Library/FHIRHelpers" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" +* version = "4.0.1" * name = "FHIRHelpers" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZCommon.fsh b/input/fsh/libraries/IMMZCommon.fsh index a0ca2ec768..6bc153dbfe 100644 --- a/input/fsh/libraries/IMMZCommon.fsh +++ b/input/fsh/libraries/IMMZCommon.fsh @@ -7,7 +7,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZCommon" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZConcepts.fsh b/input/fsh/libraries/IMMZConcepts.fsh index 3e375bbd1f..558329e48f 100644 --- a/input/fsh/libraries/IMMZConcepts.fsh +++ b/input/fsh/libraries/IMMZConcepts.fsh @@ -7,7 +7,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZConcepts" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZConfig.fsh b/input/fsh/libraries/IMMZConfig.fsh index 69f88ee1cf..21ecf0581a 100644 --- a/input/fsh/libraries/IMMZConfig.fsh +++ b/input/fsh/libraries/IMMZConfig.fsh @@ -7,7 +7,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZConfig" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh b/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh index 6f387a074d..1fed1519ce 100644 --- a/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh +++ b/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh @@ -7,7 +7,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesLogic" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZDT08.fsh b/input/fsh/libraries/IMMZDT08.fsh index e817508c26..7c2dcbf9ab 100644 --- a/input/fsh/libraries/IMMZDT08.fsh +++ b/input/fsh/libraries/IMMZDT08.fsh @@ -1,13 +1,12 @@ Instance: IMMZDT08 InstanceOf: Library Title: "IMMZDT08" -Description: "This library defines decision support logic for the IMMZ.DT.08 decision table in the Immunization CPG" +Description: "This library defines population criteria logic for the IMMZ.DT.08 indicator in the Immunization CPG" Usage: #definition * url = "http://smart.who.int/immunizations-measles/Library/IMMZDT08" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZDT08" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZINDMeasles.fsh b/input/fsh/libraries/IMMZDT12.fsh similarity index 57% rename from input/fsh/libraries/IMMZINDMeasles.fsh rename to input/fsh/libraries/IMMZDT12.fsh index cbbd9c577f..c97f928f58 100644 --- a/input/fsh/libraries/IMMZINDMeasles.fsh +++ b/input/fsh/libraries/IMMZDT12.fsh @@ -1,16 +1,15 @@ -Instance: IMMZINDMeasles +Instance: IMMZDT12 InstanceOf: Library -Title: "IMMZINDMeasles" -Description: "This library defines population criteria for the Measles indicator in the Immunization CPG" +Title: "IMMZDT12" +Description: "This library defines population criteria logic for the IMMZ.DT.12 indicator in the Immunization CPG" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZINDMeasles" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZDT12" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" -* name = "IMMZINDMeasles" +* name = "IMMZDT12" * status = #draft * experimental = false * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library -* content.id = "ig-loader-IMMZINDMeasles.cql" \ No newline at end of file +* content.id = "ig-loader-IMMZDT12.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZIndicatorCommon.fsh b/input/fsh/libraries/IMMZDT13.fsh similarity index 55% rename from input/fsh/libraries/IMMZIndicatorCommon.fsh rename to input/fsh/libraries/IMMZDT13.fsh index e8331cab51..95d49507ea 100644 --- a/input/fsh/libraries/IMMZIndicatorCommon.fsh +++ b/input/fsh/libraries/IMMZDT13.fsh @@ -1,16 +1,15 @@ -Instance: IMMZIndicatorCommon +Instance: IMMZDT13 InstanceOf: Library -Title: "IMMZIndicatorCommon" -Description: "This library defines common terminologies and functions used throughout the Immunization CPG" +Title: "IMMZDT13" +Description: "This library defines population criteria logic for the IMMZ.DT.13 indicator in the Immunization CPG" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZIndicatorCommon" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZDT13" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" -* name = "IMMZIndicatorCommon" +* name = "IMMZDT13" * status = #draft * experimental = false * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library -* content.id = "ig-loader-IMMZIndicatorCommon.cql" \ No newline at end of file +* content.id = "ig-loader-IMMZDT13.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZCommonIzDataElements.fsh b/input/fsh/libraries/IMMZElements.fsh similarity index 53% rename from input/fsh/libraries/IMMZCommonIzDataElements.fsh rename to input/fsh/libraries/IMMZElements.fsh index ec75b0fee8..d5b3ced290 100644 --- a/input/fsh/libraries/IMMZCommonIzDataElements.fsh +++ b/input/fsh/libraries/IMMZElements.fsh @@ -1,16 +1,15 @@ -Instance: IMMZCommonIzDataElements +Instance: IMMZElements InstanceOf: Library -Title: "IMMZCommonIzDataElements" -Description: "This library defines common terminologies and functions used throughout the Immunization CPG" +Title: "IMMZElements" +Description: "This library defines context-independent elements used throughout the Immunization CPG" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZCommonIzDataElements" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZElements" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" -* name = "IMMZCommonIzDataElements" +* name = "IMMZElements" * status = #draft * experimental = false * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library -* content.id = "ig-loader-IMMZCommonIzDataElements.cql" \ No newline at end of file +* content.id = "ig-loader-IMMZElements.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZEncounterElements.fsh b/input/fsh/libraries/IMMZEncounterElements.fsh new file mode 100644 index 0000000000..f27b2915eb --- /dev/null +++ b/input/fsh/libraries/IMMZEncounterElements.fsh @@ -0,0 +1,15 @@ +Instance: IMMZEncounterElements +InstanceOf: Library +Title: "IMMZEncounterElements" +Description: "This library defines encounter-based elements used throughout the Immunization CPG" +Usage: #definition +* url = "http://smart.who.int/immunizations-measles/Library/IMMZEncounterElements" +* extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * valueCode = #computable +* name = "IMMZEncounterElements" +* status = #draft +* experimental = false +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZEncounterElements.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZIND08.fsh b/input/fsh/libraries/IMMZIND08.fsh index 543e3378b9..7a3705f4d3 100644 --- a/input/fsh/libraries/IMMZIND08.fsh +++ b/input/fsh/libraries/IMMZIND08.fsh @@ -7,7 +7,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZIND08" * status = #draft * experimental = false diff --git a/input/fsh/libraries/IMMZIndicatorElements.fsh b/input/fsh/libraries/IMMZIndicatorElements.fsh new file mode 100644 index 0000000000..4644126882 --- /dev/null +++ b/input/fsh/libraries/IMMZIndicatorElements.fsh @@ -0,0 +1,15 @@ +Instance: IMMZIndicatorElements +InstanceOf: Library +Title: "IMMZIndicatorElements" +Description: "This library defines indicator-based elements and terminologies used throughout the Immunization CPG indicators" +Usage: #definition +* url = "http://smart.who.int/immunizations-measles/Library/IMMZIndicatorElements" +* extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * valueCode = #computable +* name = "IMMZIndicatorElements" +* status = #draft +* experimental = false +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZIndicatorElements.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZVaccineLibrary.fsh b/input/fsh/libraries/IMMZVaccineLibrary.fsh index a9f19cba72..106e799293 100644 --- a/input/fsh/libraries/IMMZVaccineLibrary.fsh +++ b/input/fsh/libraries/IMMZVaccineLibrary.fsh @@ -7,7 +7,6 @@ Usage: #definition * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZVaccineLibrary" * status = #draft * experimental = false diff --git a/input/fsh/libraries/WHOCommon.fsh b/input/fsh/libraries/WHOCommon.fsh index b017031ff7..e1fe714fde 100644 --- a/input/fsh/libraries/WHOCommon.fsh +++ b/input/fsh/libraries/WHOCommon.fsh @@ -3,7 +3,7 @@ InstanceOf: Library Title: "WHOCommon" Description: "This library defines common terminologies and functions used throughout WHO SMART Guidelines content" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/WHOCommon" +* url = "http://smart.who.int/base-clinical/Library/WHOCommon" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable diff --git a/input/fsh/libraries/WHOConcepts.fsh b/input/fsh/libraries/WHOConcepts.fsh index 6fae47188a..5a55587b08 100644 --- a/input/fsh/libraries/WHOConcepts.fsh +++ b/input/fsh/libraries/WHOConcepts.fsh @@ -3,7 +3,7 @@ InstanceOf: Library Title: "WHOConcepts" Description: "This library defines common concepts used throughout WHO SMART Guidelines content" Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/WHOConcepts" +* url = "http://smart.who.int/base-clinical/Library/WHOConcepts" * extension[+] * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" * valueCode = #computable diff --git a/input/fsh/libraries/WHOElements.fsh b/input/fsh/libraries/WHOElements.fsh new file mode 100644 index 0000000000..d0cb893a6a --- /dev/null +++ b/input/fsh/libraries/WHOElements.fsh @@ -0,0 +1,16 @@ +Instance: WHOElements +InstanceOf: Library +Title: "WHOElements" +Description: "This library defines context-independent elements used throughout WHO SMART Guidelines content" +Usage: #definition +* url = "http://smart.who.int/base-clinical/Library/WHOElements" +* extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * valueCode = #computable +* version = "0.1.0" +* name = "WHOElements" +* status = #draft +* experimental = false +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-WHOElements.cql" \ No newline at end of file diff --git a/input/fsh/libraries/WHOEncounterElements.fsh b/input/fsh/libraries/WHOEncounterElements.fsh new file mode 100644 index 0000000000..8af9d51d93 --- /dev/null +++ b/input/fsh/libraries/WHOEncounterElements.fsh @@ -0,0 +1,16 @@ +Instance: WHOEncounterElements +InstanceOf: Library +Title: "WHOEncounterElements" +Description: "This library defines encounter-based elements used throughout WHO SMART Guidelines content" +Usage: #definition +* url = "http://smart.who.int/base-clinical/Library/WHOEncounterElements" +* extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * valueCode = #computable +* version = "0.1.0" +* name = "WHOEncounterElements" +* status = #draft +* experimental = false +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-WHOEncounterElements.cql" \ No newline at end of file diff --git a/input/fsh/measures/IMMZIND05.fsh b/input/fsh/measures/IMMZIND05.fsh deleted file mode 100644 index 22f463ee91..0000000000 --- a/input/fsh/measures/IMMZIND05.fsh +++ /dev/null @@ -1,41 +0,0 @@ -Instance: IMMZIND05 -InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm -Title: "IMMZIND05" - -* description = "IMMZ.IND.05 Measles indicator for first dose." -* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND05" -* version = "0.1.0" -* status = #draft -* experimental = false -* date = "2023-10-05" -* name = "IMMZIND05" -* publisher = "World Health Organization (WHO)" -* library = "http://smart.who.int/immunizations-measles/Library/IMMZINDMeasles" -* scoring = $measure-scoring#continuous-variable "Continuous Variable" -* group[+] - * population[initialPopulation] - * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean - * id = "IMMZ.IND.05.IP" - * description = "Initial Population" - * code = $measure-population#initial-population "Initial Population" - * criteria.language = #text/cql - * criteria.expression = "Initial Population 05" - * population[measurePopulation] - * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean - * id = "IMMZ.IND.05.MP" - * description = "Measure Population" - * code = $measure-population#measure-population "Measure Population" - * criteria.language = #text/cql - * criteria.expression = "Measure Population 05" - * population[measureObservation] - * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "measure-population" - * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod].valueCode = #count - * id = "IMMZ.IND.05.MO" - * description = "Measure Observation" - * code = $measure-population#measure-observation - * criteria.language = #text/cql - * criteria.expression = "Measure Observation 05" - * stratifier[+] - * id = "IMMZ.IND.05.S" - * criteria.language = #text/cql - * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/IMMZIND40.fsh b/input/fsh/measures/IMMZIND08.fsh similarity index 67% rename from input/fsh/measures/IMMZIND40.fsh rename to input/fsh/measures/IMMZIND08.fsh index c8cd700b5e..2f3aa3b4a0 100644 --- a/input/fsh/measures/IMMZIND40.fsh +++ b/input/fsh/measures/IMMZIND08.fsh @@ -1,41 +1,40 @@ -Instance: IMMZIND40 +Instance: IMMZIND08 InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm -Title: "IMMZIND40" +Title: "IMMZIND08" +* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean -* description = "IMMZ.IND.40 Measles indicator for second dose." -* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND40" -* version = "0.1.0" +* description = "IMMZ.IND.08 Immunization coverage for Measles containing vaccine (Estimated Denominator)" +* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND08" * status = #draft * experimental = false * date = "2023-10-05" -* name = "IMMZIND40" +* name = "IMMZIND08" * publisher = "World Health Organization (WHO)" * library = "http://smart.who.int/immunizations-measles/Library/IMMZINDMeasles" * scoring = $measure-scoring#continuous-variable "Continuous Variable" * group[+] * population[initialPopulation] - * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean - * id = "IMMZ.IND.40.IP" + * id = "IMMZ.IND.08.IP" * description = "Initial Population" * code = $measure-population#initial-population "Initial Population" - * criteria.language = #text/cql - * criteria.expression = "Initial Population 40" + * criteria.language = #text/cql-indicator + * criteria.expression = "Initial Population" * population[measurePopulation] * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean - * id = "IMMZ.IND.40.MP" + * id = "IMMZ.IND.08.MP" * description = "Measure Population" * code = $measure-population#measure-population "Measure Population" - * criteria.language = #text/cql - * criteria.expression = "Measure Population 40" + * criteria.language = #text/cql-identifier + * criteria.expression = "Measure Population" * population[measureObservation] * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "measure-population" * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod].valueCode = #count - * id = "IMMZ.IND.40.MO" + * id = "IMMZ.IND.08.MO" * description = "Measure Observation" * code = $measure-population#measure-observation * criteria.language = #text/cql - * criteria.expression = "Measure Observation 40" + * criteria.expression = "Measure Observation" * stratifier[+] - * id = "IMMZ.IND.40.S" + * id = "IMMZ.IND.08.S" * criteria.language = #text/cql * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/IMMZIND12.fsh b/input/fsh/measures/IMMZIND12.fsh new file mode 100644 index 0000000000..5e74b2d178 --- /dev/null +++ b/input/fsh/measures/IMMZIND12.fsh @@ -0,0 +1,37 @@ +Instance: IMMZIND12 +InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm +Title: "IMMZIND12" + +* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean +* description = "IMMZ.IND.12 Measles indicator for first dose." +* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND12" +* status = #draft +* experimental = false +* date = "2023-10-12" +* name = "IMMZIND12" +* publisher = "World Health Organization (WHO)" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZIND12" +* scoring = $measure-scoring#proportion "Proportion" +* group[+] + * population[initialPopulation] + * id = "IMMZ.IND.12.IP" + * description = "Initial Population" + * code = $measure-population#initial-population "Initial Population" + * criteria.language = #text/cql-identifier + * criteria.expression = "Initial Population" + * population[denominator] + * id = "IMMZ.IND.12.DEN" + * description = "Denominator" + * code = $measure-population#denominator "Denominator" + * criteria.language = #text/cql-identifier + * criteria.expression = "Denominator" + * population[numerator] + * id = "IMMZ.IND.12.NUM" + * description = "Numerator" + * code = $measure-population#numerator "Numerator" + * criteria.language = #text/cql-identifier + * criteria.expression = "Numerator" + * stratifier[+] + * id = "IMMZ.IND.12.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/measures/IMMZIND13.fsh b/input/fsh/measures/IMMZIND13.fsh new file mode 100644 index 0000000000..126c7c56fb --- /dev/null +++ b/input/fsh/measures/IMMZIND13.fsh @@ -0,0 +1,37 @@ +Instance: IMMZIND13 +InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm +Title: "IMMZIND13" + +* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean +* description = "IMMZ.IND.13 Measles indicator for second dose." +* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND13" +* status = #draft +* experimental = false +* date = "2023-10-13" +* name = "IMMZIND13" +* publisher = "World Health Organization (WHO)" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZIND13" +* scoring = $measure-scoring#proportion "Proportion" +* group[+] + * population[initialPopulation] + * id = "IMMZ.IND.13.IP" + * description = "Initial Population" + * code = $measure-population#initial-population "Initial Population" + * criteria.language = #text/cql-identifier + * criteria.expression = "Initial Population" + * population[denominator] + * id = "IMMZ.IND.13.DEN" + * description = "Denominator" + * code = $measure-population#denominator "Denominator" + * criteria.language = #text/cql-identifier + * criteria.expression = "Denominator" + * population[numerator] + * id = "IMMZ.IND.13.NUM" + * description = "Numerator" + * code = $measure-population#numerator "Numerator" + * criteria.language = #text/cql-identifier + * criteria.expression = "Numerator" + * stratifier[+] + * id = "IMMZ.IND.13.S" + * criteria.language = #text/cql-identifier + * criteria.expression = "Stratification" \ No newline at end of file diff --git a/input/fsh/models/IMMZCRegisterClient.fsh b/input/fsh/models/IMMZCRegisterClient.fsh index 8f46b4711b..32254f0437 100644 --- a/input/fsh/models/IMMZCRegisterClient.fsh +++ b/input/fsh/models/IMMZCRegisterClient.fsh @@ -3,50 +3,47 @@ Description: "Only letters and special characters (period, dash) allowed." Expression: "$this.matches('[A-Za-z-.]*')" Severity: #error - -Logical: IMMZCRegisterClient -Title: "IMMZ.C Register Client" +Logical: IMMZCRegisterClient +Title: "IMMZ.C Register Client" Description: "Data elements for the IMMZ.C Register Client Data Dictionary." * ^extension[http://hl7.org/fhir/tools/StructureDefinition/logical-target].valueBoolean = true -* ^name = "IMMZCRegisterClient" * ^status = #active * uniqueId 1..1 SU string "Unique identifier" "Unique identifier for the client, according to the policies applicable to each country. There can be more than one unique identifier used to link records (e.g. national ID, health ID, immunization information system ID, medical record ID)." - * ^code[+] = IMMZ.C#DE1 -// * ^code[WHOCommon] = IMMZ.C#DE1 + * ^code[+] = IMMZConcepts#C.DE1 * name 1..1 string "Name" "The full name of the client" * obeys IMMZ-C-name-1 - * ^code[+] = IMMZ.C#DE2 + * ^code[+] = IMMZConcepts#C.DE2 // * firstName 0..1 string "First name" "Client's first name or given name" // * obeys IMMZ-C-name-1 -// * ^code[+] = IMMZ.C#DE3 +// * ^code[+] = IMMZConcepts#C.DE3 // * familyName 0..1 string "Last name" "Client's family name or last name" // * obeys IMMZ-C-name-1 -// * ^code[+] = IMMZ.C#DE4 +// * ^code[+] = IMMZConcepts#C.DE4 * sex 1..1 code "Sex" "Documentation of a specific instance of sex information for the client" - * ^code[+] = IMMZ.C#DE5 + * ^code[+] = IMMZConcepts#C.DE5 * sex from IMMZ.C.DE5 (required) * birthDate 0..1 date "Date of birth" "Client's date of birth (DOB) if known; if unknown, use assigned DOB for administrative purposes" - * ^code[+] = IMMZ.C#DE10 + * ^code[+] = IMMZConcepts#C.DE10 * caregiver 0..* BackboneElement "Caregiver" "The client's caregiver (person) which could be next of kin (e.g. partner, husband, mother, sibling, etc.)" - * ^code[+] = IMMZ.C#DE14 + * ^code[+] = IMMZConcepts#C.DE14 * name 1..1 string "Caregiver's full name" "The full name of the client's caregiver" * obeys IMMZ-C-name-1 - * ^code[+] = IMMZ.C#DE15 + * ^code[+] = IMMZConcepts#C.DE15 * firstName 0..1 string "Caregiver's first name" "First or given name of the client's caregiver" * obeys IMMZ-C-name-1 - * ^code[+] = IMMZ.C#DE16 + * ^code[+] = IMMZConcepts#C.DE16 * familyName 0..1 string "Caregiver's family name" "Family name or last name of the client's caregiver" * obeys IMMZ-C-name-1 - * ^code[+] = IMMZ.C#DE17 + * ^code[+] = IMMZConcepts#C.DE17 * phone 1..1 string "Contact phone number" "Client's phone number" - * ^code[+] = IMMZ.C#DE18 + * ^code[+] = IMMZConcepts#C.DE18 * administrativeArea 0..1 CodeableConcept "Administrative area" "The name of the city/municipality/town/village of where the client lives" - * ^code[+] = IMMZ.C#DE19 + * ^code[+] = IMMZConcepts#C.DE19 * healthWorker 1..1 boolean "Active health worker" "Is the client an active and participating health worker. This data element is used mainly for reporting and indicators purposes." - * ^code[+] = IMMZ.C#DE20 + * ^code[+] = IMMZConcepts#C.DE20 - +// TODO: Question whether this level of "skeleton" mapping is SHALL/SHOULD/MAY? // Mapping: IMMZ-C-to-Patient // Source: IMMZCRegisterClient // Target: "Patient" diff --git a/input/fsh/models/IMMZD1clienthistorymeasles.fsh b/input/fsh/models/IMMZD1clienthistorymeasles.fsh index c3367d793e..019dd15aee 100644 --- a/input/fsh/models/IMMZD1clienthistorymeasles.fsh +++ b/input/fsh/models/IMMZD1clienthistorymeasles.fsh @@ -1,28 +1,26 @@ -Logical: IMMZD1ClientHistoryMeasles -Title: "IMMZ.D1 Capture Client History for Measles" -Description: "Data elements for the IMMZ.D1 Capture Client History Data Dictionary for Measles." - -* ^name = "IMMZ_D1_Client_History_Measles" +Logical: IMMZD1ClientHistoryMeasles +Title: "IMMZ.D1 Capture Client History for Measles" +Description: "Data elements for the IMMZ.D1 Capture Client History Data Dictionary for Measles." * patient 1..1 Reference "Patient" "The patient who is being checked for contraindications." * dose0 0..1 boolean "Dose 0 administered" "Indicates if the client has received a birth dose and/or supplementary dose" - * ^code[+] = IMMZ.D1#DE80 + * ^code[+] = IMMZConcepts#D1.DE80 * completedPrimarySeries 0..1 boolean "Completed the primary vaccination series" "Indicates if the client has completed the primary vaccination series of a product/antigen. If the client has not yet completed their primary series, it means they may be expected to receive more doses to complete their vaccination regimen for the respective product/antigen." - * ^code[+] = IMMZ.D1#DE8 + * ^code[+] = IMMZConcepts#D1.DE8 * dateSeriesCompleted 1..1 date "Date when primary vaccination series was completed" "The date when the client completed the primary vaccination series (per product/antigen)" - * ^code[+] = IMMZ.D1#DE81 + * ^code[+] = IMMZConcepts#D1.DE81 * hivStatus 0..1 Coding "HIV status" "The current human immunodeficiency virus (HIV) status of the client" - * ^code[+] = IMMZ.D1#DE10 + * ^code[+] = IMMZConcepts#D1.DE10 * hivStatus from IMMZ.D1.DE10 * pretermBirth 0..1 boolean "Preterm birth" "The infant was preterm, the mother gave birth to the infant when gestational age was less than 37 weeks" - * ^code[+] = IMMZ.D1#DE15 + * ^code[+] = IMMZConcepts#D1.DE15 * severelyImmunosuppressed 1..1 boolean "Severely immunosuppressed" "The client is known to be severely immunocompromised or immunosuppressed" - * ^code[+] = IMMZ.D1#DE92 + * ^code[+] = IMMZConcepts#D1.DE92 * artStartDate 1..1 date "ART start date" "The date on which the client started or restarted antiretroviral therapy (ART)" - * ^code[+] = IMMZ.D1#DE49 + * ^code[+] = IMMZConcepts#D1.DE49 * vaccineHistory 0..* BackboneElement "Vaccine History" "History of previous vaccine doses." * vaccineType 0..1 Coding "Vaccine type" "Vaccine type/category that was administered or was to be administered. Any vaccine code available in the IMMZ.Z Vaccine Library list of codes applies in this data element" - * ^code[+] = IMMZ.D1#DE19 + * ^code[+] = IMMZConcepts#D1.DE19 * vaccineType from IMMZ.Z.DE9 * vaccineDate 0..1 date "Date and time of vaccination" "Represents the visit/encounter date, which is the date and time when the vaccine was administered to the client" - * ^code[+] = IMMZ.D1#DE20 + * ^code[+] = IMMZConcepts#D1.DE20 diff --git a/input/fsh/models/IMMZD4CheckContraindicationsMeasles.fsh b/input/fsh/models/IMMZD4CheckContraindicationsMeasles.fsh index 12d7ee646b..cc0b89f2e0 100644 --- a/input/fsh/models/IMMZD4CheckContraindicationsMeasles.fsh +++ b/input/fsh/models/IMMZD4CheckContraindicationsMeasles.fsh @@ -1,11 +1,9 @@ -Logical: IMMZD4CheckContraindicationsMeasles -Title: "IMMZ.D4 Check Contraindications for Measles" -Description: "Data elements for the IMMZ.D4 Check Contraindications Data Dictionary for Measles." - -* ^name = "IMMZ_D4_Check_Contraindications_Measles" +Logical: IMMZD4CheckContraindicationsMeasles +Title: "IMMZ.D4 Check Contraindications for Measles" +Description: "Data elements for the IMMZ.D4 Check Contraindications Data Dictionary for Measles." * patient 1..1 Reference "Patient" "The patient who is being checked for contraindications." * contraindications 0..* Coding "Potential contraindications" "Specific situations or medical conditions in which it is advised or recommended to avoid or delay administering a particular vaccine." - * ^code[+] = IMMZ.D4#DE161 + * ^code[+] = IMMZConcepts#D4.DE161 * contraindications from IMMZ.D4.DE161 diff --git a/input/fsh/models/IMMZDUpdateVaccinationRecord.fsh b/input/fsh/models/IMMZDUpdateVaccinationRecord.fsh index f4681310b4..7e37fce056 100644 --- a/input/fsh/models/IMMZDUpdateVaccinationRecord.fsh +++ b/input/fsh/models/IMMZDUpdateVaccinationRecord.fsh @@ -1,123 +1,47 @@ - -Logical: IMMZDUpdateVaccinationRecord -Title: "IMMZ.D Update Vaccination Record" -Description: "Data elements for IMMZ.D Update Vaccination Record." +Logical: IMMZDUpdateVaccinationRecord +Title: "IMMZ.D Update Vaccination Record" +Description: "Data elements for IMMZ.D Update Vaccination Record." * ^extension[http://hl7.org/fhir/tools/StructureDefinition/logical-target].valueBoolean = true -* ^name = "IMMZDUpdateVaccinationRecord" * ^status = #active * immunizatioEventStatus 1..1 code "The current status of the individual immunization event" -// * ^code[+] = IMMZ.D#DE1 + * ^code[+] = IMMZConcepts#D.DE1 * immunizatioEventStatus from IMMZ.D1.DE1VS - * reasonNotDone 0..1 code "Reason vaccine was not administered" "The reason this immunization event was not performed" -// * ^code[+] = IMMZ.D#DE5 + * ^code[+] = IMMZConcepts#D.DE5 * reasonNotDone from IMMZ.D1.DE5VS - - * vaccineProduct 1..1 Coding "Vaccine brand" "The brand or trade name used to refer to the vaccine received" -// * ^code[+] = #IMMZ.D#DE18 + * ^code[+] = IMMZConcepts#D.DE18 * liveVaccine 0..1 boolean "Live attenuated vaccine" "Uses a living but weakened version of the virus or one that's very similar" -// * ^code[+] = #IMMZ.D#DE173 + * ^code[+] = IMMZConcepts#D.DE173 * vaccineType 0..1 Coding "Vaccine type" "Vaccine type/category that was administered or was to be administered. Any vaccine code available in the IMMZ.Z Vaccine Library list of codes applies in this data element" -// * ^code[+] = #IMMZ.D#DE19 + * ^code[+] = IMMZConcepts#D.DE19 * dateTime 1..1 dateTime "Date and time of vaccination" "Represents the visit/encounter date, which is the date and time when the vaccine was administered to the client" -// * ^code[+] = #IMMZ.D#DE20 + * ^code[+] = IMMZConcepts#D.DE20 * countryOfVaccination 1..1 Coding "Country of vaccination" "The service delivery country where the vaccine administration occurred" -// * ^code[+] = #IMMZ.D.DE21 + * ^code[+] = IMMZ.D.DE21 * countryOfVaccination from SGCountryValueSet * vaccinationLocation 0..1 string "Vaccination location" "The service delivery location where the vaccine administration occurred" -// * ^code[+] = #IMMZ.D.DE22 + * ^code[+] = IMMZConcepts#D.DE22 * vaccineManufacturer 0..1 string "Vaccine manufacturer" "The manufacturer of the vaccine product" -// * ^code[+] = #IMMZ.D.DE23 + * ^code[+] = IMMZConcepts#D.DE23 * vaccineLotNumber 0..1 string "Vaccine batch number" "Batch number or lot number of vaccine" -// * ^code[+] = #IMMZ.D.DE24 + * ^code[+] = IMMZConcepts#D.DE24 * vaccineMAH 0..1 string "Vaccine market authorization holder" "Name of the market authorization holder of the vaccine received. If market authorization holder is unknown, vaccine manufacturer is REQUIRED" -// * ^code[+] = #IMMZ.D.DE25 + * ^code[+] = IMMZConcepts#D.DE25 * vaccineExpirationDate 0..1 string "Expiration date" "The expiration date of the vaccine" -// * ^code[+] = #IMMZ.D.DE26 + * ^code[+] = IMMZConcepts#D.DE26 * vaccineDoseQuantity 0..1 string "Dose quantity" "The quantity of vaccine product that was administered" -// * ^code[+] = #IMMZ.D.DE34 + * ^code[+] = IMMZConcepts#D.DE34 * healthWorker 0..1 string "Health worker identifier" "The person, organization, or role of the entity that performed the act of giving the vaccine to the client. The implementing system can choose to populate this field using data from a health worker registry or health facility registry" -// * ^code[+] = #IMMZ.D.DE35 + * ^code[+] = IMMZConcepts#D.DE35 * vaccineDoseNumber 0..1 integer "Dose number" "Vaccine dose number including dose number within series" -// * ^code[+] = #IMMZ.D.DE124 + * ^code[+] = IMMZConcepts#D.DE124 * vaccineTotalDosesInSeries 0..1 integer "Total doses in series" "The recommended number of doses for immunity according to the national protocol" -// * ^code[+] = #IMMZ.D.DE125 - - - -CodeSystem: IMMZ.D1.DE1 -Title: "IMMZ.D1.DE1 CodeSystem for Immunization status" -Description: "CodeSystem for IMMZ.D1.DE1 Immunization status" - -* ^experimental = false -* ^caseSensitive = false -* ^name = "IMMZ_D1" - -* #IMMZ.D.DE2 "Completed" "The immunization event was successfully carried out as intended" -* #IMMZ.D.DE3 "Entered in error" "Immunization event record has been mistakenly created or entered into system. Recorded information is incorrect or should not have been documented, though it is possible that real-world decisions were based on it" -* #IMMZ.D.DE4 "Not Done" "Planned immunization event was not carried out for some reason" - - -ValueSet: IMMZ.D1.DE1VS -Title: "IMMZ.D1.DE1 CodeSystem for Immunization status" -Description: "CodeSystem for IMMZ.D1.DE1 Immunization status" -* ^experimental = false -* ^name = "IMMZD1DE1VS" - -* IMMZ.D1.DE1#IMMZ.D.DE2 -* IMMZ.D1.DE1#IMMZ.D.DE3 -* IMMZ.D1.DE1#IMMZ.D.DE4 - - - - - -CodeSystem: IMMZ.D1.DE5 -Title: "IMMZ.D1.DE5 CodeSystem for Reason Not Done" -Description: "CodeSystem for IMMZ.D1.DE5 Reason Not Done" - -* ^experimental = false -* ^caseSensitive = false -* ^name = "IMMZ_D1" - -* #IMMZ.D.DE6 "Immunity Testing has shown that the client already has immunity to the agent targeted by the immunization" -* #IMMZ.D.DE7 "Medical precaution" "The client currently has a medical condition for which the vaccine is contraindicated or for which precaution is warranted" -* #IMMZ.D.DE8 "Product out of stock" "There was no supply of the product on hand to perform the service" -* #IMMZ.D.DE9 "Client objection" "The client or their guardian objects to receiving the vaccine" -* #IMMZ.D.DE10 "Caregiver refusal" "The client's caregiver refused the vaccine" -* #IMMZ.D.DE11 "Unspecified reason" "The immunization event was not carried out for an unspecified reason" -* #IMMZ.D.DE12 "Client allergy to vaccine or component" "The immunization event was not carried out because of client allergy to vaccine or component" -* #IMMZ.D.DE13 "Immunocompromised" "The immunization event was not carried out because the client is immunocompromised" -* #IMMZ.D.DE14 "Chronic illness or condition" "The immunization event was not carried out due a chronic illness or condition of the client" -* #IMMZ.D.DE15 "Acute illness" "The immunization event was not carried out due to an acute illness present in the client" -* #IMMZ.D.DE16 "Had the disease" "The immunization event was not carried out due to the client having had the disease" -* #IMMZ.D.DE17 "Immunization not carried out for other reasons" "The immunization event was not carried out for other reasons" - - - -ValueSet: IMMZ.D1.DE5VS -Title: "IMMZ.D1.DE5 CodeSystem for Reason Not Done" -Description: "CodeSystem for IMMZ.D1.DE5 Reason Not Done" -* ^experimental = false -* ^name = "IMMZD1DE5VS" - -* IMMZ.D1.DE5#IMMZ.D.DE6 -* IMMZ.D1.DE5#IMMZ.D.DE7 -* IMMZ.D1.DE5#IMMZ.D.DE8 -* IMMZ.D1.DE5#IMMZ.D.DE9 -* IMMZ.D1.DE5#IMMZ.D.DE10 -* IMMZ.D1.DE5#IMMZ.D.DE11 -* IMMZ.D1.DE5#IMMZ.D.DE12 -* IMMZ.D1.DE5#IMMZ.D.DE13 -* IMMZ.D1.DE5#IMMZ.D.DE14 -* IMMZ.D1.DE5#IMMZ.D.DE15 -* IMMZ.D1.DE5#IMMZ.D.DE16 -* IMMZ.D1.DE5#IMMZ.D.DE17 + * ^code[+] = IMMZConcepts#D.DE125 diff --git a/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh b/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh index 5338da2b5a..26adcec649 100644 --- a/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh +++ b/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh @@ -1,9 +1,8 @@ -Instance: AdministerVaccine +Instance: QIMMZCAdministerVaccine InstanceOf: sdc-questionnaire-extr-smap Title: "Administer Vaccine" Description: "Questionnaire for registering the events leading to and including the administration of a vaccine" Usage: #definition -* version = "2023" * subjectType = #Patient * language = #en * title = "Administer Vaccine" diff --git a/input/fsh/questionnaires/QIMMZCRegisterClient.fsh b/input/fsh/questionnaires/QIMMZCRegisterClient.fsh index 16917acd80..15120bfdff 100644 --- a/input/fsh/questionnaires/QIMMZCRegisterClient.fsh +++ b/input/fsh/questionnaires/QIMMZCRegisterClient.fsh @@ -3,7 +3,6 @@ InstanceOf: sdc-questionnaire-extr-smap Title: "Client Registration Questionnaire" Description: "Immunization - Client Registration Questionnaire" Usage: #definition -* version = "2023" * status = #draft * subjectType = #Patient * language = #en @@ -19,28 +18,28 @@ Usage: #definition * insert Question(uniqueId, Unique identifier for the client,string,true,false) * item[=] - * code[+] = IMMZ.C#DE1 + * code[+] = IMMZConcepts#C.DE1 * insert Question(name, Client name,group,true,false) * item[=] - * code[+] = IMMZ.C#DE2 + * code[+] = IMMZConcepts#C.DE2 * code[+] = $LNC#54125-0 "Patient name" * code[+] = $SCT#371484003 "Patient name (observable entity)" * insert Question(fullName, Full name of the client,string,true,false) * item[=] - * code[+] = IMMZ.C#DE2 + * code[+] = IMMZConcepts#C.DE2 * code[+] = $LNC#54125-0 "Patient name" * code[+] = $SCT#371484003 "Patient name (observable entity)" * insert Question(firstName, First or given name,string,false,false) * item[=] - * code[+] = IMMZ.C#DE3 + * code[+] = IMMZConcepts#C.DE3 * code[+] = $LNC#45392-8 "First name" * code[+] = $SCT#184095009 "Patient forename (observable entity)" * insert Question(familyName, Family name,string,false,false) * item[=] - * code[+] = IMMZ.C#DE4 + * code[+] = IMMZConcepts#C.DE4 * code[+] = $LNC#45394-4 "Last name" * code[+] = $SCT#184096005 "Patient surname (observable entity)" @@ -48,49 +47,49 @@ Usage: #definition * insert Question(sex, Sex,choice,true,false) * item[=] * answerValueSet = "#IMMZ.C.DE5" - * code[+] = IMMZ.C#DE5 + * code[+] = IMMZConcepts#C.DE5 * code[+] = $LNC#46098-0 "Sex" * code[+] = $SCT#184100006 "Patient sex (observable entity)" * insert Question(birthDate, Birth Date,date,false,false) * item[=] - * code[+] = IMMZ.C#DE10 + * code[+] = IMMZConcepts#C.DE10 * code[+] = $LNC#21112-8 "Birth date" * code[+] = $SCT#184099003 "Date of birth (observable entity)" * insert Question(caregiver, Caregiver name,group,true,false) * item[=] - * code[+] = IMMZ.C#DE14 + * code[+] = IMMZConcepts#C.DE14 * code[+] = $SCT#184140000 "Caregiver details (observable entity)" * insert Question(fullName, Full name of the caregiver,string,true,false) * item[=] - * code[+] = IMMZ.C#DE15 + * code[+] = IMMZConcepts#C.DE15 * code[+] = $SCT#184140000 "Caregiver details (observable entity)" * insert Question(firstName, First or given name,string,false,false) * item[=] - * code[+] = IMMZ.C#DE16 + * code[+] = IMMZConcepts#C.DE16 * insert Question(familyName, Family name,string,false,false) * item[=] - * code[+] = IMMZ.C#DE17 + * code[+] = IMMZConcepts#C.DE17 * insert Question(phone, Client Phone number,string,true,false) * item[=] - * code[+] = IMMZ.C#DE18 + * code[+] = IMMZConcepts#C.DE18 * code[+] = $LNC#42077-8 "Patient Phone number" * code[+] = $SCT#184103008 "Patient telephone number (observable entity)" * insert Question(administrativeArea,Administrative area,choice,false,false) * item[=] - * code[+] = IMMZ.C#DE19 + * code[+] = IMMZConcepts#C.DE19 * code[+] = $LNC#56799-0 "Address" * code[+] = $SCT#184097001 "Patient address (observable entity)" * insert Question(healthWorker, Health Worker,boolean,true,false) * item[=] - * code[+] = IMMZ.C#DE20 + * code[+] = IMMZConcepts#C.DE20 diff --git a/input/fsh/questionnaires/QIMMZD1ClientHistoryMeasles.fsh b/input/fsh/questionnaires/QIMMZD1ClientHistoryMeasles.fsh index 9ad58c400e..2550abad29 100644 --- a/input/fsh/questionnaires/QIMMZD1ClientHistoryMeasles.fsh +++ b/input/fsh/questionnaires/QIMMZD1ClientHistoryMeasles.fsh @@ -3,8 +3,6 @@ InstanceOf: sdc-questionnaire-extr-smap Title: "Capture Client History Questionnaire" Description: "Immunization - Capture Client History Questionnaire" Usage: #definition -* id = "IMMZD1ClientHistoryMeasles" -* version = "2023" * status = #draft * subjectType = #Patient * language = #en @@ -17,41 +15,41 @@ Usage: #definition * insert Question(dose0, Indicates if the client has received a supplementary dose, boolean, false, false) * item[=] - * code[+] = IMMZ.D1#DE80 + * code[+] = IMMZConcepts#D1.DE80 * insert Question(completedPrimarySeries, Indicates if the client has completed the primary vaccination series of a product/antigen. If the client has not yet completed their primary series\, it means they may be expected to receive more doses to complete their vaccination regimen for the respective product/antigen., boolean, false, false) * item[=] - * code[+] = IMMZ.D1#DE8 + * code[+] = IMMZConcepts#D1.DE8 * insert Question(dateSeriesCompleted, The date when the client completed the primary vaccination series - per product/antigen, date, false, true) * item[=] - * code[+] = IMMZ.D1#DE81 + * code[+] = IMMZConcepts#D1.DE81 * insert Question(hivStatus, The current human immunodeficiency virus HIV status of the client, choice, false, false) * item[=] * answerValueSet = "#IMMZ.D1.DE10" - * code[+] = IMMZ.D1#DE10 + * code[+] = IMMZConcepts#D1.DE10 * code[+] = $LNC#55277-8 * code[+] = $SCT#278977008 * insert Question(pretermBirth, The infant was preterm; the mother gave birth to the infant when gestational age was less than 37 weeks, boolean, false, false) * item[=] - * code[+] = IMMZ.D1#DE15 + * code[+] = IMMZConcepts#D1.DE15 * code[+] = $ICD11#KA21.4 * code[+] = $LNC#76517-2 * code[+] = $SCT#395507008 * insert Question(severelyImmunosuppressed, The client is known to be severely immunosuppressed, boolean, false, true) * item[=] - * code[+] = IMMZ.D1#DE92 + * code[+] = IMMZConcepts#D1.DE92 * code[+] = $LNC#96381-9 * insert Question(artStartDate, The date on which the client started or restarted antiretroviral therapy ART, date, false, true) * item[=] - * code[+] = IMMZ.D1#DE49 + * code[+] = IMMZConcepts#D1.DE49 * insert Question(vaccineHistory, Vaccine History, group, false, true) * item[=] * insert Question(vaccineType, Vaccine type/category that was administered or was to be administered. Any vaccine code available in the IMMZ.Z Vaccine Library list of codes applies in this data element, choice, true, false) * item[=] * answerValueSet = "#IMMZ.Z.DE9" - * code[+] = IMMZ.D1#DE19 + * code[+] = IMMZConcepts#D1.DE19 * code[+] = $LNC#39236-5 * code[+] = $SCT#787859002 * insert Question(vaccineDate, Represents the visit/encounter date\, which is the date and time when the vaccine was administered to the client, date, true, false) * item[=] - * code[+] = IMMZ.D1#DE20 + * code[+] = IMMZConcepts#D1.DE20 * code[+] = $LNC#30952-6 \ No newline at end of file diff --git a/input/fsh/questionnaires/QIMMZD4CheckContraindicationsMeasles.fsh b/input/fsh/questionnaires/QIMMZD4CheckContraindicationsMeasles.fsh index df15b67369..d1d99f3a3a 100644 --- a/input/fsh/questionnaires/QIMMZD4CheckContraindicationsMeasles.fsh +++ b/input/fsh/questionnaires/QIMMZD4CheckContraindicationsMeasles.fsh @@ -3,7 +3,6 @@ InstanceOf: sdc-questionnaire-extr-smap Title: "Check Contraindications Questionnaire" Description: "Immunization - Check Contraindications Questionnaire" Usage: #definition -* version = "2023" * status = #draft * subjectType = #Patient * language = #en @@ -13,9 +12,8 @@ Usage: #definition * extension[+].url = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap" * extension[=].valueCanonical = "http://smart.who.int/immunizations-measles/StructureMap/IMMZD4QRToResources" - //* insert Question(contraindications, Specific situations or medical conditions in which it is advised or recommended to avoid or delay administering a particular vaccine, choice, false, true) * insert Question(contraindications, Contraindications, choice, false, true) * item[=] * answerValueSet = "#IMMZ.D4.DE161" - * code[+] = IMMZ.D4#DE161 + * code[+] = IMMZConcepts#D4.DE161 diff --git a/input/fsh/valuesets/IMMZ.C.DE5.fsh b/input/fsh/valuesets/IMMZ.C.DE5.fsh index 553934150f..76ba3cb87e 100644 --- a/input/fsh/valuesets/IMMZ.C.DE5.fsh +++ b/input/fsh/valuesets/IMMZ.C.DE5.fsh @@ -5,7 +5,7 @@ Description: "ValueSet for Sex for IMMZ.C.DE5." * ^status = #active * ^experimental = false * ^name = "IMMZ_C_DE5" -* IMMZ.C#DE6 "Male" -* IMMZ.C#DE7 "Female" -* IMMZ.C#DE8 "Biological sex not specified" -* IMMZ.C#DE9 "Intersex" +* IMMZConcepts#C.DE6 "Male" +* IMMZConcepts#C.DE7 "Female" +* IMMZConcepts#C.DE8 "Biological sex not specified" +* IMMZConcepts#C.DE9 "Intersex" diff --git a/input/fsh/valuesets/IMMZ.D1.DE10.fsh b/input/fsh/valuesets/IMMZ.D1.DE10.fsh index 26a905664c..fd77275ee0 100644 --- a/input/fsh/valuesets/IMMZ.D1.DE10.fsh +++ b/input/fsh/valuesets/IMMZ.D1.DE10.fsh @@ -6,6 +6,6 @@ Description: "ValueSet for HIV Status for IMMZ.D1.DE10." * ^name = "IMMZ_D1_DE10" * ^experimental = false -* IMMZ.D1#DE11 "HIV-positive" -* IMMZ.D1#DE12 "HIV-negative" -* IMMZ.D1#DE13 "Unknown" \ No newline at end of file +* IMMZConcepts#D1.DE11 "HIV-positive" +* IMMZConcepts#D1.DE12 "HIV-negative" +* IMMZConcepts#D1.DE13 "Unknown" \ No newline at end of file diff --git a/input/fsh/valuesets/IMMZ.D1.DE1VS.fsh b/input/fsh/valuesets/IMMZ.D1.DE1VS.fsh new file mode 100644 index 0000000000..78e312be17 --- /dev/null +++ b/input/fsh/valuesets/IMMZ.D1.DE1VS.fsh @@ -0,0 +1,9 @@ +ValueSet: IMMZ.D1.DE1VS +Title: "IMMZ.D1.DE1 CodeSystem for Immunization status" +Description: "CodeSystem for IMMZ.D1.DE1 Immunization status" +* ^experimental = false +* ^name = "IMMZD1DE1VS" + +* IMMZConcepts#D.DE2 +* IMMZConcepts#D.DE3 +* IMMZConcepts#D.DE4 diff --git a/input/fsh/valuesets/IMMZ.D1.DE5VS.fsh b/input/fsh/valuesets/IMMZ.D1.DE5VS.fsh new file mode 100644 index 0000000000..042d3a6813 --- /dev/null +++ b/input/fsh/valuesets/IMMZ.D1.DE5VS.fsh @@ -0,0 +1,18 @@ +ValueSet: IMMZ.D1.DE5VS +Title: "IMMZ.D1.DE5 values for Reason Not Done" +Description: "Values for IMMZ.D1.DE5 Reason Not Done" +* ^experimental = false +* ^name = "IMMZD1DE5VS" + +* IMMZConcepts#D.DE6 +* IMMZConcepts#D.DE7 +* IMMZConcepts#D.DE8 +* IMMZConcepts#D.DE9 +* IMMZConcepts#D.DE10 +* IMMZConcepts#D.DE11 +* IMMZConcepts#D.DE12 +* IMMZConcepts#D.DE13 +* IMMZConcepts#D.DE14 +* IMMZConcepts#D.DE15 +* IMMZConcepts#D.DE16 +* IMMZConcepts#D.DE17 diff --git a/input/fsh/valuesets/IMMZ.D4.DE161.fsh b/input/fsh/valuesets/IMMZ.D4.DE161.fsh index 1afd9a81b7..0217de87b6 100644 --- a/input/fsh/valuesets/IMMZ.D4.DE161.fsh +++ b/input/fsh/valuesets/IMMZ.D4.DE161.fsh @@ -7,10 +7,10 @@ Description: "ValueSet for Potential Contraindications for IMMZ.D4.DE161." * ^name = "IMMZ_D4_DE161" * ^experimental = false -* IMMZ.D4#DE162 "Currently pregnant" -* IMMZ.D4#DE165 "Severely immunosuppressed" -* IMMZ.D4#DE166 "History of anaphylactic reactions" -* IMMZ.D4#DE167 "Severe allergic reactions" -* IMMZ.D4#DE168 "Symptomatic HIV infection" +* IMMZConcepts#D4.DE162 "Currently pregnant" +* IMMZConcepts#D4.DE165 "Severely immunosuppressed" +* IMMZConcepts#D4.DE166 "History of anaphylactic reactions" +* IMMZConcepts#D4.DE167 "Severe allergic reactions" +* IMMZConcepts#D4.DE168 "Symptomatic HIV infection" diff --git a/sushi-config.yaml b/sushi-config.yaml index bab8756f6b..5ae058c72a 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -5,7 +5,7 @@ # ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ id: smart.who.int.immunizations-measles canonical: http://smart.who.int/immunizations-measles -name: SMART +name: ImmunizationsMeasles title: WHO SMART Guidelines - Measles Immunization description: WHO SMART Guidelines - Measles Immunization (Demonstration specification) status: draft # draft | active | retired | unknown