Quality Measure Implementation Guide (STU3 Ballot)
2.1.0 - ballot

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v2.1.0: STU3 Ballot 1) 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

Example Measure: Breast Cancer Screening

Id: BCSComponent
Url: http://hl7.org/fhir/us/cqfmeasures/Measure/BCSComponent
Version: 0.0.001
Name: BCSComponent
Title: Breast Cancer Screening
Status: draft
Experimental: true
Scoring:

system: http://terminology.hl7.org/CodeSystem/measure-scoring

code: proportion

display: Proportion

Improvement Notation:

system: http://terminology.hl7.org/CodeSystem/measure-improvement-notation

code: increase

Type:

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

code: process

Date: 2021-04-03T13:00:06-06:00
Publisher: Clinical Quality Information WG
Description: This is an example only.
Parameters:
nameuseminmaxtype
Measurement Period in 0 1 Period
SDE Sex out 0 1 Coding
Numerator out 0 1 boolean
Denominator out 0 1 boolean
Initial Population out 0 1 boolean
Patient out 0 1 Patient
Qualifying Encounters out 0 * Encounter
SDE Payer out 0 * Any
SDE Ethnicity out 0 * Coding
Denominator Exclusion out 0 1 boolean
Has Hospice out 0 1 boolean
Right Mastectomy Diagnosis out 0 * Condition
Right Mastectomy Procedure out 0 * Procedure
Left Mastectomy out 0 * Condition
Left Mastectomy Procedure out 0 * Procedure
Bilateral Mastectomy Diagnosis out 0 * Condition
Bilateral Mastectomy Procedure out 0 * Procedure
Advanced Illness and Frailty Exclusion Not Including Over Age 80 out 0 1 boolean
Has Criteria Indicating Frailty out 0 1 boolean
Outpatient Encounters with Advanced Illness out 0 * Encounter
Inpatient Encounter with Advanced Illness out 0 * Encounter
Dementia Medications In Year Before or During Measurement Period out 0 * MedicationDispense
Long Term Care Periods Longer Than 90 Consecutive Days out 0 1 boolean
Long Term Care Periods During Measurement Period out 0 * Period
SDE Race out 0 * Coding
Data Requirements:
typepathvalueSet or systemcode
DiagnosticReport code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1018
Patient
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
Coverage type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Patient
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
ServiceRequest code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15
Procedure code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1070
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1071
Procedure code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1134
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1069
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1071
Procedure code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1133
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1068
Procedure code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1005
Patient
DeviceRequest code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300
DeviceUseStatement device.code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088
Observation code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1085
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083
Condition code http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082
MedicationDispense medication http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014
Encounter type http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012
Direct Reference Codes:
displaycodesystem
Discharge to home for hospice care (procedure) 428361000124107 http://snomed.info/sct/731000124108/version/201709
Discharge to healthcare facility for hospice care (procedure) 428371000124100 http://snomed.info/sct/731000124108/version/201709
Supplemental Data:
expressionsystem
SDE Ethnicity http://terminology.hl7.org/CodeSystem/measure-data-usage
SDE Payer http://terminology.hl7.org/CodeSystem/measure-data-usage
SDE Race http://terminology.hl7.org/CodeSystem/measure-data-usage
SDE Sex http://terminology.hl7.org/CodeSystem/measure-data-usage
Jurisdiction: US
Effective Period: 2022-01-01..2022-12-31
Related Artifacts:

Dependencies

  • http://hl7.org/fhir/us/cqfmeasures/Library/SupplementalDataElements|2.0.000
  • http://hl7.org/fhir/us/cqfmeasures/Library/MATGlobalCommonFunctions|5.0.000
  • http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
  • http://hl7.org/fhir/us/cqfmeasures/Library/AdultOutpatientEncounters|2.0.000
  • http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
  • http://hl7.org/fhir/us/cqfmeasures/Library/Hospice|2.0.000
  • http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
  • http://hl7.org/fhir/us/cqfmeasures/Library/MATGlobalCommonFunctions|5.0.000
  • http://hl7.org/fhir/us/cqfmeasures/Library/AdvancedIllnessandFrailtyExclusion|5.12.000
  • http://hl7.org/fhir/us/cqfmeasures/Library/MATGlobalCommonFunctions|5.0.000
  • http://snomed.info/sct|http://snomed.info/sct/731000124108/version/201709
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1018
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1070
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1071
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.122.12.1035
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1134
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1069
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.122.12.1036
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1133
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1068
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1005
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1085
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012
Logic Definitions:
Library NameNamesequence
BCSComponent SDE Sex
define "SDE Sex":
  SDE."SDE Sex"


Library NameNamesequence
SupplementalDataElements SDE Sex
define "SDE Sex":
  case
      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
      else null
    end


Library NameNamesequence
BCSComponent Numerator
define "Numerator":
  exists ( [DiagnosticReport: "Mammography"] Mammogram
        where ( Global."Normalize Interval" ( Mammogram.effective ) ends 27 months or less on or before
          end of "Measurement Period"
        )
          and Mammogram.status in { 'final', 'amended', 'corrected', 'appended' }
    )


Library NameNamesequence
BCSComponent Denominator
define "Denominator":
  "Initial Population"


Library NameNamesequence
BCSComponent Initial Population
define "Initial Population":
  Patient.gender = 'female'
      and Global."CalendarAgeInYearsAt" ( FHIRHelpers.ToDate ( Patient.birthDate ), start of "Measurement Period" ) in Interval[51, 74 )
      and exists AdultOutpatientEncounters."Qualifying Encounters"


Library NameNamesequence
AdultOutpatientEncounters Qualifying Encounters
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'


Library NameNamesequence
BCSComponent SDE Payer
define "SDE Payer":
  SDE."SDE Payer"


Library NameNamesequence
SupplementalDataElements SDE Payer
define "SDE Payer":
  [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }


Library NameNamesequence
BCSComponent Initial Population
define "Initial Population":
  Patient.gender = 'female'
      and Global."CalendarAgeInYearsAt" ( FHIRHelpers.ToDate ( Patient.birthDate ), start of "Measurement Period" ) in Interval[51, 74 )
      and exists AdultOutpatientEncounters."Qualifying Encounters"


Library NameNamesequence
BCSComponent SDE Ethnicity
define "SDE Ethnicity":
  SDE."SDE Ethnicity"


Library NameNamesequence
SupplementalDataElements SDE Ethnicity
define "SDE Ethnicity":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding


Library NameNamesequence
BCSComponent Denominator Exclusion
define "Denominator Exclusion":
  Hospice."Has Hospice"
      or ( ( exists "Right Mastectomy Diagnosis"
            or exists "Right Mastectomy Procedure"
        )
          and ( exists "Left Mastectomy"
              or exists "Left Mastectomy Procedure"
          )
      )
      or exists "Bilateral Mastectomy Diagnosis"
      or exists "Bilateral Mastectomy Procedure"
      or Frailty."Advanced Illness and Frailty Exclusion Not Including Over Age 80"
      or ( Global."CalendarAgeInYearsAt" ( FHIRHelpers.ToDate ( Patient.birthDate ), start of "Measurement Period" ) >= 65
          and Frailty."Long Term Care Periods Longer Than 90 Consecutive Days"
      )


Library NameNamesequence
Hospice Has Hospice
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"
    )


Library NameNamesequence
BCSComponent Right Mastectomy Diagnosis
define "Right Mastectomy Diagnosis":
  ( ( [Condition: "Status Post Right Mastectomy"] )
      union ( [Condition: "Unilateral Mastectomy, Unspecified Laterality"] UnilateralMastectomyDiagnosis
          where UnilateralMastectomyDiagnosis.bodySite in "Right"
      ) ) RightMastectomy
      where Global."Normalize Interval" ( RightMastectomy.onset ) starts on or before
      end of "Measurement Period"


Library NameNamesequence
BCSComponent Right Mastectomy Procedure
define "Right Mastectomy Procedure":
  [Procedure: "Unilateral Mastectomy Right"] UnilateralMastectomyRightPerformed
      where Global."Normalize Interval" ( UnilateralMastectomyRightPerformed.performed ) ends on or before
      end of "Measurement Period"
        and UnilateralMastectomyRightPerformed.status = 'completed'


Library NameNamesequence
BCSComponent Left Mastectomy
define "Left Mastectomy":
  ( ( [Condition: "Status Post Left Mastectomy"] )
      union ( [Condition: "Unilateral Mastectomy, Unspecified Laterality"] UnilateralMastectomyDiagnosis
          where UnilateralMastectomyDiagnosis.bodySite in "Left"
      ) ) LeftMastectomy
      where Global."Normalize Interval" ( LeftMastectomy.onset ) starts on or before
      end of "Measurement Period"


Library NameNamesequence
BCSComponent Left Mastectomy Procedure
define "Left Mastectomy Procedure":
  [Procedure: "Unilateral Mastectomy Left"] UnilateralMastectomyLeftPerformed
      where Global."Normalize Interval" ( UnilateralMastectomyLeftPerformed.performed ) ends on or before
      end of "Measurement Period"
        and UnilateralMastectomyLeftPerformed.status = 'completed'


Library NameNamesequence
BCSComponent Bilateral Mastectomy Diagnosis
define "Bilateral Mastectomy Diagnosis":
  [Condition: "History of bilateral mastectomy"] BilateralMastectomyHistory
      where Global."Normalize Interval" ( BilateralMastectomyHistory.onset ) starts on or before
      end of "Measurement Period"


Library NameNamesequence
BCSComponent Bilateral Mastectomy Procedure
define "Bilateral Mastectomy Procedure":
  [Procedure: "Bilateral Mastectomy"] BilateralMastectomyPerformed
      where Global."Normalize Interval" ( BilateralMastectomyPerformed.performed ) ends on or before
      end of "Measurement Period"
        and BilateralMastectomyPerformed.status = 'completed'


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Advanced Illness and Frailty Exclusion Not Including Over Age 80
define "Advanced Illness and Frailty Exclusion Not Including Over Age 80":
  //If the measure does NOT include populations age 80 and older, then use this logic:
      	Global."CalendarAgeInYearsAt"(FHIRHelpers.ToDate(Patient.birthDate), start of "Measurement Period")>= 65
              and "Has Criteria Indicating Frailty"
              and ( Count("Outpatient Encounters with Advanced Illness")>= 2
                  or exists ( "Inpatient Encounter with Advanced Illness" )
                  or exists "Dementia Medications In Year Before or During Measurement Period"
              )


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Has Criteria Indicating Frailty
define "Has Criteria Indicating Frailty":
  //Ask Bryn about devices
      	exists ( [DeviceRequest: "Frailty Device"] FrailtyDeviceOrder
      			where FrailtyDeviceOrder.authoredOn during "Measurement Period"
      	)
      		or exists ( [DeviceUseStatement: "Frailty Device"] FrailtyDeviceUse
      				where Global."Normalize Interval"(FrailtyDeviceUse.timing) overlaps "Measurement Period"
      		)
      		or exists ( [Condition: "Frailty Diagnosis"] FrailtyDiagnosis
      				where Global."Prevalence Period"(FrailtyDiagnosis) overlaps "Measurement Period"
      		)
      		or exists ( [Encounter: "Frailty Encounter"] FrailtyEncounter
      				where FrailtyEncounter.period overlaps "Measurement Period"
      		)
      		or exists ( [Observation: "Frailty Symptom"] FrailtySymptomObservation
      				where Global."Normalize Interval"(FrailtySymptomObservation.effective) overlaps "Measurement Period"
      		)


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Outpatient Encounters with Advanced Illness
define "Outpatient Encounters with Advanced Illness":
  ( [Encounter: "Outpatient"]
      		union [Encounter: "Observation"]
      		union [Encounter: "ED"]
      		union [Encounter: "Nonacute Inpatient"] ) OutpatientEncounter
      		 with [Condition: "Advanced Illness"] AdvancedIllnessDiagnosis
                  such that exists (
                      OutpatientEncounter.diagnosis.condition EncounterDiagnosis
                          where EndsWith(EncounterDiagnosis.reference, AdvancedIllnessDiagnosis.id)
                  )
                  and OutpatientEncounter.period starts 2 years or less on or before
      			end of "Measurement Period"


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Inpatient Encounter with Advanced Illness
define "Inpatient Encounter with Advanced Illness":
  [Encounter: "Acute Inpatient"] InpatientEncounter
      		with [Condition: "Advanced Illness"] AdvancedIllnessDiagnosis
                  such that exists (
                      InpatientEncounter.diagnosis.condition EncounterDiagnosis
                          where EndsWith(EncounterDiagnosis.reference, AdvancedIllnessDiagnosis.id)
                  )
      			and InpatientEncounter.period starts 2 years or less on or before
      			end of "Measurement Period"


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Dementia Medications In Year Before or During Measurement Period
define "Dementia Medications In Year Before or During Measurement Period":
  ["MedicationDispense": "Dementia Medications"] DementiaMed
      		where DementiaMed.whenHandedOver during Interval[
                  ( start of "Measurement Period" - 1 year ), end of "Measurement Period"
              ]


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Long Term Care Periods Longer Than 90 Consecutive Days
define "Long Term Care Periods Longer Than 90 Consecutive Days":
  exists ( "Long Term Care Periods During Measurement Period" LongTermCareDuringMP
        where duration in days of LongTermCareDuringMP > 90
    )


Library NameNamesequence
AdvancedIllnessandFrailtyExclusion Long Term Care Periods During Measurement Period
// start heredefine "Long Term Care Periods During Measurement Period":
  ( [Encounter: "Care Services in Long-Term Residential Facility"]
              		union [Encounter: "Nursing Facility Visit"] ) LongTermFacilityEncounter
              		where LongTermFacilityEncounter.period overlaps "Measurement Period"
              		return LongTermFacilityEncounter.period
              			intersect "Measurement Period"


Library NameNamesequence
BCSComponent SDE Race
define "SDE Race":
  SDE."SDE Race"


Library NameNamesequence
SupplementalDataElements SDE Race
define "SDE Race":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding