Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build
Draft dQM CMS Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-cms-2025/ and changes regularly. See the Directory of published versions
| Active as of 2025-08-20 |
{
"resourceType" : "Library",
"id" : "Hospice",
"meta" : {
"profile" : [
🔗 "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"🔗 ,
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary"🔗 ,
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"🔗 ,
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary"🔗 ,
"http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"🔗 ,
"http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library"🔗 ,
"http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library"
]
},
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table class=\"narrative-table\">\n <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"metadata\"> </a>Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n\n<td class=\"content-container\">Hospice</td>\n\n\n</tr>\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n\n<td class=\"content-container\">7.1.000</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Topic</th>\n\n\n\n<td class=\"content-container\">FHIR\n</td>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Topic</th>\n\n\n\n<td class=\"content-container\">CQL\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n\n<td class=\"content-container\">National Committee for Quality Assurance</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n\n<td class=\"content-container\"><div><p>This library contains a definition used to exclude patients who are in hospice care for any part of the measurement period.</p>\n</div></td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n\n<td class=\"content-container\">\n <a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a>#logic-library\n\n\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"parameters\"> </a>Parameters</th>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n\n\n<td class=\"content-container\">None</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n \n \n <tr>\n <th scope=\"row\" class=\"row-header\">CQL Content</th>\n <td>\n <a name=\"cql-content\"> </a>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\nNOTE: For use by March 2026 US Realm Connectathon participants for internal use only. Not for use or distribution in commercial products.\n*/\nlibrary Hospice version '7.1.000'\n\nusing USQualityCore version '0.1.0-cibuild'\nusing USCore version '6.1.0-derived'\nusing FHIR version '4.0.1'\n\ninclude hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers\ninclude hl7.fhir.uv.cql.FHIRCommon version '2.0.0' called FHIRCommon\n\ninclude Status version '2.1.000' called Status\n\ncodesystem "LOINC": 'http://loinc.org'\ncodesystem "SNOMEDCT": 'http://snomed.info/sct'\n\nvalueset "Encounter Inpatient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'\nvalueset "Hospice Care Ambulatory": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584'\nvalueset "Hospice Encounter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003'\nvalueset "Hospice Diagnosis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165'\n\ncode "Discharge to healthcare facility for hospice care (procedure)": '428371000124100' from "SNOMEDCT" display 'Discharge to healthcare facility for hospice care (procedure)'\ncode "Discharge to home for hospice care (procedure)": '428361000124107' from "SNOMEDCT" display 'Discharge to home for hospice care (procedure)'\ncode "Hospice care [Minimum Data Set]": '45755-6' from "LOINC" display 'Hospice care [Minimum Data Set]'\ncode "Yes (qualifier value)": '373066001' from "SNOMEDCT" display 'Yes (qualifier value)'\n\nparameter "Measurement Period" Interval<DateTime>\n\ncontext Patient\n\ndefine "Has Hospice Services":\n exists ((([USQualityCore.Encounter: "Encounter Inpatient"]).isEncounterPerformed()) InpatientEncounter\n where (InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"\n or InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"\n )\n and InpatientEncounter.period ends during day of "Measurement Period"\n )\n or exists ((([USQualityCore.Encounter: "Hospice Encounter"]).isEncounterPerformed()) HospiceEncounter\n where HospiceEncounter.period overlaps day of "Measurement Period"\n )\n // TODO: Shouldn't need to specify a code path here (see https://jira.hl7.org/browse/FHIR-53941)\n or exists ((([USQualityCore.ObservationScreeningAssessment: code ~ "Hospice care [Minimum Data Set]"]).isAssessmentPerformed()) HospiceAssessment\n where HospiceAssessment.value ~ "Yes (qualifier value)"\n and HospiceAssessment.effective.toInterval() overlaps day of "Measurement Period"\n )\n or exists ((([USQualityCore.ServiceRequest: "Hospice Care Ambulatory"]).isInterventionOrder()) HospiceOrder\n where HospiceOrder.authoredOn during day of "Measurement Period"\n )\n or exists ((([USQualityCore.Procedure: "Hospice Care Ambulatory"]).isInterventionPerformed()) HospicePerformed\n where HospicePerformed.performed.toInterval() overlaps day of "Measurement Period"\n )\n // TODO: Consider whether to keep this as the union of Problems and EncounterDiagnosis\n or exists ((([FHIR.Condition: "Hospice Diagnosis"]).verified()) HospiceCareDiagnosis\n where HospiceCareDiagnosis.prevalenceInterval() overlaps day of "Measurement Period"\n )</code></pre>\n </td>\n </tr>\n \n \n\n\n\n<tr>\n <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.5.6 of the sample-content-ig Liquid templates</th>\n</tr>\n\n </tbody>\n </table>\n</div>"
},
"extension" : [
{
"url" : "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem",
"valueReference" : {
"reference" : "Device/cqf-tooling"
}
}
],
"url" : "https://madie.cms.gov/Library/Hospice",
"version" : "7.1.000",
"name" : "Hospice",
"title" : "Hospice",
"status" : "active",
"experimental" : false,
"type" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/library-type",
"code" : "logic-library"
}
]
},
"date" : "2025-08-20T21:26:46+00:00",
"publisher" : "National Committee for Quality Assurance",
"description" : "This library contains a definition used to exclude patients who are in hospice care for any part of the measurement period.",
"topic" : [
{
"text" : "FHIR"
},
{
"text" : "CQL"
}
],
"content" : [
{
"contentType" : "text/cql",
"data" : "LyoKTk9URTogRm9yIHVzZSBieSBNYXJjaCAyMDI2IFVTIFJlYWxtIENvbm5lY3RhdGhvbiBwYXJ0aWNpcGFudHMgZm9yIGludGVybmFsIHVzZSBvbmx5LiBOb3QgZm9yIHVzZSBvciBkaXN0cmlidXRpb24gaW4gY29tbWVyY2lhbCBwcm9kdWN0cy4KKi8KbGlicmFyeSBIb3NwaWNlIHZlcnNpb24gJzcuMS4wMDAnCgp1c2luZyBVU1F1YWxpdHlDb3JlIHZ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