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: Multi Rate Example Logic Library (Experimental)

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

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

Metadata
Title Multi Rate Example Logic Library
Version 2.0.0
Identifier MultiRateExample
Identifier urn:oid:2.16.840.1.113883.4.642.40.61.28.29
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: Value Set Bed Device Types
Resource: http://example.org/fhir/ValueSet/TBD
Canonical URL: http://example.org/fhir/ValueSet/TBD
Dependency Description: Value Set Screening Procedure Types
Resource: http://example.org/fhir/ValueSet/TBD
Canonical URL: http://example.org/fhir/ValueSet/TBD
Data Requirement Type: Patient
Profile(s): Patient
Data Requirement Type: PractitionerRole
Profile(s): PractitionerRole
Data Requirement Type: Device
Profile(s): Device
Code Filter(s):
Path: type
ValueSet: http://example.org/fhir/ValueSet/TBD
Data Requirement Type: Procedure
Profile(s): Procedure
Code Filter(s):
Path: code
ValueSet: http://example.org/fhir/ValueSet/TBD
Parameters
Name Use Card. Type Documentation
Location Out 0..1 Location
Patients Out 0..* Patient
Practitioners Out 0..* PractitionerRole
Beds Out 0..* Device
Screening Procedures Out 0..* Procedure
Initial Population Out 0..* Patient
Denominator Out 0..* Patient
Numerator Out 0..* Patient
Library Content
CQL Content
library MultiRateExample

using FHIR version '4.0.1'

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

valueset "Bed Device Types": 'http://example.org/fhir/ValueSet/TBD'
valueset "Screening Procedure Types": 'http://example.org/fhir/ValueSet/TBD'

context Location

// Number of patients
define "Patients":
  [Patient]

// Number of practitioners
define "Practitioners":
  [PractitionerRole]

// Number of beds
define "Beds":
  [Device: "Bed Device Types"]

// Number of screening procedures
define "Screening Procedures":
  [Procedure: "Screening Procedure Types"]

// Percentage of patients who received screening
define "Initial Population":
  "Patients"

define "Denominator":
  "Patients" P
    where P.gender = 'female'

define "Numerator":
  "Patients" P
    with "Screening Procedures" SP
      such that P.id = Last(Split(SP.subject.reference, '/'))

define function ToNumber(patient Patient):
  if patient is not null then 1 else 0

define function ToNumber(practitionerRole PractitionerRole):
  if practitionerRole is not null then 1 else 0

define function ToNumber(device Device):
  if device is not null then 1 else 0
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates