Metadata Title Hospice FHIR Library Version 2.0.000 Identifier Hospice Identifier urn:oid:2.16.840.1.113883.4.642.40.61.28.24 Approval Date 2019-08-03 Last Review Date 2019-08-03 Experimental true Jurisdiction Global (Whole world) Steward (Publisher) HL7 International / Clinical Quality Information Description This library is used as an example in the FHIR Quality Measure Implementation Guide Type Logic Library Parameter Name: Measurement Period Use: In Min Cardinality: 0 Max Cardinality: 1 Type: Period Parameter Name: Patient Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Patient Parameter Name: Has Hospice Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Data Requirement Type: Patient Profile(s): Patient Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, status, hospitalization, hospitalization.dischargeDisposition, period Code Filter(s): Path: type ValueSet: Encounter Inpatient Data Requirement Type: ServiceRequest Profile(s): ServiceRequest Must Support Elements: code, intent, authoredOn Code Filter(s): Path: code ValueSet: Hospice Care Ambulatory Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, performed Code Filter(s): Path: code ValueSet: Hospice Care Ambulatory Library Content CQL Content /*#xD; This example is a work in progress and should not be considered a final specification#xD; or recommendation for guidance. This example will help guide and direct the process#xD; of finding conventions and usage patterns that meet the needs of the various stakeholders#xD; in the measure development community.#xD; */#xD; library Hospice version '2.0.000'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers#xD; #xD; include MATGlobalCommonFunctions version '5.0.000' called Global#xD; #xD; codesystem "SNOMEDCT:2017-09": 'http://snomed.info/sct' version 'http://snomed.info/sct/731000124108/version/201709'#xD; #xD; valueset "Encounter Inpatient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'#xD; valueset "Hospice care ambulatory": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15'#xD; #xD; code "Discharge to healthcare facility for hospice care (procedure)": '428371000124100' from "SNOMEDCT:2017-09" display 'Discharge to healthcare facility for hospice care (procedure)'#xD; code "Discharge to home for hospice care (procedure)": '428361000124107' from "SNOMEDCT:2017-09" display 'Discharge to home for hospice care (procedure)'#xD; #xD; parameter "Measurement Period" Interval<DateTime>#xD; default Interval[@2019-01-01T00:00:00.0, @2020-01-01T00:00:00.0)#xD; #xD; context Patient#xD; #xD; define "Has Hospice":#xD; exists (#xD; [Encounter: "Encounter Inpatient"] DischargeHospice#xD; where DischargeHospice.status = 'finished'#xD; and (#xD; DischargeHospice.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"#xD; or DischargeHospice.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"#xD; )#xD; and DischargeHospice.period ends during "Measurement Period"#xD; )#xD; or exists (#xD; [ServiceRequest: "Hospice care ambulatory"] HospiceOrder#xD; where HospiceOrder.intent = 'order'#xD; and HospiceOrder.authoredOn in "Measurement Period"#xD; )#xD; or exists (#xD; [Procedure: "Hospice care ambulatory"] HospicePerformed#xD; where HospicePerformed.status = 'completed'#xD; and Global."Normalize Interval"(HospicePerformed.performed) overlaps "Measurement Period"#xD; )#xD; ELM XML Content Encoded data (44140 characters) ELM JSON Content Encoded data (81052 characters) Generated using version 0.4.9 of the sample-content-ig Liquid templates
HL7 International / Clinical Quality Information
This library is used as an example in the FHIR Quality Measure Implementation Guide