CMS FHIR Quality Measure Development IG
0.8.0-cibuild - CI Build International flag

CMS FHIR Quality Measure Development IG, published by Centers for Medicare & Medicaid Services (CMS). This guide is not an authorized publication; it is the continuous build for version 0.8.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/cms-qmd/ and changes regularly. See the Directory of published versions

Refactored Index

This topic provides an index of the shared libraries used in QICore and USQualityCore, and where refactored content from those shared libraries can be found in the refactored versions.

Library Index

This index lists all the shared libraries used by measures. Note that for QICore measures, all shared libraries were developed and published in MADiE, whereas for US Quality Core measures, a core set of shared libraries are published as part of HL7 or ONC implementation guides and made available through the NPM packages for those implementation guides. Libraries available in published implementation guides are listed in the table below with the namespace and name of the library, and linked to the published content for that library.

The remaining libraries are expected to still be developed in MADiE, but are included in the proposed set of refactored measures for reference, testing, and to support the development of this guidance. A third group — ClaimCommon, ClaimElements, and MedicationCommon — is drafted in this guide itself, supplying functions that no published library provides yet; the status, use, and type functions in ClaimCommon and all of MedicationCommon are intended for proposal to FHIRCommon. The version numbers of those libraries are suggested based on both a Major and Minor version increment for each library (for example, AdultOutpatientEncounters in QICore is version 4.19.000, whereas the suggested refactoring is 5.1.000). The content for these libraries is suggested, and it is expected that these libraries will be developed in MADiE once full US Quality Core support is available. Measure developers can use the content as a starting point for that development if desired.

Library QI Core version US Quality Core version
AdultOutpatientEncounters 4.19.000 5.1.000 proposed draft content in Github; needs review and authoring in MADiE
AdvancedIllnessandFrailty 1.27.000 2.1.000 proposed draft content in Github; needs review and authoring in MADiE
AHAOverall 4.1.000 5.1.000 proposed draft content in Github; needs review and authoring in MADiE
AlaraCommonFunctions 1.10.000 2.1.000 proposed draft content in Github; needs review and authoring in MADiE
Antibiotic 1.11.000 2.1.000 proposed draft content in Github; needs review and authoring in MADiE
ClaimCommon - 0.1.0 draft content in this guide; needs review and authoring in MADiE
ClaimElements - 0.1.0 draft content in this guide; needs review and authoring in MADiE
CQMCommon 4.1.000 5.1.000 proposed draft content in this guide, originally in cms-2025 repository; needs review and authoring in MADiE
CumulativeMedicationDuration 6.0.000 hl7.fhir.us.cql.CumulativeMedicationDuration version ‘2.0.0’
FHIRHelpers 4.4.000 hl7.fhir.uv.cql.FHIRHelpers version ‘4.0.1’
FHIRCommon - hl7.fhir.uv.cql.FHIRCommon version ‘2.0.0’
Hospice 6.18.000 7.1.000 proposed draft content in Github; needs review and authoring in MADiE
MedicationCommon - 0.1.0 draft content in this guide; needs review and authoring in MADiE
NHSNHelpers 0.1.000 1.1.000 proposed draft content in Github; needs review and authoring in MADiE
PalliativeCare 1.18.000 2.1.000 proposed draft content in Github; needs review and authoring in MADiE
PCMaternal 5.25.000 6.1.000 proposed draft content in Github; needs review and authoring in MADiE
QICoreCommon 4.0.000 refactored into FHIRCommon, USCoreCommon, and USQualityCoreCommon
Status 1.15.000 2.1.000 proposed draft content in Github; needs review and authoring in MADiE
SupplementalDataElements 5.1.000 6.1.000 proposed draft content in Github; needs review and authoring in MADiE
TJCOverall 8.25.000 9.1.000 proposed draft content in Github; needs review and authoring in MADiE
VTE 8.18.000 9.1.000 proposed draft content in Github; needs review and authoring in MADiE
USCoreCommon - hl7.fhir.us.cql.USCoreCommon version ‘2.0.0’
USCoreElements - hl7.fhir.us.cql.USCoreElements version ‘2.0.0’
USQualityCoreCommon - fhir.onc.”us-quality-core”.USQualityCoreCommon version ‘0.5.0’

Function Index

This index lists functions from the QICore-based library versions and where they are now following the refactor.

Library Prior version or name New version or location
CQMCommon 4.1.000 5.1.000
QICoreCommon deprecated FHIRCommon, USCoreCommon, or USQualityCoreCommon
CumulativeMedicationDuration 6.0.000 hl7.fhir.us.cql.CumulativeMedicationDuration 2.0.0
Status 1.15.000 2.1.000

Notes on the libraries above:

  • CQMCommon — The deprecated “ED Visit” and “Hospitalization” expression definitions have been removed; use the edVisit() and hospitalization() fluent functions instead. The claim navigation functions have moved to ClaimCommon and ClaimElements.
  • CumulativeMedicationDuration — No changes.
  • Status — verified() (consider deprecating); FHIRCommon verified() should be used instead.

QICoreCommon function locations

QICoreCommon is deprecated. Its functions are now distributed across three libraries:

QICoreCommon function New location
isActive() FHIRCommon
hasCategory(Condition, Code) FHIRCommon
isProblemListItem() FHIRCommon
isEncounterDiagnosis() FHIRCommon
hasCategory(Observation, Code) FHIRCommon
isSocialHistory() FHIRCommon
isVitalSign() FHIRCommon
isImaging() FHIRCommon
isLaboratory() FHIRCommon
isProcedure() FHIRCommon
isSurvey() FHIRCommon
isExam() FHIRCommon
isTherapy() FHIRCommon
isActivity() FHIRCommon
isCommunity() FHIRCommon
isDischarge() FHIRCommon
references() FHIRCommon
toInterval() FHIRCommon
abatementInterval() FHIRCommon
prevalenceInterval() FHIRCommon
includesCode() FHIRCommon
HasStart() / hasStart() FHIRCommon
HasEnd() / hasEnd() FHIRCommon
Latest() / latest() FHIRCommon
Earliest() / earliest() FHIRCommon
getId() USQualityCoreCommon
“Interval To Day Numbers” / toDayNumbers() USQualityCoreCommon
“Days In Period” / daysInPeriod() USQualityCoreCommon
doNotPerform(DeviceNotRequested) USQualityCoreCommon
DeviceNotRequested.doNotPerformReason() USQualityCoreCommon
DeviceNotRequested.doNotPerform() USQualityCoreCommon
DeviceNotRequested.code() USQualityCoreCommon
CommunicationNotDone.recorded() USQualityCoreCommon
CommunicationNotDone.topic() USQualityCoreCommon
ImmunizationNotDone.vaccineCode() USQualityCoreCommon
MedicationAdministrationNotDone.recorded() USQualityCoreCommon
MedicationAdministrationNotDone.medication() USQualityCoreCommon
MedicationDispenseDeclined.recorded() USQualityCoreCommon
MedicationDispenseDeclined.medication() USQualityCoreCommon
MedicationNotRequested.medication() USQualityCoreCommon
ObservationCancelled.notDoneReason() USQualityCoreCommon
ObservationCancelled.code() USQualityCoreCommon
ProcedureNotDone.recorded() USQualityCoreCommon
ProcedureNotDone.code() USQualityCoreCommon
ServiceNotRequested.reasonRefused() USQualityCoreCommon
ServiceNotRequested.code() USQualityCoreCommon
TaskRejected.code() USQualityCoreCommon
isHealthConcern() USCoreCommon

Extension Index

This index lists every element that QI Core STU6 and US Quality Core 0.5.0 represent as an extension rather than as a core FHIR element, and shows where each one landed in the refactor. Extensions reach these profiles from three places: inherited from US Core 6.1.0, defined by the IG itself, or borrowed from base FHIR and SDC. Each is covered below.

Profile names map one-to-one between the two IGs: QICore<Name> in QI Core STU6 becomes USQualityCore<Name> in US Quality Core 0.5.0. Both IGs publish 57 profiles and 8 extension definitions, and every extension slice is at the same element path with the same slice name in both. The profile column below gives the US Quality Core name; prefix it with QICore instead of USQualityCore for the QI Core STU6 equivalent.

Extensions inherited from US Core 6.1.0

QI Core STU6 and US Quality Core 0.5.0 both depend on US Core 6.1.0, so this layer is identical in both IGs and was not touched by the refactor. US Core 6.1.0 publishes 49 profiles and 10 extension definitions.

Only four US Core profiles slice extensions into their content, 16 slices in total. Every one of them is inherited unchanged (i.e. Preserved) by the corresponding US Quality Core profile, and each appears in the by-profile table further below.

US Core 6.1.0 profile Extension slices Inherited by Preserved
USCoreConditionEncounterDiagnosis 1 USQualityCoreConditionEncounterDiagnosis 1 of 1
USCoreConditionProblemsHealthConcerns 1 USQualityCoreConditionProblemsHealthConcerns 1 of 1
USCorePatient 6 USQualityCorePatient 6 of 6
USCoreQuestionnaireResponse 8 USQualityCoreQuestionnaireResponse 8 of 8

The 10 extension definitions US Core 6.1.0 publishes, and where each one is used:

US Core 6.1.0 extension Allowed context Sliced into CQL accessor
us-core-birthsex Patient us-core-patientPatient.extension:birthsex birthSex()
us-core-direct ContactPoint not sliced into any profile none
us-core-ethnicity Patient, RelatedPerson, Person, Practitioner, FamilyMemberHistory us-core-patientPatient.extension:ethnicity ethnicity()
us-core-extension-questionnaire-uri QuestionnaireResponse.questionnaire us-core-questionnaireresponseQuestionnaireResponse.questionnaire.extension:url none
us-core-genderIdentity Patient, RelatedPerson, Person, Practitioner us-core-patientPatient.extension:genderIdentity none
us-core-jurisdiction Element not sliced into any profile none
us-core-race Patient, RelatedPerson, Person, Practitioner, FamilyMemberHistory us-core-patientPatient.extension:race race()
us-core-sex Patient us-core-patientPatient.extension:sex sex() (deprecated) use individualSex()
us-core-tribal-affiliation Patient, RelatedPerson, Person, Practitioner, FamilyMemberHistory us-core-patientPatient.extension:tribalAffiliation tribalAffiliation()
uscdi-requirement ElementDefinition tooling only — applied to ElementDefinition in 48 US Core StructureDefinitions

us-core-direct and us-core-jurisdiction are published but not sliced into any US Core profile, so they never reach QI Core or US Quality Core by inheritance; they remain available for direct use. uscdi-requirement is the US Core counterpart of qicore-keyelement/uscdiplusquality — it annotates ElementDefinition, not patient data.

Note the allowed contexts: race, ethnicity, and tribalAffiliation are also legal on RelatedPerson, Person, Practitioner, and FamilyMemberHistory, but US Core slices them only into us-core-patient. USQualityCoreRelatedPerson and USQualityCorePractitioner therefore do not declare them, and the USCoreCommon accessors are all typed to FHIR.Patient.

Extension definitions published by the IG

The extensions QI Core defined itself were renamed from qicore-* to us-quality-core-* and moved to the http://fhir.org/guides/onc/us-quality-core/StructureDefinition/ canonical base. Nothing was dropped and nothing was added.

QI Core STU6 US Quality Core 0.5.0 Context
qicore-doNotPerformReason us-quality-core-doNotPerformReason Resource
qicore-encounter-diagnosisPresentOnAdmission us-quality-core-encounter-diagnosisPresentOnAdmission Encounter.diagnosis
qicore-isElective us-quality-core-isElective ServiceRequest
qicore-notDoneReason us-quality-core-notDoneReason Resource
qicore-notDoneValueSet us-quality-core-notDoneValueSet CodeableConcept
qicore-recorded us-quality-core-recorded Resource
qicore-servicerequest-appropriatenessScore us-quality-core-servicerequest-appropriatenessScore ServiceRequest
qicore-keyelement uscdiplusquality ElementDefinition, ElementDefinition.type.targetProfile, ElementDefinition.type

isElective and servicerequest-appropriatenessScore are defined but not used by any profile in either IG. qicore-keyelement/uscdiplusquality is a tooling extension applied to ElementDefinition inside every profile to flag key elements; it is not a data element and does not appear in the table below.

Extension-backed elements, by profile

19 of the 57 US Quality Core profiles carry extension-backed elements (18 of the 57 in QI Core STU6). The remaining 38 profiles have none.

Extensions borrowed from base FHIR, US Core, and SDC are marked unchanged — the same canonical URL is used in both IGs.

Profile Element Card. Extension CQL accessor in US Quality Core
AllergyIntolerance AllergyIntolerance.extension:resolutionAge 0..1 allergyintolerance-resolutionAge (unchanged) resolutionAge()
CommunicationNotDone Communication.extension:recorded 1..1 qicore-recordedus-quality-core-recorded recorded()
  Communication.topic.extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet topic()
ConditionEncounterDiagnosis Condition.extension:assertedDate 0..1 condition-assertedDate (unchanged) assertedDate()
ConditionProblemsHealthConcerns Condition.extension:assertedDate 0..1 condition-assertedDate (unchanged) assertedDate()
DeviceNotRequested DeviceRequest.extension:doNotPerformReason 1..1 qicore-doNotPerformReasonus-quality-core-doNotPerformReason doNotPerformReason()
  DeviceRequest.modifierExtension:doNotPerform 1..1 extension-DeviceRequest.doNotPerform (R5 cross-version, unchanged) doNotPerform()
  DeviceRequest.code[x].extension:doNotPerformValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet code()
DeviceRequest DeviceRequest.modifierExtension:doNotPerform 0..1 extension-DeviceRequest.doNotPerform (R5 cross-version, unchanged) doNotPerform()
Encounter Encounter.diagnosis.extension:diagnosisPresentOnAdmission new in 0.5.0 0..1 qicore-encounter-diagnosisPresentOnAdmissionus-quality-core-encounter-diagnosisPresentOnAdmission presentOnAdmission()
FamilyMemberHistory FamilyMemberHistory.condition.extension:condition-abatement 0..1 familymemberhistory-abatement (unchanged) abatement()
  FamilyMemberHistory.condition.extension:condition-severity 0..1 familymemberhistory-severity (unchanged) severity()
ImmunizationNotDone Immunization.vaccineCode.extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet vaccineCode()
MedicationAdministrationNotDone MedicationAdministration.extension:recorded 1..1 qicore-recordedus-quality-core-recorded recorded()
  MedicationAdministration.medication[x].extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet medication()
MedicationDispenseDeclined MedicationDispense.extension:recorded 1..1 qicore-recordedus-quality-core-recorded recorded()
  MedicationDispense.medication[x].extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet medication()
MedicationNotRequested MedicationRequest.medication[x].extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet medication()
ObservationCancelled Observation.extension:notDoneReason 1..1 qicore-notDoneReasonus-quality-core-notDoneReason notDoneReason()
  Observation.code.extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet code()
Patient Patient.extension:race 0..1 us-core-race (unchanged) race()
  Patient.extension:ethnicity 0..1 us-core-ethnicity (unchanged) ethnicity()
  Patient.extension:tribalAffiliation 0..* us-core-tribal-affiliation (unchanged) tribalAffiliation()
  Patient.extension:birthsex 0..1 us-core-birthsex (unchanged) birthSex()
  Patient.extension:sex 0..1 us-core-sex (unchanged) sex()
  Patient.extension:genderIdentity 0..* us-core-genderIdentity (unchanged) none
  Patient.telecom.extension:telecom-preferred 0..1 iso21090-preferred (unchanged) none
  Patient.address.extension:address-preferred 0..1 iso21090-preferred (unchanged) none
Procedure Procedure.extension:recorded 0..1 qicore-recordedus-quality-core-recorded recorded()
ProcedureNotDone Procedure.extension:recorded 1..1 qicore-recordedus-quality-core-recorded recorded()
  Procedure.code.extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet code()
QuestionnaireResponse QuestionnaireResponse.extension:signature 0..* questionnaireresponse-signature (unchanged) none
  QuestionnaireResponse.extension:completionMode 0..1 questionnaireresponse-completionMode (unchanged) none
  QuestionnaireResponse.questionnaire.extension:questionnaireDisplay 0..1 display (unchanged) none
  QuestionnaireResponse.questionnaire.extension:url 0..1 us-core-extension-questionnaire-uri (unchanged) none
  QuestionnaireResponse.item.extension:itemMedia 0..1 sdc-questionnaire-itemMedia (unchanged) none
  QuestionnaireResponse.item.extension:ItemSignature 0..* questionnaireresponse-signature (unchanged) none
  QuestionnaireResponse.item.answer.extension:itemAnswerMedia 0..1 sdc-questionnaire-itemAnswerMedia (unchanged) none
  QuestionnaireResponse.item.answer.extension:ordinalValue 0..1 ordinalValue (unchanged) none
ServiceNotRequested ServiceRequest.extension:reasonRefused 1..1 qicore-doNotPerformReasonus-quality-core-doNotPerformReason reasonRefused()
  ServiceRequest.code.extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet code()
TaskRejected Task.code.extension:notDoneValueSet 0..1 qicore-notDoneValueSetus-quality-core-notDoneValueSet code()

Notes on accessing extensions from CQL

The QICore 6.0.0 model info surfaced extensions as named model elements, so CQL could write Patient.race or ProcedureNotDone.recorded directly — 25 classes carried such elements. The USQualityCore 0.5.0 model info does not: no element in it declares an extension target, and neither does the USCore 6.1.0-derived model info it builds on. All extension access is now through fluent functions, so the same expressions become Patient.race() and ProcedureNotDone.recorded(). The last column above names the function and the library that defines it.

Extensions with no accessor in either common library must be read with the generic ext() function from FHIRCommon, for example:

define fluent function preferred(element FHIR.Element):
  element.ext('http://hl7.org/fhir/StructureDefinition/iso21090-preferred').value as FHIR.boolean

The three complex US Core extensions do not return a simple value. race(), ethnicity(), and tribalAffiliation() each return a tuple assembled from the extension’s sub-extensions:

Patient.race()               // { ombCategory: List<Coding>, detailed: List<Coding>, text: String }
Patient.ethnicity()          // { ombCategory: Coding, detailed: List<Coding>, text: String }
Patient.tribalAffiliation()  // { tribalAffiliation: CodeableConcept, isEnrolled: Boolean }

Notes on the above content:

  1. diagnosisPresentOnAdmission is now accessible. QI Core STU6 defined qicore-encounter-diagnosisPresentOnAdmission but had removed it from QICoreEncounter in favor of accessing present on admission in the QICoreClaim profile (see the Present On Admission authoring pattern). US Quality Core 0.5.0 slices it into USQualityCoreEncounter.diagnosis and provides presentOnAdmission().
  2. MedicationDispenseDeclined.medication is now accessible. The QICore 6.0.0 model info mapped it to a plain value with no notDoneValueSet target, unlike the other negation profiles. USQualityCoreCommon.medication() covers it.
  3. abatement() and severity() do not resolve in 0.5.0. Both are declared against hl7.org/fhir/StructureDefinition/familymemberhistory-* — the http:// scheme is missing, so the URL will not match the extension on the instance. The profile slices themselves are correct. In addition, doNotPerform() does not resolve against a DeviceRequest, it is only defined for the DeviceNotRequested profile. These issues have all been addressed by adding overloads for these functions to the CQMCommon library, and tickets to address these issues in the source content are being filed.
  4. individualSex() targets an extension US Core 6.1.0 does not define. USCoreCommon reads us-core-individual-sex, which was introduced after 6.1.0. It coalesces with us-core-sex, so it still resolves against 6.1.0 data; sex() itself is marked @deprecated in favor of it.
  5. sexParameterForClinicalUse() reads a base FHIR extension that no profile slices. It targets http://hl7.org/fhir/StructureDefinition/patient-sexParameterForClinicalUse, which is not part of US Core 6.1.0 and is not declared on any QI Core or US Quality Core profile.