diff --git a/input/cql/FHIRCommon.cql b/_unused/FHIRCommon.cql similarity index 98% rename from input/cql/FHIRCommon.cql rename to _unused/FHIRCommon.cql index d4b4447f20..3ffec3ba1c 100644 --- a/input/cql/FHIRCommon.cql +++ b/_unused/FHIRCommon.cql @@ -1,281 +1,281 @@ -/* -@author: Bryn Rhodes -@description: Common terminologies and functions used in FHIR-based CQL artifacts -*/ -library FHIRCommon version '4.0.1' - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.0.1' - -codesystem "LOINC": 'http://loinc.org' -codesystem "SNOMEDCT": 'http://snomed.info/sct' -codesystem "RoleCode": 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' -codesystem "Diagnosis Role": 'http://terminology.hl7.org/CodeSystem/diagnosis-role' -codesystem "RequestIntent": 'http://terminology.hl7.org/CodeSystem/request-intent' -codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category' -codesystem "ConditionClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-clinical' -codesystem "ConditionVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-ver-status' -codesystem "AllergyIntoleranceClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' -codesystem "AllergyIntoleranceVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' - -// For -valueset "Active Condition": 'http://fhir.org/guides/cqf/common/ValueSet/active-condition' -valueset "Inactive Condition": 'http://fhir.org/guides/cqf/common/ValueSet/inactive-condition' - -code "Birthdate": '21112-8' from "LOINC" display 'Birth date' -code "Dead": '419099009' from "SNOMEDCT" display 'Dead' -code "ER": 'ER' from "RoleCode" display 'Emergency room' -code "ICU": 'ICU' from "RoleCode" display 'Intensive care unit' -code "Billing": 'billing' from "Diagnosis Role" display 'Billing' - -// 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" - -// Condition Verification Status Codes - Consider value sets for these -code "unconfirmed": 'unconfirmed' from ConditionVerificationStatusCodes -code "provisional": 'provisional' from ConditionVerificationStatusCodes -code "differential": 'differential' from ConditionVerificationStatusCodes -code "confirmed": 'confirmed' from ConditionVerificationStatusCodes -code "refuted": 'refuted' from ConditionVerificationStatusCodes -code "entered-in-error": 'entered-in-error' from ConditionVerificationStatusCodes - -code "allergy-active": 'active' from "AllergyIntoleranceClinicalStatusCodes" -code "allergy-inactive": 'inactive' from "AllergyIntoleranceClinicalStatusCodes" -code "allergy-resolved": 'resolved' from "AllergyIntoleranceClinicalStatusCodes" - -// Allergy/Intolerance Verification Status Codes - Consider value sets for these -code "allergy-unconfirmed": 'unconfirmed' from AllergyIntoleranceVerificationStatusCodes -code "allergy-confirmed": 'confirmed' from AllergyIntoleranceVerificationStatusCodes -code "allergy-refuted": 'refuted' from AllergyIntoleranceVerificationStatusCodes - -// MedicationRequest Category Codes -code "Community": 'community' from "MedicationRequestCategory" display 'Community' -code "Discharge": 'discharge' from "MedicationRequestCategory" display 'Discharge' - -// Diagnosis Role Codes -code "AD": 'AD' from "Diagnosis Role" display 'Admission diagnosis' -code "DD": 'DD' from "Diagnosis Role" display 'Discharge diagnosis' -code "CC": 'CC' from "Diagnosis Role" display 'Chief complaint' -code "CM": 'CM' from "Diagnosis Role" display 'Comorbidity diagnosis' -code "pre-op": 'pre-op' from "Diagnosis Role" display 'pre-op diagnosis' -code "post-op": 'post-op' from "Diagnosis Role" display 'post-op diagnosis' -code "billing": 'billing' from "Diagnosis Role" display 'billing diagnosis' - -context Patient - -/* -@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. 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 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, '1', 'Error', 'Cannot compute a single interval from a Timing type') - when choice is FHIR.string then - Message(null as Interval, true, '1', 'Error', 'Cannot compute an interval from a String value') - else - null as Interval - end - -/* -@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 ToAbatementInterval(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, '1', 'Error', 'Cannot compute an interval from a String value') - 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 ToInterval(condition.onset), condition.recordedDate) - else null - -/* -@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 ToPrevalenceInterval(condition Condition): -if condition.clinicalStatus ~ "active" - or condition.clinicalStatus ~ "recurrence" - or condition.clinicalStatus ~ "relapse" then - Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)] -else - Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)) - -/* -@description: Returns any extensions defined on the given resource with the specified url. -@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. -*/ -define function Extensions(domainResource DomainResource, url String): - domainResource.extension E - where E.url = url - return E - -/* -@description: Returns the single extension (if present) on the given resource with the specified url. -@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. -*/ -define function Extension(domainResource DomainResource, url String): - singleton from "Extensions"(domainResource, url) - -/* -@description: Returns any extensions defined on the given element with the specified url. -@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. -*/ -define function Extensions(element Element, url String): - element.extension E - where E.url = url - return E - -/* -@description: Returns the single extension (if present) on the given element with the specified url. -@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. -*/ -define function Extension(element Element, url String): - singleton from Extensions(element, url) - -/* -@description: Returns any modifier extensions defined on the given resource with the specified url. -@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. -*/ -define function ModifierExtensions(domainResource DomainResource, url String): - domainResource.modifierExtension E - where E.url = url - return E - -/* -@description: Returns the single modifier extension (if present) on the given resource with the specified url. -@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. -*/ -define function ModifierExtension(domainResource DomainResource, url String): - singleton from ModifierExtensions(domainResource, url) - -/* -@description: Returns any modifier extensions defined on the given element with the specified url. -@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. -*/ -define function ModifierExtensions(element BackboneElement, url String): - element.modifierExtension E - where E.url = url - return E - -/* -@description: Returns the single modifier extension (if present) on the given element with the specified url. -@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. -*/ -define function ModifierExtension(element BackboneElement, url String): - singleton from ModifierExtensions(element, url) - -/* -@description: Returns any base-FHIR 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. -*/ -define function BaseExtensions(domainResource DomainResource, id String): - domainResource.extension E - where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) - return E - -/* -@description: Returns the single base-FHIR 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. -*/ -define function BaseExtension(domainResource DomainResource, id String): - singleton from BaseExtensions(domainResource, id) - -/* -@description: Returns any base-FHIR 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. -*/ -define function BaseExtensions(element Element, id String): - element.extension E - where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) - return E - -/* -@description: Returns the single base-FHIR 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. -*/ -define function BaseExtension(element Element, id String): - singleton from BaseExtensions(element, id) - -/* -@description: Returns any base-FHIR 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. -*/ -define function BaseModifierExtensions(domainResource DomainResource, id String): - domainResource.modifierExtension E - where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) - return E - -/* -@description: Returns the single base-FHIR 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. -*/ -define function BaseModifierExtension(domainResource DomainResource, id String): - singleton from BaseModifierExtensions(domainResource, id) - -/* -@description: Returns any base-FHIR 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. -*/ -define function BaseModifierExtensions(element BackboneElement, id String): - element.modifierExtension E - where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) - return E - -/* -@description: Returns the single base-FHIR 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. -*/ -define function BaseModifierExtension(element BackboneElement, id String): - singleton from BaseModifierExtensions(element, id) +/* +@author: Bryn Rhodes +@description: Common terminologies and functions used in FHIR-based CQL artifacts +*/ +library FHIRCommon version '4.0.1' + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +codesystem "LOINC": 'http://loinc.org' +codesystem "SNOMEDCT": 'http://snomed.info/sct' +codesystem "RoleCode": 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' +codesystem "Diagnosis Role": 'http://terminology.hl7.org/CodeSystem/diagnosis-role' +codesystem "RequestIntent": 'http://terminology.hl7.org/CodeSystem/request-intent' +codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category' +codesystem "ConditionClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-clinical' +codesystem "ConditionVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-ver-status' +codesystem "AllergyIntoleranceClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' +codesystem "AllergyIntoleranceVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' + +// For +valueset "Active Condition": 'http://fhir.org/guides/cqf/common/ValueSet/active-condition' +valueset "Inactive Condition": 'http://fhir.org/guides/cqf/common/ValueSet/inactive-condition' + +code "Birthdate": '21112-8' from "LOINC" display 'Birth date' +code "Dead": '419099009' from "SNOMEDCT" display 'Dead' +code "ER": 'ER' from "RoleCode" display 'Emergency room' +code "ICU": 'ICU' from "RoleCode" display 'Intensive care unit' +code "Billing": 'billing' from "Diagnosis Role" display 'Billing' + +// 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" + +// Condition Verification Status Codes - Consider value sets for these +code "unconfirmed": 'unconfirmed' from ConditionVerificationStatusCodes +code "provisional": 'provisional' from ConditionVerificationStatusCodes +code "differential": 'differential' from ConditionVerificationStatusCodes +code "confirmed": 'confirmed' from ConditionVerificationStatusCodes +code "refuted": 'refuted' from ConditionVerificationStatusCodes +code "entered-in-error": 'entered-in-error' from ConditionVerificationStatusCodes + +code "allergy-active": 'active' from "AllergyIntoleranceClinicalStatusCodes" +code "allergy-inactive": 'inactive' from "AllergyIntoleranceClinicalStatusCodes" +code "allergy-resolved": 'resolved' from "AllergyIntoleranceClinicalStatusCodes" + +// Allergy/Intolerance Verification Status Codes - Consider value sets for these +code "allergy-unconfirmed": 'unconfirmed' from AllergyIntoleranceVerificationStatusCodes +code "allergy-confirmed": 'confirmed' from AllergyIntoleranceVerificationStatusCodes +code "allergy-refuted": 'refuted' from AllergyIntoleranceVerificationStatusCodes + +// MedicationRequest Category Codes +code "Community": 'community' from "MedicationRequestCategory" display 'Community' +code "Discharge": 'discharge' from "MedicationRequestCategory" display 'Discharge' + +// Diagnosis Role Codes +code "AD": 'AD' from "Diagnosis Role" display 'Admission diagnosis' +code "DD": 'DD' from "Diagnosis Role" display 'Discharge diagnosis' +code "CC": 'CC' from "Diagnosis Role" display 'Chief complaint' +code "CM": 'CM' from "Diagnosis Role" display 'Comorbidity diagnosis' +code "pre-op": 'pre-op' from "Diagnosis Role" display 'pre-op diagnosis' +code "post-op": 'post-op' from "Diagnosis Role" display 'post-op diagnosis' +code "billing": 'billing' from "Diagnosis Role" display 'billing diagnosis' + +context Patient + +/* +@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. 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 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, '1', 'Error', 'Cannot compute a single interval from a Timing type') + when choice is FHIR.string then + Message(null as Interval, true, '1', 'Error', 'Cannot compute an interval from a String value') + else + null as Interval + end + +/* +@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 ToAbatementInterval(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, '1', 'Error', 'Cannot compute an interval from a String value') + 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 ToInterval(condition.onset), condition.recordedDate) + else null + +/* +@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 ToPrevalenceInterval(condition Condition): +if condition.clinicalStatus ~ "active" + or condition.clinicalStatus ~ "recurrence" + or condition.clinicalStatus ~ "relapse" then + Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)] +else + Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)) + +/* +@description: Returns any extensions defined on the given resource with the specified url. +@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. +*/ +define function Extensions(domainResource DomainResource, url String): + domainResource.extension E + where E.url = url + return E + +/* +@description: Returns the single extension (if present) on the given resource with the specified url. +@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. +*/ +define function Extension(domainResource DomainResource, url String): + singleton from "Extensions"(domainResource, url) + +/* +@description: Returns any extensions defined on the given element with the specified url. +@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. +*/ +define function Extensions(element Element, url String): + element.extension E + where E.url = url + return E + +/* +@description: Returns the single extension (if present) on the given element with the specified url. +@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. +*/ +define function Extension(element Element, url String): + singleton from Extensions(element, url) + +/* +@description: Returns any modifier extensions defined on the given resource with the specified url. +@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. +*/ +define function ModifierExtensions(domainResource DomainResource, url String): + domainResource.modifierExtension E + where E.url = url + return E + +/* +@description: Returns the single modifier extension (if present) on the given resource with the specified url. +@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. +*/ +define function ModifierExtension(domainResource DomainResource, url String): + singleton from ModifierExtensions(domainResource, url) + +/* +@description: Returns any modifier extensions defined on the given element with the specified url. +@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. +*/ +define function ModifierExtensions(element BackboneElement, url String): + element.modifierExtension E + where E.url = url + return E + +/* +@description: Returns the single modifier extension (if present) on the given element with the specified url. +@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. +*/ +define function ModifierExtension(element BackboneElement, url String): + singleton from ModifierExtensions(element, url) + +/* +@description: Returns any base-FHIR 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. +*/ +define function BaseExtensions(domainResource DomainResource, id String): + domainResource.extension E + where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) + return E + +/* +@description: Returns the single base-FHIR 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. +*/ +define function BaseExtension(domainResource DomainResource, id String): + singleton from BaseExtensions(domainResource, id) + +/* +@description: Returns any base-FHIR 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. +*/ +define function BaseExtensions(element Element, id String): + element.extension E + where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) + return E + +/* +@description: Returns the single base-FHIR 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. +*/ +define function BaseExtension(element Element, id String): + singleton from BaseExtensions(element, id) + +/* +@description: Returns any base-FHIR 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. +*/ +define function BaseModifierExtensions(domainResource DomainResource, id String): + domainResource.modifierExtension E + where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) + return E + +/* +@description: Returns the single base-FHIR 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. +*/ +define function BaseModifierExtension(domainResource DomainResource, id String): + singleton from BaseModifierExtensions(domainResource, id) + +/* +@description: Returns any base-FHIR 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. +*/ +define function BaseModifierExtensions(element BackboneElement, id String): + element.modifierExtension E + where E.url = ('http://hl7.org/fhir/StructureDefinition/' + id) + return E + +/* +@description: Returns the single base-FHIR 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. +*/ +define function BaseModifierExtension(element BackboneElement, id String): + singleton from BaseModifierExtensions(element, id) diff --git a/input/fsh/libraries/FHIRCommon.fsh b/_unused/FHIRCommon.fsh similarity index 66% rename from input/fsh/libraries/FHIRCommon.fsh rename to _unused/FHIRCommon.fsh index a22dd16e6c..e50a8b5f09 100644 --- a/input/fsh/libraries/FHIRCommon.fsh +++ b/_unused/FHIRCommon.fsh @@ -3,14 +3,14 @@ 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" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" +* version = "4.0.1" * name = "FHIRCommon" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-FHIRCommon.cql" \ No newline at end of file diff --git a/input/cql/FHIRHelpers.cql b/_unused/FHIRHelpers.cql similarity index 98% rename from input/cql/FHIRHelpers.cql rename to _unused/FHIRHelpers.cql index 41932a2a08..4ce3146f07 100644 --- a/input/cql/FHIRHelpers.cql +++ b/_unused/FHIRHelpers.cql @@ -1,407 +1,407 @@ -/* -@author: Bryn Rhodes -@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, see the FHIRHelpers wiki page: - https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers -@allowFluent: true -*/ -library FHIRHelpers version '4.0.1' - -using FHIR version '4.0.1' - -define function ToInterval(period FHIR.Period): - if period is null then - null - else - if period."start" is null then - Interval(period."start".value, period."end".value] - else - Interval[period."start".value, period."end".value] - -define function ToCalendarUnit(unit System.String): - case unit - when 'ms' then 'millisecond' - when 's' then 'second' - when 'min' then 'minute' - when 'h' then 'hour' - when 'd' then 'day' - when 'wk' then 'week' - when 'mo' then 'month' - when 'a' then 'year' - else unit - end - -define function ToQuantity(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.comparator is not null then - Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') - when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then - System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else - Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') - end - -define function ToQuantityIgnoringComparator(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then - System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else - Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') - end - -define function ToInterval(quantity FHIR.Quantity): - if quantity is null then null else - case quantity.comparator.value - when '<' then - Interval[ - null, - ToQuantityIgnoringComparator(quantity) - ) - when '<=' then - Interval[ - null, - ToQuantityIgnoringComparator(quantity) - ] - when '>=' then - Interval[ - ToQuantityIgnoringComparator(quantity), - null - ] - when '>' then - Interval( - ToQuantityIgnoringComparator(quantity), - null - ] - else - Interval[ToQuantity(quantity), ToQuantity(quantity)] - end - -define function ToRatio(ratio FHIR.Ratio): - if ratio is null then - null - else - System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function ToInterval(range FHIR.Range): - if range is null then - null - else - Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function ToCode(coding FHIR.Coding): - if coding is null then - null - else - System.Code { - code: coding.code.value, - system: coding.system.value, - version: coding.version.value, - display: coding.display.value - } - -define function ToConcept(concept FHIR.CodeableConcept): - if concept is null then - null - else - System.Concept { - codes: concept.coding C return ToCode(C), - display: concept.text.value - } - -define function reference(reference String): - if reference is null then - null - else - Reference { reference: string { value: reference } } - -define function resolve(reference String) returns Resource: external -define function resolve(reference Reference) returns Resource: external -define function reference(resource Resource) returns Reference: external -define function extension(element Element, url String) returns List: external -define function extension(resource Resource, url String) returns List: external -define function hasValue(element Element) returns Boolean: external -define function getValue(element Element) returns Any: external -define function ofType(identifier String) returns List: external -define function is(identifier String) returns Boolean: external -define function as(identifier String) returns Any: external -define function elementDefinition(element Element) returns ElementDefinition: external -define function slice(element Element, url String, name String) returns List: external -define function checkModifiers(resource Resource) returns Resource: external -define function checkModifiers(resource Resource, modifier String) returns Resource: external -define function checkModifiers(element Element) returns Element: external -define function checkModifiers(element Element, modifier String) returns Element: external -define function conformsTo(resource Resource, structure String) returns Boolean: external -define function memberOf(code code, valueSet String) returns Boolean: external -define function memberOf(coding Coding, valueSet String) returns Boolean: external -define function memberOf(concept CodeableConcept, valueSet String) returns Boolean: external -define function subsumes(coding Coding, subsumedCoding Coding) returns Boolean: external -define function subsumes(concept CodeableConcept, subsumedConcept CodeableConcept) returns Boolean: external -define function subsumedBy(coding Coding, subsumingCoding Coding) returns Boolean: external -define function subsumedBy(concept CodeableConcept, subsumingConcept CodeableConcept) returns Boolean: external -define function htmlChecks(element Element) returns Boolean: external - -define function ToString(value AccountStatus): value.value -define function ToString(value ActionCardinalityBehavior): value.value -define function ToString(value ActionConditionKind): value.value -define function ToString(value ActionGroupingBehavior): value.value -define function ToString(value ActionParticipantType): value.value -define function ToString(value ActionPrecheckBehavior): value.value -define function ToString(value ActionRelationshipType): value.value -define function ToString(value ActionRequiredBehavior): value.value -define function ToString(value ActionSelectionBehavior): value.value -define function ToString(value ActivityDefinitionKind): value.value -define function ToString(value ActivityParticipantType): value.value -define function ToString(value AddressType): value.value -define function ToString(value AddressUse): value.value -define function ToString(value AdministrativeGender): value.value -define function ToString(value AdverseEventActuality): value.value -define function ToString(value AggregationMode): value.value -define function ToString(value AllergyIntoleranceCategory): value.value -define function ToString(value AllergyIntoleranceCriticality): value.value -define function ToString(value AllergyIntoleranceSeverity): value.value -define function ToString(value AllergyIntoleranceType): value.value -define function ToString(value AppointmentStatus): value.value -define function ToString(value AssertionDirectionType): value.value -define function ToString(value AssertionOperatorType): value.value -define function ToString(value AssertionResponseTypes): value.value -define function ToString(value AuditEventAction): value.value -define function ToString(value AuditEventAgentNetworkType): value.value -define function ToString(value AuditEventOutcome): value.value -define function ToString(value BindingStrength): value.value -define function ToString(value BiologicallyDerivedProductCategory): value.value -define function ToString(value BiologicallyDerivedProductStatus): value.value -define function ToString(value BiologicallyDerivedProductStorageScale): value.value -define function ToString(value BundleType): value.value -define function ToString(value CapabilityStatementKind): value.value -define function ToString(value CarePlanActivityKind): value.value -define function ToString(value CarePlanActivityStatus): value.value -define function ToString(value CarePlanIntent): value.value -define function ToString(value CarePlanStatus): value.value -define function ToString(value CareTeamStatus): value.value -define function ToString(value CatalogEntryRelationType): value.value -define function ToString(value ChargeItemDefinitionPriceComponentType): value.value -define function ToString(value ChargeItemStatus): value.value -define function ToString(value ClaimResponseStatus): value.value -define function ToString(value ClaimStatus): value.value -define function ToString(value ClinicalImpressionStatus): value.value -define function ToString(value CodeSearchSupport): value.value -define function ToString(value CodeSystemContentMode): value.value -define function ToString(value CodeSystemHierarchyMeaning): value.value -define function ToString(value CommunicationPriority): value.value -define function ToString(value CommunicationRequestStatus): value.value -define function ToString(value CommunicationStatus): value.value -define function ToString(value CompartmentCode): value.value -define function ToString(value CompartmentType): value.value -define function ToString(value CompositionAttestationMode): value.value -define function ToString(value CompositionStatus): value.value -define function ToString(value ConceptMapEquivalence): value.value -define function ToString(value ConceptMapGroupUnmappedMode): value.value -define function ToString(value ConditionalDeleteStatus): value.value -define function ToString(value ConditionalReadStatus): value.value -define function ToString(value ConsentDataMeaning): value.value -define function ToString(value ConsentProvisionType): value.value -define function ToString(value ConsentState): value.value -define function ToString(value ConstraintSeverity): value.value -define function ToString(value ContactPointSystem): value.value -define function ToString(value ContactPointUse): value.value -define function ToString(value ContractPublicationStatus): value.value -define function ToString(value ContractStatus): value.value -define function ToString(value ContributorType): value.value -define function ToString(value CoverageStatus): value.value -define function ToString(value CurrencyCode): value.value -define function ToString(value DayOfWeek): value.value -define function ToString(value DaysOfWeek): value.value -define function ToString(value DetectedIssueSeverity): value.value -define function ToString(value DetectedIssueStatus): value.value -define function ToString(value DeviceMetricCalibrationState): value.value -define function ToString(value DeviceMetricCalibrationType): value.value -define function ToString(value DeviceMetricCategory): value.value -define function ToString(value DeviceMetricColor): value.value -define function ToString(value DeviceMetricOperationalStatus): value.value -define function ToString(value DeviceNameType): value.value -define function ToString(value DeviceRequestStatus): value.value -define function ToString(value DeviceUseStatementStatus): value.value -define function ToString(value DiagnosticReportStatus): value.value -define function ToString(value DiscriminatorType): value.value -define function ToString(value DocumentConfidentiality): value.value -define function ToString(value DocumentMode): value.value -define function ToString(value DocumentReferenceStatus): value.value -define function ToString(value DocumentRelationshipType): value.value -define function ToString(value EligibilityRequestPurpose): value.value -define function ToString(value EligibilityRequestStatus): value.value -define function ToString(value EligibilityResponsePurpose): value.value -define function ToString(value EligibilityResponseStatus): value.value -define function ToString(value EnableWhenBehavior): value.value -define function ToString(value EncounterLocationStatus): value.value -define function ToString(value EncounterStatus): value.value -define function ToString(value EndpointStatus): value.value -define function ToString(value EnrollmentRequestStatus): value.value -define function ToString(value EnrollmentResponseStatus): value.value -define function ToString(value EpisodeOfCareStatus): value.value -define function ToString(value EventCapabilityMode): value.value -define function ToString(value EventTiming): value.value -define function ToString(value EvidenceVariableType): value.value -define function ToString(value ExampleScenarioActorType): value.value -define function ToString(value ExplanationOfBenefitStatus): value.value -define function ToString(value ExposureState): value.value -define function ToString(value ExtensionContextType): value.value -define function ToString(value FHIRAllTypes): value.value -define function ToString(value FHIRDefinedType): value.value -define function ToString(value FHIRDeviceStatus): value.value -define function ToString(value FHIRResourceType): value.value -define function ToString(value FHIRSubstanceStatus): value.value -define function ToString(value FHIRVersion): value.value -define function ToString(value FamilyHistoryStatus): value.value -define function ToString(value FilterOperator): value.value -define function ToString(value FlagStatus): value.value -define function ToString(value GoalLifecycleStatus): value.value -define function ToString(value GraphCompartmentRule): value.value -define function ToString(value GraphCompartmentUse): value.value -define function ToString(value GroupMeasure): value.value -define function ToString(value GroupType): value.value -define function ToString(value GuidanceResponseStatus): value.value -define function ToString(value GuidePageGeneration): value.value -define function ToString(value GuideParameterCode): value.value -define function ToString(value HTTPVerb): value.value -define function ToString(value IdentifierUse): value.value -define function ToString(value IdentityAssuranceLevel): value.value -define function ToString(value ImagingStudyStatus): value.value -define function ToString(value ImmunizationEvaluationStatus): value.value -define function ToString(value ImmunizationStatus): value.value -define function ToString(value InvoicePriceComponentType): value.value -define function ToString(value InvoiceStatus): value.value -define function ToString(value IssueSeverity): value.value -define function ToString(value IssueType): value.value -define function ToString(value LinkType): value.value -define function ToString(value LinkageType): value.value -define function ToString(value ListMode): value.value -define function ToString(value ListStatus): value.value -define function ToString(value LocationMode): value.value -define function ToString(value LocationStatus): value.value -define function ToString(value MeasureReportStatus): value.value -define function ToString(value MeasureReportType): value.value -define function ToString(value MediaStatus): value.value -define function ToString(value MedicationAdministrationStatus): value.value -define function ToString(value MedicationDispenseStatus): value.value -define function ToString(value MedicationKnowledgeStatus): value.value -define function ToString(value MedicationRequestIntent): value.value -define function ToString(value MedicationRequestPriority): value.value -define function ToString(value MedicationRequestStatus): value.value -define function ToString(value MedicationStatementStatus): value.value -define function ToString(value MedicationStatus): value.value -define function ToString(value MessageSignificanceCategory): value.value -define function ToString(value Messageheader_Response_Request): value.value -define function ToString(value MimeType): value.value -define function ToString(value NameUse): value.value -define function ToString(value NamingSystemIdentifierType): value.value -define function ToString(value NamingSystemType): value.value -define function ToString(value NarrativeStatus): value.value -define function ToString(value NoteType): value.value -define function ToString(value NutritiionOrderIntent): value.value -define function ToString(value NutritionOrderStatus): value.value -define function ToString(value ObservationDataType): value.value -define function ToString(value ObservationRangeCategory): value.value -define function ToString(value ObservationStatus): value.value -define function ToString(value OperationKind): value.value -define function ToString(value OperationParameterUse): value.value -define function ToString(value OrientationType): value.value -define function ToString(value ParameterUse): value.value -define function ToString(value ParticipantRequired): value.value -define function ToString(value ParticipantStatus): value.value -define function ToString(value ParticipationStatus): value.value -define function ToString(value PaymentNoticeStatus): value.value -define function ToString(value PaymentReconciliationStatus): value.value -define function ToString(value ProcedureStatus): value.value -define function ToString(value PropertyRepresentation): value.value -define function ToString(value PropertyType): value.value -define function ToString(value ProvenanceEntityRole): value.value -define function ToString(value PublicationStatus): value.value -define function ToString(value QualityType): value.value -define function ToString(value QuantityComparator): value.value -define function ToString(value QuestionnaireItemOperator): value.value -define function ToString(value QuestionnaireItemType): value.value -define function ToString(value QuestionnaireResponseStatus): value.value -define function ToString(value ReferenceHandlingPolicy): value.value -define function ToString(value ReferenceVersionRules): value.value -define function ToString(value ReferredDocumentStatus): value.value -define function ToString(value RelatedArtifactType): value.value -define function ToString(value RemittanceOutcome): value.value -define function ToString(value RepositoryType): value.value -define function ToString(value RequestIntent): value.value -define function ToString(value RequestPriority): value.value -define function ToString(value RequestStatus): value.value -define function ToString(value ResearchElementType): value.value -define function ToString(value ResearchStudyStatus): value.value -define function ToString(value ResearchSubjectStatus): value.value -define function ToString(value ResourceType): value.value -define function ToString(value ResourceVersionPolicy): value.value -define function ToString(value ResponseType): value.value -define function ToString(value RestfulCapabilityMode): value.value -define function ToString(value RiskAssessmentStatus): value.value -define function ToString(value SPDXLicense): value.value -define function ToString(value SearchComparator): value.value -define function ToString(value SearchEntryMode): value.value -define function ToString(value SearchModifierCode): value.value -define function ToString(value SearchParamType): value.value -define function ToString(value SectionMode): value.value -define function ToString(value SequenceType): value.value -define function ToString(value ServiceRequestIntent): value.value -define function ToString(value ServiceRequestPriority): value.value -define function ToString(value ServiceRequestStatus): value.value -define function ToString(value SlicingRules): value.value -define function ToString(value SlotStatus): value.value -define function ToString(value SortDirection): value.value -define function ToString(value SpecimenContainedPreference): value.value -define function ToString(value SpecimenStatus): value.value -define function ToString(value Status): value.value -define function ToString(value StrandType): value.value -define function ToString(value StructureDefinitionKind): value.value -define function ToString(value StructureMapContextType): value.value -define function ToString(value StructureMapGroupTypeMode): value.value -define function ToString(value StructureMapInputMode): value.value -define function ToString(value StructureMapModelMode): value.value -define function ToString(value StructureMapSourceListMode): value.value -define function ToString(value StructureMapTargetListMode): value.value -define function ToString(value StructureMapTransform): value.value -define function ToString(value SubscriptionChannelType): value.value -define function ToString(value SubscriptionStatus): value.value -define function ToString(value SupplyDeliveryStatus): value.value -define function ToString(value SupplyRequestStatus): value.value -define function ToString(value SystemRestfulInteraction): value.value -define function ToString(value TaskIntent): value.value -define function ToString(value TaskPriority): value.value -define function ToString(value TaskStatus): value.value -define function ToString(value TestReportActionResult): value.value -define function ToString(value TestReportParticipantType): value.value -define function ToString(value TestReportResult): value.value -define function ToString(value TestReportStatus): value.value -define function ToString(value TestScriptRequestMethodCode): value.value -define function ToString(value TriggerType): value.value -define function ToString(value TypeDerivationRule): value.value -define function ToString(value TypeRestfulInteraction): value.value -define function ToString(value UDIEntryType): value.value -define function ToString(value UnitsOfTime): value.value -define function ToString(value Use): value.value -define function ToString(value VariableType): value.value -define function ToString(value VisionBase): value.value -define function ToString(value VisionEyes): value.value -define function ToString(value VisionStatus): value.value -define function ToString(value XPathUsageType): value.value -define function ToString(value base64Binary): value.value -define function ToBoolean(value boolean): value.value -define function ToDate(value date): value.value -define function ToDateTime(value dateTime): value.value -define function ToDecimal(value decimal): value.value -define function ToDateTime(value instant): value.value -define function ToInteger(value integer): value.value -define function ToString(value string): value.value -define function ToTime(value time): value.value -define function ToString(value uri): value.value -define function ToString(value xhtml): value.value +/* +@author: Bryn Rhodes +@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, see the FHIRHelpers wiki page: + https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers +@allowFluent: true +*/ +library FHIRHelpers version '4.0.1' + +using FHIR version '4.0.1' + +define function ToInterval(period FHIR.Period): + if period is null then + null + else + if period."start" is null then + Interval(period."start".value, period."end".value] + else + Interval[period."start".value, period."end".value] + +define function ToCalendarUnit(unit System.String): + case unit + when 'ms' then 'millisecond' + when 's' then 'second' + when 'min' then 'minute' + when 'h' then 'hour' + when 'd' then 'day' + when 'wk' then 'week' + when 'mo' then 'month' + when 'a' then 'year' + else unit + end + +define function ToQuantity(quantity FHIR.Quantity): + case + when quantity is null then null + when quantity.value is null then null + when quantity.comparator is not null then + Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') + when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org' + or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then + System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } + else + Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') + end + +define function ToQuantityIgnoringComparator(quantity FHIR.Quantity): + case + when quantity is null then null + when quantity.value is null then null + when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org' + or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then + System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } + else + Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') + end + +define function ToInterval(quantity FHIR.Quantity): + if quantity is null then null else + case quantity.comparator.value + when '<' then + Interval[ + null, + ToQuantityIgnoringComparator(quantity) + ) + when '<=' then + Interval[ + null, + ToQuantityIgnoringComparator(quantity) + ] + when '>=' then + Interval[ + ToQuantityIgnoringComparator(quantity), + null + ] + when '>' then + Interval( + ToQuantityIgnoringComparator(quantity), + null + ] + else + Interval[ToQuantity(quantity), ToQuantity(quantity)] + end + +define function ToRatio(ratio FHIR.Ratio): + if ratio is null then + null + else + System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } + +define function ToInterval(range FHIR.Range): + if range is null then + null + else + Interval[ToQuantity(range.low), ToQuantity(range.high)] + +define function ToCode(coding FHIR.Coding): + if coding is null then + null + else + System.Code { + code: coding.code.value, + system: coding.system.value, + version: coding.version.value, + display: coding.display.value + } + +define function ToConcept(concept FHIR.CodeableConcept): + if concept is null then + null + else + System.Concept { + codes: concept.coding C return ToCode(C), + display: concept.text.value + } + +define function reference(reference String): + if reference is null then + null + else + Reference { reference: string { value: reference } } + +define function resolve(reference String) returns Resource: external +define function resolve(reference Reference) returns Resource: external +define function reference(resource Resource) returns Reference: external +define function extension(element Element, url String) returns List: external +define function extension(resource Resource, url String) returns List: external +define function hasValue(element Element) returns Boolean: external +define function getValue(element Element) returns Any: external +define function ofType(identifier String) returns List: external +define function is(identifier String) returns Boolean: external +define function as(identifier String) returns Any: external +define function elementDefinition(element Element) returns ElementDefinition: external +define function slice(element Element, url String, name String) returns List: external +define function checkModifiers(resource Resource) returns Resource: external +define function checkModifiers(resource Resource, modifier String) returns Resource: external +define function checkModifiers(element Element) returns Element: external +define function checkModifiers(element Element, modifier String) returns Element: external +define function conformsTo(resource Resource, structure String) returns Boolean: external +define function memberOf(code code, valueSet String) returns Boolean: external +define function memberOf(coding Coding, valueSet String) returns Boolean: external +define function memberOf(concept CodeableConcept, valueSet String) returns Boolean: external +define function subsumes(coding Coding, subsumedCoding Coding) returns Boolean: external +define function subsumes(concept CodeableConcept, subsumedConcept CodeableConcept) returns Boolean: external +define function subsumedBy(coding Coding, subsumingCoding Coding) returns Boolean: external +define function subsumedBy(concept CodeableConcept, subsumingConcept CodeableConcept) returns Boolean: external +define function htmlChecks(element Element) returns Boolean: external + +define function ToString(value AccountStatus): value.value +define function ToString(value ActionCardinalityBehavior): value.value +define function ToString(value ActionConditionKind): value.value +define function ToString(value ActionGroupingBehavior): value.value +define function ToString(value ActionParticipantType): value.value +define function ToString(value ActionPrecheckBehavior): value.value +define function ToString(value ActionRelationshipType): value.value +define function ToString(value ActionRequiredBehavior): value.value +define function ToString(value ActionSelectionBehavior): value.value +define function ToString(value ActivityDefinitionKind): value.value +define function ToString(value ActivityParticipantType): value.value +define function ToString(value AddressType): value.value +define function ToString(value AddressUse): value.value +define function ToString(value AdministrativeGender): value.value +define function ToString(value AdverseEventActuality): value.value +define function ToString(value AggregationMode): value.value +define function ToString(value AllergyIntoleranceCategory): value.value +define function ToString(value AllergyIntoleranceCriticality): value.value +define function ToString(value AllergyIntoleranceSeverity): value.value +define function ToString(value AllergyIntoleranceType): value.value +define function ToString(value AppointmentStatus): value.value +define function ToString(value AssertionDirectionType): value.value +define function ToString(value AssertionOperatorType): value.value +define function ToString(value AssertionResponseTypes): value.value +define function ToString(value AuditEventAction): value.value +define function ToString(value AuditEventAgentNetworkType): value.value +define function ToString(value AuditEventOutcome): value.value +define function ToString(value BindingStrength): value.value +define function ToString(value BiologicallyDerivedProductCategory): value.value +define function ToString(value BiologicallyDerivedProductStatus): value.value +define function ToString(value BiologicallyDerivedProductStorageScale): value.value +define function ToString(value BundleType): value.value +define function ToString(value CapabilityStatementKind): value.value +define function ToString(value CarePlanActivityKind): value.value +define function ToString(value CarePlanActivityStatus): value.value +define function ToString(value CarePlanIntent): value.value +define function ToString(value CarePlanStatus): value.value +define function ToString(value CareTeamStatus): value.value +define function ToString(value CatalogEntryRelationType): value.value +define function ToString(value ChargeItemDefinitionPriceComponentType): value.value +define function ToString(value ChargeItemStatus): value.value +define function ToString(value ClaimResponseStatus): value.value +define function ToString(value ClaimStatus): value.value +define function ToString(value ClinicalImpressionStatus): value.value +define function ToString(value CodeSearchSupport): value.value +define function ToString(value CodeSystemContentMode): value.value +define function ToString(value CodeSystemHierarchyMeaning): value.value +define function ToString(value CommunicationPriority): value.value +define function ToString(value CommunicationRequestStatus): value.value +define function ToString(value CommunicationStatus): value.value +define function ToString(value CompartmentCode): value.value +define function ToString(value CompartmentType): value.value +define function ToString(value CompositionAttestationMode): value.value +define function ToString(value CompositionStatus): value.value +define function ToString(value ConceptMapEquivalence): value.value +define function ToString(value ConceptMapGroupUnmappedMode): value.value +define function ToString(value ConditionalDeleteStatus): value.value +define function ToString(value ConditionalReadStatus): value.value +define function ToString(value ConsentDataMeaning): value.value +define function ToString(value ConsentProvisionType): value.value +define function ToString(value ConsentState): value.value +define function ToString(value ConstraintSeverity): value.value +define function ToString(value ContactPointSystem): value.value +define function ToString(value ContactPointUse): value.value +define function ToString(value ContractPublicationStatus): value.value +define function ToString(value ContractStatus): value.value +define function ToString(value ContributorType): value.value +define function ToString(value CoverageStatus): value.value +define function ToString(value CurrencyCode): value.value +define function ToString(value DayOfWeek): value.value +define function ToString(value DaysOfWeek): value.value +define function ToString(value DetectedIssueSeverity): value.value +define function ToString(value DetectedIssueStatus): value.value +define function ToString(value DeviceMetricCalibrationState): value.value +define function ToString(value DeviceMetricCalibrationType): value.value +define function ToString(value DeviceMetricCategory): value.value +define function ToString(value DeviceMetricColor): value.value +define function ToString(value DeviceMetricOperationalStatus): value.value +define function ToString(value DeviceNameType): value.value +define function ToString(value DeviceRequestStatus): value.value +define function ToString(value DeviceUseStatementStatus): value.value +define function ToString(value DiagnosticReportStatus): value.value +define function ToString(value DiscriminatorType): value.value +define function ToString(value DocumentConfidentiality): value.value +define function ToString(value DocumentMode): value.value +define function ToString(value DocumentReferenceStatus): value.value +define function ToString(value DocumentRelationshipType): value.value +define function ToString(value EligibilityRequestPurpose): value.value +define function ToString(value EligibilityRequestStatus): value.value +define function ToString(value EligibilityResponsePurpose): value.value +define function ToString(value EligibilityResponseStatus): value.value +define function ToString(value EnableWhenBehavior): value.value +define function ToString(value EncounterLocationStatus): value.value +define function ToString(value EncounterStatus): value.value +define function ToString(value EndpointStatus): value.value +define function ToString(value EnrollmentRequestStatus): value.value +define function ToString(value EnrollmentResponseStatus): value.value +define function ToString(value EpisodeOfCareStatus): value.value +define function ToString(value EventCapabilityMode): value.value +define function ToString(value EventTiming): value.value +define function ToString(value EvidenceVariableType): value.value +define function ToString(value ExampleScenarioActorType): value.value +define function ToString(value ExplanationOfBenefitStatus): value.value +define function ToString(value ExposureState): value.value +define function ToString(value ExtensionContextType): value.value +define function ToString(value FHIRAllTypes): value.value +define function ToString(value FHIRDefinedType): value.value +define function ToString(value FHIRDeviceStatus): value.value +define function ToString(value FHIRResourceType): value.value +define function ToString(value FHIRSubstanceStatus): value.value +define function ToString(value FHIRVersion): value.value +define function ToString(value FamilyHistoryStatus): value.value +define function ToString(value FilterOperator): value.value +define function ToString(value FlagStatus): value.value +define function ToString(value GoalLifecycleStatus): value.value +define function ToString(value GraphCompartmentRule): value.value +define function ToString(value GraphCompartmentUse): value.value +define function ToString(value GroupMeasure): value.value +define function ToString(value GroupType): value.value +define function ToString(value GuidanceResponseStatus): value.value +define function ToString(value GuidePageGeneration): value.value +define function ToString(value GuideParameterCode): value.value +define function ToString(value HTTPVerb): value.value +define function ToString(value IdentifierUse): value.value +define function ToString(value IdentityAssuranceLevel): value.value +define function ToString(value ImagingStudyStatus): value.value +define function ToString(value ImmunizationEvaluationStatus): value.value +define function ToString(value ImmunizationStatus): value.value +define function ToString(value InvoicePriceComponentType): value.value +define function ToString(value InvoiceStatus): value.value +define function ToString(value IssueSeverity): value.value +define function ToString(value IssueType): value.value +define function ToString(value LinkType): value.value +define function ToString(value LinkageType): value.value +define function ToString(value ListMode): value.value +define function ToString(value ListStatus): value.value +define function ToString(value LocationMode): value.value +define function ToString(value LocationStatus): value.value +define function ToString(value MeasureReportStatus): value.value +define function ToString(value MeasureReportType): value.value +define function ToString(value MediaStatus): value.value +define function ToString(value MedicationAdministrationStatus): value.value +define function ToString(value MedicationDispenseStatus): value.value +define function ToString(value MedicationKnowledgeStatus): value.value +define function ToString(value MedicationRequestIntent): value.value +define function ToString(value MedicationRequestPriority): value.value +define function ToString(value MedicationRequestStatus): value.value +define function ToString(value MedicationStatementStatus): value.value +define function ToString(value MedicationStatus): value.value +define function ToString(value MessageSignificanceCategory): value.value +define function ToString(value Messageheader_Response_Request): value.value +define function ToString(value MimeType): value.value +define function ToString(value NameUse): value.value +define function ToString(value NamingSystemIdentifierType): value.value +define function ToString(value NamingSystemType): value.value +define function ToString(value NarrativeStatus): value.value +define function ToString(value NoteType): value.value +define function ToString(value NutritiionOrderIntent): value.value +define function ToString(value NutritionOrderStatus): value.value +define function ToString(value ObservationDataType): value.value +define function ToString(value ObservationRangeCategory): value.value +define function ToString(value ObservationStatus): value.value +define function ToString(value OperationKind): value.value +define function ToString(value OperationParameterUse): value.value +define function ToString(value OrientationType): value.value +define function ToString(value ParameterUse): value.value +define function ToString(value ParticipantRequired): value.value +define function ToString(value ParticipantStatus): value.value +define function ToString(value ParticipationStatus): value.value +define function ToString(value PaymentNoticeStatus): value.value +define function ToString(value PaymentReconciliationStatus): value.value +define function ToString(value ProcedureStatus): value.value +define function ToString(value PropertyRepresentation): value.value +define function ToString(value PropertyType): value.value +define function ToString(value ProvenanceEntityRole): value.value +define function ToString(value PublicationStatus): value.value +define function ToString(value QualityType): value.value +define function ToString(value QuantityComparator): value.value +define function ToString(value QuestionnaireItemOperator): value.value +define function ToString(value QuestionnaireItemType): value.value +define function ToString(value QuestionnaireResponseStatus): value.value +define function ToString(value ReferenceHandlingPolicy): value.value +define function ToString(value ReferenceVersionRules): value.value +define function ToString(value ReferredDocumentStatus): value.value +define function ToString(value RelatedArtifactType): value.value +define function ToString(value RemittanceOutcome): value.value +define function ToString(value RepositoryType): value.value +define function ToString(value RequestIntent): value.value +define function ToString(value RequestPriority): value.value +define function ToString(value RequestStatus): value.value +define function ToString(value ResearchElementType): value.value +define function ToString(value ResearchStudyStatus): value.value +define function ToString(value ResearchSubjectStatus): value.value +define function ToString(value ResourceType): value.value +define function ToString(value ResourceVersionPolicy): value.value +define function ToString(value ResponseType): value.value +define function ToString(value RestfulCapabilityMode): value.value +define function ToString(value RiskAssessmentStatus): value.value +define function ToString(value SPDXLicense): value.value +define function ToString(value SearchComparator): value.value +define function ToString(value SearchEntryMode): value.value +define function ToString(value SearchModifierCode): value.value +define function ToString(value SearchParamType): value.value +define function ToString(value SectionMode): value.value +define function ToString(value SequenceType): value.value +define function ToString(value ServiceRequestIntent): value.value +define function ToString(value ServiceRequestPriority): value.value +define function ToString(value ServiceRequestStatus): value.value +define function ToString(value SlicingRules): value.value +define function ToString(value SlotStatus): value.value +define function ToString(value SortDirection): value.value +define function ToString(value SpecimenContainedPreference): value.value +define function ToString(value SpecimenStatus): value.value +define function ToString(value Status): value.value +define function ToString(value StrandType): value.value +define function ToString(value StructureDefinitionKind): value.value +define function ToString(value StructureMapContextType): value.value +define function ToString(value StructureMapGroupTypeMode): value.value +define function ToString(value StructureMapInputMode): value.value +define function ToString(value StructureMapModelMode): value.value +define function ToString(value StructureMapSourceListMode): value.value +define function ToString(value StructureMapTargetListMode): value.value +define function ToString(value StructureMapTransform): value.value +define function ToString(value SubscriptionChannelType): value.value +define function ToString(value SubscriptionStatus): value.value +define function ToString(value SupplyDeliveryStatus): value.value +define function ToString(value SupplyRequestStatus): value.value +define function ToString(value SystemRestfulInteraction): value.value +define function ToString(value TaskIntent): value.value +define function ToString(value TaskPriority): value.value +define function ToString(value TaskStatus): value.value +define function ToString(value TestReportActionResult): value.value +define function ToString(value TestReportParticipantType): value.value +define function ToString(value TestReportResult): value.value +define function ToString(value TestReportStatus): value.value +define function ToString(value TestScriptRequestMethodCode): value.value +define function ToString(value TriggerType): value.value +define function ToString(value TypeDerivationRule): value.value +define function ToString(value TypeRestfulInteraction): value.value +define function ToString(value UDIEntryType): value.value +define function ToString(value UnitsOfTime): value.value +define function ToString(value Use): value.value +define function ToString(value VariableType): value.value +define function ToString(value VisionBase): value.value +define function ToString(value VisionEyes): value.value +define function ToString(value VisionStatus): value.value +define function ToString(value XPathUsageType): value.value +define function ToString(value base64Binary): value.value +define function ToBoolean(value boolean): value.value +define function ToDate(value date): value.value +define function ToDateTime(value dateTime): value.value +define function ToDecimal(value decimal): value.value +define function ToDateTime(value instant): value.value +define function ToInteger(value integer): value.value +define function ToString(value string): value.value +define function ToTime(value time): value.value +define function ToString(value uri): value.value +define function ToString(value xhtml): value.value diff --git a/input/fsh/libraries/FHIRHelpers.fsh b/_unused/FHIRHelpers.fsh similarity index 74% rename from input/fsh/libraries/FHIRHelpers.fsh rename to _unused/FHIRHelpers.fsh index 4d575bb360..ec1e832846 100644 --- a/input/fsh/libraries/FHIRHelpers.fsh +++ b/_unused/FHIRHelpers.fsh @@ -3,14 +3,14 @@ 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" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" +* version = "4.0.1" * name = "FHIRHelpers" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-FHIRHelpers.cql" \ No newline at end of file diff --git a/input/_resources/exp-params.json b/input/_resources/exp-params.json new file mode 100644 index 0000000000..01407ed8fd --- /dev/null +++ b/input/_resources/exp-params.json @@ -0,0 +1,8 @@ +{ + "resourceType" : "Parameters", + "id" : "exp-params", + "parameter" : [{ + "name" : "system-version", + "valueUri" : "http://snomed.info/sct|http://snomed.info/sct/900000000000207008" + }] + } \ No newline at end of file diff --git a/input/cql/IMMZCommon.cql b/input/cql/IMMZCommon.cql index c3c39af533..6b8b0fbb5b 100644 --- a/input/cql/IMMZCommon.cql +++ b/input/cql/IMMZCommon.cql @@ -2,238 +2,20 @@ 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 + * @comment The protocol list from the immunization */ +define function Only(protocols List): + singleton from protocols /** * @description Fetches a singleton protocol applied from an immunization * @comment The protocol list from the immunization */ -define function Only(protocols List): +define fluent function only(protocols List): singleton from protocols /** 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/IMMZD2DTMeaslesDose0Logic.cql b/input/cql/IMMZD2DTMeaslesDose0Logic.cql new file mode 100644 index 0000000000..5de7f209c3 --- /dev/null +++ b/input/cql/IMMZD2DTMeaslesDose0Logic.cql @@ -0,0 +1,70 @@ +/* +@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 +*/ +library IMMZD2DTMeaslesDose0Logic + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOCommon called WC +include IMMZD2DTMeaslesLogic called Logic + +parameter Today default Today() + +context Patient + +/* +PlanDefinition Applicability Expressions +*/ + +define "Measles Routine Immunization Schedule Incomplete": + Logic."Measles Routine Immunization Schedule Incomplete" + +define "No MCV0 Doses Administered": + Logic."Number Of MCV0 Doses Administered" = 0 + +define "MCV0 Dose Administered": + Logic."Number Of MCV0 Doses Administered" = 1 + +define "Client Age Less Than 6 Months": + AgeInMonthsAt(Today) < 6 + +define "Client Age 9 Months Or More": + AgeInMonthsAt(Today) >= 9 + +define "Last Live Vaccine Administered Within 4 Weeks": + Logic."Date Last Live Vaccine Administered" + 4 weeks on or before Today + +define "Client Is Due For MCV0": + "MCV0 Status" = 'Needed' + and "MCV0 Due Date" on or before Today + +/* +Supporting Logic +*/ + +define "MCV0 Status": + if Logic."Number Of MCV0 Doses Administered" = 0 and AgeInMonthsAt(Today) between 6 and 9 then + 'Needed' + else + 'Complete' + +define "MCV0 Schedule Date": + Patient.birthDate + 6 months + +define "MCV0 Expiration Date": + Patient.birthDate + 9 months + +define "MCV0 Due Date": + if "MCV0 Status" = 'Needed' then + WC.LatestOf({ + "MCV0 Schedule Date", + Logic."Date Last Live Vaccine Administered" + 4 weeks, + Today + }) + else + null diff --git a/input/cql/IMMZD2DTMeaslesLTLogic.cql b/input/cql/IMMZD2DTMeaslesLTLogic.cql new file mode 100644 index 0000000000..242f2c4936 --- /dev/null +++ b/input/cql/IMMZD2DTMeaslesLTLogic.cql @@ -0,0 +1,101 @@ +/* +@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) +*/ + +library IMMZD2DTMeaslesLTLogic + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOCommon called WC +include IMMZD2DTMeaslesLogic called Logic + +parameter Today default Today() + +context Patient + +/* +PlanDefinition Applicability Expressions +*/ + +define "Measles Routine Immunization Schedule Incomplete": + Logic."Measles Routine Immunization Schedule Incomplete" + +define "No Primary Series Doses Administered": + Logic."Number Of Primary Series Doses Administered" = 0 + +define "One Primary Series Dose Administered": + Logic."Number Of Primary Series Doses Administered" = 1 + +define "Two Primary Series Doses Administered": + Logic."Number Of Primary Series Doses Administered" = 2 + +define "Client Age Less Than 12 Months": + AgeInMonthsAt(Today) < 12 + +define "Client Age Less Than 15 Months": + AgeInMonthsAt(Today) < 15 + +define "Last Live Vaccine Administered Within 4 Weeks": + Logic."Date Last Live Vaccine Administered" + 4 weeks on or before Today + +define "Client Is Due For MCV1": + "MCV1 Status" = 'Needed' + and "MCV1 Due Date" on or before Today + +define "Client Is Due For MCV2": + "MCV2 Status" = 'Needed' + and "MCV2 Due Date" on or before Today + +/* +Supporting Logic +*/ + +define "MCV1 Status": + if Logic."Number Of Primary Series Doses Administered" = 0 then + 'Needed' + else + 'Complete' + +define "MCV1 Schedule Date": + Patient.birthDate + 12 months + +define "MCV1 Expiration Date": + Patient.birthDate + 15 months + +define "MCV1 Due Date": + if "MCV1 Status" = 'Needed' then + WC.LatestOf({ + "MCV1 Schedule Date", + Logic."Date Last Live Vaccine Administered" + 4 weeks, + Today + }) + else + null + +define "MCV2 Status": + if Logic."Number Of Primary Series Doses Administered" = 1 then + 'Needed' + else + 'Complete' + +define "MCV2 Schedule Date": + Patient.birthDate + 15 months + +define "MCV2 Expiration Date": + null as Date + +define "MCV2 Due Date": + if "MCV2 Status" = 'Needed' then + WC.LatestOf({ + "MCV2 Schedule Date", + Logic."Date Last Live Vaccine Administered" + 4 weeks, + Today + }) + else + null + diff --git a/input/cql/IMMZD2DTMeaslesLogic.cql b/input/cql/IMMZD2DTMeaslesLogic.cql index 7f79e93592..6fcc036463 100644 --- a/input/cql/IMMZD2DTMeaslesLogic.cql +++ b/input/cql/IMMZD2DTMeaslesLogic.cql @@ -1,348 +1,51 @@ /* - * 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 - */ +@Description: Common logic used in all the measles decisions +*/ library IMMZD2DTMeaslesLogic -// 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 +include WHOCommon called WC +include IMMZConcepts called Concepts +include IMMZCommon called Common +include IMMZConfig called Config +include IMMZEncounterElements called Elements + +parameter Today default Today() + +// TODO: Should these be data elements? parameter "Individual is at high risk of contracting measles" Boolean default false parameter "Individual is travelling to a country experiencing measles outbreaks" Boolean default false parameter "Individual is known to be HIV-infected or exposed" Boolean default false parameter "Immune reconstitution was achieved" Boolean default false -// End Skeleton CQL context Patient +define "Most Recent Live Vaccine Dose": + Elements."Live vaccine dose".mostRecent() -/** - * @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 "Date Last Live Vaccine Administered": + date from start of "Most Recent Live Vaccine Dose".occurrence.toInterval() -define "Overdue Date for MCV dose": - null +define "No Live Vaccine Administered": + "Date Last Live Vaccine Administered" is 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 "Number Of MCV0 Doses Administered": + Count(Elements."MCV Dose 0 Dose") -define "Should vaccinate patient for MCV": - "Provision of the MCV dose" and ("Schedule Due Date for MCV dose" <= (Now())) +define "Number Of Primary Series Doses Administered": + Count(Elements."MCV Primary Series Dose") -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 "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 "Measles Routine Immunization Schedule Complete": + "Number Of Primary Series Doses Administered" >= 2 -/** - * @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) +define "Measles Routine Immunization Schedule Incomplete": + not "Measles Routine Immunization Schedule Complete" -/** - * @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 "Number Of Supplementary Doses Administered": + Count(Elements."MCV Supplementary Dose") define "Draft Medication Request ID for MCV dose": - First("Draft Medication Request for MCV dose").id - -/* - * 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" - ) -*/ + Elements."Most Recent MCV Immunization Proposal".id diff --git a/input/cql/IMMZD2DTMeaslesOTLogic.cql b/input/cql/IMMZD2DTMeaslesOTLogic.cql new file mode 100644 index 0000000000..1e1e9df223 --- /dev/null +++ b/input/cql/IMMZD2DTMeaslesOTLogic.cql @@ -0,0 +1,99 @@ +/* +@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) +*/ +library IMMZD2DTMeaslesOTLogic + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOCommon called WC +include IMMZD2DTMeaslesLogic called Logic + +parameter Today default Today() + +context Patient + +/* +PlanDefinition Applicability Expressions +*/ + +define "Measles Routine Immunization Schedule Incomplete": + Logic."Measles Routine Immunization Schedule Incomplete" + +define "No Primary Series Doses Administered": + Logic."Number Of Primary Series Doses Administered" = 0 + +define "One Primary Series Dose Administered": + Logic."Number Of Primary Series Doses Administered" = 1 + +define "Two Primary Series Doses Administered": + Logic."Number Of Primary Series Doses Administered" = 2 + +define "Client Age Less Than 9 Months": + AgeInMonthsAt(Today) < 9 + +define "Client Age Less Than 15 Months": + AgeInMonthsAt(Today) < 15 + +define "Last Live Vaccine Administered Within 4 Weeks": + Logic."Date Last Live Vaccine Administered" + 4 weeks on or before Today + +define "Client Is Due For MCV1": + "MCV1 Status" = 'Needed' + and "MCV1 Due Date" on or before Today + +define "Client Is Due For MCV2": + "MCV2 Status" = 'Needed' + and "MCV2 Due Date" on or before Today + +/* +Supporting Logic +*/ + +define "MCV1 Status": + if Logic."Number Of Primary Series Doses Administered" = 0 then + 'Needed' + else + 'Complete' + +define "MCV1 Schedule Date": + Patient.birthDate + 9 months + +define "MCV1 Expiration Date": + Patient.birthDate + 15 months + +define "MCV1 Due Date": + if "MCV1 Status" = 'Needed' then + WC.LatestOf({ + "MCV1 Schedule Date", + Logic."Date Last Live Vaccine Administered" + 4 weeks, + Today + }) + else + null + +define "MCV2 Status": + if Logic."Number Of Primary Series Doses Administered" = 1 then + 'Needed' + else + 'Complete' + +define "MCV2 Schedule Date": + Patient.birthDate + 15 months + +define "MCV2 Expiration Date": + null as Date + +define "MCV2 Due Date": + if "MCV2 Status" = 'Needed' then + WC.LatestOf({ + "MCV2 Schedule Date", + Logic."Date Last Live Vaccine Administered" + 4 weeks, + Today + }) + else + null diff --git a/input/cql/IMMZD2DTMeaslesSupplementaryLogic.cql b/input/cql/IMMZD2DTMeaslesSupplementaryLogic.cql new file mode 100644 index 0000000000..59418b9a08 --- /dev/null +++ b/input/cql/IMMZD2DTMeaslesSupplementaryLogic.cql @@ -0,0 +1,68 @@ +/* +@DecisionID: IMMZ.D2.DT.Measles.Supplementary dose +@BusinessRule: Determine if the client is due for a measles vaccination according to the national immunization schedule +@Trigger: IMMZ.D2 Determine required vaccination(s) if any +@Description: Measles supplementary dose administration +*/ +library IMMZD2DTMeaslesSupplementaryLogic + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOCommon called WC +include IMMZD2DTMeaslesLogic called Logic + +parameter Today default Today() + +context Patient + +/* +PlanDefinition Applicability Expressions +*/ + +define "Measles Routine Immunization Schedule Complete": + Logic."Number Of Primary Series Doses Administered" >= 2 + +define "No Supplementary Dose Administered": + Logic."Number Of Supplementary Doses Administered" = 0 + +define "Supplementary Dose Administered": + Logic."Number Of Supplementary Doses Administered" = 1 + +define "Last Live Vaccine Administered Within 4 Weeks": + Logic."Date Last Live Vaccine Administered" + 4 weeks on or before Today + +define "Client Is Due For MCV Supplementary Dose": + "MCV Supplementary Dose Status" = 'Eligible' + and "MCV Supplementary Dose Due Date" on or before Today + +/* +Supporting Logic +*/ + +// TODO: Define these +define "Patient Is HIV-infected And Immune Reconstitution Has Been Achieved Or 6 To 12 Months Have Passed Since HAART Initiation": + false + +define "MCV Supplementary Dose Status": + if "No Supplementary Dose Administered" and "Measles Routine Immunization Schedule Complete" + and "Patient Is HIV-infected And Immune Reconstitution Has Been Achieved Or 6 To 12 Months Have Passed Since HAART Initiation" then + 'Eligible' + else + 'Complete' + +define "MCV Supplementary Schedule Date": + null as Date + +define "MCV Supplementary Expiration Date": + null as Date + +define "MCV Supplementary Dose Due Date": + if "MCV Supplementary Dose Status" = 'Eligible' then + WC.LatestOf({ + Logic."Date Last Live Vaccine Administered" + 4 weeks, + Today + }) + else + null diff --git a/input/cql/IMMZD5DTMeaslesCILogic.cql b/input/cql/IMMZD5DTMeaslesCILogic.cql new file mode 100644 index 0000000000..28ebc86a09 --- /dev/null +++ b/input/cql/IMMZD5DTMeaslesCILogic.cql @@ -0,0 +1,45 @@ +/* +@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 IMMZD5DTMeaslesCILogic + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include IMMZEncounterElements called Elements + +parameter Today default Today() + +context Patient + +/* +PlanDefinition Applicability Expressions +*/ + +define "MCV Dose Contraindicated": + "Measles Vaccination Contraindicated" + or "Measles Vaccination Could Be Contraindicated" + +// TODO: Define this +define "Contraindication Evaluation of the MCV Dose": + false + +/* +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..d81143e488 --- /dev/null +++ b/input/cql/IMMZElements.cql @@ -0,0 +1,321 @@ +library IMMZElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' +include fhir.cqf.common.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' + ) + +define "MCV Immunization Proposal": + [MedicationRequest: medication in Concepts."MCV Vaccine"] MCV + where MCV.intent = 'proposal' + +//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..331cb8ee40 --- /dev/null +++ b/input/cql/IMMZEncounterElements.cql @@ -0,0 +1,280 @@ +library IMMZEncounterElements + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +include WHOConcepts +include WHOCommon called WC +include WHOEncounterElements called WE + +include IMMZConcepts called Concepts +include IMMZCommon called Common +include IMMZElements called Elements + +parameter Today Date default Today() +parameter EncounterId String + +context Patient + +/* + * Measles elements + */ +define "MCV Dose": + Elements."MCV Dose" MCV + where MCV.occurrence.toInterval() on or before Today + +define "MCV Primary Series Dose": + Elements."MCV Primary Series Dose" MCV + where MCV.occurrence.toInterval() on or before Today + +define "MCV Supplementary Dose": + Elements."MCV Supplementary Dose" MCV + where MCV.occurrence.toInterval() on or before Today + +define "MCV Dose 0 Dose": + Elements."MCV Dose 0 Dose" MCV + where MCV.occurrence.toInterval() on or before Today + +define "MCV Immunization Proposal": + Elements."MCV Immunization Proposal" MCV + where MCV.authoredOn on or before Today + +define "Most Recent MCV Immunization Proposal": + "MCV Immunization Proposal".mostRecent() + +/* + * 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 Today + +define "Currently Pregnant Condition": + Elements."Currently Pregnant Condition" C + where C.prevalenceInterval() includes Today + +// 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 Today + +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 Today + +// 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 Today + +/* + * @dataElement Immunocompromised = True + */ +define "Immunocompromised = True": + exists "Immunocompromised Condition" + +define "Immunocompromised Condition": + Elements."Immunocompromised Condition" C + where C.prevalenceInterval() starts on or before Today + +/** + * @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 Today + +define "Severely Immunosuppressed Condition": + Elements."Severely Immunosuppressed Condition" C + where C.prevalenceInterval() starts on or before Today + +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 Today + +define "History Of Anaphylactic Reactions Condition": + Elements."History Of Anaphylactic Reactions Condition" C + where C.prevalenceInterval() starts on or before Today + +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 Today + +define "Severe Allergic Reactions Condition": + Elements."Severe Allergic Reactions Condition" C + where C.prevalenceInterval() starts on or before Today + +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 Today + +define "Symptomatic HIV Infection Condition": + Elements."Symptomatic HIV Infection Condition" C + where C.prevalenceInterval() starts on or before Today + +/****************************** + * 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 Today + +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": + Elements."HAART Medication Administration" A + where A.effective.toInterval() starts less than 12 months before Today + +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 Today - 12 months and Today - 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 Today + +define "Live vaccine dose": + Elements."Live vaccine dose" V + where V.occurrence.toInterval() starts on or before Today + +/* + @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 Today + sort by start of occurrence.toInterval() + ).occurrence as FHIR.dateTime + diff --git a/input/cql/IMMZIND08.cql b/input/cql/IMMZIND08Logic.cql similarity index 56% rename from input/cql/IMMZIND08.cql rename to input/cql/IMMZIND08Logic.cql index 2addb9c18f..29732f4d8d 100644 --- a/input/cql/IMMZIND08.cql +++ b/input/cql/IMMZIND08Logic.cql @@ -1,68 +1,92 @@ -/* - * Library: IMMZ.IND.08 - * 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.A1.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 IMMZIND08 - -// 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 -// End Skeleton CQL -parameter "Measurement Period" Interval - -context Patient - -/* - * 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 - */ -define "measure-population": - exists(IMMZIndCom."MCV Doses Administered to Patient During Measurement Period") - -/* - * Disaggregator: Dose Sequence (1, 2) - */ -define "Dose Sequence Stratifier": - IMMZIndCom."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" - -/* - * Disaggregator: Geographic Region - */ -define "Geographic Region Stratifier": - IMMZIndCom."By Geographic Region Stratifier" - -/* - * Disaggregator: Administrative Gender (or Biological Sex) - */ -define "Administrative Gender Stratifier": - IMMZIndCom."By Administrative Gender Stratifier" - -/* End of IMMZ.IND.08 */ +/* + * Library: IMMZ.IND.08 Logic + * 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.A1.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 IMMZIND08Logic + +/* +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 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 function "Measure Observation"(Patient "Patient"): + 1 + +/* + * Disaggregator: Dose Sequence (1, 2) + */ +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": + Elements."Infant By Age Stratifier" + +/* + * Disaggregator: Geographic Region + */ +define "Geographic Region Stratifier": + Elements."By Geographic Region Stratifier" + +/* + * Disaggregator: Administrative Gender (or Biological Sex) + */ +define "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/IMMZIND12Logic.cql b/input/cql/IMMZIND12Logic.cql new file mode 100644 index 0000000000..ffe69d91ac --- /dev/null +++ b/input/cql/IMMZIND12Logic.cql @@ -0,0 +1,63 @@ +/* + * Library: IMMZ.IND.12 Logic + * 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 IMMZIND12Logic + +/* +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 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/IMMZIND13Logic.cql b/input/cql/IMMZIND13Logic.cql new file mode 100644 index 0000000000..0a919a93af --- /dev/null +++ b/input/cql/IMMZIND13Logic.cql @@ -0,0 +1,64 @@ +/* + * Library: IMMZ.IND.13 Logic + * 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 IMMZIND13Logic + +/* +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 WHOCommon called WC +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..441976ff33 100644 --- a/input/cql/IMMZIndicatorCommon.cql +++ b/input/cql/IMMZIndicatorElements.cql @@ -1,222 +1,239 @@ -/** - * 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 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/IMMZVaccineLibrary.cql b/input/cql/IMMZVaccineLibrary.cql index d88026b46f..d18006b411 100644 --- a/input/cql/IMMZVaccineLibrary.cql +++ b/input/cql/IMMZVaccineLibrary.cql @@ -1,10 +1,12 @@ library IMMZVaccineLibrary + using FHIR version '4.0.1' +include FHIRHelpers version '4.0.1' +include fhir.cqf.common.FHIRCommon called FC + include WHOCommon called WCom include WHOConcepts called Wcon -include FHIRHelpers version '4.0.1' -include FHIRCommon called FC include IMMZConcepts called IMMZc include IMMZCommon called IMMZcom diff --git a/input/cql/WHOCommon.cql b/input/cql/WHOCommon.cql index b69e1d5c7d..2949cab527 100644 --- a/input/cql/WHOCommon.cql +++ b/input/cql/WHOCommon.cql @@ -4,164 +4,245 @@ 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 fluent function mostRecent(immunizations List): + Last( + immunizations I + sort by start of occurrence.toInterval() + ) -define function Lowest(observations List): +define fluent function mostRecent(medicationRequests List): + Last( + medicationRequests MR + sort by authoredOn + ) + +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..a06385dc47 100644 --- a/input/fsh/activitydefinitions/IMMZD2DTMeaslesCIMR.fsh +++ b/input/fsh/activitydefinitions/IMMZD2DTMeaslesCIMR.fsh @@ -4,14 +4,13 @@ Title: "IMMZ.D2.DT.Measles.Contraindication" Description: "Provide measles immunization" Usage: #definition -* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeasles" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLogic" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesContraindication" * status = #draft -* experimental = false +* experimental = true * date = 2023-10-03 * publisher = "World Health Organization (WHO)" * contact[+] diff --git a/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh b/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh index 0388f5dffa..152b71b1ac 100644 --- a/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh +++ b/input/fsh/activitydefinitions/IMMZD2DTMeaslesEval.fsh @@ -4,14 +4,13 @@ Title: "IMMZ.D2.DT.Measles.Eval" Description: "Provide measles immunization" Usage: #definition -* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeasles" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLogic" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesContraindicationEvaluation" * status = #draft -* experimental = false +* experimental = true * date = 2023-10-03 * publisher = "World Health Organization (WHO)" * contact[+] diff --git a/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh b/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh index dde2c8f2da..336ec9db9a 100644 --- a/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh +++ b/input/fsh/activitydefinitions/IMMZD2DTMeaslesMR.fsh @@ -4,14 +4,13 @@ Title: "IMMZ.D2.DT.Measles.MR" Description: "Provide measles immunization" Usage: #definition -* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeasles" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLogic" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesMedicationRequest" * status = #draft -* experimental = false +* experimental = true * date = 2023-10-03 * publisher = "World Health Organization (WHO)" * contact[+] @@ -32,15 +31,3 @@ Usage: #definition * expression * language = #text/cql * expression = "'proposal'" -* dynamicValue[+] - * path = "dispenseRequest.validityPeriod.start" - * expression - * description = "Due date of the dose" - * language = #text/cql-identifier - * expression = "Schedule Due Date for MCV dose" -* dynamicValue[+] - * path = "dispenseRequest.validityPeriod.end" - * expression - * description = "Expiration date for MCV dose" - * language = #text/cql-identifier - * expression = "Expiration Date for MCV dose" diff --git a/input/fsh/actors/CommunityHealthWorker.fsh b/input/fsh/actors/CommunityHealthWorker.fsh index cbdecd7d72..fa8914a7e0 100644 --- a/input/fsh/actors/CommunityHealthWorker.fsh +++ b/input/fsh/actors/CommunityHealthWorker.fsh @@ -7,5 +7,5 @@ Usage: #example * identifier.value = "CommunityHealthWorker" * name = "CommunityHealthWorker" * title = "Community Health Worker" -* experimental = false +* experimental = true * description = "Community health workers provide health education, referral and follow-up; case management and basic preventive health care; and home visiting services to specific communities. They provide support and assistance to clients by reminding clients to take their vaccinations, responding to emergencies, and reporting births." \ No newline at end of file diff --git a/input/fsh/actors/EPIManager.fsh b/input/fsh/actors/EPIManager.fsh index a9ea45f7e5..fd6034ce70 100644 --- a/input/fsh/actors/EPIManager.fsh +++ b/input/fsh/actors/EPIManager.fsh @@ -7,5 +7,5 @@ Usage: #example * identifier.value = "EPIM" * name = "EPIManager" * title = "Expanded Programme on Immunization (EPI) Manager" -* experimental = false +* experimental = true * description = "Responsible for: developing annual and multi-annual plans; immunization communication and mobilization; management of logistics, the cold chain, and vaccines; monitoring, supervision and evaluation of immunization services; and coordination of EPI activities at the national and subnational levels." \ No newline at end of file diff --git a/input/fsh/actors/HealthWorker.fsh b/input/fsh/actors/HealthWorker.fsh index 38dbd53c00..94752148f1 100644 --- a/input/fsh/actors/HealthWorker.fsh +++ b/input/fsh/actors/HealthWorker.fsh @@ -7,5 +7,5 @@ Usage: #example * identifier.value = "HW" * name = "HealthcareWorker" * title = "Healthcare Worker" -* experimental = false +* experimental = true * description = "Health workers facilitate education sessions, administers immunizations, provide counselling when needed, record stock movements, and compiles/generates reports." \ No newline at end of file diff --git a/input/fsh/codesystems/ICD11.fsh b/input/fsh/codesystems/ICD11.fsh index 8cbe404aa6..0d86d80aa4 100644 --- a/input/fsh/codesystems/ICD11.fsh +++ b/input/fsh/codesystems/ICD11.fsh @@ -1,10 +1,10 @@ CodeSystem: ICD11 -Id: ICD11 Title: "ICD-11" Description: "ICD-11." - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablecodesystem" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablecodesystem" * ^url = $ICD11 -//* ^hierarchyMeaning = #is-a +* ^hierarchyMeaning = #is-a * ^experimental = true * ^caseSensitive = true 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..f000512769 --- /dev/null +++ b/input/fsh/codesystems/IMMZConcepts.fsh @@ -0,0 +1,78 @@ +CodeSystem: IMMZConcepts +Title: "Immunizations Concepts CodeSystem" +Description: "This code system defines concepts used in SMART Immunizations" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablecodesystem" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablecodesystem" +* ^experimental = true +* ^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.DE1 "Immunization event status" "The current status of the individual immunization event" +* #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.DE5 "Reason vaccine was not administered" "The reason this immunization event was not performed" +* #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" +* #D.DE18 "Vaccine brand" "The brand or trade name used to refer to the vaccine received" +* #D.DE173 "Live attenuated vaccine" "Uses a living but weakened version of the virus or one that’s very similar" +* #D.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" +* #D.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" +* #D.DE21 "Country of vaccination" "The service delivery country where the vaccine administration occurred" +* #D.DE22 "Vaccination location" "The service delivery location where the vaccine administration occurred" +* #D.DE23 "Vaccine manufacturer" "The manufacturer of the vaccine product" +* #D.DE24 "Vaccine batch number" "Batch number or lot number of vaccine" +* #D.DE25 "Vaccine market authorization holder" "Name of the market authorization holder of the vaccine received. If market authorization holder is unknown, vaccine manufacturer is REQUIRED" +* #D.DE26 "Expiration date" "The expiration date of the vaccine" +* #D.DE34 "Dose quantity" "The quantity of vaccine product that was administered" +* #D.DE35 "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" +* #D.DE124 "Dose number" "Vaccine dose number including dose number within series" +* #D.DE125 "Total doses in series" "The recommended number of doses for immunity according to the national protocol" + + +* #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..2bd6d983b6 100644 --- a/input/fsh/codesystems/VaccineProducts.fsh +++ b/input/fsh/codesystems/VaccineProducts.fsh @@ -1,7 +1,8 @@ CodeSystem: VaccineProducts -Title: "Vaccine Product codes CodeSet" +Title: "Vaccine Product codes CodeSet" Description: "Vaccine Product codes, containing the different available products." - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablecodesystem" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablecodesystem" * ^experimental = true * ^caseSensitive = 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.C.SexToAdministrativeGender.fsh b/input/fsh/conceptmaps/IMMZ.C.SexToAdministrativeGender.fsh deleted file mode 100644 index 13f6efb14a..0000000000 --- a/input/fsh/conceptmaps/IMMZ.C.SexToAdministrativeGender.fsh +++ /dev/null @@ -1,27 +0,0 @@ -Instance: IMMZCSexToAdministrativeGender -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" -* status = #active -* experimental = false -* date = "2023-08-09" - -* group[+] - * source = Canonical(IMMZ.C) - * target = $GENDER - * insert ElementMap(DE6, male, equivalent) - * insert ElementMap(DE7, female, equivalent) - * insert ElementMap(DE8, unknown, equivalent) - * insert ElementMap(DE9, other, wider) - -* group[+] - * source = $GENDER - * target = Canonical(IMMZ.C) - * insert ElementMap(male, DE6, equivalent) - * insert ElementMap(female, DE7, equivalent) - * insert ElementMap(unknown, DE8, equivalent) - * insert ElementMap(other, DE9, narrower) - * element[=].target[=].comment = "The source concept is more specific than the target" \ No newline at end of file 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/IMMZConceptsToAdministrativeGender.fsh b/input/fsh/conceptmaps/IMMZConceptsToAdministrativeGender.fsh new file mode 100644 index 0000000000..6f446da242 --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToAdministrativeGender.fsh @@ -0,0 +1,28 @@ +Instance: IMMZConceptsToAdministrativeGender +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ.C sex coding to FHIR Administrative Gender." +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableconceptmap" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableconceptmap" + +* name = "IMMZConceptsToAdministrativeGender" +* title = "ConceptMap to and from Immunization Concepts to administrative gender" +* status = #active +* experimental = true + +* group[+] + * source = Canonical(IMMZConcepts) + * target = $GENDER + * insert ElementMap(C.DE6, male, equivalent) + * insert ElementMap(C.DE7, female, equivalent) + * insert ElementMap(C.DE8, unknown, equivalent) + * insert ElementMap(C.DE9, other, wider) + +* group[+] + * source = $GENDER + * target = Canonical(IMMZConcepts) + * insert ElementMap(male, C.DE6, equivalent) + * insert ElementMap(female, C.DE7, equivalent) + * insert ElementMap(unknown, C.DE8, equivalent) + * insert ElementMap(other, C.DE9, narrower) + * element[=].target[=].comment = "The source concept is more specific than the target" \ No newline at end of file diff --git a/input/fsh/conceptmaps/IMMZConceptsToICD11.fsh b/input/fsh/conceptmaps/IMMZConceptsToICD11.fsh new file mode 100644 index 0000000000..19287ce44e --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToICD11.fsh @@ -0,0 +1,62 @@ +Instance: IMMZConceptsToICD11 +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ Concepts to ICD-11" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableconceptmap" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableconceptmap" + +* name = "IMMZConceptsToICD11" +* title = "ConceptMap to and from ICD-11" +* status = #active +* experimental = true + +* 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..d7922c3109 --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToLOINC.fsh @@ -0,0 +1,61 @@ +Instance: IMMZConceptsToLOINC +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ Concepts to LOINC" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableconceptmap" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableconceptmap" + +* name = "IMMZConceptsToLOINC" +* title = "ConceptMap to and from LOINC" +* status = #active +* experimental = true + +* 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..aa55317bf3 --- /dev/null +++ b/input/fsh/conceptmaps/IMMZConceptsToSNOMED.fsh @@ -0,0 +1,78 @@ +Instance: IMMZConceptsToSNOMED +InstanceOf: ConceptMap +Description: "Mapping to and from IMMZ Concepts to SNOMED" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableconceptmap" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableconceptmap" + +* name = "IMMZConceptsToSNOMED" +* title = "ConceptMap to and from SNOMED" +* status = #active +* experimental = true + +* 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/extensions/SGIMMAdministeredProduct.fsh b/input/fsh/extensions/SGIMMAdministeredProduct.fsh index c678bfadef..4c6a7cd41a 100644 --- a/input/fsh/extensions/SGIMMAdministeredProduct.fsh +++ b/input/fsh/extensions/SGIMMAdministeredProduct.fsh @@ -2,4 +2,5 @@ Extension: SGIMMAdministeredProduct Id: sg-ext-administeredProduct Title: "SGAdministeredProduct" Description: "The product administered" +* ^experimental = true * value[x] only Reference(SGVaccineProduct) or CodeableConcept \ No newline at end of file diff --git a/input/fsh/extensions/SGMedicationClassification.fsh b/input/fsh/extensions/SGMedicationClassification.fsh index 051ce0be3d..fdfe175db1 100644 --- a/input/fsh/extensions/SGMedicationClassification.fsh +++ b/input/fsh/extensions/SGMedicationClassification.fsh @@ -1,6 +1,6 @@ Extension: SGMedicationClassification Description: "Medication Classification." Context: Medication - +* ^experimental = true * value[x] only CodeableConcept * value[x] from VaccineTypes (required) \ No newline at end of file diff --git a/input/fsh/libraries/IMMZCommon.fsh b/input/fsh/libraries/IMMZCommon.fsh index a0ca2ec768..acaae3d2fc 100644 --- a/input/fsh/libraries/IMMZCommon.fsh +++ b/input/fsh/libraries/IMMZCommon.fsh @@ -3,14 +3,17 @@ InstanceOf: Library Title: "IMMZCommon" Description: "This library defines common terminologies and functions used throughout the Immunization CPG" Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" * url = "http://smart.who.int/immunizations-measles/Library/IMMZCommon" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZCommon" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-IMMZCommon.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZCommonIzDataElements.fsh b/input/fsh/libraries/IMMZCommonIzDataElements.fsh deleted file mode 100644 index ec75b0fee8..0000000000 --- a/input/fsh/libraries/IMMZCommonIzDataElements.fsh +++ /dev/null @@ -1,16 +0,0 @@ -Instance: IMMZCommonIzDataElements -InstanceOf: Library -Title: "IMMZCommonIzDataElements" -Description: "This library defines common terminologies and functions used throughout the Immunization CPG" -Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZCommonIzDataElements" -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZCommonIzDataElements" -* 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 diff --git a/input/fsh/libraries/IMMZConcepts.fsh b/input/fsh/libraries/IMMZConcepts.fsh index 3e375bbd1f..28ece082ca 100644 --- a/input/fsh/libraries/IMMZConcepts.fsh +++ b/input/fsh/libraries/IMMZConcepts.fsh @@ -3,14 +3,17 @@ InstanceOf: Library Title: "IMMZConcepts" Description: "This library defines concepts used throughout the Immunization CPG" Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" * url = "http://smart.who.int/immunizations-measles/Library/IMMZConcepts" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZConcepts" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-IMMZConcepts.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZConfig.fsh b/input/fsh/libraries/IMMZConfig.fsh index 69f88ee1cf..f974e5c75b 100644 --- a/input/fsh/libraries/IMMZConfig.fsh +++ b/input/fsh/libraries/IMMZConfig.fsh @@ -3,14 +3,17 @@ InstanceOf: Library Title: "IMMZConfig" Description: "This library defines configuration points for the Immunization CPG" Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" * url = "http://smart.who.int/immunizations-measles/Library/IMMZConfig" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZConfig" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-IMMZConfig.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZD2DTMeaslesDose0Logic.fsh b/input/fsh/libraries/IMMZD2DTMeaslesDose0Logic.fsh new file mode 100644 index 0000000000..968e362867 --- /dev/null +++ b/input/fsh/libraries/IMMZD2DTMeaslesDose0Logic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZD2DTMeaslesDose0Logic +InstanceOf: Library +Title: "IMMZD2DTMeaslesDose0Logic" +Description: "This library defines decision support logic for the D2.DT.Measles Dose 0 decision table in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesDose0Logic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZD2DTMeaslesDose0Logic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZD2DTMeaslesDose0Logic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZD2DTMeaslesLTLogic.fsh b/input/fsh/libraries/IMMZD2DTMeaslesLTLogic.fsh new file mode 100644 index 0000000000..c896eccff8 --- /dev/null +++ b/input/fsh/libraries/IMMZD2DTMeaslesLTLogic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZD2DTMeaslesLTLogic +InstanceOf: Library +Title: "IMMZD2DTMeaslesLTLogic" +Description: "This library defines decision support logic for the D2.DT.Measles Dose 0 decision table in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZD2DTMeaslesLTLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZD2DTMeaslesLTLogic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh b/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh index 6f387a074d..752285b6b8 100644 --- a/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh +++ b/input/fsh/libraries/IMMZD2DTMeaslesLogic.fsh @@ -3,14 +3,17 @@ InstanceOf: Library Title: "IMMZD2DTMeaslesLogic" Description: "This library defines decision support logic for the D2.DT.Measles decision table in the Immunization CPG" Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" * url = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLogic" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZD2DTMeaslesLogic" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-IMMZD2DTMeaslesLogic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZD2DTMeaslesOTLogic.fsh b/input/fsh/libraries/IMMZD2DTMeaslesOTLogic.fsh new file mode 100644 index 0000000000..2cbfabe826 --- /dev/null +++ b/input/fsh/libraries/IMMZD2DTMeaslesOTLogic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZD2DTMeaslesOTLogic +InstanceOf: Library +Title: "IMMZD2DTMeaslesOTLogic" +Description: "This library defines decision support logic for the D2.DT.Measles Dose 0 decision table in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesOTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZD2DTMeaslesOTLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZD2DTMeaslesOTLogic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZD2DTMeaslesSupplementaryLogic.fsh b/input/fsh/libraries/IMMZD2DTMeaslesSupplementaryLogic.fsh new file mode 100644 index 0000000000..752f996825 --- /dev/null +++ b/input/fsh/libraries/IMMZD2DTMeaslesSupplementaryLogic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZD2DTMeaslesSupplementaryLogic +InstanceOf: Library +Title: "IMMZD2DTMeaslesSupplementaryLogic" +Description: "This library defines decision support logic for the D2.DT.Measles Dose 0 decision table in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesSupplementaryLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZD2DTMeaslesSupplementaryLogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZD2DTMeaslesSupplementaryLogic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZD5DTMeaslesCILogic.fsh b/input/fsh/libraries/IMMZD5DTMeaslesCILogic.fsh new file mode 100644 index 0000000000..5ab99c4e3a --- /dev/null +++ b/input/fsh/libraries/IMMZD5DTMeaslesCILogic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZD5DTMeaslesCILogic +InstanceOf: Library +Title: "IMMZD5DTMeaslesCILogic" +Description: "This library defines decision support logic for the D2.DT.Measles Dose 0 decision table in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZD5DTMeaslesCILogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZD5DTMeaslesCILogic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZD5DTMeaslesCILogic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZDT08.fsh b/input/fsh/libraries/IMMZDT08.fsh deleted file mode 100644 index e817508c26..0000000000 --- a/input/fsh/libraries/IMMZDT08.fsh +++ /dev/null @@ -1,16 +0,0 @@ -Instance: IMMZDT08 -InstanceOf: Library -Title: "IMMZDT08" -Description: "This library defines decision support logic for the IMMZ.DT.08 decision table 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 -* publisher = "World Health Organization (WHO)" -* type = $library-type#logic-library -* content.id = "ig-loader-IMMZDT08.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZElements.fsh b/input/fsh/libraries/IMMZElements.fsh new file mode 100644 index 0000000000..f37a5d47d9 --- /dev/null +++ b/input/fsh/libraries/IMMZElements.fsh @@ -0,0 +1,19 @@ +Instance: IMMZElements +InstanceOf: Library +Title: "IMMZElements" +Description: "This library defines context-independent elements used throughout the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZElements" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZElements" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* 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..03b874afbe --- /dev/null +++ b/input/fsh/libraries/IMMZEncounterElements.fsh @@ -0,0 +1,19 @@ +Instance: IMMZEncounterElements +InstanceOf: Library +Title: "IMMZEncounterElements" +Description: "This library defines encounter-based elements used throughout the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZEncounterElements" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZEncounterElements" +* status = #draft +* experimental = true +* 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 deleted file mode 100644 index 543e3378b9..0000000000 --- a/input/fsh/libraries/IMMZIND08.fsh +++ /dev/null @@ -1,16 +0,0 @@ -Instance: IMMZIND08 -InstanceOf: Library -Title: "IMMZIND08" -Description: "This library defines population criteria for the IND.08 indicator in the Immunization CPG" -Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZIND08" -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZIND08" -* status = #draft -* experimental = false -* publisher = "World Health Organization (WHO)" -* type = $library-type#logic-library -* content.id = "ig-loader-IMMZIND08.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZIND08Logic.fsh b/input/fsh/libraries/IMMZIND08Logic.fsh new file mode 100644 index 0000000000..fc8d0b2356 --- /dev/null +++ b/input/fsh/libraries/IMMZIND08Logic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZIND08Logic +InstanceOf: Library +Title: "IMMZ.IND.08 Logic" +Description: "This library defines population criteria for the IND.08 indicator in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZIND08Logic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZIND08Logic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZIND08Logic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZIND12Logic.fsh b/input/fsh/libraries/IMMZIND12Logic.fsh new file mode 100644 index 0000000000..0866956bd1 --- /dev/null +++ b/input/fsh/libraries/IMMZIND12Logic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZIND12Logic +InstanceOf: Library +Title: "IMMZ.IND.12 Logic" +Description: "This library defines population criteria logic for the IND.12 indicator in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZIND12Logic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZIND12Logic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZIND12Logic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZIND13Logic.fsh b/input/fsh/libraries/IMMZIND13Logic.fsh new file mode 100644 index 0000000000..bfb44ad748 --- /dev/null +++ b/input/fsh/libraries/IMMZIND13Logic.fsh @@ -0,0 +1,19 @@ +Instance: IMMZIND13Logic +InstanceOf: Library +Title: "IMMZ.IND.13 Logic" +Description: "This library defines population criteria logic for the IND.13 indicator in the Immunization CPG" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZIND13Logic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZIND13Logic" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* type = $library-type#logic-library +* content.id = "ig-loader-IMMZIND13Logic.cql" \ No newline at end of file diff --git a/input/fsh/libraries/IMMZINDMeasles.fsh b/input/fsh/libraries/IMMZINDMeasles.fsh deleted file mode 100644 index cbbd9c577f..0000000000 --- a/input/fsh/libraries/IMMZINDMeasles.fsh +++ /dev/null @@ -1,16 +0,0 @@ -Instance: IMMZINDMeasles -InstanceOf: Library -Title: "IMMZINDMeasles" -Description: "This library defines population criteria for the Measles indicator in the Immunization CPG" -Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZINDMeasles" -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZINDMeasles" -* 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 diff --git a/input/fsh/libraries/IMMZIndicatorCommon.fsh b/input/fsh/libraries/IMMZIndicatorCommon.fsh deleted file mode 100644 index e8331cab51..0000000000 --- a/input/fsh/libraries/IMMZIndicatorCommon.fsh +++ /dev/null @@ -1,16 +0,0 @@ -Instance: IMMZIndicatorCommon -InstanceOf: Library -Title: "IMMZIndicatorCommon" -Description: "This library defines common terminologies and functions used throughout the Immunization CPG" -Usage: #definition -* url = "http://smart.who.int/immunizations-measles/Library/IMMZIndicatorCommon" -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZIndicatorCommon" -* 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 diff --git a/input/fsh/libraries/IMMZIndicatorElements.fsh b/input/fsh/libraries/IMMZIndicatorElements.fsh new file mode 100644 index 0000000000..9af8f983fe --- /dev/null +++ b/input/fsh/libraries/IMMZIndicatorElements.fsh @@ -0,0 +1,19 @@ +Instance: IMMZIndicatorElements +InstanceOf: Library +Title: "IMMZIndicatorElements" +Description: "This library defines indicator-based elements and terminologies used throughout the Immunization CPG indicators" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/immunizations-measles/Library/IMMZIndicatorElements" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* name = "IMMZIndicatorElements" +* status = #draft +* experimental = true +* 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..4a666d8bc4 100644 --- a/input/fsh/libraries/IMMZVaccineLibrary.fsh +++ b/input/fsh/libraries/IMMZVaccineLibrary.fsh @@ -3,14 +3,17 @@ InstanceOf: Library Title: "IMMZVaccineLibrary" Description: "This library defines logic and mappings for the use of vaccines in the Immunization CPG" Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" * url = "http://smart.who.int/immunizations-measles/Library/IMMZVaccineLibrary" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable -* version = "0.1.0" * name = "IMMZVaccineLibrary" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-IMMZVaccineLibrary.cql" \ No newline at end of file diff --git a/input/fsh/libraries/WHOCommon.fsh b/input/fsh/libraries/WHOCommon.fsh index b017031ff7..e4adf537a2 100644 --- a/input/fsh/libraries/WHOCommon.fsh +++ b/input/fsh/libraries/WHOCommon.fsh @@ -3,14 +3,18 @@ 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" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/base-clinical/Library/WHOCommon" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable * version = "0.1.0" * name = "WHOCommon" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-WHOCommon.cql" \ No newline at end of file diff --git a/input/fsh/libraries/WHOConcepts.fsh b/input/fsh/libraries/WHOConcepts.fsh index 6fae47188a..cf0a82de54 100644 --- a/input/fsh/libraries/WHOConcepts.fsh +++ b/input/fsh/libraries/WHOConcepts.fsh @@ -3,14 +3,18 @@ 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" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/base-clinical/Library/WHOConcepts" * extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" * valueCode = #computable * version = "0.1.0" * name = "WHOConcepts" * status = #draft -* experimental = false +* experimental = true * publisher = "World Health Organization (WHO)" * type = $library-type#logic-library * content.id = "ig-loader-WHOConcepts.cql" \ No newline at end of file diff --git a/input/fsh/libraries/WHOElements.fsh b/input/fsh/libraries/WHOElements.fsh new file mode 100644 index 0000000000..55da74db8c --- /dev/null +++ b/input/fsh/libraries/WHOElements.fsh @@ -0,0 +1,20 @@ +Instance: WHOElements +InstanceOf: Library +Title: "WHOElements" +Description: "This library defines context-independent elements used throughout WHO SMART Guidelines content" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/base-clinical/Library/WHOElements" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* version = "0.1.0" +* name = "WHOElements" +* status = #draft +* experimental = true +* 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..b8342e9db1 --- /dev/null +++ b/input/fsh/libraries/WHOEncounterElements.fsh @@ -0,0 +1,20 @@ +Instance: WHOEncounterElements +InstanceOf: Library +Title: "WHOEncounterElements" +Description: "This library defines encounter-based elements used throughout WHO SMART Guidelines content" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" +* meta.profile[+] = "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" +* url = "http://smart.who.int/base-clinical/Library/WHOEncounterElements" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* version = "0.1.0" +* name = "WHOEncounterElements" +* status = #draft +* experimental = true +* 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/IMMZIND08.fsh similarity index 51% rename from input/fsh/measures/IMMZIND05.fsh rename to input/fsh/measures/IMMZIND08.fsh index 22f463ee91..214a07f988 100644 --- a/input/fsh/measures/IMMZIND05.fsh +++ b/input/fsh/measures/IMMZIND08.fsh @@ -1,41 +1,43 @@ -Instance: IMMZIND05 +Instance: IMMZIND08 InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm -Title: "IMMZIND05" +Title: "IMMZ.IND.08 Immunization coverage for Measles containing vaccine (Estimated Denominator)" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure" +* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean -* description = "IMMZ.IND.05 Measles indicator for first dose." -* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND05" -* 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 +* experimental = true * date = "2023-10-05" -* name = "IMMZIND05" +* name = "IMMZIND08" +* title = "IMMZ.IND.08 Immunization coverage for Measles containing vaccine (Estimated Denominator)" * publisher = "World Health Organization (WHO)" -* library = "http://smart.who.int/immunizations-measles/Library/IMMZINDMeasles" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZIND08Logic" * 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" + * id = "IMMZ.IND.08.IP" * description = "Initial Population" * code = $measure-population#initial-population "Initial Population" - * criteria.language = #text/cql - * criteria.expression = "Initial Population 05" + * criteria.language = #text/cql-identifier + * criteria.expression = "Initial Population" * population[measurePopulation] * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean - * id = "IMMZ.IND.05.MP" + * id = "IMMZ.IND.08.MP" * description = "Measure Population" * code = $measure-population#measure-population "Measure Population" - * criteria.language = #text/cql - * criteria.expression = "Measure Population 05" + * 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.05.MO" + * id = "IMMZ.IND.08.MO" * description = "Measure Observation" * code = $measure-population#measure-observation - * criteria.language = #text/cql - * criteria.expression = "Measure Observation 05" + * criteria.language = #text/cql-identifier + * criteria.expression = "Measure Observation" * stratifier[+] - * id = "IMMZ.IND.05.S" - * criteria.language = #text/cql + * id = "IMMZ.IND.08.S" + * criteria.language = #text/cql-identifier * 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..cfb27f7b4a --- /dev/null +++ b/input/fsh/measures/IMMZIND12.fsh @@ -0,0 +1,45 @@ +Instance: IMMZIND12 +InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm +Title: "IMMZ.IND.12 Measles indicator for first dose" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure" +* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean +* description = "The percentage in the target population who have received one dose of measles and rubella vaccine during reporting period" +* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND12" +* status = #draft +* experimental = true +* date = "2023-10-12" +* name = "IMMZIND12" +* title = "IMMZ.IND.12 Measles indicator for first dose" +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO Immunization facility analysis guide" +* relatedArtifact[+] + * type = #citation + * citation = "WHO Handbook on immunization data" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZIND12Logic" +* scoring = $measure-scoring#proportion "Proportion" +* group[+] + * population[initialPopulation] + * id = "IMMZ.IND.12.IP" + * description = "Number in target group" + * code = $measure-population#initial-population "Initial Population" + * criteria.language = #text/cql-identifier + * criteria.expression = "Initial Population" + * population[denominator] + * id = "IMMZ.IND.12.DEN" + * description = "Number in target group" + * code = $measure-population#denominator "Denominator" + * criteria.language = #text/cql-identifier + * criteria.expression = "Denominator" + * population[numerator] + * id = "IMMZ.IND.12.NUM" + * description = "Number of measles and rubella doses (1st dose) administered through routine services during reporting period" + * 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..6d05586a1d --- /dev/null +++ b/input/fsh/measures/IMMZIND13.fsh @@ -0,0 +1,45 @@ +Instance: IMMZIND13 +InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm +Title: "IMMZ.IND.13 Measles indicator for second dose" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure" +* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean +* description = "The percentage in the target population who have received second dose of measles and rubella vaccine during reporting period" +* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND13" +* status = #draft +* experimental = true +* date = "2023-10-13" +* name = "IMMZIND13" +* title = "IMMZ.IND.13 Measles indicator for second dose" +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO Immunization facility analysis guide" +* relatedArtifact[+] + * type = #citation + * citation = "WHO Handbook on immunization data" +* library = "http://smart.who.int/immunizations-measles/Library/IMMZIND13Logic" +* scoring = $measure-scoring#proportion "Proportion" +* group[+] + * population[initialPopulation] + * id = "IMMZ.IND.13.IP" + * description = "Number in target group as defined by member states" + * code = $measure-population#initial-population "Initial Population" + * criteria.language = #text/cql-identifier + * criteria.expression = "Initial Population" + * population[denominator] + * id = "IMMZ.IND.13.DEN" + * description = "Number in target group as defined by member states" + * code = $measure-population#denominator "Denominator" + * criteria.language = #text/cql-identifier + * criteria.expression = "Denominator" + * population[numerator] + * id = "IMMZ.IND.13.NUM" + * description = "Number of measles and rubella doses (2nd dose) administered through routine services during reporting period" + * 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/measures/IMMZIND40.fsh b/input/fsh/measures/IMMZIND40.fsh deleted file mode 100644 index c8cd700b5e..0000000000 --- a/input/fsh/measures/IMMZIND40.fsh +++ /dev/null @@ -1,41 +0,0 @@ -Instance: IMMZIND40 -InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cv-measure-cqfm -Title: "IMMZIND40" - -* description = "IMMZ.IND.40 Measles indicator for second dose." -* url = "http://smart.who.int/immunizations-measles/Measure/IMMZIND40" -* version = "0.1.0" -* status = #draft -* experimental = false -* date = "2023-10-05" -* name = "IMMZIND40" -* 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" - * description = "Initial Population" - * code = $measure-population#initial-population "Initial Population" - * criteria.language = #text/cql - * criteria.expression = "Initial Population 40" - * population[measurePopulation] - * extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis].valueCode = #boolean - * id = "IMMZ.IND.40.MP" - * description = "Measure Population" - * code = $measure-population#measure-population "Measure Population" - * criteria.language = #text/cql - * criteria.expression = "Measure Population 40" - * 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" - * description = "Measure Observation" - * code = $measure-population#measure-observation - * criteria.language = #text/cql - * criteria.expression = "Measure Observation 40" - * stratifier[+] - * id = "IMMZ.IND.40.S" - * criteria.language = #text/cql - * 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..4df1b4a1c8 100644 --- a/input/fsh/models/IMMZCRegisterClient.fsh +++ b/input/fsh/models/IMMZCRegisterClient.fsh @@ -3,50 +3,50 @@ 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." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^extension[http://hl7.org/fhir/tools/StructureDefinition/logical-target].valueBoolean = true -* ^name = "IMMZCRegisterClient" * ^status = #active +* ^experimental = true * 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..82ce54614f 100644 --- a/input/fsh/models/IMMZD1clienthistorymeasles.fsh +++ b/input/fsh/models/IMMZD1clienthistorymeasles.fsh @@ -1,28 +1,28 @@ -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." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true * 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..8ea4b873cd 100644 --- a/input/fsh/models/IMMZD4CheckContraindicationsMeasles.fsh +++ b/input/fsh/models/IMMZD4CheckContraindicationsMeasles.fsh @@ -1,11 +1,11 @@ -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." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true * 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..07ff592de8 100644 --- a/input/fsh/models/IMMZDUpdateVaccinationRecord.fsh +++ b/input/fsh/models/IMMZDUpdateVaccinationRecord.fsh @@ -1,123 +1,50 @@ - -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." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" * ^extension[http://hl7.org/fhir/tools/StructureDefinition/logical-target].valueBoolean = true -* ^name = "IMMZDUpdateVaccinationRecord" * ^status = #active +* ^experimental = true * 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[+] = IMMZConcepts#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/plandefinitions/IMMZD2DTMeasles.fsh b/input/fsh/plandefinitions/IMMZD2DTMeasles.fsh deleted file mode 100644 index db62e4f09f..0000000000 --- a/input/fsh/plandefinitions/IMMZD2DTMeasles.fsh +++ /dev/null @@ -1,25 +0,0 @@ -Instance: IMMZD2DTMeasles -InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition -Title: "IMMZ.D2.DT.Measles" -Description: "If the child or patient has not been given MCV1 (at 9 months) and MCV2 (between 15-18 months) vaccination" -Usage: #definition - -* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLogic" -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZD2DTMeasles" -* status = #draft -* experimental = false -* publisher = "World Health Organization (WHO)" -* action[+] - * title = "Immunize patient for Measles" - * description = "Provide measles immunization" - * condition[+] - * kind = #applicability - * expression - * description = "Provision of the MCV dose" - * language = #text/cql-identifier - * expression = "Provision of the MCV dose" - * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) \ No newline at end of file diff --git a/input/fsh/plandefinitions/IMMZD2DTMeaslesCI.fsh b/input/fsh/plandefinitions/IMMZD2DTMeaslesCI.fsh deleted file mode 100644 index 9887a42c29..0000000000 --- a/input/fsh/plandefinitions/IMMZD2DTMeaslesCI.fsh +++ /dev/null @@ -1,36 +0,0 @@ -Instance: IMMZD2DTMeaslesCI -InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition -Title: "IMMZ.D2.DT.Measles.Contraindication" -Description: "Check contraindications for Measles vaccine" -Usage: #definition - -* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeasles" -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZD2DTMeaslesContraindication" -* status = #draft -* experimental = false -* publisher = "World Health Organization (WHO)" -* action[+] - * title = "Check Contraindication for Measles Immunization" - * description = "Contraindication for measles immunization" - * type = $action-type#update - * condition[+] - * kind = #applicability - * expression - * description = "MCV Dose Contraindicated" - * language = #text/cql-identifier - * expression = "MCV Dose Contraindicated" - * definitionCanonical = Canonical(IMMZD2DTMeaslesCIMR) -* action[+] - * title = "Evaluate Contraindication for Measles" - * description = "Provide further evaluation for measles contraindication" - * condition[+] - * kind = #applicability - * expression - * description = "Contraindication Evaluation of the MCV dose" - * language = #text/cql-identifier - * expression = "Contraindication Evaluation of the MCV dose" - * definitionCanonical = Canonical(IMMZD2DTMeaslesEval) \ No newline at end of file diff --git a/input/fsh/plandefinitions/IMMZD2DTMeaslesDose0.fsh b/input/fsh/plandefinitions/IMMZD2DTMeaslesDose0.fsh new file mode 100644 index 0000000000..78b4932cd6 --- /dev/null +++ b/input/fsh/plandefinitions/IMMZD2DTMeaslesDose0.fsh @@ -0,0 +1,82 @@ +Instance: IMMZD2DTMeaslesDose0 +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "IMMZ.D2.DT.Measles MCV Dose 0" +Description: "If the child or patient has not been given MCV0 between 6 and 9 months" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" + +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesDose0Logic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/immunizations-measles/PlanDefinition/IMMZD2DTMeaslesDose0" +* name = "IMMZD2DTMeaslesDose0" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO recommendations for routine immunization - summary tables (March 2023)" +* action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "Note: The countries should apply the national immunization policy for MCV0 dose and adjust this logic accordingly.
A supplementary dose of MCV (recorded as MCV0) should be considered for infants known to be exposed (i.e. born to an HIV-infected woman) or soon after diagnosis of HIV infection in children older than 6 months who are not receiving HAART and for whom the risk of measles is high, with the aim of providing partial protection until they are revaccinated after immune reconstitution with HAART.
In the following situations, a supplementary dose of MCV should be given to infants from 6 months of age:
* (1) during a measles outbreak as part of intensified service delivery;
* (2) during campaigns in settings where the risk of measles among infants < 9 months of age remains high (e.g. in endemic countries experiencing regular outbreaks);
* (3) for internally displaced populations and refugees, and populations in conflict zones;
* (4) for individual infants at high risk of contracting measles (e.g. contacts of known measles cases or in settings with increased risk of exposure during outbreaks such as day-care facilities);
* (5)for infants travelling to countries experiencing measles outbreaks;
* (6) infants known to be HIV-infected or exposed (i.e. born to an HIV-infected woman).
In areas where there is a high incidence of both HIV infection and measles, an initial dose of MCV may be offered as early as age 6 months (recorded as MCV0). The 2 routine doses of MCV (MCV1 and MCV2) should then be administered to these children according to the national immunization schedule.
As a general rule, live vaccines should be given either simultaneously or at intervals of 4 weeks. An exception to this rule is OPV, which can be given at any time before or after measles vaccination without interference in the response to either vaccine." + * title = "Immunize patient for Measles" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Measles Routine Immunization Schedule Incomplete" + * action[+] + * title = "Consider MCV0 Dose" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "No MCV0 Doses Administered" + * action[+] + * title = "Client Age Less Than 6 Months" + * description = "Should not vaccinate client for MCV0 as client is less than 6 months. Check for any vaccines due, and inform the caregiver of when to come back for MCV0." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Age Less Than 6 Months" + * action[+] + * title = "Last Live Vaccine Administered Within 4 Weeks" + * description = "Should not vaccinate client for MCV0 as live vaccine was administered in the last 4 weeks. Check for any vaccines due, and inform the caregiver of when to come back for MCV0." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Last Live Vaccine Administered Within 4 Weeks" + * action[+] + * title = "Provide Measles Vaccine" + * description = "May vaccinate client for MCV0 as client is within appropriate age range, MCV0 was not administered and no live vaccine was administered in the last 4 weeks. Check if one of the MCV0 specific scenarios is applicable." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Is Due For MCV0" + * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.start" + * expression + * description = "Due date of the dose" + * language = #text/cql-identifier + * expression = "MCV0 Schedule Date" + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.end" + * expression + * description = "Expiration date for MCV dose" + * language = #text/cql-identifier + * expression = "MCV0 Expiration Date" + * action[+] + * title = "MCV0 Dose Administered" + * description = "MCV0 was administered. Check measles routine immunization schedule." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "MCV0 Dose Administered" diff --git a/input/fsh/plandefinitions/IMMZD2DTMeaslesLT.fsh b/input/fsh/plandefinitions/IMMZD2DTMeaslesLT.fsh new file mode 100644 index 0000000000..b5b6e283b4 --- /dev/null +++ b/input/fsh/plandefinitions/IMMZD2DTMeaslesLT.fsh @@ -0,0 +1,132 @@ +Instance: IMMZD2DTMeaslesLT +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "IMMZ.D2.DT.Measles Low Transmission" +Description: "If the child or patient has not been given MCV1 (at 12 months) and MCV2 (between 15-18 months) vaccination" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" + +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesLTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/immunizations-measles/PlanDefinition/IMMZD2DTMeaslesLT" +* name = "IMMZD2DTMeaslesLT" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO recommendations for routine immunization - summary tables (March 2023)" +* action[+] + * title = "Immunize patient for Measles" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Measles Routine Immunization Schedule Incomplete" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "In countries with low levels of measles transmission MCV1 may be administered at 12 months of age.
As a general rule, live vaccines should be given either simultaneously or at intervals of 4 weeks. An exception to this rule is OPV, which can be given at any time before or after measles vaccination without interference in the response to either vaccine." + * title = "Provide primary series measles vaccination (MCV1)" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "No Primary Series Doses Administered" + * action[+] + * title = "Client Age Less Than 12 Months" + * description = "Should not vaccinate client as client's age is less than 12 months. Check for any vaccines due, and inform the caregiver of when to come back for MCV1." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Age Less Than 12 Months" + * action[+] + * title = "Last Live Vaccine Administered Within 4 Weeks" + * description = "Should not vaccinate client for MCV1 as live vaccine was administered in the last 4 weeks. Check for any vaccines due and inform the caregiver of when to come back for MCV1." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Last Live Vaccine Administered Within 4 Weeks" + * action[+] + * title = "Provide Measles Vaccine" + * description = "Should vaccinate client for MCV1 as no measles doses were administered, client is within appropriate age range and no live vaccine administered in the last 4 weeks. Check for contraindications." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Is Due For MCV1" + * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.start" + * expression + * description = "Due date of the dose" + * language = #text/cql-identifier + * expression = "MCV1 Schedule Date" + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.end" + * expression + * description = "Expiration date for MCV dose" + * language = #text/cql-identifier + * expression = "MCV1 Expiration Date" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "In countries with low levels of measles transmission, administration of MCV2 at 15-18 months of age ensures early protection of the individual.
The minimum interval between MCV1 and MCV2 is 4 weeks.
As a general rule, live vaccines should be given either simultaneously or at intervals of 4 weeks. An exception to this rule is OPV, which can be given at any time before or after measles vaccination without interference in the response to either vaccine." + * title = "Provide primary series measles vaccination (MCV2)" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "One Primary Series Dose Administered" + * action[+] + * title = "Client Age Less Than 15 Months" + * description = "Should not vaccinate client for MCV2 as client's age is less than 15 months. Check for any vaccines due, and inform the caregiver of when to come back for MCV2." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Age Less Than 15 Months" + * action[+] + * title = "Last Live Vaccine Administered Within 4 Weeks" + * description = "Should not vaccinate client for MCV2 as live vaccine was administered in the last 4 weeks. Check for any vaccines due, and inform the caregiver of when to come back for MCV2." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Last Live Vaccine Administered Within 4 Weeks" + * action[+] + * title = "Provide Measles Vaccine" + * description = "Should vaccinate client for MCV2 as client is within appropriate age range and no live vaccine administered in the last 4 weeks. Check for contraindications." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Is Due For MCV2" + * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.start" + * expression + * description = "Due date of the dose" + * language = #text/cql-identifier + * expression = "MCV2 Schedule Date" + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.end" + * expression + * description = "Expiration date for MCV dose" + * language = #text/cql-identifier + * expression = "MCV2 Expiration Date" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "An additional dose of MCV should be administered to HIV-infected children receiving HAART following immune reconstitution. If CD4+ T lymphocyte counts are monitored, an additional dose of MCV should be administered when immune reconstitution has been achieved, e.g. when the CD4+ T lymphocyte count reaches 20–25%. Where CD4+ T lymphocyte monitoring is not available, children should receive an additional dose of MCV 6–12 months after initiation of HAART." + * title = "Measles primary series is complete." + * description = "Measles primary series is complete. Two measles primary series doses were administered. Check if a measles supplementary dose is appropriate for the client." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Two Primary Series Doses Administered" diff --git a/input/fsh/plandefinitions/IMMZD2DTMeaslesOT.fsh b/input/fsh/plandefinitions/IMMZD2DTMeaslesOT.fsh new file mode 100644 index 0000000000..b8d4d4b315 --- /dev/null +++ b/input/fsh/plandefinitions/IMMZD2DTMeaslesOT.fsh @@ -0,0 +1,132 @@ +Instance: IMMZD2DTMeaslesOT +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "IMMZ.D2.DT.Measles Ongoing Transmission" +Description: "If the child or patient has not been given MCV1 (at 9 months) and MCV2 (between 15-18 months) vaccination" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" + +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesOTLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/immunizations-measles/PlanDefinition/IMMZD2DTMeaslesOT" +* name = "IMMZD2DTMeaslesOT" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO recommendations for routine immunization - summary tables (March 2023)" +* action[+] + * title = "Immunize patient for Measles" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Measles Routine Immunization Schedule Incomplete" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "In countries with ongoing transmission in which the risk of measles mortality remains high, MCV1 should be given at age 9 months.
As a general rule, live vaccines should be given either simultaneously or at intervals of 4 weeks. An exception to this rule is OPV, which can be given at any time before or after measles vaccination without interference in the response to either vaccine." + * title = "Provide primary series measles vaccination (MCV1)" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "No Primary Series Doses Administered" + * action[+] + * title = "Client Age Less Than 9 Months" + * description = "Should not vaccinate client as client's age is less than 9 months. Check for any vaccines due, and inform the caregiver of when to come back for MCV1." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Age Less Than 9 Months" + * action[+] + * title = "Last Live Vaccine Administered Within 4 Weeks" + * description = "Should not vaccinate client for MCV1 as live vaccine was administered in the last 4 weeks. Check for any vaccines due and inform the caregiver of when to come back for MCV1." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Last Live Vaccine Administered Within 4 Weeks" + * action[+] + * title = "Provide Measles Vaccine" + * description = "Should vaccinate client for MCV1 as no measles doses were administered, client is within appropriate age range and no live vaccine administered in the last 4 weeks. Check for contraindications." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Is Due For MCV1" + * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.start" + * expression + * description = "Due date of the dose" + * language = #text/cql-identifier + * expression = "MCV1 Schedule Date" + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.end" + * expression + * description = "Expiration date for MCV dose" + * language = #text/cql-identifier + * expression = "MCV1 Expiration Date" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "In countries with ongoing transmission in which the risk of measles mortality remains high, MCV2 should be given between 15-18 months. The minimum interval between MCV1 and MCV2 is 4 weeks.
As a general rule, live vaccines should be given either simultaneously or at intervals of 4 weeks. An exception to this rule is OPV, which can be given at any time before or after measles vaccination without interference in the response to either vaccine." + * title = "Provide primary series measles vaccination (MCV2)" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "One Primary Series Dose Administered" + * action[+] + * title = "Client Age Less Than 15 Months" + * description = "Should not vaccinate client for MCV2 as client's age is less than 15 months. Check for any vaccines due, and inform the caregiver of when to come back for MCV2." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Age Less Than 15 Months" + * action[+] + * title = "Last Live Vaccine Administered Within 4 Weeks" + * description = "Should not vaccinate client for MCV2 as live vaccine was administered in the last 4 weeks. Check for any vaccines due, and inform the caregiver of when to come back for MCV2." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Last Live Vaccine Administered Within 4 Weeks" + * action[+] + * title = "Provide Measles Vaccine" + * description = "Should vaccinate client for MCV2 as client is within appropriate age range and no live vaccine administered in the last 4 weeks. Check for contraindications." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Is Due For MCV2" + * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.start" + * expression + * description = "Due date of the dose" + * language = #text/cql-identifier + * expression = "MCV2 Schedule Date" + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.end" + * expression + * description = "Expiration date for MCV dose" + * language = #text/cql-identifier + * expression = "MCV2 Expiration Date" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "An additional dose of MCV should be administered to HIV-infected children receiving HAART following immune reconstitution. If CD4+ T lymphocyte counts are monitored, an additional dose of MCV should be administered when immune reconstitution has been achieved, e.g. when the CD4+ T lymphocyte count reaches 20–25%. Where CD4+ T lymphocyte monitoring is not available, children should receive an additional dose of MCV 6–12 months after initiation of HAART." + * title = "Measles primary series is complete" + * description = "Measles primary series is complete. Two measles primary series doses were administered. Check if a measles supplementary dose is appropriate for the client." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Two Primary Series Doses Administered" diff --git a/input/fsh/plandefinitions/IMMZD2DTMeaslesSupplementary.fsh b/input/fsh/plandefinitions/IMMZD2DTMeaslesSupplementary.fsh new file mode 100644 index 0000000000..53b3512e4e --- /dev/null +++ b/input/fsh/plandefinitions/IMMZD2DTMeaslesSupplementary.fsh @@ -0,0 +1,74 @@ +Instance: IMMZD2DTMeaslesSupplementary +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "IMMZ.D2.DT.Measles MCV Dose 0" +Description: "If the child or patient has not been given a supplementary dose" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" + +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD2DTMeaslesSupplementaryLogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/immunizations-measles/PlanDefinition/IMMZD2DTMeaslesSupplementary" +* name = "IMMZD2DTMeaslesSupplementary" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO recommendations for routine immunization - summary tables (March 2023)" +* action[+] + * title = "Immunize patient for Measles" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Measles Routine Immunization Schedule Complete" + * action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "An additional dose of MCV should be administered to HIV-infected children receiving HAART following immune reconstitution. If CD4+ T lymphocyte counts are monitored, an additional dose of MCV should be administered when immune reconstitution has been achieved, e.g. when the CD4+ T lymphocyte count reaches 20–25%. Where CD4+ T lymphocyte monitoring is not available, children should receive an additional dose of MCV 6–12 months after initiation of HAART.
As a general rule, live vaccines should be given either simultaneously or at intervals of 4 weeks. An exception to this rule is OPV, which can be given at any time before or after measles vaccination without interference in the response to either vaccine" + * title = "Consider supplementary dose" + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "No Supplementary Dose Administered" + * action[+] + * title = "Last Live Vaccine Administered Within 4 Weeks" + * description = "Should not vaccinate client for measles supplementary dose as live vaccine was administered in the last 4 weeks. Check for any vaccines due, and inform the caregiver of when to come back for supplementary dose." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Last Live Vaccine Administered Within 4 Weeks" + * action[+] + * title = "Provide Measles Vaccine" + * description = "May vaccinate client for measles supplementary dose as supplementary dose was not administered, measles routine immunization schedule is complete and no live vaccine administered in the last 4 weeks. Check if one of the measles supplementary dose specific scenarios is applicable." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Client Is Due For Supplementary Dose" + * definitionCanonical = Canonical(IMMZD2DTMeaslesMR) + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.start" + * expression + * description = "Due date of the dose" + * language = #text/cql-identifier + * expression = "MCV Supplementary Schedule Date" + * dynamicValue[+] + * path = "dispenseRequest.validityPeriod.end" + * expression + * description = "Expiration date for MCV dose" + * language = #text/cql-identifier + * expression = "MCV Supplementary Expiration Date" + * action[+] + * title = "Supplementary Dose Administered" + * description = "Measles immunization schedule is complete. Measles supplementary dose was administered." + * condition[+] + * kind = #applicability + * expression + * language = #text/cql-identifier + * expression = "Supplementary Dose Administered" diff --git a/input/fsh/plandefinitions/IMMZD5DTMeaslesCI.fsh b/input/fsh/plandefinitions/IMMZD5DTMeaslesCI.fsh new file mode 100644 index 0000000000..dfd0f8e39b --- /dev/null +++ b/input/fsh/plandefinitions/IMMZD5DTMeaslesCI.fsh @@ -0,0 +1,47 @@ +Instance: IMMZD5DTMeaslesCI +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition +Title: "IMMZ.D5.DT.Measles.Contraindication" +Description: "Check contraindications for Measles vaccine" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" + +* library = "http://smart.who.int/immunizations-measles/Library/IMMZD5DTMeaslesCILogic" +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/immunizations-measles/PlanDefinition/IMMZD5DTMeaslesCI" +* name = "IMMZD5DTMeaslesContraindication" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO recommendations for routine immunization - summary tables (March 2023)" +* action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "While vaccines are universally recommended, some clients may have contraindications to particular vaccines.
Additional contraindications may be included in WHO position papers for the vaccine - Measles vaccines: WHO position paper (April 2017)." + * title = "Check Contraindication for Measles Immunization" + * description = "Contraindication for measles immunization" + * type = $action-type#update + * condition[+] + * kind = #applicability + * expression + * description = "MCV Dose Contraindicated" + * language = #text/cql-identifier + * expression = "MCV Dose Contraindicated" + * definitionCanonical = Canonical(IMMZD2DTMeaslesCIMR) +* action[+] + * extension[+] + * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale" + * valueMarkdown = "While vaccines are universally recommended, some clients may have contraindications to particular vaccines.
Additional contraindications may be included in WHO position papers for the vaccine - Measles vaccines: WHO position paper (April 2017)." + * title = "Evaluate Contraindication for Measles" + * description = "Provide further evaluation for measles contraindication" + * condition[+] + * kind = #applicability + * expression + * description = "Contraindication Evaluation of the MCV dose" + * language = #text/cql-identifier + * expression = "Contraindication Evaluation of the MCV dose" + * definitionCanonical = Canonical(IMMZD2DTMeaslesEval) \ No newline at end of file diff --git a/input/fsh/plandefinitions/IMMZDTImmunizationStrategy.fsh b/input/fsh/plandefinitions/IMMZDTImmunizationStrategy.fsh new file mode 100644 index 0000000000..e2fdf90621 --- /dev/null +++ b/input/fsh/plandefinitions/IMMZDTImmunizationStrategy.fsh @@ -0,0 +1,48 @@ +Instance: IMMZDTImmunizationStrategy +InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-strategydefinition +Title: "IMMZ.DT.Immunization Strategy" +Description: "Provide vaccinations according to the recommended schedule" +Usage: #definition +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition" + +* extension[+] + * url = "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability" + * valueCode = #computable +* url = "http://smart.who.int/immunizations-measles/PlanDefinition/IMMZDTImmunizationStrategy" +* name = "IMMZDTImmunizationStrategy" +* status = #draft +* experimental = true +* publisher = "World Health Organization (WHO)" +* relatedArtifact[+] + * type = #citation + * citation = "WHO recommendations for routine immunization - summary tables (March 2023)" +* action[+] + * title = "Check Immunizations" + * description = "Check immunization plan definitions to see what is required." + * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications + * selectionBehavior = #all + * action[+] + * title = "Measles Dose 0" + * description = "Consider measles dose 0 immunization" + * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications + * selectionBehavior = #all + * definitionCanonical = Canonical(IMMZD2DTMeaslesDose0) + * action[+] + * title = "Measles Routine Immunization" + * description = "Provide measles routine immunization" + * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications + * selectionBehavior = #all + * definitionCanonical = Canonical(IMMZD2DTMeaslesOT) + * action[+] + * title = "Measles Supplementary Dose" + * description = "Consider measles supplementary dose" + * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications + * selectionBehavior = #all + * definitionCanonical = Canonical(IMMZD2DTMeaslesSupplementary) + * action[+] + * title = "Measles Contraindications" + * description = "Check measles contraindications" + * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications + * selectionBehavior = #all + * definitionCanonical = Canonical(IMMZD5DTMeaslesCI) \ No newline at end of file diff --git a/input/fsh/plandefinitions/IMMZDTUmbrella.fsh b/input/fsh/plandefinitions/IMMZDTUmbrella.fsh deleted file mode 100644 index fdc2f1f07d..0000000000 --- a/input/fsh/plandefinitions/IMMZDTUmbrella.fsh +++ /dev/null @@ -1,25 +0,0 @@ -Instance: IMMZDTUmbrella -InstanceOf: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-strategydefinition -Title: "IMMZ.DT.Umbrella" -Description: "If the child or patient has not been given MCV1 (at 9 months) and MCV2 (between 15-18 months) vaccination" -Usage: #definition - -* extension[+] - * url = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" - * valueCode = #computable -* version = "0.1.0" -* name = "IMMZDTUmbrella" -* status = #draft -* experimental = false -* publisher = "World Health Organization (WHO)" -* action[+] - * title = "Check Immunizations" - * description = "Check immunization plan definitions to see what is required." - * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications - * selectionBehavior = #all - * action[+] - * title = "Immunize patient for Measles" - * description = "Provide measles immunization" - * code = http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-common-process-cs#dispense-medications - * selectionBehavior = #all - * definitionCanonical = Canonical(IMMZD2DTMeasles) \ No newline at end of file diff --git a/input/fsh/profiles/SGImmunization.fsh b/input/fsh/profiles/SGImmunization.fsh index 7007b166cf..06711bb9e3 100644 --- a/input/fsh/profiles/SGImmunization.fsh +++ b/input/fsh/profiles/SGImmunization.fsh @@ -1,5 +1,8 @@ Profile: SGImmunization Parent: Immunization Description: "A record of an immunization, with a given product" - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "A record of an immunization, with a given product" * extension contains SGIMMAdministeredProduct named administeredProduct 0..1 \ No newline at end of file diff --git a/input/fsh/profiles/SGVaccineProduct.fsh b/input/fsh/profiles/SGVaccineProduct.fsh index 2e87979450..f55fde8dfb 100644 --- a/input/fsh/profiles/SGVaccineProduct.fsh +++ b/input/fsh/profiles/SGVaccineProduct.fsh @@ -1,5 +1,8 @@ Profile: SGVaccineProduct Parent: Medication Description: "A Vaccine product" - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "A Vaccine product" * extension contains SGMedicationClassification named classification 0..* MS diff --git a/input/fsh/profiles/SGVaccineProposal.fsh b/input/fsh/profiles/SGVaccineProposal.fsh index 65ea997529..21ca098891 100644 --- a/input/fsh/profiles/SGVaccineProposal.fsh +++ b/input/fsh/profiles/SGVaccineProposal.fsh @@ -1,5 +1,9 @@ Profile: SGVaccineProposal Parent: MedicationRequest Description: "An order for immunization (for a disease, not a specific product)" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "An order for immunization (for a disease, not a specific product)" * intent = #proposal * medicationCodeableConcept from VaccineTypes \ No newline at end of file diff --git a/input/fsh/profiles/SGVaccineRequest.fsh b/input/fsh/profiles/SGVaccineRequest.fsh index 2b9db0a4fc..6211b274d9 100644 --- a/input/fsh/profiles/SGVaccineRequest.fsh +++ b/input/fsh/profiles/SGVaccineRequest.fsh @@ -1,5 +1,9 @@ Profile: SGVaccineRequest Parent: MedicationRequest Description: "An order for an actual product" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition" +* ^experimental = true +* ^title = "An order for an actual product" * intent = #instance-order * medication[x] only Reference(SGVaccineProduct) \ No newline at end of file diff --git a/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh b/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh index 5338da2b5a..ab8910bdfe 100644 --- a/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh +++ b/input/fsh/questionnaires/QIMMZCAdministerVaccine.fsh @@ -1,14 +1,16 @@ -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" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablequestionnaire" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablequestionnaire" * subjectType = #Patient * language = #en * title = "Administer Vaccine" * status = #active +* experimental = true * contained[+] = VSMeaslesVaccineProducts * contained[+] = SGImmunizationStatusCodes * contained[+] = AllVaccineTypes diff --git a/input/fsh/questionnaires/QIMMZCRegisterClient.fsh b/input/fsh/questionnaires/QIMMZCRegisterClient.fsh index 16917acd80..251fda62cc 100644 --- a/input/fsh/questionnaires/QIMMZCRegisterClient.fsh +++ b/input/fsh/questionnaires/QIMMZCRegisterClient.fsh @@ -3,8 +3,10 @@ InstanceOf: sdc-questionnaire-extr-smap Title: "Client Registration Questionnaire" Description: "Immunization - Client Registration Questionnaire" Usage: #definition -* version = "2023" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablequestionnaire" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablequestionnaire" * status = #draft +* experimental = true * subjectType = #Patient * language = #en * contained[+] = IMMZ.C.DE5 @@ -19,28 +21,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 +50,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..af141787cb 100644 --- a/input/fsh/questionnaires/QIMMZD1ClientHistoryMeasles.fsh +++ b/input/fsh/questionnaires/QIMMZD1ClientHistoryMeasles.fsh @@ -3,9 +3,10 @@ InstanceOf: sdc-questionnaire-extr-smap Title: "Capture Client History Questionnaire" Description: "Immunization - Capture Client History Questionnaire" Usage: #definition -* id = "IMMZD1ClientHistoryMeasles" -* version = "2023" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablequestionnaire" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablequestionnaire" * status = #draft +* experimental = true * subjectType = #Patient * language = #en * status = #draft @@ -17,41 +18,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..a091943e42 100644 --- a/input/fsh/questionnaires/QIMMZD4CheckContraindicationsMeasles.fsh +++ b/input/fsh/questionnaires/QIMMZD4CheckContraindicationsMeasles.fsh @@ -3,8 +3,10 @@ InstanceOf: sdc-questionnaire-extr-smap Title: "Check Contraindications Questionnaire" Description: "Immunization - Check Contraindications Questionnaire" Usage: #definition -* version = "2023" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablequestionnaire" +* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablequestionnaire" * status = #draft +* experimental = true * subjectType = #Patient * language = #en * status = #draft @@ -13,9 +15,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/ARVDrugs-values.fsh b/input/fsh/valuesets/ARVDrugs-values.fsh index 229fa538f9..e5df28db12 100644 --- a/input/fsh/valuesets/ARVDrugs-values.fsh +++ b/input/fsh/valuesets/ARVDrugs-values.fsh @@ -2,8 +2,11 @@ ValueSet: ARVDrugsvalues Id: ARVDrugs-values Title: "ARV Drugs values" Description: "Codes representing ARV Drugs values" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true * $SCT#713540004 "Substance with antiretroviral mechanism of action (substance)" * $SCT#788075003 "Medicinal product acting as antiretroviral agent (product)" diff --git a/input/fsh/valuesets/AllVaccineTypes.fsh b/input/fsh/valuesets/AllVaccineTypes.fsh index 6d3fdbe532..fe92605c0f 100644 --- a/input/fsh/valuesets/AllVaccineTypes.fsh +++ b/input/fsh/valuesets/AllVaccineTypes.fsh @@ -2,9 +2,11 @@ ValueSet: AllVaccineTypes Id: AllVaccineTypes Title: "Vaccine Type ValueSet" Description: "Vaccine type Codes, containing the different types of antigens used in vaccine guidelines." - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #active -* ^experimental = false +* ^experimental = true * codes from system ICD11 where parent = #XM28X5 diff --git a/input/fsh/valuesets/CountryValueSet.fsh b/input/fsh/valuesets/CountryValueSet.fsh index 484a6eb232..c08fa0a8f9 100644 --- a/input/fsh/valuesets/CountryValueSet.fsh +++ b/input/fsh/valuesets/CountryValueSet.fsh @@ -5,6 +5,9 @@ Title: "Country ValueSet" Description: """This value set defines a base set of codes for countries. Note: The codes for countries are taken from [ISO 3166](https://www.iso.org/iso-3166-country-codes.html).""" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft * ^experimental = true * include codes from system ISO3166Part1 \ No newline at end of file diff --git a/input/fsh/valuesets/HIVstatus-values.fsh b/input/fsh/valuesets/HIVstatus-values.fsh index 0601c302f0..a7a0e6334d 100644 --- a/input/fsh/valuesets/HIVstatus-values.fsh +++ b/input/fsh/valuesets/HIVstatus-values.fsh @@ -5,8 +5,11 @@ Id: HIVstatus-values Title: "HIV status values" Description: "Codes representing HIV status values" //don't touch status, experimental, immutable +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true //fill in codes, check AL_CodeSystems.fsh for the short names of the codesystem * $SCT#278977008 "Human immunodeficiency virus status (observable entity)" diff --git a/input/fsh/valuesets/IMMZ.C.DE5.fsh b/input/fsh/valuesets/IMMZ.C.DE5.fsh index 553934150f..6f0a4475dc 100644 --- a/input/fsh/valuesets/IMMZ.C.DE5.fsh +++ b/input/fsh/valuesets/IMMZ.C.DE5.fsh @@ -2,10 +2,13 @@ ValueSet: IMMZ.C.DE5 Title: "IMMZ.C.DE5 ValueSet for Sex" Description: "ValueSet for Sex for IMMZ.C.DE5." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #active -* ^experimental = false +* ^experimental = true * ^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..3ebe8f89d2 100644 --- a/input/fsh/valuesets/IMMZ.D1.DE10.fsh +++ b/input/fsh/valuesets/IMMZ.D1.DE10.fsh @@ -1,11 +1,13 @@ ValueSet: IMMZ.D1.DE10 Title: "IMMZ.D1.DE10 ValueSet for HIV Status" Description: "ValueSet for HIV Status for IMMZ.D1.DE10." - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #active * ^name = "IMMZ_D1_DE10" -* ^experimental = false +* ^experimental = true -* 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..bae0e71810 --- /dev/null +++ b/input/fsh/valuesets/IMMZ.D1.DE1VS.fsh @@ -0,0 +1,12 @@ +ValueSet: IMMZ.D1.DE1VS +Title: "IMMZ.D1.DE1 CodeSystem for Immunization status" +Description: "CodeSystem for IMMZ.D1.DE1 Immunization status" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" +* ^experimental = true +* ^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..467e11aa38 --- /dev/null +++ b/input/fsh/valuesets/IMMZ.D1.DE5VS.fsh @@ -0,0 +1,21 @@ +ValueSet: IMMZ.D1.DE5VS +Title: "IMMZ.D1.DE5 values for Reason Not Done" +Description: "Values for IMMZ.D1.DE5 Reason Not Done" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" +* ^experimental = true +* ^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..816706f2f6 100644 --- a/input/fsh/valuesets/IMMZ.D4.DE161.fsh +++ b/input/fsh/valuesets/IMMZ.D4.DE161.fsh @@ -2,15 +2,17 @@ ValueSet: IMMZ.D4.DE161 Title: "IMMZ.D4.DE161 ValueSet for Potential Contraindications" Description: "ValueSet for Potential Contraindications for IMMZ.D4.DE161." - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #active * ^name = "IMMZ_D4_DE161" -* ^experimental = false +* ^experimental = true -* 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/input/fsh/valuesets/IMMZ.Z.DE9.fsh b/input/fsh/valuesets/IMMZ.Z.DE9.fsh index 75ccd05055..707eb17f14 100644 --- a/input/fsh/valuesets/IMMZ.Z.DE9.fsh +++ b/input/fsh/valuesets/IMMZ.Z.DE9.fsh @@ -1,10 +1,12 @@ ValueSet: IMMZ.Z.DE9 -Title: "IMMZ.Z.DE10 ValueSet for Measles Vaccines" -Description: "ValueSet for Measles Vaccines for IMMZ.Z.DE9." - +Title: "IMMZ.Z.DE9 ValueSet for Measles Vaccines" +Description: "ValueSet for Measles Vaccines for IMMZ.Z.DE9" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #active -* ^name = "IMMZ_Z_DE9" -* ^experimental = false +* ^name = "IMMZZDE9" +* ^experimental = true * $ICD11#XM28X5 "Measles vaccines" * $ICD11#XM8L15 "Measles, live attenuated" diff --git a/input/fsh/valuesets/ImmunizationStatusCodes.fsh b/input/fsh/valuesets/ImmunizationStatusCodes.fsh index cb5ab2fcc7..9becd3b2de 100644 --- a/input/fsh/valuesets/ImmunizationStatusCodes.fsh +++ b/input/fsh/valuesets/ImmunizationStatusCodes.fsh @@ -3,8 +3,11 @@ ValueSet: SGImmunizationStatusCodes Id: SGImmunizationStatusCodes Title: "Immunization Status Codes" Description: "The value set to instantiate this attribute should be drawn from a terminologically robust code system that consists of or contains concepts to support describing the current status of the administered dose of vaccine." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * EventStatus#completed * EventStatus#entered-in-error * EventStatus#not-done \ No newline at end of file diff --git a/input/fsh/valuesets/Immunocompromised-values.fsh b/input/fsh/valuesets/Immunocompromised-values.fsh index dc3740310e..77a85d80b3 100644 --- a/input/fsh/valuesets/Immunocompromised-values.fsh +++ b/input/fsh/valuesets/Immunocompromised-values.fsh @@ -2,8 +2,11 @@ ValueSet: Immunocompromisedvalues Id: Immunocompromised-values Title: "Immunocompromised valueset" Description: "Codes representing Immunocompromised values" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true * $SCT#370388006 "Patient immunocompromised" * $SCT#370391006 "Patient immunosuppressed" diff --git a/input/fsh/valuesets/LiveAttenuatedVaccines.fsh b/input/fsh/valuesets/LiveAttenuatedVaccines.fsh index 1c2b6e2a3c..064a4fd8fd 100644 --- a/input/fsh/valuesets/LiveAttenuatedVaccines.fsh +++ b/input/fsh/valuesets/LiveAttenuatedVaccines.fsh @@ -4,9 +4,12 @@ ValueSet: LiveAttenuatedVaccines Id: LiveAttenuatedVaccines Title: "Set of live attenuated vaccines" Description: "Codes representing live attenuated vaccines" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" //don't touch status, experimental, immutable * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true //fill in codes, check AL_CodeSystems.fsh for the short names of the codesystem * $ICD11#XM8142 diff --git a/input/fsh/valuesets/MeaslesVaccineProducts.fsh b/input/fsh/valuesets/MeaslesVaccineProducts.fsh index bf29e057b5..559a398a29 100644 --- a/input/fsh/valuesets/MeaslesVaccineProducts.fsh +++ b/input/fsh/valuesets/MeaslesVaccineProducts.fsh @@ -2,4 +2,8 @@ ValueSet: VSMeaslesVaccineProducts Id: VSMeaslesVaccineProducts Title: "MeaslesVaccine Products ValueSet" Description: "Vaccine Product Codes - representing the codes of the products currently available." +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" +* ^experimental = true * codes from system VaccineProducts //where classification = "XM28X5" \ No newline at end of file diff --git a/input/fsh/valuesets/MeaslesVaccineTypes.fsh b/input/fsh/valuesets/MeaslesVaccineTypes.fsh index 277a4844e2..2bebafef86 100644 --- a/input/fsh/valuesets/MeaslesVaccineTypes.fsh +++ b/input/fsh/valuesets/MeaslesVaccineTypes.fsh @@ -2,8 +2,11 @@ ValueSet: VaccineTypes Id: VaccineTypes Title: "Measles Vaccine Type ValueSet" Description: "Measles Vaccine type Codes, containing the different types of antigens used in vaccine guidelines." - +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #active +* ^experimental = true * codes from system ICD11 where parent = #XM28X5 * ICD11#XM28X5 diff --git a/input/fsh/valuesets/Negativetestresult-values.fsh b/input/fsh/valuesets/Negativetestresult-values.fsh index a2ffb1de1b..b7b860df4e 100644 --- a/input/fsh/valuesets/Negativetestresult-values.fsh +++ b/input/fsh/valuesets/Negativetestresult-values.fsh @@ -5,8 +5,11 @@ Id: Negativetestresult-values Title: "Negative Test Results" Description: "Codes representing negative test result values" //don't touch status, experimental, immutable +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true //fill in codes, check AL_CodeSystems.fsh for the short names of the codesystem * $SCT#260385009 "Negative (qualifier value)" diff --git a/input/fsh/valuesets/PositiveTestResult-values.fsh b/input/fsh/valuesets/PositiveTestResult-values.fsh index 7efbab02e3..6a4b6d3dc8 100644 --- a/input/fsh/valuesets/PositiveTestResult-values.fsh +++ b/input/fsh/valuesets/PositiveTestResult-values.fsh @@ -2,7 +2,10 @@ ValueSet: PositiveTestResultvalues Id: PositiveTestResult-values Title: "Positive Test Result valuest" Description: "Codes representing Positive Test Result values" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true * $SCT#10828004 "Positive (qualifier value)" diff --git a/input/fsh/valuesets/birthweight-values.fsh b/input/fsh/valuesets/birthweight-values.fsh index f20f8162f8..804c774fca 100644 --- a/input/fsh/valuesets/birthweight-values.fsh +++ b/input/fsh/valuesets/birthweight-values.fsh @@ -2,8 +2,11 @@ ValueSet: Birthweightvalues Id: Birthweight-values Title: "Birthweight valueset" Description: "Codes representing Birthweight values" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^immutable = true * $SCT#276610007 "Birthweight" * $LNC#8339-4 "Birth weight Measured" diff --git a/input/fsh/valuesets/pregnancystatus-values.fsh b/input/fsh/valuesets/pregnancystatus-values.fsh index fd934cfb8c..fcef858f39 100644 --- a/input/fsh/valuesets/pregnancystatus-values.fsh +++ b/input/fsh/valuesets/pregnancystatus-values.fsh @@ -1,12 +1,14 @@ Alias: $m49.htm = http://unstats.un.org/unsd/methods/m49/m49.htm -ValueSet: pregnancystatus-values +ValueSet: PregnancyStatusValues Id: pregnancystatus-values Title: "Pregnancy status values" Description: "Codes representing possible values for the Pregnancy status element" -* ^version = "0.1.0" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset" +* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset" * ^status = #draft -* ^experimental = false +* ^experimental = true * ^date = "2023-10-12T09:43:25-04:00" * ^publisher = "World Health Organization (WHO)" * ^contact.name = "World Health Organization (WHO)" @@ -17,6 +19,7 @@ Description: "Codes representing possible values for the Pregnancy status elemen * LOINC#LA15173-0 "Pregnant" * LOINC#LA26683-5 "Not pregnant" * LOINC#LA4489-6 "Unknown" +// TODO: These should not be in this set, this should be handled with mapping, yes? * SNOMED_CT_INT#77386006 "Pregnant" * SNOMED_CT_INT#60001007 "Not pregnant" * SNOMED_CT_INT#261665006 "Unknown" \ No newline at end of file diff --git a/input/pagecontent/changes.md b/input/pagecontent/changes.md index d24173eaa7..2ca1c48f12 100644 --- a/input/pagecontent/changes.md +++ b/input/pagecontent/changes.md @@ -1,4 +1,5 @@ This page provides a list of changes to the WHO Immunization SMART Guidelines Implementation Guide since its initial release. +### Initial Release (v0.1.0) -Technical changes can be tracked in each resource or in the history page, when published. +This is the initial release of the SMART Immunizations Measles Demonstration implementation guide. \ No newline at end of file diff --git a/sushi-config.yaml b/sushi-config.yaml index b832ab4c78..f64c7b725f 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -5,10 +5,11 @@ # ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ 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 +experimental: true version: 0.1.0 fhirVersion: 4.0.1 # https://www.hl7.org/fhir/valueset-FHIR-version.html copyrightYear: 2023+ @@ -25,10 +26,14 @@ publisher: # use cases, the value can be an object with keys for id, uri, and version. # dependencies: - who.base: dev + hl7.terminology: 5.5.0 + hl7.fhir.uv.extensions.r4: 5.1.0 + hl7.fhir.uv.cql: 1.0.0 + hl7.fhir.uv.crmi: 1.0.0 hl7.fhir.uv.sdc: 3.0.0 hl7.fhir.uv.cpg: current hl7.fhir.us.cqfmeasures: current + fhir.cqf.common: 4.0.1 # # @@ -161,7 +166,10 @@ menu: meta: profile: - - http://smart.who.int/smart-base/ImplementationGuide-SGImplementationGuide + - http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableimplementationguide + - http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableimplementationguide + - http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-computableguideline +# - http://smart.who.int/smart-base/ImplementationGuide-SGImplementationGuide # ╭───────────────────────────Less Common Implementation Guide Properties──────────────────────────╮ # │ Uncomment the properties below to configure additional properties on the ImplementationGuide │ @@ -295,6 +303,8 @@ meta: parameters: produce-jekyll-data: true + path-expansion-params: + - ../../input/_resources/exp-params.json path-resource: - input/actors - input/maps @@ -304,3 +314,7 @@ parameters: - http://id.who.int/icd/release/11/mms - http://hl7.org/fhir/ValueSet/immunization-status - http://hl7.org/fhir/ValueSet/country + - http://smart.who.int/base-clinical/Library/WHOCommon + - http://smart.who.int/base-clinical/Library/WHOConcepts + - http://smart.who.int/base-clinical/Library/WHOElements + - http://smart.who.int/base-clinical/Library/WHOEncounterElements