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 1.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
Page standards status: Informative |
@prefix fhir: <http://hl7.org/fhir/> . @prefix loinc: <https://loinc.org/rdf/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . # - resource ------------------------------------------------------------------- a fhir:Measure ; fhir:nodeRole fhir:treeRoot ; fhir:id [ fhir:v "EXM55-FHIR"] ; # fhir:meta [ ( fhir:profile [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-cvmeasure"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-cvmeasure> ] [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure> ] [ fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure> ] ) ] ; # fhir:text [ fhir:status [ fhir:v "extensions" ] ; fhir: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<td class=\"content-container\">EXM55 - Median Emergency Department Visit Duration</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">5.0.0</td>\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<td class=\"content-container\">55</td>\n</tr>\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">urn:oid:2.16.840.1.113883.4.642.40.61.29.8</td>\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<td class=\"content-container\">2018-01-01 through 2018-12-31</td>\n</tr>\n\n \n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Approval Date</th>\n\n\n<td class=\"content-container\">2019-03-08</td>\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Last Review Date</th>\n\n\n<td class=\"content-container\">2019-03-08</td>\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Experimental</th>\n\n\n<td class=\"content-container\">true</td>\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Use Context</th>\n\n\n<td class=\"content-container\"><span title=\"{http://terminology.hl7.org/CodeSystem/usage-context-type venue}\">Clinical Venue</span> = <span title=\"Codes:{http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes eh}\">EH</span></td>\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Jurisdiction</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://unstats.un.org/unsd/methods/m49/m49.htm 001}\">Global (Whole world)</span></td>\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Topic</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://loinc.org 57024-2}\">Health Quality Measure Document</span></td>\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<td class=\"content-container\">HL7 International / Clinical Quality Information</td>\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<td class=\"content-container\"><div><p>This example illustrates a continuous variable measure represented as a FHIR eCQM</p>\n</div></td>\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<td class=\"content-container\">Encounter</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Scoring</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring continuous-variable}\">Continuous Variable</span></td>\n</tr>\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Type</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-type process}\">Process</span></td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation decrease}\">Decreased score indicates improvement</span></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\">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 <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-exm55-initial-population\n <br/>\n \n \n \n <em>Description</em>: No description provided\n \n \n \n \n \n \n <em>Criteria</em>: <a href=\"#primary-primary-exm55-initial-population\">Initial Population</a> \n \n \n \n \n \n \n </td>\n </tr>\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-exm55-measure-population\n <br/>\n \n \n \n <em>Description</em>: No description provided\n \n \n \n \n \n \n <em>Criteria</em>: <a href=\"#primary-primary-exm55-measure-population\">Measure Population</a> \n \n \n \n \n \n \n </td>\n </tr>\n \n\n \n \n \n <tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Measure Population Exclusion</th>\n\n\n \n <td class=\"content-container\">\n \n <em>ID</em>: primary-exm55-measure-population-exclusion\n <br/>\n \n \n \n <em>Description</em>: No description provided\n \n \n \n \n \n \n <em>Criteria</em>: <a href=\"#primary-primary-exm55-measure-population-exclusion\">Measure Population Exclusion</a> \n \n \n \n \n \n \n </td>\n </tr>\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-exm55-measure-population-identifier\n <br/>\n \n \n \n <em>Description</em>: No description provided\n \n \n \n \n \n \n <em>Criteria</em>: <a href=\"#primary-primary-exm55-measure-population-identifier\">Measure Observation</a> \n \n \n \n \n \n <br/><em>Input Population</em>: measure-population-identifier\n \n \n <em>AggregateMethod</em>: median\n \n </td>\n </tr>\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<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<td class=\"content-container\"><a href=\"Library-EXM55.html\">EXM55 - Median Emergency Department Visit Duration Library (Example Continuous Variable Measure Library)</a></td>\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 </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 \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-exm55-initial-population\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">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</code></pre>\n \n \n <a href=\"#exm55-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 \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-exm55-measure-population\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Measure Population\" :\n \"Initial Population\"</code></pre>\n \n \n <a href=\"#exm55-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 <tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n Measure Population Exclusion\n \n </th>\n</tr>\n<tr>\n\n <td>\n \n \n \n \n \n <a name=\"primary-primary-exm55-measure-population-exclusion\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">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\"</code></pre>\n \n \n <a href=\"#exm55-measure-population-exclusion\"><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 <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-exm55-measure-population-identifier\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function \"Measure Observation\" (Encounter \"Encounter\" ) :\n duration in minutes of \"Related ED Visit\"(Encounter).period</code></pre>\n \n \n <a href=\"#exm55-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 <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 \"Stratification 1\" :\n \"Inpatient Encounter\" Encounter\n where not (PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\")</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 \"Stratification 2\" :\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\"</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 \"Stratification 3\" :\n \"Inpatient Encounter\" 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 <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.\"start\" is null then\n Interval(period.\"start\".value, period.\"end\".value]\n else\n Interval[period.\"start\".value, period.\"end\".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 \"Inpatient Encounter\" :\n [\"Encounter\"] Encounter\n where LengthInDays(Encounter.period) <= 120\n and Encounter.period ends during \"Measurement 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-stratification-3\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Stratification 3\" :\n \"Inpatient Encounter\" 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 \"Stratification 2\" :\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\"</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 \"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\"</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 \"Stratification 1\" :\n \"Inpatient Encounter\" Encounter\n where not (PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\")</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 \"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</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 \"Measure Population\" :\n \"Initial Population\"</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 \"LengthInDays\"(Value Interval<DateTime>):\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<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 \"PrincipalDiagnosis\"(Encounter Encounter):\n (singleton from (Encounter.diagnosis D where D.use ~ ToConcept(\"Billing\") and D.rank.value = 1)) PD\n return singleton from ([Condition: id in \"GetId\"(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 \"GetId\"(uri String):\n Last(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 \"Measure Observation\" (Encounter \"Encounter\" ) :\n duration in minutes of \"Related ED Visit\"(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 \"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 )</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<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/6.5.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>: 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 <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<tr>\n <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.9 of the sample-content-ig Liquid templates</th>\n</tr>\n\n </tbody>\n </table>\n</div>"^^rdf:XMLLiteral ] ; # fhir:contained ( [ a fhir:Library ; fhir:id [ fhir:v "effective-data-requirements" ] ; ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode"^^xsd:anyURI ] ; fhir:value [ a fhir:Coding ; fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/diagnosis-role"^^xsd:anyURI ] ; fhir:code [ fhir:v "billing" ] ; fhir:display [ fhir:v "Billing" ] ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Inpatient Encounter" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define \"Inpatient Encounter\" :\n [\"Encounter\"] Encounter\n where LengthInDays(Encounter.period) <= 120\n and Encounter.period ends during \"Measurement Period\"" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 0 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Stratification 3" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define \"Stratification 3\" :\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter) is null" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 1 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Stratification 2" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define \"Stratification 2\" :\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\"" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 2 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Measure Population Exclusion" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "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\"" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 3 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Stratification 1" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define \"Stratification 1\" :\n \"Inpatient Encounter\" Encounter\n where not (PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\")" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 4 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Initial Population" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "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" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 5 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Measure Population" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define \"Measure Population\" :\n \"Initial Population\"" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 6 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "LengthInDays" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define function \"LengthInDays\"(Value Interval<DateTime>):\n difference in days between start of Value and end of Value" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 7 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "FHIRHelpers" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "ToInterval" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "/*\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]" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 8 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "PrincipalDiagnosis" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define function \"PrincipalDiagnosis\"(Encounter Encounter):\n (singleton from (Encounter.diagnosis D where D.use ~ ToConcept(\"Billing\") and D.rank.value = 1)) PD\n return singleton from ([Condition: id in \"GetId\"(PD.condition.reference)])" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 9 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "FHIRHelpers" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "ToConcept" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "/*\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 }" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 10 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "FHIRHelpers" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "ToCode" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "/*\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 }" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 11 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "GetId" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define function \"GetId\"(uri String):\n Last(Split(uri, '/'))" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 12 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "FHIRHelpers" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "ToString" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define function ToString(value string): value.value" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 13 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "FHIRHelpers" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "ToString" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define function ToString(value EncounterStatus): value.value" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 14 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Measure Observation" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "define function \"Measure Observation\" (Encounter \"Encounter\" ) :\n duration in minutes of \"Related ED Visit\"(Encounter).period" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 15 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] [ ( fhir:extension [ fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "EXM55" ] ] [ fhir:url [ fhir:v "name"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "Related ED Visit" ] ] [ fhir:url [ fhir:v "statement"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "//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 )" ] ] [ fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ; fhir:value [ a fhir:integer ; fhir:v 16 ] ] ) ; fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ] ] ) ; fhir:name [ fhir:v "EffectiveDataRequirements" ] ; fhir:status [ fhir:v "active" ] ; fhir:type [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/library-type"^^xsd:anyURI ] ; fhir:code [ fhir:v "module-definition" ] ] ) ] ; ( fhir:relatedArtifact [ fhir:type [ fhir:v "depends-on" ] ; fhir:display [ fhir:v "Library FHIRHelpers" ] ; fhir:resource [ fhir:v "http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1> ] ] [ fhir:type [ fhir:v "depends-on" ] ; fhir:display [ fhir:v "Code system Diagnosis Role" ] ; fhir:resource [ fhir:v "http://terminology.hl7.org/CodeSystem/diagnosis-role"^^xsd:anyURI ; fhir:link <http://terminology.hl7.org/CodeSystem/diagnosis-role> ] ] [ fhir:type [ fhir:v "depends-on" ] ; fhir:display [ fhir:v "Value set Psychiatric/Mental Health Patient" ] ; fhir:resource [ fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299"^^xsd:anyURI ; fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299> ] ] [ fhir:type [ fhir:v "depends-on" ] ; fhir:display [ fhir:v "Value set Emergency Department Visit" ] ; fhir:resource [ fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"^^xsd:anyURI ; fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292> ] ] [ fhir:type [ fhir:v "depends-on" ] ; fhir:display [ fhir:v "Value set Hospital Settings" ] ; fhir:resource [ fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126"^^xsd:anyURI ; fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126> ] ] ) ; ( fhir:parameter [ fhir:name [ fhir:v "Measurement Period" ] ; fhir:use [ fhir:v "in" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "1" ] ; fhir:type [ fhir:v "Period" ] ] [ fhir:name [ fhir:v "Stratification 3" ] ; fhir:use [ fhir:v "out" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "*" ] ; fhir:type [ fhir:v "Encounter" ] ] [ fhir:name [ fhir:v "Stratification 2" ] ; fhir:use [ fhir:v "out" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "*" ] ; fhir:type [ fhir:v "Encounter" ] ] [ fhir:name [ fhir:v "Measure Population Exclusion" ] ; fhir:use [ fhir:v "out" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "*" ] ; fhir:type [ fhir:v "Encounter" ] ] [ fhir:name [ fhir:v "Stratification 1" ] ; fhir:use [ fhir:v "out" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "*" ] ; fhir:type [ fhir:v "Encounter" ] ] [ fhir:name [ fhir:v "Initial Population" ] ; fhir:use [ fhir:v "out" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "*" ] ; fhir:type [ fhir:v "Encounter" ] ] [ fhir:name [ fhir:v "Measure Population" ] ; fhir:use [ fhir:v "out" ] ; fhir:min [ fhir:v 0 ] ; fhir:max [ fhir:v "*" ] ; fhir:type [ fhir:v "Encounter" ] ] ) ; ( fhir:dataRequirement [ fhir:type [ fhir:v "Encounter" ] ; ( fhir:profile [ fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter> ] ) ; ( fhir:mustSupport [ fhir:v "period" ] [ fhir:v "use" ] [ fhir:v "rank" ] [ fhir:v "rank.value" ] [ fhir:v "condition" ] [ fhir:v "condition.reference" ] ) ] [ fhir:type [ fhir:v "Encounter" ] ; ( fhir:profile [ fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter> ] ) ; ( fhir:mustSupport [ fhir:v "type" ] [ fhir:v "period" ] [ fhir:v "status" ] [ fhir:v "hospitalization" ] [ fhir:v "hospitalization.admitSource" ] [ fhir:v "use" ] [ fhir:v "rank" ] [ fhir:v "rank.value" ] [ fhir:v "condition" ] [ fhir:v "condition.reference" ] ) ; ( fhir:codeFilter [ fhir:path [ fhir:v "type" ] ; fhir:valueSet [ fhir:v "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"^^xsd:anyURI ; fhir:link <http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292> ] ] ) ] [ fhir:type [ fhir:v "Condition" ] ; ( fhir:profile [ fhir:v "http://hl7.org/fhir/StructureDefinition/Condition"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Condition> ] ) ; ( fhir:mustSupport [ fhir:v "id" ] ) ; ( fhir:codeFilter [ fhir:path [ fhir:v "id" ] ] ) ] ) ] ) ; # fhir:extension ( [ fhir:url [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-populationBasis"^^xsd:anyURI ] ; fhir:value [ a fhir:code ; fhir:v "Encounter" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem"^^xsd:anyURI ] ; fhir:value [ a fhir:Reference ; fhir:reference [ fhir:v "Device/software-system-example" ] ] ] [ fhir:id [ fhir:v "effective-data-requirements" ] ; fhir:url [ fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements"^^xsd:anyURI ] ; fhir:value [ a fhir:canonical ; fhir:v "#effective-data-requirements"^^xsd:anyURI ] ] ) ; # fhir:url [ fhir:v "http://hl7.org/fhir/uv/cqm/Measure/EXM55-FHIR"^^xsd:anyURI] ; # fhir:identifier ( [ fhir:use [ fhir:v "official" ] ; fhir:system [ fhir:v "http://example.org/fhir/cqi/ecqm/Measure/Identifier/exm"^^xsd:anyURI ] ; fhir:value [ fhir:v "55" ] ] [ fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ; fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.4.642.40.61.29.8" ] ] ) ; # fhir:version [ fhir:v "5.0.0"] ; # fhir:name [ fhir:v "EXM55"] ; # fhir:title [ fhir:v "EXM55 - Median Emergency Department Visit Duration"] ; # fhir:status [ fhir:v "active"] ; # fhir:experimental [ fhir:v true] ; # fhir:date [ fhir:v "2025-08-13"^^xsd:date] ; # fhir:publisher [ fhir:v "HL7 International / Clinical Quality Information"] ; # fhir:contact ( [ ( fhir:telecom [ fhir:system [ fhir:v "url" ] ; fhir:value [ fhir:v "http://www.hl7.org/Special/committees/cqi" ] ] ) ] ) ; # fhir:description [ fhir:v "This example illustrates a continuous variable measure represented as a FHIR eCQM"] ; # fhir:useContext ( [ fhir:code [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/usage-context-type"^^xsd:anyURI ] ; fhir:code [ fhir:v "venue" ] ; fhir:display [ fhir:v "Clinical Venue" ] ] ; fhir:value [ a fhir:CodeableConcept ; ( fhir:coding [ fhir:system [ fhir:v "http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes"^^xsd:anyURI ] ; fhir:code [ fhir:v "eh" ] ; fhir:display [ fhir:v "EH" ] ] ) ] ] ) ; # fhir:jurisdiction ( [ ( fhir:coding [ fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ; fhir:code [ fhir:v "001" ] ] ) ] ) ; # fhir:approvalDate [ fhir:v "2019-03-08"^^xsd:date] ; # fhir:lastReviewDate [ fhir:v "2019-03-08"^^xsd:date] ; # fhir:effectivePeriod [ fhir:start [ fhir:v "2018-01-01"^^xsd:date ] ; fhir:end [ fhir:v "2018-12-31"^^xsd:date ] ] ; # fhir:topic ( [ ( fhir:coding [ a loinc:57024-2 ; fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ; fhir:code [ fhir:v "57024-2" ] ; fhir:display [ fhir:v "Health Quality Measure Document" ] ] ) ] ) ; # fhir:library ( [ fhir:v "http://hl7.org/fhir/uv/cqm/Library/EXM55"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/uv/cqm/Library/EXM55> ] ) ; # fhir:scoring [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-scoring"^^xsd:anyURI ] ; fhir:code [ fhir:v "continuous-variable" ] ; fhir:display [ fhir:v "Continuous Variable" ] ] ) ] ; # fhir:type ( [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-type"^^xsd:anyURI ] ; fhir:code [ fhir:v "process" ] ] ) ] ) ; # fhir:improvementNotation [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-improvement-notation"^^xsd:anyURI ] ; fhir:code [ fhir:v "decrease" ] ; fhir:display [ fhir:v "Decreased score indicates improvement" ] ] ) ] ; # fhir:group ( [ fhir:id [ fhir:v "group-1" ] ; ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary" ] ] ) ; ( fhir:population [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-initial-population" ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "initial-population" ] ; fhir:display [ fhir:v "Initial Population" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Initial Population" ] ] ] [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-measure-population" ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "measure-population" ] ; fhir:display [ fhir:v "Measure Population" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Measure Population" ] ] ] [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-measure-population-exclusion" ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "measure-population-exclusion" ] ; fhir:display [ fhir:v "Measure Population Exclusion" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Measure Population Exclusion" ] ] ] [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-measure-population-identifier" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "measure-population-identifier" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-aggregateMethod"^^xsd:anyURI ] ; fhir:value [ a fhir:code ; fhir:v "median" ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "measure-observation" ] ; fhir:display [ fhir:v "Measure Observation" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Measure Observation" ] ] ] ) ; ( fhir:stratifier [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-stratification-1" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo"^^xsd:anyURI ] ; fhir:value [ a fhir:CodeableConcept ; ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "initial-population" ] ; fhir:display [ fhir:v "Initial Population" ] ] ) ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://example.org/stratification"^^xsd:anyURI ] ; fhir:code [ fhir:v "Stratification 1" ] ; fhir:display [ fhir:v "Stratification 1" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Stratification 1" ] ] ] [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-stratificatio-2" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo"^^xsd:anyURI ] ; fhir:value [ a fhir:CodeableConcept ; ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "initial-population" ] ; fhir:display [ fhir:v "Initial Population" ] ] ) ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://example.org/stratification"^^xsd:anyURI ] ; fhir:code [ fhir:v "Stratification 2" ] ; fhir:display [ fhir:v "Stratification 2" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Stratification 2" ] ] ] [ ( fhir:extension [ fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.stratifier.linkId"^^xsd:anyURI ] ; fhir:value [ a fhir:string ; fhir:v "primary-exm55-stratification-3" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-appliesTo"^^xsd:anyURI ] ; fhir:value [ a fhir:CodeableConcept ; ( fhir:coding [ fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/measure-population"^^xsd:anyURI ] ; fhir:code [ fhir:v "initial-population" ] ; fhir:display [ fhir:v "Initial Population" ] ] ) ] ] ) ; fhir:code [ ( fhir:coding [ fhir:system [ fhir:v "http://example.org/stratification"^^xsd:anyURI ] ; fhir:code [ fhir:v "Stratification 3" ] ; fhir:display [ fhir:v "Stratification 3" ] ] ) ] ; fhir:criteria [ fhir:language [ fhir:v "text/cql-identifier" ] ; fhir:expression [ fhir:v "Stratification 3" ] ] ] ) ] ) . #
IG © 2019+ HL7 International / Clinical Quality Information. Package hl7.fhir.uv.cqm#1.0.0 based on FHIR 4.0.1. Generated 2025-08-27
Links: Table of Contents |
QA Report
| Version History |
|
Propose a change