Quality Measure Implementation Guide
2.0.0-ballot - STU 2 Ballot

Quality Measure Implementation Guide - Downloaded Version null See the Directory of published versions

## : EXM55 - Median Emergency Department Visit Duration

Page standards status: Informative

Raw json | Download

    {
      "resourceType" : "Measure",
      "id" : "EXM55-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/crmi/StructureDefinition/crmi-shareablemeasure"
        ]
      },
      "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\">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\">EXM55 - Median Emergency Department Visit Duration</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n\n<td class=\"content-container\">5.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\">55</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.8</td>\n\n\n</tr>\n\n\n\n  \n    \n    \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Effective Period</th>\n\n\n\n<td class=\"content-container\">2018-01-01 through 2018-12-31</td>\n\n\n</tr>\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-03-08</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-03-08</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<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    EH\n\n\n</td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Jurisdiction</th>\n\n\n\n<td class=\"content-container\">\n    001 from <a href=\"http://unstats.un.org/unsd/methods/m49/m49.htm\">http://unstats.un.org/unsd/methods/m49/m49.htm</a> \n\n\n</td>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Topic</th>\n\n\n\n<td class=\"content-container\">\n    Health Quality Measure Document\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\">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\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n\n<td class=\"content-container\"><div><p>This example illustrates a continuous variable measure represented as a FHIR eCQM</p>\n</div></td>\n\n\n</tr>\n\n\n\n\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\">Improvement Notation</th>\n\n\n\n<td class=\"content-container\">\n    Decreased score indicates improvement\n\n\n</td>\n\n\n</tr>\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    process from <a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-measure-type.html\">http://terminology.hl7.org/CodeSystem/measure-type</a> \n\n\n</td>\n\n\n</tr>\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\">Measure Group (Rate) (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<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n    \n      \n        <em>Code</em>: Stratification 1\n      \n      \n    \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    \n      \n        <em>Code</em>: Stratification 2\n      \n      \n    \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    \n      \n        <em>Code</em>: Stratification 3\n      \n      \n    \n    \n  </td>\n</tr>\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\">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-EXM55.html\">EXM55 - Median Emergency Department Visit Duration Library (Example Continuous Variable Measure Library)</a></td>\n\n\n</tr>\n\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Contents</th>\n  <td class=\"content-container\">\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    <em><a href=\"#parameters\">Parameters</a></em>\n    <br/>\n  </td>\n</tr>\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 Group (Rate) (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            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 1&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    where not (PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&quot;)</code></pre>\n    \n      \n      <a href=\"#exm55-stratification-1\"><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    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 2&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    where PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&quot;</code></pre>\n    \n      \n      <a href=\"#exm55-stratification-2\"><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            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 3&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    where PrincipalDiagnosis(Encounter) is null</code></pre>\n    \n      \n      <a href=\"#exm55-stratification-3\"><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  <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\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\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-toconcept\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }</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-tocode\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }</code></pre>\n  </td>\n\n</tr>\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-tostring\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value string): value.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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-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 LengthInDays(Encounter.period) &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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-stratification-3\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 3&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    where PrincipalDiagnosis(Encounter) is null</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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-stratification-2\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 2&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    where PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-measure-population-exclusion\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Measure Population Exclusion&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    with [&quot;Encounter&quot; : &quot;Emergency Department Visit&quot;] ED\n      such that ED.period ends 1 hour or less before start of Encounter.period\n        and ED.status = 'finished'\n        and ED.hospitalization.admitSource in &quot;Hospital Settings&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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-stratification-1\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 1&quot; :\n  &quot;Inpatient Encounter&quot; Encounter\n    where not (PrincipalDiagnosis(Encounter).code in &quot;Psychiatric/Mental Health Patient&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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-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<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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-lengthindays\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function &quot;LengthInDays&quot;(Value Interval&lt;DateTime&gt;):\n\tdifference 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<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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-principaldiagnosis\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function &quot;PrincipalDiagnosis&quot;(Encounter Encounter):\n\t(singleton from (Encounter.diagnosis D where D.use ~ ToConcept(&quot;Billing&quot;) and D.rank.value = 1)) PD\n\t\treturn singleton from ([Condition: id in &quot;GetId&quot;(PD.condition.reference)])</code></pre>\n  </td>\n\n</tr>\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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-getid\"> </a>\n    \n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function &quot;GetId&quot;(uri String):\n\tLast(Split(uri, '/'))</code></pre>\n  </td>\n\n</tr>\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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-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> EXM55</td>\n\n</tr>\n<tr>\n\n  <td>\n    \n    \n    \n    \n      <a name=\"exm55-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<tr>\n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Code system Diagnosis Role\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-diagnosis-role.html\">Diagnosis Role</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/diagnosis-role</tt>\n    \n  </td>\n</tr>\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 Psychiatric/Mental Health Patient\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.299/expansion\">Psychiatric/Mental Health Diagnosis</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.299</tt>\n    \n  </td>\n</tr>\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<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 Hospital Settings\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.113762.1.4.1111.126/expansion\">Hospital Settings</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126</tt>\n    \n  </td>\n</tr>\n \n\n\n  \n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Billing\n        <br/>\n      \n      <em>Code</em>: billing\n      <br/>\n      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/diagnosis-role</tt>\n    </td>\n  </tr>\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 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\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, use, rank, rank.value, condition, condition.reference\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, period, status, hospitalization, hospitalization.admitSource, use, rank, rank.value, condition, condition.reference\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<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/R4/condition.html\">Condition</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: id\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: id</span>\n    <br/>\n  \n  \n  \n  \n  \n   \n  </td>\n</tr>\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\"/>\n\n\n  <td class=\"content-container\">\n    <table>\n      <thead>\n        <tr>\n          <td><em>Name</em></td>\n          <td><em>Use</em></td>\n          <td><em>Card.</em></td>\n          <td><em>Type</em></td>\n          <td><em>Documentation</em></td>\n        </tr>\n      </thead>\n      <tbody>\n      \n        <tr>\n          <td>Measurement Period</td>\n          <td>In</td>\n          <td>0..1</td>\n          <td>Period</td>\n          <td/>\n        </tr>\n      \n        <tr>\n          <td>Stratification 3</td>\n          <td>Out</td>\n          <td>0..*</td>\n          <td>Encounter</td>\n          <td/>\n        </tr>\n      \n        <tr>\n          <td>Stratification 2</td>\n          <td>Out</td>\n          <td>0..*</td>\n          <td>Encounter</td>\n          <td/>\n        </tr>\n      \n        <tr>\n          <td>Measure Population Exclusion</td>\n          <td>Out</td>\n          <td>0..*</td>\n          <td>Encounter</td>\n          <td/>\n        </tr>\n      \n        <tr>\n          <td>Stratification 1</td>\n          <td>Out</td>\n          <td>0..*</td>\n          <td>Encounter</td>\n          <td/>\n        </tr>\n      \n        <tr>\n          <td>Initial Population</td>\n          <td>Out</td>\n          <td>0..*</td>\n          <td>Encounter</td>\n          <td/>\n        </tr>\n      \n        <tr>\n          <td>Measure Population</td>\n          <td>Out</td>\n          <td>0..*</td>\n          <td>Encounter</td>\n          <td/>\n        </tr>\n      \n      </tbody>\n    </table>\n  </td>\n</tr>\n\n  \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.5.4 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" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
              "valueCoding" : {
                "system" : "http://terminology.hl7.org/CodeSystem/diagnosis-role",
                "code" : "billing",
                "display" : "Billing"
              }
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "Inpatient Encounter"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Inpatient Encounter\" :\n  [\"Encounter\"] Encounter\n    where LengthInDays(Encounter.period) <= 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" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "Stratification 3"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Stratification 3\" :\n  \"Inpatient Encounter\" Encounter\n    where PrincipalDiagnosis(Encounter) is null"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 1
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "Stratification 2"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Stratification 2\" :\n  \"Inpatient Encounter\" Encounter\n    where PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 2
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "Measure Population Exclusion"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Measure Population Exclusion\" :\n  \"Inpatient Encounter\" Encounter\n    with [\"Encounter\" : \"Emergency Department Visit\"] ED\n      such that ED.period ends 1 hour or less before start of Encounter.period\n        and ED.status = 'finished'\n        and ED.hospitalization.admitSource in \"Hospital Settings\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 3
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "Stratification 1"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Stratification 1\" :\n  \"Inpatient Encounter\" Encounter\n    where not (PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\")"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 4
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "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" : 5
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "Measure Population"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Measure Population\" :\n  \"Initial Population\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 6
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "LengthInDays"
                },
                {
                  "url" : "statement",
                  "valueString" : "define function \"LengthInDays\"(Value Interval<DateTime>):\n\tdifference in days between start of Value and end of Value"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 7
                }
              ],
              "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" : 8
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "PrincipalDiagnosis"
                },
                {
                  "url" : "statement",
                  "valueString" : "define function \"PrincipalDiagnosis\"(Encounter Encounter):\n\t(singleton from (Encounter.diagnosis D where D.use ~ ToConcept(\"Billing\") and D.rank.value = 1)) PD\n\t\treturn singleton from ([Condition: id in \"GetId\"(PD.condition.reference)])"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 9
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "FHIRHelpers"
                },
                {
                  "url" : "name",
                  "valueString" : "ToConcept"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 10
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "FHIRHelpers"
                },
                {
                  "url" : "name",
                  "valueString" : "ToCode"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 11
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "url" : "name",
                  "valueString" : "GetId"
                },
                {
                  "url" : "statement",
                  "valueString" : "define function \"GetId\"(uri String):\n\tLast(Split(uri, '/'))"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 12
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "FHIRHelpers"
                },
                {
                  "url" : "name",
                  "valueString" : "ToString"
                },
                {
                  "url" : "statement",
                  "valueString" : "define function ToString(value string): value.value"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 13
                }
              ],
              "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" : 14
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "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" : 15
                }
              ],
              "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "EXM55"
                },
                {
                  "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" : 16
                }
              ],
              "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 FHIRHelpers",
              "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"
            },
            {
              "type" : "depends-on",
              "display" : "Code system Diagnosis Role",
              "resource" : "http://terminology.hl7.org/CodeSystem/diagnosis-role"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Psychiatric/Mental Health Patient",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299"
            },
            {
              "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"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Hospital Settings",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126"
            }
          ],
          "parameter" : [
            {
              "name" : "Measurement Period",
              "use" : "in",
              "min" : 0,
              "max" : "1",
              "type" : "Period"
            },
            {
              "name" : "Stratification 3",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Encounter"
            },
            {
              "name" : "Stratification 2",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Encounter"
            },
            {
              "name" : "Measure Population Exclusion",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Encounter"
            },
            {
              "name" : "Stratification 1",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Encounter"
            },
            {
              "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",
                "use",
                "rank",
                "rank.value",
                "condition",
                "condition.reference"
              ]
            },
            {
              "type" : "Encounter",
              "profile" : [
                🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
              ],
              "mustSupport" : [
                "type",
                "period",
                "status",
                "hospitalization",
                "hospitalization.admitSource",
                "use",
                "rank",
                "rank.value",
                "condition",
                "condition.reference"
              ],
              "codeFilter" : [
                {
                  "path" : "type",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
                }
              ]
            },
            {
              "type" : "Condition",
              "profile" : [
                🔗 "http://hl7.org/fhir/StructureDefinition/Condition"
              ],
              "mustSupport" : [
                "id"
              ],
              "codeFilter" : [
                {
                  "path" : "id"
                }
              ]
            }
          ]
        }
      ],
      "extension" : [
        {
          "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/crmi/StructureDefinition/crmi-effectiveDataRequirements",
          "valueCanonical" : "#effective-data-requirements"
        }
      ],
      "url" : "http://hl7.org/fhir/uv/cqm/Measure/EXM55-FHIR",
      "identifier" : [
        {
          "use" : "official",
          "system" : "http://example.org/fhir/cqi/ecqm/Measure/Identifier/exm",
          "value" : "55"
        },
        {
          "system" : "urn:ietf:rfc:3986",
          "value" : "urn:oid:2.16.840.1.113883.4.642.40.61.29.8"
        }
      ],
      "version" : "5.0.0",
      "name" : "EXM55",
      "title" : "EXM55 - Median Emergency Department Visit Duration",
      "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" : "This example illustrates a continuous variable measure represented as a FHIR eCQM",
      "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" : "eh",
                "display" : "EH"
              }
            ]
          }
        }
      ],
      "jurisdiction" : [
        {
          "coding" : [
            {
              "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
              "code" : "001"
            }
          ]
        }
      ],
      "approvalDate" : "2019-03-08",
      "lastReviewDate" : "2019-03-08",
      "effectivePeriod" : {
        "start" : "2018-01-01",
        "end" : "2018-12-31"
      },
      "topic" : [
        {
          "coding" : [
            {
              "system" : "http://loinc.org",
              "code" : "57024-2",
              "display" : "Health Quality Measure Document"
            }
          ]
        }
      ],
      "library" : [
        🔗 "http://hl7.org/fhir/uv/cqm/Library/EXM55"
      ],
      "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"
            }
          ]
        }
      ],
      "improvementNotation" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
            "code" : "decrease",
            "display" : "Decreased score indicates improvement"
          }
        ]
      },
      "group" : [
        {
          "id" : "group-1",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId",
              "valueString" : "primary"
            }
          ],
          "population" : [
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
                  "valueString" : "primary-exm55-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"
              }
            },
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
                  "valueString" : "primary-exm55-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"
              }
            },
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
                  "valueString" : "primary-exm55-measure-population-exclusion"
                }
              ],
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "measure-population-exclusion",
                    "display" : "Measure Population Exclusion"
                  }
                ]
              },
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Measure Population Exclusion"
              }
            },
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
                  "valueString" : "primary-exm55-measure-population-identifier"
                },
                {
                  "url" : "http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference",
                  "valueString" : "measure-population-identifier"
                },
                {
                  "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" : [
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
                  "valueString" : "primary-exm55-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"
                      }
                    ]
                  }
                }
              ],
              "code" : {
                "coding" : [
                  {
                    "system" : "http://example.org/stratification",
                    "code" : "Stratification 1",
                    "display" : "Stratification 1"
                  }
                ]
              },
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Stratification 1"
              }
            },
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
                  "valueString" : "primary-exm55-stratificatio-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"
                      }
                    ]
                  }
                }
              ],
              "code" : {
                "coding" : [
                  {
                    "system" : "http://example.org/stratification",
                    "code" : "Stratification 2",
                    "display" : "Stratification 2"
                  }
                ]
              },
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Stratification 2"
              }
            },
            {
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId",
                  "valueString" : "primary-exm55-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"
                      }
                    ]
                  }
                }
              ],
              "code" : {
                "coding" : [
                  {
                    "system" : "http://example.org/stratification",
                    "code" : "Stratification 3",
                    "display" : "Stratification 3"
                  }
                ]
              },
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Stratification 3"
              }
            }
          ]
        }
      ]
    }