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-25 |
{
"resourceType" : "Library",
"id" : "TJCOverall",
"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"
]
},
"language" : "en",
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\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\">TJCOverall</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\">9.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\">The Joint Commission</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>Common functions and definitions used by TJC measures</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\">/*\n@description: TJCOverall Common Functions\n\nNOTE: This library is not published in this IG, it is included here for convenience. The source of truth for\nthis library will be the MADiE environment once it fully supports use of QICore STU6-derived.\n*/\nlibrary TJCOverall version '9.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\ninclude hl7.fhir.us.cql.USCoreCommon version '2.0.0-ballot' called USCoreCommon\ninclude hl7.fhir.us.cql.USCoreElements version '2.0.0-ballot' called USCoreElements\n\ninclude CQMCommon version '5.1.000' called CQMCommon\ninclude USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon\n\nvalueset "Comfort Measures": 'http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45'\nvalueset "Discharge To Acute Care Facility": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87'\nvalueset "Discharged to Health Care Facility for Hospice Care": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.207'\nvalueset "Discharged to Home for Hospice Care": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.209'\nvalueset "Ischemic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247'\nvalueset "Left Against Medical Advice": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308'\nvalueset "Nonelective Inpatient Encounter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424'\nvalueset "Patient Expired": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309'\n\nparameter "Measurement Period" Interval<DateTime>\n default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)\n\ncontext Patient\n\ndefine "Non Elective Inpatient Encounter With Age":\n // ["Encounter"] NonElectiveEncounter\n ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter\n where AgeInYearsAt(date from start of NonElectiveEncounter.period ) >= 18\n and NonElectiveEncounter.period ends during day of "Measurement Period"\n\ndefine "Ischemic Stroke Encounter":\n "Non Elective Inpatient Encounter With Age" NonElectiveEncounterWithAge\n where NonElectiveEncounterWithAge.hasPrincipalDiagnosisOf("Ischemic Stroke" )\n\ndefine "Ischemic Stroke Encounters With Discharge Disposition":\n "Ischemic Stroke Encounter" IschemicStrokeEncounter\n let DischDisp: IschemicStrokeEncounter.hospitalization.dischargeDisposition\n \twhere DischDisp in "Discharge To Acute Care Facility"\n\t\tor DischDisp in "Left Against Medical Advice"\n\t\tor DischDisp in "Patient Expired"\n\t\tor DischDisp in "Discharged to Home for Hospice Care"\n\t\tor DischDisp in "Discharged to Health Care Facility for Hospice Care"\t\t\t\n\ndefine "Encounter With Comfort Measures During Hospitalization":\n "Ischemic Stroke Encounter" IschemicStrokeEncounter\n with "Intervention Comfort Measures" ComfortMeasure\n such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during IschemicStrokeEncounter.hospitalizationWithObservation()\n\ndefine "Intervention Comfort Measures":\n ( ["ServiceRequest": "Comfort Measures"] ComfortCare\n where ComfortCare.status in { 'active', 'completed', 'on-hold' }\n and ComfortCare.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n ) \n union ( ["Procedure": "Comfort Measures"] ComfortCarePerformed\n where ComfortCarePerformed.status in { 'completed', 'in-progress' }\n )\n \ndefine fluent function calendarDayOfOrDayAfter(StartValue DateTime):\n Interval [date from (StartValue), date from (StartValue) + 1 day]</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/TJCOverall",
"version" : "9.1.000",
"name" : "TJCOverall",
"title" : "TJCOverall",
"status" : "active",
"experimental" : false,
"type" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/library-type",
"code" : "logic-library"
}
]
},
"date" : "2025-08-25T20:31:10+00:00",
"publisher" : "The Joint Commission",
"description" : "Common functions and definitions used by TJC measures",
"topic" : [
{
"text" : "FHIR"
},
{
"text" : "CQL"
}
],
"content" : [
{
"contentType" : "text/cql",
"data" : "LyoKQGRlc2NyaXB0aW9uOiBUSkNPdmVyYWxsIENvbW1vbiBGdW5jdGlvbnMKCk5PVEU6IFRoaXMgbGlicmFyeSBpcyBub3QgcHVibGlzaGVkIGluIHRoaXMgSUcsIGl0IGlzIGluY2x1ZGVkIGhlcmUgZm9yIGNvbnZlbmllbmNlLiBUaGUgc291cmNlIG9mIHRydXRoIGZvcgp0aGlzIGxpYnJhcnkgd2lsbCBiZSB0aGUgTUFEaUUgZW52aXJvbm1lbnQgb25jZSBpdCBmdWxseSBzdXBwb3J0cyB1c2Ugb2YgUUlDb3JlIFNUVTYtZGVyaXZlZC4KKi8KbGlicmFyeSBUSkNPdmVyYWxsIHZlcnNpb24gJzkuMS4wMDAnCgp1c2luZyBVU1F1YWxpdHlDb3JlIHZlcnNpb24gJzAuMS4wLWNpYnVpbGQnCnVzaW5nIFVTQ29yZSB2ZXJzaW9uICc2LjEuMC1kZXJpdmVkJwp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4xJwoKaW5jbHVkZSBobDcuZmhpci51di5jcWwuRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjEnIGNhbGxlZCBGSElSSGVscGVycwppbmNsdWRlIGhsNy5maGlyLnV2LmNxbC5GSElSQ29tbW9uIHZlcnNpb24gJzIuMC4wJyBjYWxsZWQgRkhJUkNvbW1vbgppbmNsdWRlIGhsNy5maGlyLnVzLmNxbC5VU0NvcmVDb21tb24gdmVyc2lvbiAnMi4wLjAtYmFsbG90JyBjYWxsZWQgVVNDb3JlQ29tbW9uCmluY2x1ZGUgaGw3LmZoaXIudXMuY3FsLlVTQ29yZUVsZW1lbnRzIHZlcnNpb24gJzIuMC4wLWJhbGxvdCcgY2FsbGVkIFVTQ29yZUVsZW1lbnRzCgppbmNsdWRlIENRTUNvbW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