Skip to main content

Quality Measures

Overview​

Code on GitHub

The Quality Measures data mart combines CMS-oriented quality measure logic and hospital readmission logic in one package. The measure outputs and readmission outputs remain in separate model folders, but they are documented together because both workflows support health plan and population quality reporting.

CMS publishes Medicare Part C and Part D Star Ratings technical notes and performance data on the Part C and D Performance Data page. CMS also publishes hospital outcome methodology, including hospital-wide readmission resources, on its Measure Methodology page.

Install this standalone package alongside Core using the data mart installation guide.

Methodology​

The quality measure workflow evaluates denominator, numerator, exclusion, and performance logic for each supported measure. It produces patient-level measure rows, a patient-level pivot, and summary counts with performance rates.

The readmissions workflow identifies index admissions, applies exclusion logic, detects planned admissions, and flags all-cause and unplanned 30-day readmissions. The logic is designed around CMS-style readmission concepts, including index admissions, 30-day follow-up windows, transfer handling, discharge status, run-out checks, and planned readmission exclusions.

The package implements the measures below using its bundled definitions and value sets. The identifiers below are the values used in the package outputs, not a promise of inclusion in a particular CMS Star rating year. NCQA-authored HEDIS measure implementations are excluded from this open-source package. Review the applicable specification and reporting population before using these outputs for external reporting.

Measure NameOutput identifierSpecificationStatus
Documentation of Current Medications in the Medical RecordCQM130SpecificationReleased
Hospital-Wide All-Cause ReadmissionSeparate readmission_summary workflowMethodologyReleased
Medication Adherence for Cholesterol (Statins)ADH-StatinsCMS Star Ratings technical notesReleased
Medication Adherence for Diabetes MedicationsADH-DiabetesCMS Star Ratings technical notesReleased
Medication Adherence for Hypertension (RAS antagonists)ADH-RASCMS Star Ratings technical notesReleased
Pain Assessment and Follow-UpNQF0420SpecificationReleased
Statin Therapy for the Prevention and Treatment of Cardiovascular DiseaseCQM438QPP measure searchReleased
Statin Use in Persons with DiabetesSUPDCMS Star Ratings technical notesReleased

Configuration​

The tested 1.0 package graph uses claims data. Do not assume that setting claims_enabled: false and clinical_enabled: true enables every Quality Measures model; check the selected model's domain requirements.

The data mart supports a measurement-period end date.

  • quality_measures_period_end defaults to the current year-end. The package does not implement snapshots_enabled. To retain multiple measurement periods, run the desired period explicitly and preserve its results in a separate downstream history table or output schema.
vars:
quality_measures_period_end: "2026-12-31"

Outputs​

ModelDescription
quality_measures.summary_countsCounts and rates by data source, measure, measure version, and performance period.
quality_measures.summary_longOne row per person, data source, measure, measure version, and performance period with denominator, numerator, exclusion, and performance flags.
quality_measures.summary_widePatient-level pivot of measure output for reporting and downstream analytics.
quality_measures.readmission_summaryEncounter-level index admission and readmission flags.
quality_measures.encounter_augmentedEncounter-level detail augmented with readmission-relevant data quality and cohort context.

Measure Concepts​

ConceptDescription
Measure IDIdentifier assigned by the measure steward or reporting program. A measure can have several identifiers across CMS Star Ratings, MIPS, NQF, and eCQM contexts.
DenominatorPopulation eligible for a measure.
NumeratorSubset of the denominator that received the service, met the clinical target, or had the measured outcome.
ExclusionReason a person or encounter is removed from the measure population.
Performance periodTime window used to evaluate the measure.
Value setsStandard code lists used to define clinical concepts in the measure logic.

Example SQL​

Quality Measure Performance
select
data_source
, measure_id
, measure_name
, performance_period_end
, denominator_sum
, numerator_sum
, exclusion_sum
, performance_rate
from quality_measures.summary_counts
order by performance_rate desc;
Exclusion Reason Breakdown
select
measure_id
, exclusion_reason
, count(person_id) as patient_count
from quality_measures.summary_long
where exclusion_flag = 1
group by
measure_id
, exclusion_reason
order by
measure_id
, exclusion_reason;
Overall 30-Day Unplanned Readmission Rate
select
100.0 * sum(case when index_admission_flag = 1 and unplanned_readmit_30_flag = 1 then 1 else 0 end)
/ nullif(sum(case when index_admission_flag = 1 then 1 else 0 end), 0) as readmission_rate
from quality_measures.readmission_summary;
30-Day Readmission Rate by Discharge Date
with readmissions as (
select
discharge_date
, sum(case when index_admission_flag = 1 then 1 else 0 end) as index_admissions
, sum(case when index_admission_flag = 1 and unplanned_readmit_30_flag = 1 then 1 else 0 end) as readmissions
from quality_measures.readmission_summary
group by discharge_date
)

select
discharge_date
, index_admissions
, readmissions
, case
when index_admissions = 0 then 0
else 1.0 * readmissions / index_admissions
end as readmission_rate
from readmissions
order by discharge_date;
Readmission Data Quality Detail
select *
from quality_measures.encounter_augmented
where disqualified_encounter_flag = 1;