eCQM QICore Content Implementation Guide
2024.0.0 - CI Build

eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2024.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2024/ and changes regularly. See the Directory of published versions

: Core Clinical Data Elements for the Hybrid Hospital Wide Readmission Measure with Claims and Electronic Health Record Data HWRFHIR - JSON Representation

Active as of 2024-12-18

Raw json | Download

{
  "resourceType" : "Measure",
  "id" : "CMSFHIR529HybridHospitalWideReadmission",
  "meta" : {
    "profile" : [
      🔗 "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"🔗 ,
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"🔗 ,
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"
    ]
  },
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <table class=\"grid dict\">\n        \n            <tr>\n                <th scope=\"row\"><b>Title: </b></th>\n                <td style=\"padding-left: 4px;\">Core Clinical Data Elements for the Hybrid Hospital Wide Readmission Measure with Claims and Electronic Health Record Data HWRFHIR</td>\n            </tr>\n        \n\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Id: </b></th>\n                <td style=\"padding-left: 4px;\">CMSFHIR529HybridHospitalWideReadmission</td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Version: </b></th>\n                <td style=\"padding-left: 4px;\">0.1.001</td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Url: </b></th>\n                <td style=\"padding-left: 4px;\"><a href=\"Measure-CMSFHIR529HybridHospitalWideReadmission.html\">Core Clinical Data Elements for the Hybrid Hospital Wide Readmission Measure with Claims and Electronic Health Record Data HWRFHIR</a></td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\">\n                    <b>\n                        \n                            \n                                Short Name Identifier:\n                            \n                        \n                    </b>\n                </th>\n\n                <td style=\"padding-left: 4px;\">\n                    \n                        <p style=\"margin-bottom: 5px;\">\n                            <span>CMS529FHIR</span>\n                        </p>\n                    \n                </td>\n            </tr>\n        \n            <tr>\n                <th scope=\"row\">\n                    <b>\n                        \n                            \n                                Version Independent Identifier:\n                            \n                        \n                    </b>\n                </th>\n\n                <td style=\"padding-left: 4px;\">\n                    \n                        <p style=\"margin-bottom: 5px;\">\n                            <span>urn:uuid:66842e26-2256-4a2d-8dac-dd014c425748</span>\n                        </p>\n                    \n                </td>\n            </tr>\n        \n            <tr>\n                <th scope=\"row\">\n                    <b>\n                        \n                            \n                                Version Specific Identifier:\n                            \n                        \n                    </b>\n                </th>\n\n                <td style=\"padding-left: 4px;\">\n                    \n                        <p style=\"margin-bottom: 5px;\">\n                            <span>urn:uuid:d95d574f-1d07-4a69-b14d-98a8b0b35f0a</span>\n                        </p>\n                    \n                </td>\n            </tr>\n        \n            <tr>\n                <th scope=\"row\">\n                    <b>\n                        \n                            \n                                Endorser (CMS Consensus Based Entity) Identifier:\n                            \n                        \n                    </b>\n                </th>\n\n                <td style=\"padding-left: 4px;\">\n                    \n                        <p style=\"margin-bottom: 5px;\">\n                            <span>2879</span>\n                        </p>\n                    \n                </td>\n            </tr>\n        \n            <tr>\n                <th scope=\"row\">\n                    <b>\n                        \n                            \n                                Publisher (CMS) Identifier:\n                            \n                        \n                    </b>\n                </th>\n\n                <td style=\"padding-left: 4px;\">\n                    \n                        <p style=\"margin-bottom: 5px;\">\n                            <span>529FHIR</span>\n                        </p>\n                    \n                </td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Effective Period: </b></th>\n                <td style=\"padding-left: 4px;\">2026-07-01..2027-06-30</td>\n            </tr>\n        \n\n        \n\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Publisher: </b></th>\n                <td style=\"padding-left: 4px;\">Centers for Medicare &amp; Medicaid Services (CMS)</td>\n            </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Author: </b></th>\n            <td style=\"padding-left: 4px;\">Lantana Consulting Group, Yale New Haven Health Service Corporation/ Center for Outcomes Research and Evaluation</td>\n        </tr>\n        \n\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Description: </b></th>\n                <td style=\"padding-left: 4px;\"><div><p>This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the Hybrid HWR outcome measure. It is designed to extract the first resulted set of vital signs and basic laboratory results obtained from hospitalizations for adult Medicare Fee-For-Service (FFS) and Medicare Advantage (MA) patients admitted to acute care hospitals.</p>\n</div></td>\n            </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Purpose: </b></th>\n                <td style=\"padding-left: 4px;\"><div><p>UNKNOWN</p>\n</div></td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Copyright: </b></th>\n                <td style=\"padding-left: 4px;\"><div><p>Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.</p>\n<p>This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. All rights reserved.</p>\n<p>LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.</p>\n</div></td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Disclaimer: </b></th>\n                <td style=\"padding-left: 4px;\"><div><p>These performance specifications are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.</p>\n<p>THE MEASURES AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.</p>\n<p>Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p>\n</div></td>\n            </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Rationale: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>The intent of this logic is to extract the FIRST valid set of clinical data elements from hospital electronic health records (EHRs) for all qualifying hospitalizations. The data will be linked with administrative claims to risk adjust the Hybrid HWR outcome measure. This work addresses stakeholder concerns that clinical data garnered from patients and used by clinicians to guide diagnostic decisions and treatment, are preferable to administrative claims data when profiling hospitals' case mix. We are calling the list of data elements for extraction the &quot;HWR-specific core clinical data elements&quot; (CCDE). The CCDE are the first set of vital signs and basic laboratory tests resulted from hospitalizations for adult Medicare FFS and MA patients, age 65 or older (Initial Population), after they arrive at the hospital to which they are subsequently admitted. For example, this first set of data values are often captured in the emergency department or in the pre-operative area, sometimes hours before a patient is admitted to that same facility.</p>\n<p>These data elements were selected because they: 1. reflect patients' clinical status when they first present to the hospital, 2. are clinically and statistically relevant to patient outcomes, 3. are consistently obtained during adult inpatient hospitalizations based on current clinical practice, 4. are captured with a standard definition and recorded in a standard format across providers, and 5. are entered in structured fields that are feasibly retrieved from current EHR systems (YNHHS/CORE, 2015).</p>\n<p>Additional data called Linking Variables are used to link EHR data files with administrative claims data for CMS to calculate results for the Hybrid HWR measure, which are: CMS Certification Number (CCN); Medicare Beneficiary Identifier (MBI); Inpatient Admission Date; and Discharge Date.</p>\n</div></td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Clinical recommendation statement: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>The logic is not meant to guide or alter the care patients receive. The purpose of this CCDE logic is to extract clinical data that are already routinely captured in EHRs from hospitalizations for adult patients. It is not intended to require that clinical staff perform additional measurements or tests that are not needed for diagnostic assessment or treatment of patients.</p>\n</div></td>\n        </tr>\n        \n\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Guidance (Usage): </b></th>\n                <td style=\"padding-left: 4px;\">These specifications are for use for data with discharges that occur between July 1, 2026 and June 30, 2027. The associated Hospital Specific Report (HSR) is anticipated to be released in Spring 2028.\n\nThis logic guides the user to extract the FIRST valid resulted HWR-specific CCDEs for all Medicare FFS and MA hospitalizations for patients age 65 or older (Initial Population) directly admitted to the hospital or admitted to the same facility after being treated in another area such as the emergency department or hospital outpatient/same day surgery location. \n\nThe logic supports extraction of the FIRST resulted vital signs and laboratory tests, where the result is not null, during the patient encounter or episode of care. This may include values captured after inpatient admission, as well as prior to inpatient admission, for example from the emergency department, pre-operative, or other outpatient areas associated with the hospital, as long as the values fall within the allowed timeframes specified in the measure logic.  All clinical systems used in inpatient and outpatient locations associated with the hospital facility should be queried for core clinical data element values related to a patient who is subsequently admitted.\n\nPatients who arrive at the hospital on oxygen therapy will be flagged in the logic and the information will be incorporated into the risk adjustment models.  Rationale: patients who arrive on oxygen may appear in better condition, that is, having a higher oxygen saturation due to oxygen administration, that is not truly reflective of the patient's status upon arrival.\n\nValue sets for the laboratory tests are represented using Logical Observation Identifiers Names Codes (LOINC) currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for reporting of the CCDEs.\n\nNOTE: It is recommended hospitals only report the FIRST resulted value for EACH core clinical data element collected in the appropriate timeframe, if available. Hospitals may also choose to report ALL values on an encounter during their entire admission; however, only the first resulted values are utilized in the logic for measure calculation.\n\nFor each CCDE, it is recommended that hospitals report the below Unified Code for Units of Measure (UCUM) units, however, any units may be submitted. Where the reported unit is not easily converted to the requested UCUM units, the value will be set to missing and the median value reported for that CCDE will be imputed.\n\nCCDE                                              UCUM Units\n\nBicarbonate-------------------------------------meq/L \n                                                               mmol/L \n\nCreatinine---------------------------------------mg/dL \n                                                   \n\nGlucose------------------------------------------mg/dL\n                                                                mmol/L\n-\nHeart rate---------------------------------------{Beats}/min\n\nHematocrit --------------------------------------%\n\nOxygen saturation (by pulse oximetry)- -%\n\nPotassium----------------------------------------meq/L \n                                                                 mmol/L\n\nRespiratory rate---------------------------------{Breaths}/min\n\nSodium--------------------------------------------meq/L\n                                                                 mmol/L\n \nSystolic blood pressure-----------------------mm[Hg]\n\nTemperature-------------------------------------Cel\n                                                                [degF]  \n\nWeight---------------------------------------------kg\n                                                                 [lb_av]\n                                                                  g\n                                                          \nWhite blood cell count -----------------------{Cells}/uL\n                                                               10*3/uL\n                                                               10*9/L \n                                                             \nFor each hospitalization please also submit the following Linking Variables: \nCMS Certification Number (CCN); \nMedicare Beneficiary Identifier (MBI);\nInpatient Admission Date; and\nDischarge Date.\n\nThis is an encounter-based measure. The initial population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS529v6. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>\n            </tr>\n        \n\n        \n            \n                <tr>\n                    <th scope=\"row\"><b>Population Criteria: </b></th>\n                    <td style=\"padding-left: 4px;\">\n                        \n                            <table class=\"grid-dict\">\n                                \n                                    <tr>\n                                        <th><b>67533fe346b6174510cfed57</b></th>\n                                    </tr>\n                                \n                                \n                                    <tr>\n                                        <td>Initial Population:</td>\n\n                                        \n                                            \n                                                <td>All Medicare FFS and MA hospitalizations for patients aged 65 and older at the start of an inpatient admission, where the length of stay is less than 365 days, and the hospitalization ends during the measurement period. \n\nNOTE: All Medicare FFS and MA hospitalizations meeting the above criteria should be included, regardless of whether Medicare FFS/MA is the primary, secondary, or tertiary payer.</td>\n                                            \n                                        \n\n                                    </tr>\n                                \n                                \n                            </table>\n                        \n                    </td>\n                </tr>\n            \n        \n\n        \n            <tr>\n                <th scope=\"row\"><b> Supplemental Data Elements: </b></th>\n                <td style=\"padding-left: 4px;\">\n                    \n                        \n                            \n                                <p>Encounter with First Body Temperature</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Heart Rate</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Oxygen Saturation</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Respiratory Rate</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Systolic Blood Pressure</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Bicarbonate Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Creatinine Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Glucose Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Hematocrit Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Potassium Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Sodium Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First White Blood Cells Lab Test</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>SDE Ethnicity</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>SDE Payer</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>SDE Race</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>SDE Sex</p>\n                            \n                        \n                    \n                        \n                            \n                                <p>Encounter with First Weight Recorded</p>\n                            \n                        \n                    \n                </td>\n            </tr>\n        \n\n        \n\n        \n            <tr>\n                <th scope=\"row\">\n                    <b> Supplemental Data Guidance\n                        : </b></th>\n                <td style=\"padding-left: 4px;\"> For hospitalizations in the Initial Population, report the FIRST resulted vital signs (physical exams) during current hospitalization. \n\nThe physical exam CCDEs are as follows:\n\nBody Temperature\nHeart rate\nOxygen saturation (by pulse oximetry)\nRespiratory rate\nSystolic blood pressure\nBody weight\n\nFor laboratory test results, report the FIRST resulted laboratory tests where result is not null during current hospitalization. \n\nThe laboratory test CCDEs are as follows:\n\nBicarbonate\nCreatinine \nGlucose\nHematocrit\nPotassium\nSodium\nWhite blood cell count\n\nFirst values for the CCDEs may be resulted in the emergency department or other hospital outpatient locations within the hospital facility before a patient is subsequently admitted to the same hospital. First values for these data elements may also be resulted in an inpatient location for directly admitted patients who do not receive care in the emergency department or other hospital outpatient/same day surgery locations before admission. \n\nNOTE: Hospitals may choose to submit all, or only report the FIRST resulted value for EACH CCDE collected in the appropriate timeframe, if available.\n\nFor every patient in the Initial Population, also identify payer, race, ethnicity and sex. </td>\n            </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Libraries: </b></th>\n                <td style=\"padding-left: 4px;\">\n                    <table class=\"grid-dict\">\n                        \n                            <tr>\n                                <td><a href=\"Library-CMSFHIR529HybridHospitalWideReadmission.html\">CMSFHIR529HybridHospitalWideReadmission</a></td>\n                            </tr>\n                        \n                    </table>\n                </td>\n            </tr>\n        \n\n        \n\n        \n            \n                <tr>\n                    <th scope=\"row\"><b>Terminology and Other Dependencies: </b></th>\n                    <td style=\"padding-left: 4px;\">\n                        \n                            <li><code>Library/CQMCommon|2.2.000</code></li>\n                        \n                            <li><code>Library/FHIRHelpers|4.4.000</code></li>\n                        \n                            <li><code>Library/QICoreCommon|2.1.000</code></li>\n                        \n                            <li><code>Library/SupplementalDataElements|3.5.000</code></li>\n                        \n                            <li><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-loinc.html\">Logical Observation Identifiers, Names and Codes (LOINC)</a></li>\n                        \n                            <li><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">AdministrativeGender</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1104.10/expansion\">Medicare payer</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1104.12/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.38/expansion\">Outpatient Surgery Service</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.139/expansion\">Bicarbonate lab test</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.129/expansion\">White blood cells count lab test</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.114/expansion\">Hematocrit lab test</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.134/expansion\">Glucose lab test</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.2363/expansion\">Creatinine lab test</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.151/expansion\">Oxygen Saturation in Arterial Blood by Pulse Oximetry</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.117/expansion\">Potassium lab test</a></li>\n                        \n                            <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.119/expansion\">Sodium lab test</a></li>\n                        \n                    </td>\n                </tr>\n                <tr>\n                    <th scope=\"row\"><b>Parameters:</b></th>\n                    <td style=\"padding-left: 4px;\">\n                        <table class=\"grid-dict\">\n                            <tr>\n                                <th><b>name</b></th>\n                                <th><b>use</b></th>\n                                <th><b>min</b></th>\n                                <th><b>max</b></th>\n                                <th><b>type</b></th>\n                            </tr>\n                            \n                                <tr>\n                                    <td>Measurement Period</td>\n                                    <td>In</td>\n                                    <td>0</td>\n                                    <td>1</td>\n                                    <td>Period</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Heart Rate</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Bicarbonate Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First White Blood Cells Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Hematocrit Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Glucose Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>SDE Race</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>1</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Systolic Blood Pressure</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>string</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>SDE Sex</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>1</td>\n                                    <td>Coding</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Respiratory Rate</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Creatinine Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Body Temperature</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>SDE Payer</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Weight Recorded</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Initial Population</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>SDE Ethnicity</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>1</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Oxygen Saturation</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Potassium Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter with First Sodium Lab Test</td>\n                                    <td>Out</td>\n                                    <td>0</td>\n                                    <td>*</td>\n                                    <td>Resource</td>\n                                </tr>\n                            \n                        </table>\n                    </td>\n                </tr>\n\n                <tr>\n                    <th scope=\"row\"><b>DataRequirements:</b></th>\n                    <td style=\"padding-left: 4px;\">\n                        <table class=\"grid-dict\">\n                            <tr>\n                                <th><b>Resource Type</b></th>\n                                <th><b>Resource Elements</b></th>\n                                <th><b>Valueset Name</b></th>\n                                <th><b>Valueset</b></th>\n                            </tr>\n                            \n                                <tr>\n                                    <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            period\n                                        \n                                            id\n                                        \n                                            id.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Observation Services\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            period\n                                        \n                                            id\n                                        \n                                            id.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Emergency Department Visit\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                            period\n                                        \n                                            id\n                                        \n                                            id.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Outpatient Surgery Service\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.38/expansion\">Outpatient Surgery Service</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            period\n                                        \n                                            id\n                                        \n                                            id.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Encounter Inpatient\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Patient(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html\">QICorePatient</a>)</td>\n                                    <td>\n                                        \n                                            race\n                                        \n                                            ethnicity\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                    </td>\n                                    <td/>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Coverage(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html\">QICoreCoverage</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Medicare FFS payer\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1104.10/expansion\">Medicare payer</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Coverage(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html\">QICoreCoverage</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Medicare Advantage payer\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1104.12/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Coverage(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html\">QICoreCoverage</a>)</td>\n                                    <td>\n                                        \n                                            type\n                                        \n                                            period\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Payer Type\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/R4/heartrate.html\">Observation Heart Rate Profile</a>)</td>\n                                    <td>\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                    </td>\n                                    <td/>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Bicarbonate lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.139/expansion\">Bicarbonate lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 White blood cells count lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.129/expansion\">White blood cells count lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Hematocrit lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.114/expansion\">Hematocrit lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Glucose lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.134/expansion\">Glucose lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Creatinine lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.2363/expansion\">Creatinine lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Potassium lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.117/expansion\">Potassium lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-observation-lab.html\">US Core Laboratory Result Observation Profile</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                            issued\n                                        \n                                            issued.value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Sodium lab test\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.119/expansion\">Sodium lab test</a></td>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/R4/bp.html\">Observation Blood Pressure Profile</a>)</td>\n                                    <td>\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            effective\n                                        \n                                            component\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                    </td>\n                                    <td/>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/R4/resprate.html\">Observation Respiratory Rate Profile</a>)</td>\n                                    <td>\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                    </td>\n                                    <td/>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/R4/bodytemp.html\">Observation Body Temperature Profile</a>)</td>\n                                    <td>\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                    </td>\n                                    <td/>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/R4/bodyweight.html\">Observation Body Weight Profile</a>)</td>\n                                    <td>\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                    </td>\n                                    <td/>\n                                </tr>\n                            \n                                <tr>\n                                    <td>Observation(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>)</td>\n                                    <td>\n                                        \n                                            code\n                                        \n                                            effective\n                                        \n                                            status\n                                        \n                                            status.value\n                                        \n                                            value\n                                        \n                                    </td>\n                                    <td>\n                                        \n                                            \n                                                 Oxygen Saturation by Pulse Oximetry\n                                            \n                                        \n                                    </td>\n                                    <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.151/expansion\">Oxygen Saturation in Arterial Blood by Pulse Oximetry</a></td>\n                                </tr>\n                            \n                        </table>\n                    </td>\n                </tr>\n\n                \n                    <tr>\n                        <th scope=\"row\"><b>Direct Reference Codes:</b></th>\n                        <td style=\"padding-left: 4px;\">\n                            <table class=\"grid-dict\">\n                                <tr>\n                                    <th><b>display</b></th>\n                                    <th><b>code</b></th>\n                                    <th><b>system</b></th>\n                                </tr>\n                                \n                                    <tr>\n                                        <td>Systolic BP</td>\n                                        <td>8480-6</td>\n                                        <td><a href=\"https://loinc.org/\">http://loinc.org</a></td>\n                                    </tr>\n                                \n                                    <tr>\n                                        <td>Male</td>\n                                        <td>M</td>\n                                        <td><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">http://hl7.org/fhir/administrative-gender</a></td>\n                                    </tr>\n                                \n                                    <tr>\n                                        <td>Female</td>\n                                        <td>F</td>\n                                        <td><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">http://hl7.org/fhir/administrative-gender</a></td>\n                                    </tr>\n                                \n                            </table>\n                        </td>\n                    </tr>\n                \n\n                \n                <tr>\n                    <th scope=\"row\"><b>Logic Definitions:</b></th>\n                    <td style=\"padding-left: 4px;\">\n                        \n                        <table class=\"grid-dict\">\n                            <tr>\n                                <th><b>Group</b></th>\n                                <th><b>Scoring</b></th>\n                                <th><b>Population Criteria</b></th>\n                                <th><b>Expression</b></th>\n                            </tr>\n                            <tr>\n                                \n                                <td> 67533fe346b6174510cfed57 </td>\n                                <td colspan=\"3\" style=\"padding-left: 4px;\">\n                                    \n                                        <b>Group scoring:</b>\n                                        \n                                            <span>  cohort </span>\n                                        \n                                    \n\n                                    \n\n                                    \n\n                                    \n\n                                    \n                                        <tr>\n                                        \n                                            <th scope=\"row\"><b>Type: </b></th>\n                                            <td style=\"padding-left: 4px;\">\n                                                \n                                                    \n                                                        <p style=\"margin-bottom: 5px;\">\n                                                            <span>Outcome </span>\n                                                        </p>\n                                                    \n                                                \n                                                \n                                            </td>\n                                        \n                                        </tr>\n                                    \n\n                                    \n\n                                    \n                                    <tr>\n                                        <th scope=\"row\"><b>Rate Aggregation: </b></th>\n                                        <td colspan=\"3\" style=\"padding-left: 4px;\">None</td>\n                                    </tr>\n                                    \n\n                                    \n                                        <tr>\n                                            <th scope=\"row\"><b>Improvement Notation: </b></th>\n                                            <td style=\"padding-left: 4px;\">\n                                            \n                                                \n                                                    \n                                                        <p style=\"margin-bottom: 5px;\">\n                                                            <span>decrease </span>\n                                                        </p>\n                                                    \n                                                \n                                                \n                                            \n                                            </td>\n                                        </tr>\n                                    \n\n                                    \n\n                                </td>\n                                \n                                <tr>\n                                    <td/>\n                                    <td/>\n                                    <td>Initial Population</td>\n                                    <td>\n                                        \n                                            <pre><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  &quot;Inpatient Encounters&quot;</code></pre>\n                                        \n                                    </td>\n                                </tr>\n                                \n                                \n                            \n                            </tr>\n                        </table>\n                \n\n                <table class=\"grid-dict\">\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Inpatient Encounters</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Inpatient Encounters&quot;:\n  [Encounter: &quot;Encounter Inpatient&quot;] InpatientEncounter\n    with ( [Coverage: &quot;Medicare FFS payer&quot;]\n      union [Coverage: &quot;Medicare Advantage payer&quot;] ) MedicarePayer\n      such that ( InpatientEncounter.hospitalizationWithObservationAndOutpatientSurgeryService ( ).lengthInDays ( ) ) &lt; 365\n        and InpatientEncounter.status = 'finished'\n        and AgeInYearsAt(date from start of InpatientEncounter.period) &gt;= 65\n        and InpatientEncounter.period ends during day of &quot;Measurement Period&quot;</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Heart Rate</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Heart Rate&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstHeartRate: First([&quot;observation-heartrate&quot;] HeartRate\n        where HeartRate.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and HeartRate.status in { 'final', 'amended', 'corrected' }\n          and HeartRate.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstHeartRateResult: FirstHeartRate.value as Quantity,\n      Timing: FirstHeartRate.effective.earliest ( )\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Bicarbonate Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Bicarbonate Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstBicarbonateLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;Bicarbonate lab test&quot;] bicarbonatelab\n        where bicarbonatelab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and bicarbonatelab.status in { 'final', 'amended', 'corrected' }\n          and bicarbonatelab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstBicarbonateLab.value as Quantity,\n      Timing: FirstBicarbonateLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First White Blood Cells Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First White Blood Cells Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstWhiteBloodCellLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;White blood cells count lab test&quot;] WhiteBloodCellLab\n        where WhiteBloodCellLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and WhiteBloodCellLab.status in { 'final', 'amended', 'corrected' }\n          and WhiteBloodCellLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstWhiteBloodCellLab.value as Quantity,\n      Timing: FirstWhiteBloodCellLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Hematocrit Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Hematocrit Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstHematocritLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;Hematocrit lab test&quot;] HematocritLab\n        where HematocritLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and HematocritLab.status in { 'final', 'amended', 'corrected' }\n          and HematocritLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstHematocritLab.value as Quantity,\n      Timing: FirstHematocritLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Glucose Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Glucose Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstGlucoseLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;Glucose lab test&quot;] GlucoseLab\n        where GlucoseLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and GlucoseLab.status in { 'final', 'amended', 'corrected' }\n          and GlucoseLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstGlucoseLab.value as Quantity,\n      Timing: FirstGlucoseLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>SupplementalDataElements</td>\n                            \n                            \n                                <td>SDE Race</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n  Patient.race R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>SDE Race</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n  SDE.&quot;SDE Race&quot;</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Blood Pressure Reading</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Blood Pressure Reading&quot;:\n  [&quot;observation-bp&quot;] BloodPressure\n    where BloodPressure.status in { 'final', 'amended', 'corrected' }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Systolic Blood Pressure</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Systolic Blood Pressure&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstSystolicBP: First(&quot;Blood Pressure Reading&quot; SBPReading\n        where SBPReading.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n        return singleton from(SBPReading.component SBPComponent\n            where SBPComponent.code ~ &quot;Systolic blood pressure&quot;\n            return SBPComponent.value as Quantity\n        )\n        sort ascending\n    )\n    return EncounterInpatient.id</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>SupplementalDataElements</td>\n                            \n                            \n                                <td>SDE Sex</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n  case\n    when Patient.gender = 'male' then &quot;M&quot;\n    when Patient.gender = 'female' then &quot;F&quot;\n    else null\n  end</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>SDE Sex</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n  SDE.&quot;SDE Sex&quot;</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Respiratory Rate</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Respiratory Rate&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstRespRate: First([&quot;observation-resprate&quot;] RespRate\n        where RespRate.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and RespRate.status in { 'final', 'amended', 'corrected' }\n          and RespRate.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstRespRateResult: FirstRespRate.value as Quantity,\n      Timing: FirstRespRate.effective.earliest ( )\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Creatinine Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Creatinine Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstCreatinineLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;Creatinine lab test&quot;] CreatinineLab\n        where CreatinineLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and CreatinineLab.status in { 'final', 'amended', 'corrected' }\n          and CreatinineLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstCreatinineLab.value as Quantity,\n      Timing: FirstCreatinineLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Body Temperature</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Body Temperature&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstTemperature: First([&quot;observation-bodytemp&quot;] temperature\n        where temperature.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and temperature.status in { 'final', 'amended', 'corrected' }\n          and temperature.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstTemperatureResult: FirstTemperature.value as Quantity,\n      Timing: FirstTemperature.effective.earliest ( )\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>SupplementalDataElements</td>\n                            \n                            \n                                <td>SDE Payer</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n  [Coverage: type in &quot;Payer Type&quot;] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>SDE Payer</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n  SDE.&quot;SDE Payer&quot;</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Weight Recorded</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Weight Recorded&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstWeight: First([&quot;observation-bodyweight&quot;] WeightExam\n        where WeightExam.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and WeightExam.status in { 'final', 'amended', 'corrected' }\n          and WeightExam.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstWeight.value as Quantity,\n      Timing: FirstWeight.effective.earliest ( )\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Initial Population</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  &quot;Inpatient Encounters&quot;</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>SupplementalDataElements</td>\n                            \n                            \n                                <td>SDE Ethnicity</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n  Patient.ethnicity E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>SDE Ethnicity</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n  SDE.&quot;SDE Ethnicity&quot;</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Oxygen Saturation</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Oxygen Saturation&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstOxygenSat: First([Observation: &quot;Oxygen Saturation by Pulse Oximetry&quot;] O2Saturation\n        where O2Saturation.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and O2Saturation.status in { 'final', 'amended', 'corrected' }\n          and O2Saturation.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstOxygenSatResult: FirstOxygenSat.value as Quantity,\n      Timing: FirstOxygenSat.effective.earliest ( )\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Potassium Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Potassium Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstPotassiumLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;Potassium lab test&quot;] PotassiumLab\n        where PotassiumLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and PotassiumLab.status in { 'final', 'amended', 'corrected' }\n          and PotassiumLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstPotassiumLab.value as Quantity,\n      Timing: FirstPotassiumLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CMSFHIR529HybridHospitalWideReadmission</td>\n                            \n                            \n                                <td>Encounter with First Sodium Lab Test</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Sodium Lab Test&quot;:\n  &quot;Inpatient Encounters&quot; EncounterInpatient\n    let FirstSodiumLab: First([&quot;US Core Laboratory Result Observation Profile&quot;: &quot;Sodium lab test&quot;] SodiumLab\n        where SodiumLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and SodiumLab.status in { 'final', 'amended', 'corrected' }\n          and SodiumLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstSodiumLab.value as Quantity,\n      Timing: FirstSodiumLab.issued\n    }</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CQMCommon</td>\n                            \n                            \n                                <td>lengthInDays</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Calculates the difference in calendar days between the start and end of the given interval.\n*/\ndefine fluent function lengthInDays(Value Interval&lt;DateTime&gt; ):\n  difference in days between start of Value and end of Value</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>CQMCommon</td>\n                            \n                            \n                                <td>hospitalizationWithObservationAndOutpatientSurgeryService</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.\n*/\ndefine fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter &quot;Encounter&quot; ):\n  TheEncounter Visit\n\t  let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs\n\t\t  \twhere LastObs.status = 'finished'\n          and LastObs.period ends 1 hour or less on or before start of Visit.period\n\t\t\t  sort by\tend of period\n    \t),\n    \tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n    \tEDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED\n\t\t\t  where LastED.status = 'finished'\n          and LastED.period ends 1 hour or less on or before VisitStart\n\t\t\t  sort by\tend of period\n    \t),\n    \tVisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),\n    \tOutpatientSurgeryVisit: Last([Encounter: &quot;Outpatient Surgery Service&quot;] LastSurgeryOP\n\t\t\t  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED\n\t\t\t  sort by\tend of period\n    \t)\n  \treturn Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>QICoreCommon</td>\n                            \n                            \n                                <td>earliest</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n*/\ndefine fluent function earliest(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):\n  (choice.toInterval()) period\n    return\n      if (period.&quot;hasStart&quot;()) then start of period\n      else end of period</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>FHIRHelpers</td>\n                            \n                            \n                                <td>ToString</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"highlight language-cql\"><code class=\"language-cql\">define function ToString(value uri): value.value</code></pre>\n                                </td>\n                            \n                        </tr>\n                    \n                        <tr>\n                            <th><b>Library Name</b></th>\n                            <th><b>Name</b></th>\n                        </tr>\n                        <tr>\n                            \n                                <td>FHIRHelpers</td>\n                            \n                            \n                                <td>ToCode</td>\n                            \n                        </tr>\n                        <tr>\n                            \n                                <td/>\n                                <td>\n                                    <pre class=\"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                    </table>\n                </td>\n            </tr>\n            \n        \n    \n\n    </table>\n</div>"
  },
  "contained" : [
    {
      "resourceType" : "Library",
      "id" : "effective-data-requirements",
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding" : {
            "system" : "http://loinc.org",
            "code" : "8480-6",
            "display" : "Systolic BP"
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding" : {
            "system" : "http://hl7.org/fhir/administrative-gender",
            "code" : "M",
            "display" : "Male"
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding" : {
            "system" : "http://hl7.org/fhir/administrative-gender",
            "code" : "F",
            "display" : "Female"
          }
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Inpatient Encounters"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Inpatient Encounters\":\n  [Encounter: \"Encounter Inpatient\"] InpatientEncounter\n    with ( [Coverage: \"Medicare FFS payer\"]\n      union [Coverage: \"Medicare Advantage payer\"] ) MedicarePayer\n      such that ( InpatientEncounter.hospitalizationWithObservationAndOutpatientSurgeryService ( ).lengthInDays ( ) ) < 365\n        and InpatientEncounter.status = 'finished'\n        and AgeInYearsAt(date from start of InpatientEncounter.period) >= 65\n        and InpatientEncounter.period ends during day of \"Measurement Period\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 0
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Heart Rate"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Heart Rate\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstHeartRate: First([\"observation-heartrate\"] HeartRate\n        where HeartRate.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and HeartRate.status in { 'final', 'amended', 'corrected' }\n          and HeartRate.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstHeartRateResult: FirstHeartRate.value as Quantity,\n      Timing: FirstHeartRate.effective.earliest ( )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 1
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Bicarbonate Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Bicarbonate Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstBicarbonateLab: First([\"US Core Laboratory Result Observation Profile\": \"Bicarbonate lab test\"] bicarbonatelab\n        where bicarbonatelab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and bicarbonatelab.status in { 'final', 'amended', 'corrected' }\n          and bicarbonatelab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstBicarbonateLab.value as Quantity,\n      Timing: FirstBicarbonateLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 2
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First White Blood Cells Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First White Blood Cells Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstWhiteBloodCellLab: First([\"US Core Laboratory Result Observation Profile\": \"White blood cells count lab test\"] WhiteBloodCellLab\n        where WhiteBloodCellLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and WhiteBloodCellLab.status in { 'final', 'amended', 'corrected' }\n          and WhiteBloodCellLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstWhiteBloodCellLab.value as Quantity,\n      Timing: FirstWhiteBloodCellLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 3
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Hematocrit Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Hematocrit Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstHematocritLab: First([\"US Core Laboratory Result Observation Profile\": \"Hematocrit lab test\"] HematocritLab\n        where HematocritLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and HematocritLab.status in { 'final', 'amended', 'corrected' }\n          and HematocritLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstHematocritLab.value as Quantity,\n      Timing: FirstHematocritLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 4
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Glucose Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Glucose Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstGlucoseLab: First([\"US Core Laboratory Result Observation Profile\": \"Glucose lab test\"] GlucoseLab\n        where GlucoseLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and GlucoseLab.status in { 'final', 'amended', 'corrected' }\n          and GlucoseLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstGlucoseLab.value as Quantity,\n      Timing: FirstGlucoseLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 5
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Race"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Race\":\n  Patient.race R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 6
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "SDE Race"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Race\":\n  SDE.\"SDE Race\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 7
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Blood Pressure Reading"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Blood Pressure Reading\":\n  [\"observation-bp\"] BloodPressure\n    where BloodPressure.status in { 'final', 'amended', 'corrected' }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 8
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Systolic Blood Pressure"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Systolic Blood Pressure\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstSystolicBP: First(\"Blood Pressure Reading\" SBPReading\n        where SBPReading.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n        return singleton from(SBPReading.component SBPComponent\n            where SBPComponent.code ~ \"Systolic blood pressure\"\n            return SBPComponent.value as Quantity\n        )\n        sort ascending\n    )\n    return EncounterInpatient.id"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 9
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Sex"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Sex\":\n  case\n    when Patient.gender = 'male' then \"M\"\n    when Patient.gender = 'female' then \"F\"\n    else null\n  end"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 10
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "SDE Sex"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Sex\":\n  SDE.\"SDE Sex\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 11
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Respiratory Rate"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Respiratory Rate\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstRespRate: First([\"observation-resprate\"] RespRate\n        where RespRate.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and RespRate.status in { 'final', 'amended', 'corrected' }\n          and RespRate.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstRespRateResult: FirstRespRate.value as Quantity,\n      Timing: FirstRespRate.effective.earliest ( )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 12
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Creatinine Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Creatinine Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstCreatinineLab: First([\"US Core Laboratory Result Observation Profile\": \"Creatinine lab test\"] CreatinineLab\n        where CreatinineLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and CreatinineLab.status in { 'final', 'amended', 'corrected' }\n          and CreatinineLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstCreatinineLab.value as Quantity,\n      Timing: FirstCreatinineLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 13
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Body Temperature"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Body Temperature\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstTemperature: First([\"observation-bodytemp\"] temperature\n        where temperature.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and temperature.status in { 'final', 'amended', 'corrected' }\n          and temperature.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstTemperatureResult: FirstTemperature.value as Quantity,\n      Timing: FirstTemperature.effective.earliest ( )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 14
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Payer"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Payer\":\n  [Coverage: type in \"Payer Type\"] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 15
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "SDE Payer"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 16
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Weight Recorded"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Weight Recorded\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstWeight: First([\"observation-bodyweight\"] WeightExam\n        where WeightExam.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and WeightExam.status in { 'final', 'amended', 'corrected' }\n          and WeightExam.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstWeight.value as Quantity,\n      Timing: FirstWeight.effective.earliest ( )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 17
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Initial Population"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Initial Population\":\n  \"Inpatient Encounters\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 18
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Ethnicity"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Ethnicity\":\n  Patient.ethnicity E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 19
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "SDE Ethnicity"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 20
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Oxygen Saturation"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Oxygen Saturation\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstOxygenSat: First([Observation: \"Oxygen Saturation by Pulse Oximetry\"] O2Saturation\n        where O2Saturation.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and O2Saturation.status in { 'final', 'amended', 'corrected' }\n          and O2Saturation.value is not null\n        sort by effective.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstOxygenSatResult: FirstOxygenSat.value as Quantity,\n      Timing: FirstOxygenSat.effective.earliest ( )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 21
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Potassium Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Potassium Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstPotassiumLab: First([\"US Core Laboratory Result Observation Profile\": \"Potassium lab test\"] PotassiumLab\n        where PotassiumLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and PotassiumLab.status in { 'final', 'amended', 'corrected' }\n          and PotassiumLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstPotassiumLab.value as Quantity,\n      Timing: FirstPotassiumLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 22
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CMSFHIR529HybridHospitalWideReadmission"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Sodium Lab Test"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Sodium Lab Test\":\n  \"Inpatient Encounters\" EncounterInpatient\n    let FirstSodiumLab: First([\"US Core Laboratory Result Observation Profile\": \"Sodium lab test\"] SodiumLab\n        where SodiumLab.effective.earliest() during EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService()\n          and SodiumLab.status in { 'final', 'amended', 'corrected' }\n          and SodiumLab.value is not null\n        sort by issued.earliest()\n    )\n    return {\n      EncounterId: EncounterInpatient.id,\n      FirstResult: FirstSodiumLab.value as Quantity,\n      Timing: FirstSodiumLab.issued\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 23
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CQMCommon"
            },
            {
              "url" : "name",
              "valueString" : "lengthInDays"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Calculates the difference in calendar days between the start and end of the given interval.\n*/\ndefine fluent function lengthInDays(Value Interval<DateTime> ):\n  difference in days between start of Value and end of Value"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 24
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CQMCommon"
            },
            {
              "url" : "name",
              "valueString" : "hospitalizationWithObservationAndOutpatientSurgeryService"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.\n*/\ndefine fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter \"Encounter\" ):\n  TheEncounter Visit\n\t  let ObsVisit: Last([Encounter: \"Observation Services\"] LastObs\n\t\t  \twhere LastObs.status = 'finished'\n          and LastObs.period ends 1 hour or less on or before start of Visit.period\n\t\t\t  sort by\tend of period\n    \t),\n    \tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n    \tEDVisit: Last([Encounter: \"Emergency Department Visit\"] LastED\n\t\t\t  where LastED.status = 'finished'\n          and LastED.period ends 1 hour or less on or before VisitStart\n\t\t\t  sort by\tend of period\n    \t),\n    \tVisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),\n    \tOutpatientSurgeryVisit: Last([Encounter: \"Outpatient Surgery Service\"] LastSurgeryOP\n\t\t\t  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED\n\t\t\t  sort by\tend of period\n    \t)\n  \treturn Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 25
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "QICoreCommon"
            },
            {
              "url" : "name",
              "valueString" : "earliest"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n*/\ndefine fluent function earliest(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):\n  (choice.toInterval()) period\n    return\n      if (period.\"hasStart\"()) then start of period\n      else end of period"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 26
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "FHIRHelpers"
            },
            {
              "url" : "name",
              "valueString" : "ToString"
            },
            {
              "url" : "statement",
              "valueString" : "define function ToString(value uri): value.value"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 27
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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" : 28
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        }
      ],
      "name" : "EffectiveDataRequirements",
      "status" : "active",
      "type" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/library-type",
            "code" : "module-definition"
          }
        ]
      },
      "relatedArtifact" : [
        {
          "type" : "depends-on",
          "display" : "Library CQMCommon",
          "resource" : "Library/CQMCommon|2.2.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library FHIRHelpers",
          "resource" : "Library/FHIRHelpers|4.4.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library QICoreCommon",
          "resource" : "Library/QICoreCommon|2.1.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library SDE",
          "resource" : "Library/SupplementalDataElements|3.5.000"
        },
        {
          "type" : "depends-on",
          "display" : "Code system LOINC",
          "resource" : "http://loinc.org"
        },
        {
          "type" : "depends-on",
          "display" : "Code system AdministrativeGender",
          "resource" : "http://hl7.org/fhir/administrative-gender"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Encounter Inpatient",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Medicare FFS payer",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.10"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Medicare Advantage payer",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Observation Services",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
        },
        {
          "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 Outpatient Surgery Service",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.38"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Bicarbonate lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.139"
        },
        {
          "type" : "depends-on",
          "display" : "Value set White blood cells count lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.129"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Hematocrit lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.114"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Glucose lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.134"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Creatinine lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2363"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Payer Type",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Oxygen Saturation by Pulse Oximetry",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.151"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Potassium lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.117"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Sodium lab test",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.119"
        }
      ],
      "parameter" : [
        {
          "name" : "Measurement Period",
          "use" : "in",
          "min" : 0,
          "max" : "1",
          "type" : "Period"
        },
        {
          "name" : "Encounter with First Heart Rate",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Bicarbonate Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First White Blood Cells Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Hematocrit Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Glucose Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "SDE Race",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Systolic Blood Pressure",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "string"
        },
        {
          "name" : "SDE Sex",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Coding"
        },
        {
          "name" : "Encounter with First Respiratory Rate",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Creatinine Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Body Temperature",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "SDE Payer",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Weight Recorded",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Initial Population",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "SDE Ethnicity",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Oxygen Saturation",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Potassium Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Encounter with First Sodium Lab Test",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        }
      ],
      "dataRequirement" : [
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "status",
            "status.value",
            "period",
            "id",
            "id.value"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "finished"
                }
              ]
            }
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "status",
            "status.value",
            "period",
            "id",
            "id.value"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "finished"
                }
              ]
            }
          ],
          "dateFilter" : [
            {
              "path" : "period",
              "valuePeriod" : {
                "extension" : [
                  {
                    "url" : "http://hl7.org/fhir/uv/crmi-analysisException",
                    "valueString" : "Error attempting to determine filter value: toFhirValue not implemented for Subtract"
                  }
                ]
              }
            }
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "period",
            "id",
            "id.value"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.38"
            }
          ],
          "dateFilter" : [
            {
              "path" : "period",
              "valuePeriod" : {
                "extension" : [
                  {
                    "url" : "http://hl7.org/fhir/uv/crmi-analysisException",
                    "valueString" : "Error attempting to determine filter value: toFhirValue not implemented for Subtract"
                  }
                ]
              }
            }
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "status",
            "status.value",
            "period",
            "id",
            "id.value"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "finished"
                }
              ]
            }
          ],
          "dateFilter" : [
            {
              "path" : "period",
              "valuePeriod" : {
                "extension" : [
                  {
                    "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
                    "valueExpression" : {
                      "language" : "text/cql-identifier",
                      "expression" : "Measurement Period"
                    }
                  }
                ]
              }
            }
          ]
        },
        {
          "type" : "Patient",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport" : [
            "race",
            "ethnicity"
          ]
        },
        {
          "type" : "Coverage",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"
          ],
          "mustSupport" : [
            "type"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.10"
            }
          ]
        },
        {
          "type" : "Coverage",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"
          ],
          "mustSupport" : [
            "type"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12"
            }
          ]
        },
        {
          "type" : "Coverage",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"
          ],
          "mustSupport" : [
            "type",
            "period"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/heartrate"
          ],
          "mustSupport" : [
            "effective",
            "status",
            "status.value",
            "value"
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.139"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.129"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.114"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.134"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2363"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.117"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "issued",
            "issued.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.119"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/bp"
          ],
          "mustSupport" : [
            "status",
            "status.value",
            "effective",
            "component"
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/resprate"
          ],
          "mustSupport" : [
            "effective",
            "status",
            "status.value",
            "value"
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/bodytemp"
          ],
          "mustSupport" : [
            "effective",
            "status",
            "status.value",
            "value"
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/bodyweight"
          ],
          "mustSupport" : [
            "effective",
            "status",
            "status.value",
            "value"
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.151"
            }
          ]
        }
      ]
    }
  ],
  "extension" : [
    {
      "id" : "supplementalDataGuidance",
      "extension" : [
        {
          "url" : "guidance",
          "valueString" : "For hospitalizations in the Initial Population, report the FIRST resulted vital signs (physical exams) during current hospitalization. \n\nThe physical exam CCDEs are as follows:\n\nBody Temperature\nHeart rate\nOxygen saturation (by pulse oximetry)\nRespiratory rate\nSystolic blood pressure\nBody weight\n\nFor laboratory test results, report the FIRST resulted laboratory tests where result is not null during current hospitalization. \n\nThe laboratory test CCDEs are as follows:\n\nBicarbonate\nCreatinine \nGlucose\nHematocrit\nPotassium\nSodium\nWhite blood cell count\n\nFirst values for the CCDEs may be resulted in the emergency department or other hospital outpatient locations within the hospital facility before a patient is subsequently admitted to the same hospital. First values for these data elements may also be resulted in an inpatient location for directly admitted patients who do not receive care in the emergency department or other hospital outpatient/same day surgery locations before admission. \n\nNOTE: Hospitals may choose to submit all, or only report the FIRST resulted value for EACH CCDE collected in the appropriate timeframe, if available.\n\nFor every patient in the Initial Population, also identify payer, race, ethnicity and sex."
        },
        {
          "url" : "usage",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                "code" : "supplemental-data",
                "display" : "Supplemental Data"
              }
            ],
            "text" : "Supplemental Data Guidance"
          }
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance"
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
      "valueReference" : {
        "reference" : "Device/cqf-tooling"
      }
    },
    {
      "id" : "effective-data-requirements",
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements",
      "valueReference" : {
        "reference" : "#effective-data-requirements"
      }
    }
  ],
  "url" : "https://madie.cms.gov/Measure/CMSFHIR529HybridHospitalWideReadmission",
  "identifier" : [
    {
      "use" : "usual",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "short-name",
            "display" : "Short Name"
          }
        ]
      },
      "system" : "https://madie.cms.gov/measure/shortName",
      "value" : "CMS529FHIR"
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "version-independent",
            "display" : "Version Independent"
          }
        ]
      },
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:uuid:66842e26-2256-4a2d-8dac-dd014c425748"
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "version-specific",
            "display" : "Version Specific"
          }
        ]
      },
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:uuid:d95d574f-1d07-4a69-b14d-98a8b0b35f0a"
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "endorser",
            "display" : "Endorser"
          }
        ]
      },
      "system" : "https://madie.cms.gov/measure/cbeId",
      "value" : "2879",
      "assigner" : {
        "display" : "CMS Consensus Based Entity"
      }
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "publisher",
            "display" : "Publisher"
          }
        ]
      },
      "system" : "https://madie.cms.gov/measure/cmsId",
      "value" : "529FHIR",
      "assigner" : {
        "display" : "CMS"
      }
    }
  ],
  "version" : "0.1.001",
  "name" : "CMSFHIR529HybridHospitalWideReadmission",
  "title" : "Core Clinical Data Elements for the Hybrid Hospital Wide Readmission Measure with Claims and Electronic Health Record Data HWRFHIR",
  "status" : "active",
  "experimental" : false,
  "date" : "2024-12-18T21:25:47+00:00",
  "publisher" : "Centers for Medicare & Medicaid Services (CMS)",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.cms.gov/"
        }
      ]
    }
  ],
  "description" : "This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the Hybrid HWR outcome measure. It is designed to extract the first resulted set of vital signs and basic laboratory results obtained from hospitalizations for adult Medicare Fee-For-Service (FFS) and Medicare Advantage (MA) patients admitted to acute care hospitals.",
  "purpose" : "UNKNOWN",
  "usage" : "These specifications are for use for data with discharges that occur between July 1, 2026 and June 30, 2027. The associated Hospital Specific Report (HSR) is anticipated to be released in Spring 2028.\n\nThis logic guides the user to extract the FIRST valid resulted HWR-specific CCDEs for all Medicare FFS and MA hospitalizations for patients age 65 or older (Initial Population) directly admitted to the hospital or admitted to the same facility after being treated in another area such as the emergency department or hospital outpatient/same day surgery location. \n\nThe logic supports extraction of the FIRST resulted vital signs and laboratory tests, where the result is not null, during the patient encounter or episode of care. This may include values captured after inpatient admission, as well as prior to inpatient admission, for example from the emergency department, pre-operative, or other outpatient areas associated with the hospital, as long as the values fall within the allowed timeframes specified in the measure logic.  All clinical systems used in inpatient and outpatient locations associated with the hospital facility should be queried for core clinical data element values related to a patient who is subsequently admitted.\n\nPatients who arrive at the hospital on oxygen therapy will be flagged in the logic and the information will be incorporated into the risk adjustment models.  Rationale: patients who arrive on oxygen may appear in better condition, that is, having a higher oxygen saturation due to oxygen administration, that is not truly reflective of the patient's status upon arrival.\n\nValue sets for the laboratory tests are represented using Logical Observation Identifiers Names Codes (LOINC) currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for reporting of the CCDEs.\n\nNOTE: It is recommended hospitals only report the FIRST resulted value for EACH core clinical data element collected in the appropriate timeframe, if available. Hospitals may also choose to report ALL values on an encounter during their entire admission; however, only the first resulted values are utilized in the logic for measure calculation.\n\nFor each CCDE, it is recommended that hospitals report the below Unified Code for Units of Measure (UCUM) units, however, any units may be submitted. Where the reported unit is not easily converted to the requested UCUM units, the value will be set to missing and the median value reported for that CCDE will be imputed.\n\nCCDE                                              UCUM Units\n\nBicarbonate-------------------------------------meq/L \n                                                               mmol/L \n\nCreatinine---------------------------------------mg/dL \n                                                   \n\nGlucose------------------------------------------mg/dL\n                                                                mmol/L\n-\nHeart rate---------------------------------------{Beats}/min\n\nHematocrit --------------------------------------%\n\nOxygen saturation (by pulse oximetry)- -%\n\nPotassium----------------------------------------meq/L \n                                                                 mmol/L\n\nRespiratory rate---------------------------------{Breaths}/min\n\nSodium--------------------------------------------meq/L\n                                                                 mmol/L\n \nSystolic blood pressure-----------------------mm[Hg]\n\nTemperature-------------------------------------Cel\n                                                                [degF]  \n\nWeight---------------------------------------------kg\n                                                                 [lb_av]\n                                                                  g\n                                                          \nWhite blood cell count -----------------------{Cells}/uL\n                                                               10*3/uL\n                                                               10*9/L \n                                                             \nFor each hospitalization please also submit the following Linking Variables: \nCMS Certification Number (CCN); \nMedicare Beneficiary Identifier (MBI);\nInpatient Admission Date; and\nDischarge Date.\n\nThis is an encounter-based measure. The initial population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS529v6. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).",
  "copyright" : "Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.\n\nThis material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. All rights reserved.\n\nLOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.",
  "effectivePeriod" : {
    "start" : "2026-07-01",
    "end" : "2027-06-30"
  },
  "author" : [
    {
      "name" : "Lantana Consulting Group",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.lantanagroup.com/"
        }
      ]
    },
    {
      "name" : "Yale New Haven Health Service Corporation/ Center for Outcomes Research and Evaluation",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://medicine.yale.edu/core/"
        }
      ]
    }
  ],
  "library" : [
    🔗 "https://madie.cms.gov/Library/CMSFHIR529HybridHospitalWideReadmission"
  ],
  "disclaimer" : "These performance specifications are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.\n\nTHE MEASURES AND SPECIFICATIONS ARE PROVIDED \"AS IS\" WITHOUT WARRANTY OF ANY KIND.\n\nDue to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
  "rationale" : "The intent of this logic is to extract the FIRST valid set of clinical data elements from hospital electronic health records (EHRs) for all qualifying hospitalizations. The data will be linked with administrative claims to risk adjust the Hybrid HWR outcome measure. This work addresses stakeholder concerns that clinical data garnered from patients and used by clinicians to guide diagnostic decisions and treatment, are preferable to administrative claims data when profiling hospitals' case mix. We are calling the list of data elements for extraction the \"HWR-specific core clinical data elements\" (CCDE). The CCDE are the first set of vital signs and basic laboratory tests resulted from hospitalizations for adult Medicare FFS and MA patients, age 65 or older (Initial Population), after they arrive at the hospital to which they are subsequently admitted. For example, this first set of data values are often captured in the emergency department or in the pre-operative area, sometimes hours before a patient is admitted to that same facility. \n\nThese data elements were selected because they: 1. reflect patients' clinical status when they first present to the hospital, 2. are clinically and statistically relevant to patient outcomes, 3. are consistently obtained during adult inpatient hospitalizations based on current clinical practice, 4. are captured with a standard definition and recorded in a standard format across providers, and 5. are entered in structured fields that are feasibly retrieved from current EHR systems (YNHHS/CORE, 2015).\n\nAdditional data called Linking Variables are used to link EHR data files with administrative claims data for CMS to calculate results for the Hybrid HWR measure, which are: CMS Certification Number (CCN); Medicare Beneficiary Identifier (MBI); Inpatient Admission Date; and Discharge Date.",
  "clinicalRecommendationStatement" : "The logic is not meant to guide or alter the care patients receive. The purpose of this CCDE logic is to extract clinical data that are already routinely captured in EHRs from hospitalizations for adult patients. It is not intended to require that clinical staff perform additional measurements or tests that are not needed for diagnostic assessment or treatment of patients.",
  "guidance" : "These specifications are for use for data with discharges that occur between July 1, 2026 and June 30, 2027. The associated Hospital Specific Report (HSR) is anticipated to be released in Spring 2028.\n\nThis logic guides the user to extract the FIRST valid resulted HWR-specific CCDEs for all Medicare FFS and MA hospitalizations for patients age 65 or older (Initial Population) directly admitted to the hospital or admitted to the same facility after being treated in another area such as the emergency department or hospital outpatient/same day surgery location. \n\nThe logic supports extraction of the FIRST resulted vital signs and laboratory tests, where the result is not null, during the patient encounter or episode of care. This may include values captured after inpatient admission, as well as prior to inpatient admission, for example from the emergency department, pre-operative, or other outpatient areas associated with the hospital, as long as the values fall within the allowed timeframes specified in the measure logic.  All clinical systems used in inpatient and outpatient locations associated with the hospital facility should be queried for core clinical data element values related to a patient who is subsequently admitted.\n\nPatients who arrive at the hospital on oxygen therapy will be flagged in the logic and the information will be incorporated into the risk adjustment models.  Rationale: patients who arrive on oxygen may appear in better condition, that is, having a higher oxygen saturation due to oxygen administration, that is not truly reflective of the patient's status upon arrival.\n\nValue sets for the laboratory tests are represented using Logical Observation Identifiers Names Codes (LOINC) currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for reporting of the CCDEs.\n\nNOTE: It is recommended hospitals only report the FIRST resulted value for EACH core clinical data element collected in the appropriate timeframe, if available. Hospitals may also choose to report ALL values on an encounter during their entire admission; however, only the first resulted values are utilized in the logic for measure calculation.\n\nFor each CCDE, it is recommended that hospitals report the below Unified Code for Units of Measure (UCUM) units, however, any units may be submitted. Where the reported unit is not easily converted to the requested UCUM units, the value will be set to missing and the median value reported for that CCDE will be imputed.\n\nCCDE                                              UCUM Units\n\nBicarbonate-------------------------------------meq/L \n                                                               mmol/L \n\nCreatinine---------------------------------------mg/dL \n                                                   \n\nGlucose------------------------------------------mg/dL\n                                                                mmol/L\n-\nHeart rate---------------------------------------{Beats}/min\n\nHematocrit --------------------------------------%\n\nOxygen saturation (by pulse oximetry)- -%\n\nPotassium----------------------------------------meq/L \n                                                                 mmol/L\n\nRespiratory rate---------------------------------{Breaths}/min\n\nSodium--------------------------------------------meq/L\n                                                                 mmol/L\n \nSystolic blood pressure-----------------------mm[Hg]\n\nTemperature-------------------------------------Cel\n                                                                [degF]  \n\nWeight---------------------------------------------kg\n                                                                 [lb_av]\n                                                                  g\n                                                          \nWhite blood cell count -----------------------{Cells}/uL\n                                                               10*3/uL\n                                                               10*9/L \n                                                             \nFor each hospitalization please also submit the following Linking Variables: \nCMS Certification Number (CCN); \nMedicare Beneficiary Identifier (MBI);\nInpatient Admission Date; and\nDischarge Date.\n\nThis is an encounter-based measure. The initial population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS529v6. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).",
  "group" : [
    {
      "id" : "67533fe346b6174510cfed57",
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
                "code" : "cohort",
                "display" : "Cohort"
              }
            ]
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
          "valueCode" : "Encounter"
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
                "code" : "outcome",
                "display" : "Outcome"
              }
            ]
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
          "valueCode" : "None"
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
                "code" : "decrease",
                "display" : "decrease"
              }
            ]
          }
        }
      ],
      "description" : "This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the Hybrid HWR outcome measure. It is designed to extract the first resulted set of vital signs and basic laboratory results obtained from hospitalizations for adult Medicare Fee-For-Service (FFS) and Medicare Advantage (MA) patients admitted to acute care hospitals.",
      "population" : [
        {
          "id" : "087F31A7-36A7-4F47-AB51-E1264E96E0B8",
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "initial-population",
                "display" : "Initial Population"
              }
            ]
          },
          "description" : "All Medicare FFS and MA hospitalizations for patients aged 65 and older at the start of an inpatient admission, where the length of stay is less than 365 days, and the hospitalization ends during the measurement period. \n\nNOTE: All Medicare FFS and MA hospitalizations meeting the above criteria should be included, regardless of whether Medicare FFS/MA is the primary, secondary, or tertiary payer.",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Initial Population"
          }
        }
      ]
    }
  ],
  "supplementalData" : [
    {
      "id" : "encounter-with-first-body-temperature",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Body Temperature",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Body Temperature"
      }
    },
    {
      "id" : "encounter-with-first-heart-rate",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Heart Rate",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Heart Rate"
      }
    },
    {
      "id" : "encounter-with-first-oxygen-saturation",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Oxygen Saturation",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Oxygen Saturation"
      }
    },
    {
      "id" : "encounter-with-first-respiratory-rate",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Respiratory Rate",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Respiratory Rate"
      }
    },
    {
      "id" : "encounter-with-first-systolic-blood-pressure",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Systolic Blood Pressure",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Systolic Blood Pressure"
      }
    },
    {
      "id" : "encounter-with-first-bicarbonate-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Bicarbonate Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Bicarbonate Lab Test"
      }
    },
    {
      "id" : "encounter-with-first-creatinine-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Creatinine Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Creatinine Lab Test"
      }
    },
    {
      "id" : "encounter-with-first-glucose-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Glucose Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Glucose Lab Test"
      }
    },
    {
      "id" : "encounter-with-first-hematocrit-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Hematocrit Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Hematocrit Lab Test"
      }
    },
    {
      "id" : "encounter-with-first-potassium-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Potassium Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Potassium Lab Test"
      }
    },
    {
      "id" : "encounter-with-first-sodium-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Sodium Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Sodium Lab Test"
      }
    },
    {
      "id" : "encounter-with-first-white-blood-cells-lab-test",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First White Blood Cells Lab Test",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First White Blood Cells Lab Test"
      }
    },
    {
      "id" : "sde-ethnicity",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Ethnicity",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Ethnicity"
      }
    },
    {
      "id" : "sde-payer",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Payer",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Payer"
      }
    },
    {
      "id" : "sde-race",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Race",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Race"
      }
    },
    {
      "id" : "sde-sex",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Sex",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Sex"
      }
    },
    {
      "id" : "encounter-with-first-weight-recorded",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "Encounter with First Weight Recorded",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Encounter with First Weight Recorded"
      }
    }
  ]
}