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-07-25 |
{
"resourceType" : "Library",
"id" : "Antibiotic",
"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\">Antibiotic</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\">2.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 functions used to exclude patients with a history of comorbid conditions, competing diagnoses, or antibiotic medications.</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 Antibiotic version '2.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.CumulativeMedicationDuration version '2.0.0-ballot' called CMD\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 USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon\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 function "Encounter with Comorbid Condition History"(episodes List<Encounter>, comorbidConditions List<Condition>):\n episodes episode\n with comorbidConditions comcondition\n such that date from start of comcondition.prevalenceInterval() during Interval[date from start of episode.period - 1 year, date from start of episode.period]\n return episode\n\ndefine function "Encounter with Competing Diagnosis History"(episodes List<Encounter>, competingConditions List<Condition>):\n episodes episode\n with competingConditions competcondition\n such that competcondition.prevalenceInterval() starts 3 days or less on or after day of start of episode.period\n return episode\n\ndefine function "Encounter with Antibiotic Medication History"(episodes List<Encounter>, antibioticMedications List<MedicationRequest>):\n episodes episode\n with antibioticMedications ActiveMedication\n such that ActiveMedication.medicationRequestPeriod() overlaps day of Interval[date from start of episode.period - 30 days, date from start of episode.period - 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/Antibiotic",
"version" : "2.1.000",
"name" : "Antibiotic",
"title" : "Antibiotic",
"status" : "active",
"experimental" : false,
"type" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/library-type",
"code" : "logic-library"
}
]
},
"date" : "2025-07-25T21:04:34+00:00",
"publisher" : "National Committee for Quality Assurance",
"description" : "This library contains functions used to exclude patients with a history of comorbid conditions, competing diagnoses, or antibiotic medications.",
"topic" : [
{
"text" : "FHIR"
},
{
"text" : "CQL"
}
],
"content" : [
{
"contentType" : "text/cql",
"data" : "LyoKTk9URTogRm9yIHVzZSBieSBNYXJjaCAyMDI2IFVTIFJlYWxtIENvbm5lY3RhdGhvbiBwYXJ0aWNpcGFudHMgZm9yIGludGVybmFsIHVzZSBvbmx5LiBOb3QgZm9yIHVzZSBvciBkaXN0cmlidXRpb24gaW4gY29tbWVyY2lhbCBwcm9kdWN0cy4KKi8KbGlicmFyeSBBbnRpYmlvdGljIHZlcnNpb24gJzIuMS4wMDAnCgp1c2luZyBVU1F1YWxpdHlDb3JlIHZlcnNpb24gJzAuMS4wLWNpYnVpbGQnCnVzaW5nIFVTQ29yZSB2ZXJzaW9uICc2LjEuMC1kZXJpdmVkJwp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4xJwoKaW5jbHVkZSBobDcuZmhpci51di5jcWwuRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjEnIGNhbGxlZCBGSElSSGVscGVycwppbmNsdWRlIGhsNy5maGlyLnV2LmNxbC5GSElSQ29tbW9uIHZlcnNpb24gJzIuMC4wJyBjYWxsZWQgRkhJUkNvbW1vbgppbmNsdWRlIGhsNy5maGlyLnVzLmNxbC5DdW11bGF0aXZlTWVkaWNhdGlvbkR1cmF0aW9uIHZlcnNpb24gJzIuMC4wLWJhbGxvdCcgY2FsbGVkIENNRAppbmNsdWRlIGhsNy5maGlyLnVzLmNxbC5VU0NvcmVDb21tb24gdmVyc2lvbiAnMi4wLjAtYmFsbG90JyBjYWxsZWQgVVNDb3JlQ29tbW9uCmluY2x1ZGUgaGw3LmZoaXIudXMuY3FsLlVTQ29yZUVsZW1lbnRzIHZlcnNpb24gJzIuMC4wLWJhbGxvdCcgY2FsbGVkIFVTQ29yZUVsZW1lbnRzCgppbmNsdWRlIFVTUXVhbGl0eUNvcmVDb21tb24gdmVyc2lvbiAnMC4xLjAtY2lid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