Quality Measure Implementation Guide
2.0.0 - STU 2 International flag

Quality Measure Implementation Guide, published by HL7 International / Clinical Quality Information. This guide is not an authorized publication; it is the continuous build for version 2.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cqm/ and changes regularly. See the Directory of published versions

: EXM Measure

Page standards status: Informative

Raw json | Download

{
  "resourceType" : "Measure",
  "id" : "EXMLogic-FHIR",
  "meta" : {
    "profile" : [
      🔗 "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-cvmeasure"🔗 ,
      "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure"🔗 ,
      "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-executablemeasure"🔗 ,
      "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-cqlmeasure"🔗 ,
      "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-elmmeasure"🔗 ,
      "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure"
    ]
  },
  "language" : "en",
  "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\">EXM Measure</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.0.0</td>\n\n\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n\n<td class=\"content-container\">EXM</td>\n\n\n</tr>\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n\n<td class=\"content-container\">urn:oid:2.16.840.1.113883.4.642.40.61.29.9</td>\n\n\n</tr>\n\n\n\n  \n    \n    \n    \n    \n\n\n  \n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Approval Date</th>\n\n\n\n<td class=\"content-container\">2019-02-17</td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Last Review Date</th>\n\n\n\n<td class=\"content-container\">2019-02-17</td>\n\n\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Experimental</th>\n\n\n\n<td class=\"content-container\">true</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Use Context</th>\n\n\n\n<td class=\"content-container\">\n    Clinical Venue\n\n = \n    EC\n\n\n</td>\n\n\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Jurisdiction</th>\n\n\n\n<td class=\"content-container\">\n    <a href=\"http://unstats.un.org/unsd/methods/m49/m49.htm\">http://unstats.un.org/unsd/methods/m49/m49.htm</a>#001\n\n\n</td>\n\n\n</tr>\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\">Health Quality Measure Document\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\">HL7 International / Clinical Quality Information</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Developer</th>\n\n\n\n<td class=\"content-container\">Example Measure Content Developer</td>\n\n\n</tr>\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>An example FHIR-based measure</p>\n</div></td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Purpose</th>\n\n\n\n<td class=\"content-container\"><div><p>This measure has been developed to support improvement in clinical care.</p>\n</div></td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Copyright</th>\n\n\n\n<td class=\"content-container\"><div><p>Example Copyright Statement</p>\n</div></td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Disclaimer</th>\n\n\n\n<td class=\"content-container\"><div><p>Example disclaimer</p>\n</div></td>\n\n\n</tr>\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Basis</th>\n\n\n\n<td class=\"content-container\">Encounter</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Scoring</th>\n\n\n\n<td class=\"content-container\">\n    Continuous Variable\n\n\n</td>\n\n\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Scoring Precision</th>\n\n\n\n<td class=\"content-container\">2</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n\n<td class=\"content-container\">\n    Increased score indicates improvement\n\n\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Type</th>\n\n\n\n<td class=\"content-container\">\n    <a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-measure-type.html\">http://terminology.hl7.org/CodeSystem/measure-type</a>#process\n\n\n</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Risk Adjustment</th>\n\n\n\n<td class=\"content-container\">Risk adjustment for this measure is performed by...</td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Rate Aggregation</th>\n\n\n\n<td class=\"content-container\">Rate aggregation for this measure is performed by...</td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Rationale</th>\n\n\n\n<td class=\"content-container\"><div><p>The purpose of this measure is to show how all the elements of a FHIR-based quality measure are represented.</p>\n</div></td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Clinical Recommendation Statement</th>\n\n\n\n<td class=\"content-container\"><div><p>The clinical recommendation statement for this measure is...</p>\n</div></td>\n\n\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Guidance (Usage)</th>\n\n\n\n<td class=\"content-container\">Users of this measure should be aware that this is intentionally simplified to show specific aspects of a measure.</td>\n\n\n</tr>\n\n\n\n  \n    \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Comment</th>\n\n\n\n<td class=\"content-container\"><div><p>This illustrates an example comment</p>\n</div></td>\n\n\n</tr>\n\n  \n\n\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\"><a name=\"contents\"> </a>Contents</th>\n  <td class=\"content-container\">\n    <em><a href=\"#metadata\">Metadata</a></em>\n    <br/>\n    <em><a href=\"#contents\">Contents</a></em>\n    <br/>\n    <em><a href=\"#measure-rates\">Measure Rates (Groups)</a></em>\n    <br/>\n    <em><a href=\"#supplemental-data\">Supplemental Data</a></em>\n    <br/>\n    \n    <em><a href=\"#measure-logic\">Measure Logic</a></em>\n    <br/>\n    \n    \n    <em><a href=\"#population-criteria\">Population Criteria</a></em>\n    <br/>\n    <em><a href=\"#definitions\">Logic Definitions</a></em>\n    <br/>\n    <em><a href=\"#terminology\">Terminology</a></em>\n    <br/>\n    <em><a href=\"#dependencies\">Dependencies</a></em>\n    <br/>\n    <em><a href=\"#data-requirements\">Data Requirements</a></em>\n    <br/>\n    \n    \n    \n  </td>\n</tr>\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"measure-rates\"> </a>Measure Rates (Groups)</th>\n\n\n</tr>\n\n  \n  \n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Rate (Group) (ID: primary)</th>\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    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Initial Population</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: primary-exmlogic-initial-population\n        <br/>\n        \n        \n          \n        \n        \n          \n            \n              \n              <em>Criteria</em>: <a href=\"#primary-primary-exmlogic-initial-population\">Initial Population</a> \n            \n          \n          \n        \n        \n        \n      </td>\n    </tr>\n  \n\n      \n    \n\n    \n      \n        \n  \n    \n    \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Measure Population</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: primary-exmlogic-measure-population\n        <br/>\n        \n        \n          \n        \n        \n          \n            \n              \n              <em>Criteria</em>: <a href=\"#primary-primary-exmlogic-measure-population\">Measure Population</a> \n            \n          \n          \n        \n        \n        \n      </td>\n    </tr>\n  \n\n      \n    \n\n    \n      \n    \n\n    \n      \n        \n  \n    \n    \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Measure Observation</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: primary-exmlogic-measure-observation\n        <br/>\n        \n        \n          \n        \n        \n          \n            \n              \n              <em>Criteria</em>: <a href=\"#primary-primary-exmlogic-measure-observation\">Measure Observation</a> \n            \n          \n          \n        \n        \n          <br/><em>Input population</em>: measure-population\n        \n        \n          <em>Aggregate method</em>: median\n        \n      </td>\n    </tr>\n  \n\n      \n    \n\n  \n\n\n  \n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: stratifier-1\n      \n        <br/>\n      \n    \n    \n      \n        <em>Code</em>: <span title=\"Codes:\">Stratifier 1</span>\n      \n      \n    \n    \n    \n      <br/>\n      <em>Applies to</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-population initial-population}\">initial-population</span>\n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: stratifier-2\n      \n        <br/>\n      \n    \n    \n      \n        <em>Code</em>: <span title=\"Codes:\">Stratifier 2</span>\n      \n      \n    \n    \n    \n      <br/>\n      <em>Applies to</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-population initial-population}\">initial-population</span>\n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: stratifier-3\n      \n        <br/>\n      \n    \n    \n      \n        <em>Code</em>: <span title=\"Codes:\">Stratifier 3</span>\n      \n      \n    \n    \n    \n      <br/>\n      <em>Applies to</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-population initial-population}\">initial-population</span>\n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: stratifier-4\n      \n        <br/>\n      \n    \n    \n      \n        <em>Code</em>: <span title=\"Codes:\">Stratifier 4</span>\n      \n      \n    \n    \n    \n      <br/>\n      <em>Applies to</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-population initial-population}\">initial-population</span>\n    \n  </td>\n</tr>\n\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"supplemental-data\"> </a>Supplemental Data Elements</th>\n\n\n</tr>\n\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=\"measure-logic\"> </a>Measure Logic</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Primary Library</th>\n\n\n\n<td class=\"content-container\"><a href=\"Library-EXMLogic.html\">Example Logic Library</a></td>\n\n\n</tr>\n\n\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"population-criteria\"> </a>Population Criteria</th>\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\">Measure Rate (Group) (ID: primary)</th>\n\n\n</tr>\n  \n  \n  \n  \n\n    \n      \n          \n    \n      \n        \n          \n        \n          \n            \n              \n            \n            \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n    Initial Population\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      \n      <a name=\"primary-primary-exmlogic-initial-population\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    with [&quot;Encounter&quot; : &quot;Emergency Department Visit&quot;] ED\n     such that ED.status = 'finished'\n       and ED.period ends 1 hour or less before start of Encounter.period</code></pre>\n    \n      \n      <a href=\"#exmlogic-initial-population\"><em>Definition</em></a>\n    \n  </td>\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        \n          \n        \n          \n        \n          \n            \n              \n            \n            \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n    Measure Population\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      \n      <a name=\"primary-primary-exmlogic-measure-population\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Measure Population&quot; :\n  &quot;Initial Population&quot;</code></pre>\n    \n      \n      <a href=\"#exmlogic-measure-population\"><em>Definition</em></a>\n    \n  </td>\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    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n    Measure Observation\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      \n      <a name=\"primary-primary-exmlogic-measure-observation\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function &quot;Measure Observation&quot;(Encounter &quot;Encounter&quot;) :\n  duration in minutes of &quot;Related ED Visit&quot;(Encounter).period</code></pre>\n    \n      \n      <a href=\"#exmlogic-measure-observation\"><em>Definition</em></a>\n    \n  </td>\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        \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        \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  \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\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"definitions\"> </a>Logic Definitions</th>\n\n\n</tr>\n  \n  \n          \n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> EXMCommon</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exmcommon-lengthindays\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function lengthInDays(Value Interval&lt;DateTime&gt; ):\n  difference in days between start of Value and end of Value</code></pre>\n  </td>\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\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"fhirhelpers-tointerval\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.&quot;start&quot; is null then\n            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]\n        else\n            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"fhirhelpers-tostring\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value EncounterStatus): value.value</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n\n        \n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> EXMLogic</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exmlogic-inpatient-encounter\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Inpatient Encounter&quot; :\n  [&quot;Encounter&quot;] Encounter\n    where Encounter.period.lengthInDays() &lt;= 120\n      and Encounter.period ends during &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> EXMLogic</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exmlogic-initial-population\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    with [&quot;Encounter&quot; : &quot;Emergency Department Visit&quot;] ED\n     such that ED.status = 'finished'\n       and ED.period ends 1 hour or less before start of Encounter.period</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> EXMLogic</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exmlogic-measure-population\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Measure Population&quot; :\n  &quot;Initial Population&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> EXMLogic</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exmlogic-measure-observation\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function &quot;Measure Observation&quot;(Encounter &quot;Encounter&quot;) :\n  duration in minutes of &quot;Related ED Visit&quot;(Encounter).period</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> EXMLogic</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exmlogic-related-ed-visit\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//Measure Observation\ndefine function &quot;Related ED Visit&quot;(Encounter &quot;Encounter&quot;) :\n  Last([&quot;Encounter&quot; : &quot;Emergency Department Visit&quot;] ED\n    where ED.status = 'finished'\n      and ED.period ends 1 hour or less before start of Encounter.period\n    sort by start of period )</code></pre>\n  </td>\n\n</tr>\n\n\n\n\n\n  \n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"terminology\"> </a>Terminology</th>\n\n\n</tr>\n  \n  \n  \n\n \n\n \n\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Emergency Department Visit\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</tt>\n    \n  </td>\n</tr>\n \n\n\n  \n  \n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"dependencies\"> </a>Dependencies</th>\n\n\n</tr>\n  \n  \n  \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: FHIR model information\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"http://hl7.org/fhir/uv/cql/STU2/Library-FHIR-ModelInfo.html\">http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library EXMCommon\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"Library-EXMCommon.html\">EXMCommon</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cqm/Library/EXMCommon</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library FHIRHelpers\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html\">http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</tt>\n    \n  </td>\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=\"data-requirements\"> </a>Data Requirements</th>\n\n\n</tr>\n  \n  \n  \n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: period\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a>\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n  \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>"
  },
  "contained" : [
    {
      "resourceType" : "Library",
      "id" : "effective-data-requirements",
      "extension" : [
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "EXMLogic"
            },
            {
              "url" : "name",
              "valueString" : "Inpatient Encounter"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Inpatient Encounter\" :\n  [\"Encounter\"] Encounter\n    where Encounter.period.lengthInDays() <= 120\n      and Encounter.period ends during \"Measurement Period\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 0
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "EXMLogic"
            },
            {
              "url" : "name",
              "valueString" : "Initial Population"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Initial Population\" :\n  \"Inpatient Encounter\" Encounter\n    with [\"Encounter\" : \"Emergency Department Visit\"] ED\n     such that ED.status = 'finished'\n       and ED.period ends 1 hour or less before start of Encounter.period"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 1
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "EXMLogic"
            },
            {
              "url" : "name",
              "valueString" : "Measure Population"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Measure Population\" :\n  \"Initial Population\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 2
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "EXMCommon"
            },
            {
              "url" : "name",
              "valueString" : "lengthInDays"
            },
            {
              "url" : "statement",
              "valueString" : "define fluent function lengthInDays(Value Interval<DateTime> ):\n  difference in days between start of Value and end of Value"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 3
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "FHIRHelpers"
            },
            {
              "url" : "name",
              "valueString" : "ToInterval"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 4
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "FHIRHelpers"
            },
            {
              "url" : "name",
              "valueString" : "ToString"
            },
            {
              "url" : "statement",
              "valueString" : "define function ToString(value EncounterStatus): value.value"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 5
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "EXMLogic"
            },
            {
              "url" : "name",
              "valueString" : "Measure Observation"
            },
            {
              "url" : "statement",
              "valueString" : "define function \"Measure Observation\"(Encounter \"Encounter\") :\n  duration in minutes of \"Related ED Visit\"(Encounter).period"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 6
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "EXMLogic"
            },
            {
              "url" : "name",
              "valueString" : "Related ED Visit"
            },
            {
              "url" : "statement",
              "valueString" : "//Measure Observation\ndefine function \"Related ED Visit\"(Encounter \"Encounter\") :\n  Last([\"Encounter\" : \"Emergency Department Visit\"] ED\n    where ED.status = 'finished'\n      and ED.period ends 1 hour or less before start of Encounter.period\n    sort by start of period )"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 7
            }
          ],
          "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        }
      ],
      "name" : "EffectiveDataRequirements",
      "status" : "active",
      "type" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/library-type",
            "code" : "module-definition"
          }
        ]
      },
      "relatedArtifact" : [
        {
          "type" : "depends-on",
          "display" : "FHIR model information",
          "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"
        },
        {
          "type" : "depends-on",
          "display" : "Library EXMCommon",
          "resource" : "http://hl7.org/fhir/uv/cqm/Library/EXMCommon"
        },
        {
          "type" : "depends-on",
          "display" : "Library FHIRHelpers",
          "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Emergency Department Visit",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
        }
      ],
      "parameter" : [
        {
          "name" : "Measurement Period",
          "use" : "in",
          "min" : 0,
          "max" : "1",
          "type" : "Period"
        },
        {
          "name" : "Initial Population",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Encounter"
        },
        {
          "name" : "Measure Population",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Encounter"
        }
      ],
      "dataRequirement" : [
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
          ],
          "mustSupport" : [
            "period"
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
          ],
          "mustSupport" : [
            "type",
            "status",
            "period"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
            }
          ]
        }
      ]
    }
  ],
  "extension" : [
    {
      "extension" : [
        {
          "url" : "type",
          "valueCode" : "documentation"
        },
        {
          "url" : "text",
          "valueMarkdown" : "This illustrates an example comment"
        }
      ],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-artifactComment"
    },
    {
      "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-populationBasis",
      "valueCode" : "Encounter"
    },
    {
      "url" : "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem",
      "valueReference" : {
        🔗 "reference" : "Device/software-system-example"
      }
    },
    {
      "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-scoringPrecision",
      "valuePositiveInt" : 2
    },
    {
      "url" : "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements",
      "valueCanonical" : "#effective-data-requirements"
    }
  ],
  "url" : "http://hl7.org/fhir/uv/cqm/Measure/EXMLogic-FHIR",
  "identifier" : [
    {
      "system" : "http://example.org/fhir/cqi/ecqm/Measure/Identifier/exm",
      "value" : "EXM"
    },
    {
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:oid:2.16.840.1.113883.4.642.40.61.29.9"
    }
  ],
  "version" : "2.0.0",
  "name" : "MeasureEXM",
  "title" : "EXM Measure",
  "status" : "active",
  "experimental" : true,
  "date" : "2025-08-13",
  "publisher" : "HL7 International / Clinical Quality Information",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/cqi"
        }
      ]
    }
  ],
  "description" : "An example FHIR-based measure",
  "useContext" : [
    {
      "code" : {
        "system" : "http://terminology.hl7.org/CodeSystem/usage-context-type",
        "code" : "venue",
        "display" : "Clinical Venue"
      },
      "valueCodeableConcept" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes",
            "code" : "ec",
            "display" : "EC"
          }
        ]
      }
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "purpose" : "This measure has been developed to support improvement in clinical care.",
  "usage" : "Users of this measure should be aware that this is intentionally simplified to show specific aspects of a measure.",
  "copyright" : "Example Copyright Statement",
  "approvalDate" : "2019-02-17",
  "lastReviewDate" : "2019-02-17",
  "effectivePeriod" : {
    "extension" : [
      {
        "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-effectivePeriodAnchor",
        "valueDateTime" : "2018-01-01"
      },
      {
        "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-effectivePeriodDuration",
        "valueDuration" : {
          "value" : 1,
          "system" : "http://unitsofmeasure.org",
          "code" : "a"
        }
      }
    ],
    "start" : "2018-01-01",
    "end" : "2018-12-31"
  },
  "topic" : [
    {
      "coding" : [
        {
          "system" : "http://loinc.org",
          "code" : "57024-2"
        }
      ],
      "text" : "Health Quality Measure Document"
    }
  ],
  "author" : [
    {
      "name" : "Example Measure Content Developer"
    }
  ],
  "library" : [
    🔗 "http://hl7.org/fhir/uv/cqm/Library/EXMLogic"
  ],
  "disclaimer" : "Example disclaimer",
  "scoring" : {
    "coding" : [
      {
        "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
        "code" : "continuous-variable",
        "display" : "Continuous Variable"
      }
    ]
  },
  "type" : [
    {
      "coding" : [
        {
          "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
          "code" : "process"
        }
      ]
    }
  ],
  "riskAdjustment" : "Risk adjustment for this measure is performed by...",
  "rateAggregation" : "Rate aggregation for this measure is performed by...",
  "rationale" : "The purpose of this measure is to show how all the elements of a FHIR-based quality measure are represented.",
  "clinicalRecommendationStatement" : "The clinical recommendation statement for this measure is...",
  "improvementNotation" : {
    "coding" : [
      {
        "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
        "code" : "increase",
        "display" : "Increased score indicates improvement"
      }
    ]
  },
  "guidance" : "Additional guidance provided to help communicate the intent of the measure",
  "group" : [
    {
      "id" : "group-1",
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId",
          "valueString" : "primary"
        }
      ],
      "code" : {
        "coding" : [
          {
            "system" : "http://example.org/group",
            "code" : "group",
            "display" : "group-1"
          }
        ]
      },
      "population" : [
        {
          "id" : "initial-population-1",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
              "valueString" : "primary-exmlogic-initial-population"
            }
          ],
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "initial-population",
                "display" : "Initial Population"
              }
            ]
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Initial Population"
          }
        },
        {
          "id" : "measure-population",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
              "valueString" : "primary-exmlogic-measure-population"
            }
          ],
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "measure-population",
                "display" : "Measure Population"
              }
            ]
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Measure Population"
          }
        },
        {
          "id" : "measure-observation",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
              "valueString" : "primary-exmlogic-measure-observation"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference",
              "valueString" : "measure-population"
            },
            {
              "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-aggregateMethod",
              "valueCode" : "median"
            }
          ],
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "measure-observation",
                "display" : "Measure Observation"
              }
            ]
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Measure Observation"
          }
        }
      ],
      "stratifier" : [
        {
          "id" : "stratifier-1",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
              "valueString" : "primary-exmlogic-stratification-1"
            },
            {
              "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "initial-population",
                    "display" : "Initial Population"
                  }
                ],
                "text" : "initial-population"
              }
            }
          ],
          "code" : {
            "text" : "Stratifier 1"
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Stratifier 1"
          }
        },
        {
          "id" : "stratifier-2",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
              "valueString" : "primary-exmlogic-stratification-2"
            },
            {
              "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "initial-population",
                    "display" : "Initial Population"
                  }
                ],
                "text" : "initial-population"
              }
            }
          ],
          "code" : {
            "text" : "Stratifier 2"
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Stratifier 2"
          }
        },
        {
          "id" : "stratifier-3",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
              "valueString" : "primary-exmlogic-stratification-3"
            },
            {
              "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "initial-population",
                    "display" : "Initial Population"
                  }
                ],
                "text" : "initial-population"
              }
            }
          ],
          "code" : {
            "text" : "Stratifier 3"
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Stratifier 3"
          }
        },
        {
          "id" : "stratifier-4",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
              "valueString" : "primary-exmlogic-stratification-4"
            },
            {
              "url" : "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "initial-population",
                    "display" : "Initial Population"
                  }
                ],
                "text" : "initial-population"
              }
            }
          ],
          "code" : {
            "text" : "Stratifier 4"
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Stratifier 4"
          }
        }
      ]
    }
  ]
}