Quality Measure Implementation Guide
2.0.0-ballot - STU 2 Ballot

Quality Measure Implementation Guide - Downloaded Version null See the Directory of published versions

## Measure: Pneumococcal Vaccination Status for Older Adults (Experimental)

Official URL: http://hl7.org/fhir/uv/cqm/Measure/PVSComponent | Version: 0.0.001 | Highlight text changes?
Standards status: Informative Active as of 2025-08-13 | Computable Name: PVSComponent
Other Identifiers: Version Independent: Uniform Resource Identifier (URI)#http://example.org/fhir/us/cqm/Measure/HBPComponent (use: official, ), Version Specific: Uniform Resource Identifier (URI)#http://example.org/fhir/us/cqm/Measure/127v10 (use: official, ), Short Name: Pneumococcal Vaccination Status (use: usual, ), OID:2.16.840.1.113883.4.642.40.61.29.13
Usage: Clinical Venue: EC

This is an example only.

Metadata
Title | Pneumococcal Vaccination Status for Older Adults
Version | 0.0.001
Short Name | Pneumococcal Vaccination Status
GUID (Version Independent) | http://example.org/fhir/us/cqm/Measure/HBPComponent
GUID (Version Specific) | http://example.org/fhir/us/cqm/Measure/127v10
Identifier | urn:oid:2.16.840.1.113883.4.642.40.61.29.13
Effective Period | 2022-01-01 through 2022-12-31
Experimental | true
Use Context | Clinical Venue = EC
Jurisdiction | 001 from http://unstats.un.org/unsd/methods/m49/m49.htm
Steward (Publisher) | HL7 International / Clinical Quality Information
Description | This is an example only.
Measure Basis | boolean
Measure Scoring | Proportion
Improvement Notation | increase from http://terminology.hl7.org/CodeSystem/measure-improvement-notation
Measure Type | process from http://terminology.hl7.org/CodeSystem/measure-type
Measure Group (Rate) (ID: primary)
Supplemental Data Elements
Supplemental Data Element | ID: 66567b90-12e8-4a1c-8425-2cb8106f9664 Usage Code: Supplemental Data Description: No description provided Logic Definition: SDE Ethnicity
Supplemental Data Element | ID: d431e0e9-8d05-4ca7-a0b2-6cf72313c6d6 Usage Code: Supplemental Data Description: No description provided Logic Definition: SDE Payer
Supplemental Data Element | ID: b5baeb14-bfba-4ad5-a150-8a5442d113f8 Usage Code: Supplemental Data Description: No description provided Logic Definition: SDE Race
Supplemental Data Element | ID: 54129f83-97a7-4149-82c8-92ab0e8060ed Usage Code: Supplemental Data Description: No description provided Logic Definition: SDE Sex
Measure Logic
Primary Library | PVS Component Library
Contents | Population Criteria Logic Definitions Terminology Dependencies Data Requirements Parameters
Population Criteria
Measure Group (Rate) (ID: primary)
Logic Definitions
Logic Definition | Library Name: 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"
        )
Logic Definition | Library Name: SupplementalDataElements
    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
Logic Definition | Library Name: SupplementalDataElements
    define "SDE Payer":
      [Coverage: type in "Payer"] Payer
            return {
              code: Payer.type,
              period: Payer.period
            }
Logic Definition | Library Name: SupplementalDataElements
    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
Logic Definition | Library Name: SupplementalDataElements
    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
Logic Definition | Library Name: PVSComponent
    define "SDE Sex":
      SDE."SDE Sex"
Logic Definition | Library Name: PVSComponent
    define "Numerator":
      exists ( [Immunization: "Pneumococcal Vaccine"] PneumococcalVaccine
            where PneumococcalVaccine.status = 'completed'
              and PneumococcalVaccine.occurrence as dateTime on or before
              end of "Measurement Period"
        )
          or exists ( [Procedure: "Pneumococcal Vaccine Administered"] PneumococcalVaccineGiven
              where PneumococcalVaccineGiven.status = 'completed'
                and PneumococcalVaccineGiven.performed as Period on or before
                end of "Measurement Period"
          )
Logic Definition | Library Name: PVSComponent
    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"]
          union [Encounter: "Discharge Services - Nursing Facility"]
          union [Encounter: "Nursing Facility Visit"]
          union [Encounter: "Care Services in Long-Term Residential Facility"] ) ValidEncounter
          where ValidEncounter.period during "Measurement Period"
            and ValidEncounter.status = 'finished'
Logic Definition | Library Name: PVSComponent
    define "Initial Population":
      Global."CalendarAgeInYearsAt" ( FHIRHelpers.ToDate ( Patient.birthDate ), start of "Measurement Period" ) >= 65
          and exists "Qualifying Encounters"
Logic Definition | Library Name: PVSComponent
    define "Denominator":
      "Initial Population"
Logic Definition | Library Name: PVSComponent
    define "SDE Payer":
      SDE."SDE Payer"
Logic Definition | Library Name: PVSComponent
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
Logic Definition | Library Name: PVSComponent
    define "Denominator Exclusions":
      Hospice."Has Hospice"
Logic Definition | Library Name: PVSComponent
    define "SDE Race":
      SDE."SDE Race"
Logic Definition | Library Name: MATGlobalCommonFunctions
    define function "CalendarAgeInYearsAt"(BirthDateTime DateTime, AsOf DateTime):
    	years between ToDate(BirthDateTime)and ToDate(AsOf)
Logic Definition | Library Name: MATGlobalCommonFunctions
    define function "ToDate"(Value DateTime):
    	DateTime(year from Value, month from Value, day from Value, 0, 0, 0, 0, timezoneoffset from Value)
Logic Definition | Library Name: MATGlobalCommonFunctions
    /*
    *
    *    CQFMeasures Common Logic
    *
    */

    define function "Normalize Interval"(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
      case
    	  when choice is FHIR.dateTime then
        	Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
    		when choice is FHIR.Period then
      		FHIRHelpers.ToInterval(choice as FHIR.Period)
    		when choice is FHIR.instant then
    			Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
    		when choice is FHIR.Age then
    		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
    			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
    		when choice is FHIR.Range then
    		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
    			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
    		when choice is FHIR.Timing then
    		  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')
        when choice is FHIR.string then
          Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
    		else
    			null as Interval<DateTime>
    	end
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value AdministrativeGender): value.value
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value ImmunizationStatus): value.value
Logic Definition | Library Name: FHIRHelpers
    define function ToDateTime(value dateTime): value.value
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value ProcedureStatus): value.value
Logic Definition | Library Name: FHIRHelpers
    /*
    @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
    value to a CQL DateTime Interval
    @comment: If the start value of the given period is unspecified, the starting
    boundary of the resulting interval will be open (meaning the start of the interval
    is unknown, as opposed to interpreted as the beginning of time).
    */
    define function ToInterval(period FHIR.Period):
        if period is null then
            null
        else
            if period."start" is null then
                Interval(period."start".value, period."end".value]
            else
                Interval[period."start".value, period."end".value]
Logic Definition | Library Name: FHIRHelpers
    define function ToDate(value date): value.value
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value EncounterStatus): value.value
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value uri): value.value
Logic Definition | Library Name: FHIRHelpers
    /*
    @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
    */
    define function ToConcept(concept FHIR.CodeableConcept):
        if concept is null then
            null
        else
            System.Concept {
                codes: concept.coding C return ToCode(C),
                display: concept.text.value
            }
Logic Definition | Library Name: FHIRHelpers
    /*
    @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
    */
    define function ToCode(coding FHIR.Coding):
        if coding is null then
            null
        else
            System.Code {
              code: coding.code.value,
              system: coding.system.value,
              version: coding.version.value,
              display: coding.display.value
            }
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value ServiceRequestIntent): value.value
Logic Definition | Library Name: FHIRHelpers
    define function ToDateTime(value instant): value.value
Logic Definition | Library Name: FHIRHelpers
    /*
    @description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity)
    value to a CQL Quantity
    @comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
    has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
    an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
    @seealso: ToCalendarUnit
    */
    define function ToQuantity(quantity FHIR.Quantity):
        case
            when quantity is null then null
            when quantity.value is null then null
            when quantity.comparator is not null then
                Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
            when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
                  or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
                System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
            else
                Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
        end
Logic Definition | Library Name: FHIRHelpers
    /*
    @description: Converts a UCUM definite duration unit to a CQL calendar duration
    unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities)
    topic of the CQL specification.
    @comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
    */
    define function ToCalendarUnit(unit System.String):
        case unit
            when 'ms' then 'millisecond'
            when 's' then 'second'
            when 'min' then 'minute'
            when 'h' then 'hour'
            when 'd' then 'day'
            when 'wk' then 'week'
            when 'mo' then 'month'
            when 'a' then 'year'
            else unit
        end
Terminology
Code System | Description: Code system SNOMEDCT:2017-09 Resource: `http://snomed.info/sct|http://snomed.info/sct/731000124108/version/201709` Canonical URL: `http://snomed.info/sct|http://snomed.info/sct/731000124108/version/201709`
Value Set | Description: Value set Pneumococcal Vaccine Resource: Pneumococcal Vaccine Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1027`
Value Set | Description: Value set Pneumococcal Vaccine Administered Resource: Pneumococcal Vaccine Administered Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1034`
Value Set | Description: Value set Office Visit Resource: Office Visit Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001`
Value Set | Description: Value set Annual Wellness Visit Resource: Annual Wellness Visit Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240`
Value Set | Description: Value set Preventive Care Services - Established Office Visit, 18 and Up Resource: Preventive Care Services Established Office Visit, 18 and Up Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025`
Value Set | Description: Value set Preventive Care Services-Initial Office Visit, 18 and Up Resource: Preventive Care Services Initial Office Visit, 18 and Up Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023`
Value Set | Description: Value set Home Healthcare Services Resource: Home Healthcare Services Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016`
Value Set | Description: Value set Discharge Services - Nursing Facility Resource: Discharge Services Nursing Facility Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1065`
Value Set | Description: Value set Nursing Facility Visit Resource: Nursing Facility Visit Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012`
Value Set | Description: Value set Care Services in Long-Term Residential Facility Resource: Care Services in Long Term Residential Facility Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014`
Value Set | Description: Value set Payer Resource: Payer Type Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591`
Value Set | Description: Value set Encounter Inpatient Resource: Encounter Inpatient Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307`
Value Set | Description: Value set Hospice care ambulatory Resource: Hospice Care Ambulatory Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15`
Direct Reference Code | Display: Discharge to home for hospice care (procedure) Code: 428361000124107 System: `http://snomed.info/sct`
Direct Reference Code | Display: Discharge to healthcare facility for hospice care (procedure) Code: 428371000124100 System: `http://snomed.info/sct`
Dependencies
Dependency | Description: FHIR model information Resource: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1 Canonical URL: `http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1`
Dependency | Description: Library SDE Resource: Supplemental Data Elementsversion: null2.0.000) Canonical URL: `http://hl7.org/fhir/uv/cqm/Library/SupplementalDataElements|2.0.000`
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: Library Global Resource: MAT Global Common Functions FHIR Libraryversion: null5.0.000) Canonical URL: `http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000`
Dependency | Description: Library Hospice Resource: Hospice FHIR Libraryversion: null2.0.000) Canonical URL: `http://hl7.org/fhir/uv/cqm/Library/Hospice|2.0.000`
Data Requirements
Data Requirement | Type: Patient Profile(s): Patient Must Support Elements: url, extension, value
Data Requirement | Type: Immunization Profile(s): Immunization Must Support Elements: vaccineCode, status, occurrence Code Filter(s): Path: vaccineCode ValueSet: Pneumococcal Vaccine
Data Requirement | Type: Procedure Profile(s): Procedure Must Support Elements: code, status, performed Code Filter(s): Path: code ValueSet: Pneumococcal Vaccine Administered
Data Requirement | Type: Procedure Profile(s): Procedure Must Support Elements: code, status, performed Code Filter(s): Path: code ValueSet: Hospice Care Ambulatory
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Office Visit
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Annual Wellness Visit
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Established Office Visit, 18 and Up
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Initial Office Visit, 18 and Up
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Home Healthcare Services
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Discharge Services Nursing Facility
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Nursing Facility Visit
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Care Services in Long Term Residential Facility
Data Requirement | Type: Encounter Profile(s): Encounter Must Support Elements: type, status, hospitalization, hospitalization.dischargeDisposition, period Code Filter(s): Path: type ValueSet: Encounter Inpatient
Data Requirement | Type: Coverage Profile(s): Coverage Must Support Elements: type, period Code Filter(s): Path: type ValueSet: Payer Type
Data Requirement | Type: ServiceRequest Profile(s): ServiceRequest Must Support Elements: code, intent, authoredOn Code Filter(s): Path: code ValueSet: Hospice Care Ambulatory
Parameters
Name | Use | Card. | Type | Documentation
Measurement Period | In | 0..1 | Period |
SDE Sex | Out | 0..1 | Coding |
Numerator | Out | 0..1 | boolean |
Denominator | Out | 0..1 | boolean |
SDE Payer | Out | 0..* | Resource |
Initial Population | Out | 0..1 | boolean |
SDE Ethnicity | Out | 0..* | Coding |
Denominator Exclusions | Out | 0..1 | boolean |
SDE Race | Out | 0..* | Coding |
Generated using version 0.5.4 of the sample-content-ig Liquid templates