Quality Measure Implementation Guide
6.0.0-ballot - ballot United States of America 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 6.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/cqf-measures/ 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-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: http://hl7.org/fhir/uv/cqm/Library/MultiRateExample-FHIR
Official

MultiRateExample

Experimental: true
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

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
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