Quality Measure STU2 for FHIR R4 Implementation Guide

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v2.0.0: STU 2) based on FHIR R4. The current version which supercedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions

Library-AdultOutpatientEncounters

Formats: XML, JSON, Turtle

Id: AdultOutpatientEncounters
Url: http://hl7.org/fhir/us/cqfmeasures/Library/AdultOutpatientEncounters
Version: 2.0.000
Identifier:

value: AdultOutpatientEncounters

Name: AdultOutpatientEncounters
Title: Adult Outpatient Encounters Common Library
Status: active
Experimental: true
Type:

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

code: logic-library

Date: 2019-09-03
Publisher: Health Level 7 International - Clinical Quality Information Work Group
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
Related Artifacts:
TypeResource
depends-onhttp://hl7.org/fhir/Library/FHIR-ModelInfo|4.0.1
depends-onhttp://hl7.org/fhir/Library/FHIRHelpers|4.0.1
depends-onhttp://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
depends-onhttp://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
depends-onhttp://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
depends-onhttp://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
depends-onhttp://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
Parameters:
NameTypeMinMaxIn/Out
Measurement PeriodPeriod01in
PatientPatient01out
Qualifying EncountersEncounter0*out
Data Requirements:
TypeProfileMSCode Filter
Encounter http://hl7.org/fhir/StructureDefinition/Encounter

code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001

Encounter http://hl7.org/fhir/StructureDefinition/Encounter

code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240

Encounter http://hl7.org/fhir/StructureDefinition/Encounter

code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025

Encounter http://hl7.org/fhir/StructureDefinition/Encounter

code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023

Encounter http://hl7.org/fhir/StructureDefinition/Encounter

code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016

Content: text/cql
library AdultOutpatientEncounters version '2.0.000'

/*
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.
*/

/*
@update: @@BTR 2020-03-31 ->
Incremented version to 2.0.000
Updated FHIR version to 4.0.1
@@@
*/

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1' called FHIRHelpers

valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
valueset "Annual Wellness Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240'
valueset "Preventive Care Services - Established Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025'
valueset "Preventive Care Services-Initial Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023'
valueset "Home Healthcare Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'

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

context Patient

define "Qualifying Encounters":
	(
    [Encounter: "Office Visit"]
  		union [Encounter: "Annual Wellness Visit"]
  		union [Encounter: "Preventive Care Services - Established Office Visit, 18 and Up"]
  		union [Encounter: "Preventive Care Services-Initial Office Visit, 18 and Up"]
  		union [Encounter: "Home Healthcare Services"]
  ) ValidEncounter
		where ValidEncounter.period during "Measurement Period"
  		and ValidEncounter.status  = 'finished'
Content: application/elm+xml
Encoded data (9792 characters)
Content: application/elm+json
Encoded data (17196 characters)