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
| Draft as of 2026-09-19 |
<Library xmlns="http://hl7.org/fhir">
<id value="CMS68FHIRDocumentationCurrentMeds"/>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table class="narrative-table">
<tbody>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="metadata"> </a>Metadata</th>
</tr>
<tr>
<th scope="row" class="row-header">Version</th>
<td class="content-container">1.1.000</td>
</tr>
<tr>
<th scope="row" class="row-header">Status</th>
<td class="content-container">Draft</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
<a href="http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html">http://terminology.hl7.org/CodeSystem/library-type</a>#logic-library
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="parameters"> </a>Parameters</th>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">None</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Library Content</th>
</tr>
<tr>
<th scope="row" class="row-header">CQL Content</th>
<td>
<a name="cql-content"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
NOTE: For use by March 2026 US Realm Connectathon participants for internal use only. Not for use or distribution in commercial products.
*/
library CMS68FHIRDocumentationCurrentMeds version '1.1.000'
using USQualityCore version '0.1.0-cibuild'
using USCore version '6.1.0-derived'
using FHIR version '4.0.1'
include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers
include hl7.fhir.uv.cql.FHIRCommon version '2.0.0' called FHIRCommon
include hl7.fhir.us.cql.USCoreCommon version '2.0.0-ballot' called USCoreCommon
include hl7.fhir.us.cql.USCoreElements version '2.0.0-ballot' called USCoreElements
include USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon
include SupplementalDataElements version '6.1.000' called SDE
include Status version '2.1.000' called Status
codesystem "SNOMEDCT": 'http://snomed.info/sct'
valueset "Encounter to Document Medications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1834'
code "Acute health crisis (finding)": '705016005' from "SNOMEDCT" display 'Acute health crisis (finding)'
code "Documentation of current medications (procedure)": '428191000124101' from "SNOMEDCT" display 'Documentation of current medications (procedure)'
parameter "Measurement Period" Interval<DateTime>
default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)
context Patient
define "SDE Ethnicity":
SDE."SDE Ethnicity"
define "SDE Payer":
SDE."SDE Payer"
define "SDE Race":
SDE."SDE Race"
define "SDE Sex":
SDE."SDE Sex"
define "Denominator":
"Initial Population"
define "Qualifying Encounter During Day of Measurement Period":
["Encounter": "Encounter to Document Medications"] ValidEncounter
where ValidEncounter.status = 'finished'
and ValidEncounter.period during day of "Measurement Period"
define "Initial Population":
"Qualifying Encounter During Day of Measurement Period" QualifyingEncounter
define "Numerator":
"Qualifying Encounter During Day of Measurement Period" QualifyingEncounter
with [Procedure: "Documentation of current medications (procedure)"] MedicationsDocumented
such that MedicationsDocumented.performed.toInterval ( ) starts during day of QualifyingEncounter.period
and MedicationsDocumented.performed.toInterval ( ).hasEnd ( )
and MedicationsDocumented.status = 'completed'
define "Denominator Exceptions":
"Qualifying Encounter During Day of Measurement Period" QualifyingEncounter
with [ProcedureNotDone: code ~ "Documentation of current medications (procedure)"] MedicationsNotDocumented
such that MedicationsNotDocumented.recorded ( ) during day of QualifyingEncounter.period
and MedicationsNotDocumented.status = 'not-done'
and exists ( MedicationsNotDocumented.reasonCode reasonItem
where reasonItem ~ "Acute health crisis (finding)"
)</code></pre>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Generated using version 0.5.6 of the sample-content-ig Liquid templates</th>
</tr>
</tbody>
</table>
</div>
</text>
<extension
url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
<valueReference>
<reference value="Device/cqf-tooling"/>
</valueReference>
</extension>
<url
value="https://madie.cms.gov/Library/CMS68FHIRDocumentationCurrentMeds"/>
<version value="1.1.000"/>
<name value="CMS68FHIRDocumentationCurrentMeds"/>
<status value="draft"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/library-type"/>
<code value="logic-library"/>
</coding>
</type>
<date value="2026-09-19T16:31:14+00:00"/>
<content>
<contentType value="text/cql"/>
<data
value="LyoKTk9URTogRm9yIHVzZSBieSBNYXJjaCAyMDI2IFVTIFJlYWxtIENvbm5lY3RhdGhvbiBwYXJ0aWNpcGFudHMgZm9yIGludGVybmFsIHVzZSBvbmx5LiBOb3QgZm9yIHVzZSBvciBkaXN0cmlidXRpb24gaW4gY29tbWVyY2lhbCBwcm9kdWN0cy4KKi8KbGlicmFyeSBDTVM2OEZISVJEb2N1bWVudGF0aW9uQ3VycmVudE1lZHMgdmVyc2lvbiAnMS4xLjAwMCcKCnVzaW5nIFVTUXVhbGl0eUNvcmUgdmVyc2lvbiAnMC4xLjAtY2lidWlsZCcKdXNpbmcgVVNDb3JlIHZlcnNpb24gJzYuMS4wLWRlcml2ZWQnCnVzaW5nIEZISVIgdmVyc2lvbiAnNC4wLjEnCgppbmNsdWRlIGhsNy5maGlyLnV2LmNxbC5GSElSSGVscGVycyB2ZXJzaW9uICc0LjAuMScgY2FsbGVkIEZISVJIZWxwZXJzCmluY2x1ZGUgaGw3LmZoaXIudXYuY3FsLkZISVJDb21tb24gdmVyc2lvbiAnMi4wLjAnIGNhbGxlZCBGSElSQ29tbW9uCmluY2x1ZGUgaGw3LmZoaXIudXMuY3FsLlVTQ29yZUNvbW1vbiB2ZXJzaW9uICcyLjAuMC1iYWxsb3QnIGNhbGxlZCBVU0NvcmVDb21tb24KaW5jbHVkZSBobDcuZmhpci51cy5jcWwuVVNDb3JlRWxlbWVudHMgdmVyc2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pbmcgZGF5IG9mIFF1YWxpZnlpbmdFbmNvdW50ZXIucGVyaW9kCiAgICAgICAgYW5kIE1lZGljYXRpb25zRG9jdW1lbnRlZC5wZXJmb3JtZWQudG9JbnRlcnZhbCAoICkuaGFzRW5kICggKQogICAgICAgIGFuZCBNZWRpY2F0aW9uc0RvY3VtZW50ZWQuc3RhdHVzID0gJ2NvbXBsZXRlZCcKCmRlZmluZSAiRGVub21pbmF0b3IgRXhjZXB0aW9ucyI6CiAgIlF1YWxpZnlpbmcgRW5jb3VudGVyIER1cmluZyBEYXkgb2YgTWVhc3VyZW1lbnQgUGVyaW9kIiBRdWFsaWZ5aW5nRW5jb3VudGVyCiAgICB3aXRoIFtQcm9jZWR1cmVOb3REb25lOiBjb2RlIH4gIkRvY3VtZW50YXRpb24gb2YgY3VycmVudCBtZWRpY2F0aW9ucyAocHJvY2VkdXJlKSJdIE1lZGljYXRpb25zTm90RG9jdW1lbnRlZAogICAgICBzdWNoIHRoYXQgTWVkaWNhdGlvbnNOb3REb2N1bWVudGVkLnJlY29yZGVkICggKSBkdXJpbmcgZGF5IG9mIFF1YWxpZnlpbmdFbmNvdW50ZXIucGVyaW9kCiAgICAgICAgYW5kIE1lZGljYXRpb25zTm90RG9jdW1lbnRlZC5zdGF0dXMgPSAnbm90LWRvbmUnCiAgICAgICAgYW5kIGV4aXN0cyAoIE1lZGljYXRpb25zTm90RG9jdW1lbnRlZC5yZWFzb25Db2RlIHJlYXNvbkl0ZW0KICAgICAgICAgICAgd2hlcmUgcmVhc29uSXRlbSB+ICJBY3V0ZSBoZWFsdGggY3Jpc2lzIChmaW5kaW5nKSIKICAgICAgICAp"/>
<url
value="https://madie.cms.gov/Library-CMS68FHIRDocumentationCurrentMeds.cql"/>
</content>
</Library>