Quality Measure Implementation Guide
2.0.0-ballot - STU 2 Ballot International flag

Quality Measure Implementation Guide, published by HL7 International / Clinical Quality Information. This guide is not an authorized publication; it is the continuous build for version 2.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cqm/ and changes regularly. See the Directory of published versions

Library: Hospice FHIR Library (Experimental)

Official URL: http://hl7.org/fhir/uv/cqm/Library/Hospice Version: 2.0.000
Standards status: Informative Active as of 2019-09-03 Computable Name: Hospice
Other Identifiers: http://example.org/fhir/cqi/ecqm/Library/Identifier#Hospice (use: official, ), OID:2.16.840.1.113883.4.642.40.61.28.24

This library is used as an example in the FHIR Quality Measure Implementation Guide

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 001 from http://unstats.un.org/unsd/methods/m49/m49.htm
Topic FHIR
Topic CQL
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 from http://terminology.hl7.org/CodeSystem/library-type
Dependency Description: Library FHIRHelpers
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Dependency Description: Library Global
Resource: MAT Global Common Functions FHIR Libraryversion: null5.0.000)
Canonical URL: http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000
Dependency Description: Code System SNOMEDCT:2017-09
Resource: http://snomed.info/sct|http://snomed.info/sct/731000124108/version/201709
Canonical URL: http://snomed.info/sct|http://snomed.info/sct/731000124108/version/201709
Dependency Description: Value Set Encounter Inpatient
Resource: Encounter Inpatient
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Dependency Description: Value Set Hospice care ambulatory
Resource: Hospice Care Ambulatory
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Encounter Inpatient
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Code Filter(s):
Path: code
ValueSet: Hospice Care Ambulatory
Data Requirement Type: Procedure
Profile(s): Procedure
Code Filter(s):
Path: code
ValueSet: Hospice Care Ambulatory
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
Patient Out 0..1 Patient
Has Hospice Out 0..1 boolean
Library Content
CQL Content
/*
This example is a work in progress and should not be considered a final specification
or recommendation for guidance. This example will help guide and direct the process
of finding conventions and usage patterns that meet the needs of the various stakeholders
in the measure development community.
*/
library Hospice version '2.0.000'

using FHIR version '4.0.1'

include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers

include MATGlobalCommonFunctions version '5.0.000' called Global

codesystem "SNOMEDCT:2017-09": 'http://snomed.info/sct' version 'http://snomed.info/sct/731000124108/version/201709'

valueset "Encounter Inpatient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'
valueset "Hospice care ambulatory": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15'

code "Discharge to healthcare facility for hospice care (procedure)": '428371000124100' from "SNOMEDCT:2017-09" display 'Discharge to healthcare facility for hospice care (procedure)'
code "Discharge to home for hospice care (procedure)": '428361000124107' from "SNOMEDCT:2017-09" display 'Discharge to home for hospice care (procedure)'

parameter "Measurement Period" Interval<DateTime>
  default Interval[@2019-01-01T00:00:00.0, @2020-01-01T00:00:00.0)

context Patient

define "Has Hospice":
	exists (
    [Encounter: "Encounter Inpatient"] DischargeHospice
			where DischargeHospice.status = 'finished'
		    and (
	        DischargeHospice.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
				    or DischargeHospice.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"
	    	)
				and DischargeHospice.period ends during "Measurement Period"
	)
    or exists (
      [ServiceRequest: "Hospice care ambulatory"] HospiceOrder
        where HospiceOrder.intent = 'order'
            and HospiceOrder.authoredOn in "Measurement Period"
    )
    or exists (
      [Procedure: "Hospice care ambulatory"] HospicePerformed
        where HospicePerformed.status = 'completed'
          and Global."Normalize Interval"(HospicePerformed.performed) overlaps "Measurement Period"
    )
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates