Quality Measure Implementation Guide (STU5)
5.0.0-ballot2 - ballot United States of America flag

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

Library: Multi Rate Example Logic Library (Experimental)

Official URL: http://hl7.org/fhir/us/cqfmeasures/Library/MultiRateExample-FHIR Version: 2.0.0
Active as of 2019-09-03 Computable Name: MultiRateExample
Other Identifiers: http://example.org/fhir/cqi/ecqm/Library/Identifier#MultiRateExample (use: official)

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

Title: Multi Rate Example Logic Library
Id: MultiRateExample-FHIR
Version: 2.0.0
Url: Multi Rate Example Logic Library
official

MultiRateExample

Experimental: true
Type:

system: LibraryType

code: logic-library

Date: 2019-09-03
Publisher: HL7 International / Clinical Quality Information
Description:

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

Jurisdiction: US
Approval Date: 2019-08-03
Last Review Date: 2019-08-03
Content: text/cql
library MultiRateExample

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

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