eCQM Title | Hospital Harm - Postoperative Respiratory Failure |
||
---|---|---|---|
eCQM Identifier (Measure Authoring Tool) | 1218 | eCQM Version Number | 1.0.000 |
CBE Number | 4130e | GUID | 010fa13e-a59f-4ab7-8b96-e8df0494b611 |
Measurement Period | January 1, 20XX through December 31, 20XX | ||
Measure Steward | Centers for Medicare & Medicaid Services (CMS) | ||
Measure Developer | American Institutes for Research (AIR) | ||
Endorsed By | CMS Consensus Based Entity | ||
Description |
This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF) |
||
Copyright |
Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. American Institutes for Research(R), formerly IMPAQ International, disclaims all liability for use or accuracy of any third party codes contained in the specifications. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved. |
||
Disclaimer |
This performance measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURES AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM]. |
||
Measure Scoring | Proportion | ||
Measure Type | Outcome | ||
Stratification |
None |
||
Risk Adjustment |
Variables are collected for the development of baseline risk adjustment model Report the first resulted vital sign values during the encounter in the Unified Code for Units of Measure (UCUM) units specified: - Body temperature: Cel, [degF] - Heart rate: {Beats}/min - Respiratory rate: {Breaths}/min - Systolic blood pressure: mm[Hg] Report the first resulted laboratory test values during the encounter in UCUM units specified: - Albumin: g/dL, umol/L - Aspartate aminotransferase (AST/SGOT): U/L, IU/L - Bicarbonate: mmol/L - Bilirubin: mg/dL, umol/L - Blood urea nitrogen (BUN): mg/dL, umol/L - Carbon dioxide (partial pressure): mm[Hg] - Creatinine: mg/dL, umol/L - Hematocrit: % - Hemoglobin: g/dL, mmol/L - Leukocyte count: {cells}/uL, 10*3/uL, 10*9/L, /mm3 - Oxygen (partial pressure): mm[Hg] - pH of arterial blood: [pH] - Platelet count: 10*3/uL, 10*9/L, /mm3 - Sodium: meq/L, mmol/L - White blood cell count: {cells}/uL, 10*3/uL, 10*9/L, /mm3 Additional variables used for risk adjustment: - American Society of Anesthesiologists (ASA) physical status class assessment that starts during the encounter - First Body mass index (BMI), reported using UCUM unit: kg/m2 - Encounter diagnoses with their present on admission (POA) indicators - Most recent smoking status - Principal surgical procedures that start during the encounter Please see the Hospital Harm - Postoperative Respiratory Failure Risk Adjustment Methodology Report on the eCQM-specific page on the eCQI Resource Center website: https://ecqi.healthit.gov/ |
||
Rate Aggregation |
None |
||
Rationale |
Postoperative respiratory failure (PRF), defined as unplanned endotracheal reintubation, prolonged inability to wean from mechanical ventilation, or inadequate oxygenation and/or ventilation, is the most common serious postoperative pulmonary complication, with an incidence of up to 7.5% (the incidence of any postoperative pulmonary complication ranges from 10-40%) (Arozullah et al., 2000; Canet et al., 2015; Gupta et al., 2011; Kor et al., 2014). This measure addresses the prevalence of PRF and the variance between hospitals in the incidence of PRF. PRF is a serious complication that can increase the risk of morbidity and mortality, with in-hospital mortality resulting from PRF estimated at 25% to 40% (Arozullah et al., 2000; Canet & Gallart, 2014). Surgical procedures complicated by PRF have 3.74 times higher adjusted odds of death than those not complicated by respiratory failure, 1.47 times higher odds of 90-day readmission, and 1.86 times higher odds of an outpatient visit with one of 44 postoperative conditions (e.g., bacterial infection, fluid and electrolyte disorder, abdominal hernia) within 90 days of hospital discharge (Miller et al., 2001; Romano et al, 2009). PRF is additionally associated with prolonged mechanical ventilation and the need for rehabilitation or skilled nursing facility placement upon discharge (Thompson & Lisco, 2018). The incidence of PRF varies by hospital, with higher reported rates of PRF in nonteaching hospitals than teaching hospitals (Rahman et al., 2013). Additionally, one study found that the odds of developing PRF increased by 6% for each level increase in hospital size from small to large (Rahman et al., 2013). This suggests that there remains room for improvement in hospitals reporting higher rates of PRF. The most widely used current measures of PRF are based on either claims data (CMS Patient Safety Indicator (PSI) 11) or proprietary registry data (National Surgical Quality Improvement Program (NSQIP) of the American College of Surgeons). The proposed eCQM is closely modeled after the NSQIP measure of PRF, which has been widely adopted across American hospitals, and is intended to complement and eventually supplant CMS PSI 11. |
||
Clinical Recommendation Statement |
Recent studies and current clinical practice guidelines for PRF have identified enhanced recovery pathways, prophylactic mucolytics, postoperative continuous positive airway pressure ventilation, lung protective intraoperative ventilation, prophylactic respiratory physiotherapy, epidural analgesia, and goal directed hemodynamic therapy as evidence-based interventions to reduce the incidence of PRF. Yet, progress in reducing the incidence of PRF has been stymied by lack of consensus regarding the definition of PRF, which patients are most at-risk, which risk factors are potentially modifiable, and which patients are more likely to benefit from targeted interventions of a health care system’s limited resources. This measure would address this gap in data. |
||
Improvement Notation |
A lower measure score indicates higher quality |
||
Reference |
Reference Type: CITATION Reference Text: 'Arozullah, A.M., Daley, J., Henderson, W.G., & Khuri, S.F. (2000). Multifactorial risk index for predicting postoperative respiratory failure in men after major noncardiac surgery. The National Veterans Administration Surgical Quality Improvement Program. Annals of surgery. 232(2):242-253. doi: 10.1097/00000658-200008000-00015. PMID: 10903604; PMCID: PMC1421137.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Canet, J., & Gallart, L. (2014). Postoperative respiratory failure: Pathogenesis, prediction, and prevention. Current Opinion in Critical Care. 20(1):56-62. doi: 10.1097/MCC.0000000000000045. PMID: 24240985.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Canet, J., Sabaté, S., Mazo, V., Gallart, L., de Abreu, M.G., Belda, J., ... & Pelosi, P. (2015). PERISCOPE group. Development and validation of a score to predict postoperative respiratory failure in a multicentre European cohort: A prospective, observational study. Eur J Anaesthesiol. 32(7):458-70. doi: 10.1097/EJA.0000000000000223. PMID: 26020123.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Gupta, H., Gupta, P.K., Fang, X., Miller, W.J., Cemaj, S., Forse, R.A., & Morrow, L.E. (2011). Development and validation of a risk calculator predicting postoperative respiratory failure. Chest. 140(5):1207-1215. doi: 10.1378/chest.11-0466. Epub 2011 Jul 14. PMID: 21757571.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Kor, D.J., Lingineni, R.K., Gajic, O., Park, P.K., Blum, J.M., Hou, P.C., ... & Talmor, D.S. (2014). Predicting risk of postoperative lung injury in high-risk surgical patients: a multicenter cohort study. Anesthesiology. 120(5):1168-81. doi: 10.1097/ALN.0000000000000216. PMID: 24755786; PMCID: PMC3999474.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Miller, M.R., Elixhauser, A., Zhan, C., & Meyer, G.S. (2001). Patient Safety Indicators: using administrative data to identify potential patient safety concerns. Health Serv Res. 36(6 Pt 2):110-32. PMID: 16148964; PMCID: PMC1383610.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Rahman, M., Neal, D., Fargen, K.M., & Hoh, B.L. (2013). Establishing standard performance measures for adult brain tumor patients: a Nationwide Inpatient Sample database study. Neuro Oncol. 15(11):1580-8. doi: 10.1093/neuonc/not108. Epub 2013 Sep 30. PMID: 24084409; PMCID: PMC3813415.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Romano, P.S., Mull, H.J., Rivard, P.E., Zhao, S., Henderson, W.G., Loveland, S., Tsilimingras, D., ... & Rosen, A.K. (2009). Validity of selected AHRQ patient safety indicators based on VA National Surgical Quality Improvement Program data. Health Serv Res. 44(1):182-204. doi: 10.1111/j.1475-6773.2008.00905.x. Epub 2008 Sep 17. PMID: 18823449; PMCID: PMC2669628.' |
||
Reference |
Reference Type: CITATION Reference Text: 'Thompson, S.L., & Lisco, S.J. (2018). Postoperative respiratory failure. Int Anesthesiol Clin. 56(1):147-164. doi: 10.1097/AIA.0000000000000173. PMID: 29189437.' |
||
Definition |
Inpatient hospitalizations: Includes time in outpatient surgery service or observation when the transition between these encounters (if they exist) and the inpatient encounter are within an hour or less of each other. "Elective Inpatient Encounter" value set intends to capture all scheduled hospitalizations and excludes emergency, urgent, and unplanned admissions. Elective surgical procedures: Elective is modeled by specifying an elective inpatient admission encounter type with an encounter class of ‘elective’. Surgical procedure is referred to as an "Operating Room (OR) procedure" or "procedure" and is modeled by the use of anesthesia during the encounter. These combined concepts determine a qualifying elective surgical procedure occurred. The ‘First’ OR procedure of the encounter is captured by an administration of general or neuraxial anesthesia, typically only given and monitored within an operating room environment. These anesthesia concepts are included in the ‘General or Neuraxial Anesthesia’ value set. All other subsequent procedures are captured by an administration of general, neuraxial, regional anesthesia and conscious sedation that requires monitored anesthesia care (MAC) regardless of procedural area location. These anesthesia concepts are included in the "Anesthesia Requiring Monitored Care" value set. Procedural area locations include operating rooms, endoscopy, cardiac catheterization and interventional radiology suites. Procedural area locations are also defined by areas where there is an administration of general, neuraxial, regional anesthesia or conscious sedation that requires MAC. Non-invasive oxygen therapy refers to patients on room air, nasal cannula, face masks, or continuous or intermittent positive airway pressure devices. |
||
Guidance |
PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area. This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This version of the eCQM uses QDM version 5.6. Please refer to the eCQI resource center (https://ecqi.healthit.gov/qdm) for more information on the QDM. |
||
Transmission Format |
TBD |
||
Initial Population |
Elective inpatient hospitalizations with no preceding emergency department visit that end during the measurement period for patients aged 18 and older without an obstetrical condition and at least one surgical procedure was performed within the first 3 days of the encounter |
||
Denominator |
Equals Initial Population |
||
Denominator Exclusions |
Inpatient hospitalizations for patients: With a diagnosis for a degenerative neurological disorder With any selected head, neck, and thoracic surgery involving significant risk of airway compromise or requiring airway protection Who have mechanical ventilation that starts more than one hour prior to the start of the first operating procedure (OR) procedure With a diagnosis for a neuromuscular disorder With arterial partial pressure of carbon dioxide (PaCO2)>50 mmHg combined with an arterial pH<7.30 within 48 hours or less prior to the start of the first OR procedure With arterial partial pressure of oxygen (PaO2)<50 mmHg within 48 hours or less prior to the start of the first OR procedure With a principal diagnosis for acute respiratory failure With a secondary diagnosis for acute respiratory failure present on admission With any diagnosis present on admission for the existence of a tracheostomy Where a tracheostomy is performed before or on the same day as the first OR procedure |
||
Numerator |
Elective inpatient hospitalizations for patients with postoperative respiratory failure as evidenced by any of the following: Criterion A: Mechanical ventilation (MV) initiated within 30 days after first OR procedure, as evidenced by: A.1. Intubation that occurs outside of a procedural area and within 30 days after the end of the first OR procedure of the encounter. or A.2. MV that occurs outside of a procedural area within 30 days after the end of the first OR procedure of the encounter and is preceded by a period of non-invasive oxygen therapy between the end of the OR procedure and the MV occurrence, and without a subsequent OR procedure between the non-invasive oxygen therapy and the MV occurrence. or Criterion B: MV with a duration of more than 48 hours after the first OR procedure, as evidenced by: B.1. Extubation that occurs outside of a procedural area more than 48 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a period of non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the extubation occurrence. or B.2 Mechanical ventilation that occurs between 48 and 72 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the MV occurrence. |
||
Numerator Exclusions |
Not Applicable |
||
Denominator Exceptions |
None |
||
Supplemental Data Elements |
For every patient evaluated by this measure also identify payer, race, ethnicity and sex |
"Elective Inpatient Encounter with OR Procedure within 3 Days"
"Initial Population"
"Encounter with Degenerative Neurological Disorder" union "Encounter with High Risk to Airway Head Neck and Thoracic Surgery" union "Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure" union "Encounter with Neuromuscular Disorder" union "Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure" union "Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure" union "Encounter with Principal Diagnosis of Acute Respiratory Failure" union "Encounter with Secondary Diagnosis of Acute Respiratory Failure Present on Admission" union "Encounter with Tracheostomy Present on Admission" union "Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure"
"Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure" union "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy" union "Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia" union "Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia"
None
None
None
["Procedure, Performed": "General and Neuraxial Anesthesia"] AnesthesiaProcedures where Global."LatestOf" ( AnesthesiaProcedures.relevantDatetime, AnesthesiaProcedures.relevantPeriod ) during day of "Measurement Period"
"Initial Population"
"Encounter with Degenerative Neurological Disorder" union "Encounter with High Risk to Airway Head Neck and Thoracic Surgery" union "Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure" union "Encounter with Neuromuscular Disorder" union "Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure" union "Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure" union "Encounter with Principal Diagnosis of Acute Respiratory Failure" union "Encounter with Secondary Diagnosis of Acute Respiratory Failure Present on Admission" union "Encounter with Tracheostomy Present on Admission" union "Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure"
["Encounter, Performed": "Elective Inpatient Encounter"] ElectiveEncounter where ElectiveEncounter.relevantPeriod ends during day of "Measurement Period" and ElectiveEncounter.class ~ "Elective (qualifier value)" and AgeInYearsAt(date from start of ElectiveEncounter.relevantPeriod) >= 18 and not exists ( ["Encounter, Performed": "Emergency Department Visit"] EDVisit where EDVisit.relevantPeriod ends 1 hour or less before or on start of ElectiveEncounter.relevantPeriod )
"Elective Inpatient Encounter with Age 18 and Older without ED Visit" ElectiveEncounter where not exists ElectiveEncounter.diagnoses EncounterDiagnoses where EncounterDiagnoses.code in "Obstetrical or Pregnancy Related Conditions"
"Elective Inpatient Encounter with Age and without Obstetrical Condition" ElectiveEncounter with ["Procedure, Performed": "General and Neuraxial Anesthesia"] SurgeryWithAnesthesia such that Global."EarliestOf" ( SurgeryWithAnesthesia.relevantDatetime, SurgeryWithAnesthesia.relevantPeriod ) during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( ElectiveEncounter ) and Global."EarliestOf" ( SurgeryWithAnesthesia.relevantDatetime, SurgeryWithAnesthesia.relevantPeriod ) 3 days or less after start of Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( ElectiveEncounter )
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery where exists ( EncounterWithSurgery.diagnoses EncounterDiagnosis where EncounterDiagnosis.code in "Degenerative Neurological Disorder" )
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Removal of endotracheal tube (procedure)"] Extubation let ExtubationTime: Global."NormalizeInterval" ( Extubation.relevantDatetime, Extubation.relevantPeriod ), FirstProcedureTime: Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ), GATime: Global."NormalizeInterval" ( "LatestGeneralAnesthesiaOrMAC"(Extubation).relevantDatetime, "LatestGeneralAnesthesiaOrMAC"(Extubation).relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) where ExtubationTime during HospitalizationPeriod and ExtubationTime starts 30 days or less after end of FirstProcedureTime and ExtubationTime starts more than 48 hours after end of GATime and not ( ( "Extubation with Preceding Noninvasive Oxygen".id contains Extubation.id ) and not ( "Extubation During General Anesthesia".id contains Extubation.id ) ) and not exists ( EncounterWithSurgery.facilityLocations EncounterLocation where EncounterLocation.code in "Procedural Hospital Locations" ) return EncounterWithSurgery
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery with ["Procedure, Performed": "Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise"] HeadNeckProcedures such that Global."NormalizeInterval" ( HeadNeckProcedures.relevantDatetime, HeadNeckProcedures.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery )
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Intubation"] EndotrachealTubeIn let IntubationTime: Global."NormalizeInterval" ( EndotrachealTubeIn.relevantDatetime, EndotrachealTubeIn.relevantPeriod ), FirstProcedureTime: Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ), GATime: Global."NormalizeInterval" ( "LatestGeneralAnesthesiaOrMAC"(EndotrachealTubeIn).relevantDatetime, "LatestGeneralAnesthesiaOrMAC"(EndotrachealTubeIn).relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) where IntubationTime starts 30 days or less after end of FirstProcedureTime and IntubationTime starts during HospitalizationPeriod and IntubationTime starts after end of GATime and not exists ( EncounterWithSurgery.facilityLocations EncounterLocation where EncounterLocation.code in "Procedural Hospital Locations" and IntubationTime starts during EncounterLocation.locationPeriod ) and not ( "Intubation During General Anesthesia and MAC".id contains EndotrachealTubeIn.id ) return EncounterWithSurgery
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Mechanical Ventilation"] Ventilation, "Noninvasive Oxygen Therapy" OxygenSupport let MVTime: Global."NormalizeInterval" ( Ventilation.relevantDatetime, Ventilation.relevantPeriod ), FirstProcedureTime: Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ), GATime: Global."NormalizeInterval" ( "LatestGeneralAnesthesiaOrMAC"(Ventilation).relevantDatetime, "LatestGeneralAnesthesiaOrMAC"(Ventilation).relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ), OxygenTime: Global."NormalizeInterval" ( OxygenSupport.relevantDatetime, OxygenSupport.relevantPeriod ) where MVTime starts 30 days or less after end of FirstProcedureTime and MVTime starts during HospitalizationPeriod and MVTime starts after end of GATime and OxygenTime starts during Interval[end of GATime, start of MVTime] and not exists ( EncounterWithSurgery.facilityLocations EncounterLocation where EncounterLocation.code in "Procedural Hospital Locations" and MVTime starts during EncounterLocation.locationPeriod ) return EncounterWithSurgery
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery with ["Procedure, Performed": "Mechanical Ventilation"] Ventilation such that Global."NormalizeInterval" ( Ventilation.relevantDatetime, Ventilation.relevantPeriod ) starts more than 1 hour before start of Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) and Global."NormalizeInterval" ( Ventilation.relevantDatetime, Ventilation.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery )
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Mechanical Ventilation"] Ventilation let MVTime: Global."NormalizeInterval" ( Ventilation.relevantDatetime, Ventilation.relevantPeriod ), GATime: Global."NormalizeInterval" ( "LatestGeneralAnesthesiaOrMAC"(Ventilation).relevantDatetime, "LatestGeneralAnesthesiaOrMAC"(Ventilation).relevantPeriod ), FirstProcedureTime: Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) where MVTime starts during Interval ( end of GATime + 48 hours, end of GATime + 72 hours ) and MVTime starts 30 days or less after end of FirstProcedureTime and MVTime starts during HospitalizationPeriod and not ( "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy".id contains EncounterWithSurgery.id ) and not exists ( EncounterWithSurgery.facilityLocations EncounterLocation where EncounterLocation.code in "Procedural Hospital Locations" ) return EncounterWithSurgery
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery where exists ( EncounterWithSurgery.diagnoses EncounterDiagnosis where EncounterDiagnosis.code in "Neuromuscular Disorder" )
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Laboratory Test, Performed": "Carbon Dioxide Partial Pressure in Arterial Blood"] CarbonDioxide, ["Laboratory Test, Performed": "Arterial Blood pH"] BloodpH where Global."NormalizeInterval" ( CarbonDioxide.relevantDatetime, CarbonDioxide.relevantPeriod ) starts 48 hours or less before start of Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) and CarbonDioxide.result as Quantity > 50 'mm[Hg]' and Global."NormalizeInterval" ( BloodpH.relevantDatetime, BloodpH.relevantPeriod ) starts 48 hours or less before start of Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) and BloodpH.result as Quantity < 7.30 'mm[Hg]' and ( Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) ) return EncounterWithSurgery
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery with ["Laboratory Test, Performed": "Oxygen Partial Pressure in Arterial Blood"] Oxygen such that Global."NormalizeInterval" ( Oxygen.relevantDatetime, Oxygen.relevantPeriod ) starts 48 hours or less before start of Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) and Oxygen.result as Quantity < 50 'mm[Hg]' and Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) return EncounterWithSurgery
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery where exists ( EncounterWithSurgery.diagnoses Diagnosis where Diagnosis.code in "Acute Respiratory Failure" and Diagnosis.rank = 1 )
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery where exists ( EncounterWithSurgery.diagnoses Diagnosis where Diagnosis.code in "Acute Respiratory Failure" and Diagnosis.rank >= 2 and Diagnosis.presentOnAdmissionIndicator in "Present on Admission or Clinically Undetermined" )
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery with ["Procedure, Performed": "Tracheostomy Procedures"] TracheostomySurgery such that Global."NormalizeInterval" ( TracheostomySurgery.relevantDatetime, TracheostomySurgery.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) and Global."NormalizeInterval" ( TracheostomySurgery.relevantDatetime, TracheostomySurgery.relevantPeriod ) starts before day of Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) and Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery )
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery where exists ( EncounterWithSurgery.diagnoses Dx where Dx.code in "Tracheostomy Diagnoses" and Dx.presentOnAdmissionIndicator in "Present on Admission or Clinically Undetermined" )
"Encounter with Tracheostomy Before Day of First OR Procedure" union "Encounter with Tracheostomy Same Day of First OR Procedure"
"Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery with ["Procedure, Performed": "Tracheostomy Procedures"] TracheostomySurgery such that Global."NormalizeInterval" ( TracheostomySurgery.relevantDatetime, TracheostomySurgery.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) and Global."NormalizeInterval" ( TracheostomySurgery.relevantDatetime, TracheostomySurgery.relevantPeriod ) starts during day of Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) and Global."NormalizeInterval" ( "FirstProcedure"(EncounterWithSurgery).relevantDatetime, "FirstProcedure"(EncounterWithSurgery).relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery )
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Removal of endotracheal tube (procedure)"] GAExtubation, "General Anesthesia and MAC" ProcedureWithAnesthesia let GAExtubationTime: Global."NormalizeInterval" ( GAExtubation.relevantDatetime, GAExtubation.relevantPeriod ), AnesthesiaTime: Global."NormalizeInterval" ( ProcedureWithAnesthesia.relevantDatetime, ProcedureWithAnesthesia.relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) where GAExtubationTime starts during AnesthesiaTime and GAExtubationTime starts during HospitalizationPeriod return GAExtubation
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Removal of endotracheal tube (procedure)"] Extubation, "Noninvasive Oxygen Therapy" OxygenSupport let ExtubationTime: Global."NormalizeInterval" ( Extubation.relevantDatetime, Extubation.relevantPeriod ), AnesthesiaTime: Global."NormalizeInterval" ( "LatestGeneralAnesthesiaOrMAC"(Extubation).relevantDatetime, "LatestGeneralAnesthesiaOrMAC"(Extubation).relevantPeriod ), OxygenTime: Global."NormalizeInterval" ( OxygenSupport.relevantDatetime, OxygenSupport.relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) where ExtubationTime starts during HospitalizationPeriod and ExtubationTime starts after AnesthesiaTime and OxygenTime starts during Interval[end of AnesthesiaTime, start of ExtubationTime] return Extubation
["Procedure, Performed": "Anesthesia Requiring Monitored Care"] MAC union ["Procedure, Performed": "General and Neuraxial Anesthesia"] GA
"Elective Inpatient Encounter with OR Procedure within 3 Days"
from "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery, ["Procedure, Performed": "Intubation"] ProceduralIntubation, "General Anesthesia and MAC" ProcedureWithAnesthesia let IntubationTime: Global."NormalizeInterval" ( ProceduralIntubation.relevantDatetime, ProceduralIntubation.relevantPeriod ), AnesthesiaTime: Global."NormalizeInterval" ( ProcedureWithAnesthesia.relevantDatetime, ProcedureWithAnesthesia.relevantPeriod ), HospitalizationPeriod: Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( EncounterWithSurgery ) where IntubationTime starts during AnesthesiaTime and IntubationTime starts during HospitalizationPeriod return ProceduralIntubation
"Noninvasive Oxygen Therapy Procedure" union "Noninvasive Oxygen Therapy Assessment"
["Assessment, Performed": "Non Invasive Oxygen Therapy"]
["Procedure, Performed": "Non Invasive Oxygen Therapy by Nasal Cannula or Mask"]
"Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure" union "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy" union "Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia" union "Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia"
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, diagnosis: QualifyingEncounter.diagnoses.code, POA: QualifyingEncounter.diagnoses.presentOnAdmissionIndicator }
from ["Assessment, Performed": "American society of anesthesiologists morbidity state"] ASAclass with "Initial Population" QualifyingEncounter such that Global."NormalizeInterval" ( ASAclass.relevantDatetime, ASAclass.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( QualifyingEncounter ) and ASAclass.result is not null and ASAclass.result in "ASA physical status class" return ASAclass.result
from ["Procedure, Performed"] Procedure, "Initial Population" QualifyingEncounter where Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( QualifyingEncounter ) return { encounterId: QualifyingEncounter.id, procedureId: Procedure.id, procedurecode: Procedure.code, procedurerank: Procedure.rank, proceduretime: Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstAlbumin: "FirstAlbumin"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstArterialpH: "FirstArterialpH"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstAST: "FirstAST"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBicarbonate: "FirstBicarbonate"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBilirubin: "FirstBilirubin"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBUN: "FirstBloodUreaNitrogen"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBMI: "FirstBMI"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBodyTemp: "FirstBodyTemperature"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstCarbonDioxide: "FirstCarbonDioxide"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstCreatinine: "FirstCreatinine"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstHeartRate: "FirstHeartRate"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstHematocrit: "FirstHematocrit"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstHemoglobin: "FirstHemoglobin"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstLeukocyte: "FirstLeukocyte"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstOxygen: "FirstOxygen"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstPlatelet: "FirstPlatelet"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstRespiratoryRate: "FirstRespiratoryRate"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstSodium: "FirstSodium"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstSystolic: "FirstSystolicBloodPressure"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstWBCcount: "FirstWhiteBloodCellCount"(QualifyingEncounter) }
from ["Procedure, Performed"] Procedure, "Initial Population" QualifyingEncounter where Procedure.rank = 1 and Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( QualifyingEncounter ) return { encounterId: QualifyingEncounter.id, procedureId: Procedure.id, procedurecode: Procedure.code, procedurerank: Procedure.rank, proceduretime: Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) }
Last(["Assessment, Performed": "Tobacco smoking status"] SmokingStatus with "Initial Population" QualifyingEncounter such that(Global."LatestOf"(SmokingStatus.relevantDatetime, SmokingStatus.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) or Global."LatestOf"(SmokingStatus.relevantDatetime, SmokingStatus.relevantPeriod) before Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) ) and SmokingStatus.result is not null and SmokingStatus.result in "Smoking status" sort by Global."LatestOf"(relevantDatetime, relevantPeriod) ).result
["Patient Characteristic Ethnicity": "Ethnicity"]
["Patient Characteristic Payer": "Payer Type"]
["Patient Characteristic Race": "Race"]
["Patient Characteristic Sex": "ONC Administrative Sex"]
First(["Laboratory Test, Performed": "Albumin lab test"] FirstAlbuminTest where Global."EarliestOf"(FirstAlbuminTest.relevantDatetime, FirstAlbuminTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstAlbuminTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Arterial Blood pH"] FirstArterialpHTest where Global."EarliestOf"(FirstArterialpHTest.relevantDatetime, FirstArterialpHTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstArterialpHTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Aspartate transaminase lab test"] FirstASTTest where Global."EarliestOf"(FirstASTTest.relevantDatetime, FirstASTTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstASTTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Bicarbonate lab test"] FirstBicarbonateTest where Global."EarliestOf"(FirstBicarbonateTest.relevantDatetime, FirstBicarbonateTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstBicarbonateTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Bilirubin lab test"] FirstBilirubinTest where Global."EarliestOf"(FirstBilirubinTest.relevantDatetime, FirstBilirubinTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstBilirubinTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Blood urea nitrogen lab test"] FirstBUN where Global."EarliestOf"(FirstBUN.relevantDatetime, FirstBUN.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstBUN.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Physical Exam, Performed": "Body mass index (BMI) [Ratio]"] FirstBodyMass where Global."EarliestOf"(FirstBodyMass.relevantDatetime, FirstBodyMass.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstBodyMass.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Physical Exam, Performed": "Body temperature"] FirstTemperature where Global."EarliestOf"(FirstTemperature.relevantDatetime, FirstTemperature.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstTemperature.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Carbon Dioxide Partial Pressure in Arterial Blood"] FirstCarbonDioxideTest where Global."EarliestOf"(FirstCarbonDioxideTest.relevantDatetime, FirstCarbonDioxideTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstCarbonDioxideTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Creatinine lab test"] FirstCreatinineTest where Global."EarliestOf"(FirstCreatinineTest.relevantDatetime, FirstCreatinineTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstCreatinineTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Physical Exam, Performed": "Heart rate"] FirstHeartBeats where Global."EarliestOf"(FirstHeartBeats.relevantDatetime, FirstHeartBeats.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstHeartBeats.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Hematocrit lab test"] FirstHematocritTest where Global."EarliestOf"(FirstHematocritTest.relevantDatetime, FirstHematocritTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstHematocritTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Hemoglobin lab test"] FirstHemoglobinTest where Global."EarliestOf"(FirstHemoglobinTest.relevantDatetime, FirstHemoglobinTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstHemoglobinTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Leukocyte count lab test"] FirstLeukocyteCount where Global."EarliestOf"(FirstLeukocyteCount.relevantDatetime, FirstLeukocyteCount.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstLeukocyteCount.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Oxygen Partial Pressure in Arterial Blood"] FirstOxygenTest where Global."EarliestOf"(FirstOxygenTest.relevantDatetime, FirstOxygenTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstOxygenTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Platelet count lab test"] FirstPlateletCount where Global."EarliestOf"(FirstPlateletCount.relevantDatetime, FirstPlateletCount.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstPlateletCount.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First("Anesthesia Procedure List" FirstORProcedure where Global."NormalizeInterval"(FirstORProcedure.relevantDatetime, FirstORProcedure.relevantPeriod) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(Encounter) sort by start of Global."NormalizeInterval"(relevantDatetime, relevantPeriod) )
First(["Physical Exam, Performed": "Respiratory rate"] FirstRespiration where Global."EarliestOf"(FirstRespiration.relevantDatetime, FirstRespiration.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstRespiration.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "Sodium lab test"] FirstSodiumTest where Global."EarliestOf"(FirstSodiumTest.relevantDatetime, FirstSodiumTest.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstSodiumTest.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Physical Exam, Performed": "Systolic blood pressure"] FirstSystolic where Global."EarliestOf"(FirstSystolic.relevantDatetime, FirstSystolic.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstSystolic.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
First(["Laboratory Test, Performed": "White blood cells count lab test"] FirstWBCCount where Global."EarliestOf"(FirstWBCCount.relevantDatetime, FirstWBCCount.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) and FirstWBCCount.result is not null sort by Global."EarliestOf"(relevantDatetime, relevantPeriod) ).result as Quantity
Last("General Anesthesia and MAC" ProcedureList where Global."NormalizeInterval"(ProcedureList.relevantDatetime, ProcedureList.relevantPeriod) ends before start of Global."NormalizeInterval"(Event.relevantDatetime, Event.relevantPeriod) sort by start of Global."NormalizeInterval"(relevantDatetime, relevantPeriod) )
if ( HasStart(period)) then start of period else end of period
Earliest(NormalizeInterval(pointInTime, period))
not ( end of period is null or end of period = maximum DateTime )
not ( start of period is null or start of period = minimum DateTime )
Encounter Visit let ObsVisit: Last(["Encounter, Performed": "Observation Services"] LastObs where LastObs.relevantPeriod ends 1 hour or less on or before start of Visit.relevantPeriod sort by end of relevantPeriod ), VisitStart: Coalesce(start of ObsVisit.relevantPeriod, start of Visit.relevantPeriod), EDVisit: Last(["Encounter, Performed": "Emergency Department Visit"] LastED where LastED.relevantPeriod ends 1 hour or less on or before VisitStart sort by end of relevantPeriod ), VisitStartWithED: Coalesce(start of EDVisit.relevantPeriod, VisitStart), OutpatientSurgeryVisit: Last(["Encounter, Performed": "Outpatient Surgery Service"] LastSurgeryOP where LastSurgeryOP.relevantPeriod ends 1 hour or less on or before VisitStartWithED sort by end of relevantPeriod ) return Interval[Coalesce(start of OutpatientSurgeryVisit.relevantPeriod, VisitStartWithED), end of Visit.relevantPeriod]
if ( HasEnd(period)) then end of period else start of period
Latest(NormalizeInterval(pointInTime, period))
if pointInTime is not null then Interval[pointInTime, pointInTime] else if period is not null then period else null as Interval<DateTime>
["Patient Characteristic Ethnicity": "Ethnicity"]
["Patient Characteristic Payer": "Payer Type"]
["Patient Characteristic Race": "Race"]
["Patient Characteristic Sex": "ONC Administrative Sex"]
from ["Assessment, Performed": "American society of anesthesiologists morbidity state"] ASAclass with "Initial Population" QualifyingEncounter such that Global."NormalizeInterval" ( ASAclass.relevantDatetime, ASAclass.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( QualifyingEncounter ) and ASAclass.result is not null and ASAclass.result in "ASA physical status class" return ASAclass.result
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, diagnosis: QualifyingEncounter.diagnoses.code, POA: QualifyingEncounter.diagnoses.presentOnAdmissionIndicator }
from ["Procedure, Performed"] Procedure, "Initial Population" QualifyingEncounter where Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( QualifyingEncounter ) return { encounterId: QualifyingEncounter.id, procedureId: Procedure.id, procedurecode: Procedure.code, procedurerank: Procedure.rank, proceduretime: Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstAST: "FirstAST"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstAlbumin: "FirstAlbumin"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstArterialpH: "FirstArterialpH"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBMI: "FirstBMI"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBicarbonate: "FirstBicarbonate"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBilirubin: "FirstBilirubin"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBUN: "FirstBloodUreaNitrogen"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstBodyTemp: "FirstBodyTemperature"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstCarbonDioxide: "FirstCarbonDioxide"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstCreatinine: "FirstCreatinine"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstHeartRate: "FirstHeartRate"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstHematocrit: "FirstHematocrit"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstHemoglobin: "FirstHemoglobin"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstLeukocyte: "FirstLeukocyte"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstOxygen: "FirstOxygen"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstPlatelet: "FirstPlatelet"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstRespiratoryRate: "FirstRespiratoryRate"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstSodium: "FirstSodium"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstSystolic: "FirstSystolicBloodPressure"(QualifyingEncounter) }
"Initial Population" QualifyingEncounter return Tuple { encounterId: QualifyingEncounter.id, firstWBCcount: "FirstWhiteBloodCellCount"(QualifyingEncounter) }
from ["Procedure, Performed"] Procedure, "Initial Population" QualifyingEncounter where Procedure.rank = 1 and Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) starts during Global."HospitalizationWithObservationAndOutpatientSurgeryService" ( QualifyingEncounter ) return { encounterId: QualifyingEncounter.id, procedureId: Procedure.id, procedurecode: Procedure.code, procedurerank: Procedure.rank, proceduretime: Global."NormalizeInterval" ( Procedure.relevantDatetime, Procedure.relevantPeriod ) }
Last(["Assessment, Performed": "Tobacco smoking status"] SmokingStatus with "Initial Population" QualifyingEncounter such that(Global."LatestOf"(SmokingStatus.relevantDatetime, SmokingStatus.relevantPeriod) during Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) or Global."LatestOf"(SmokingStatus.relevantDatetime, SmokingStatus.relevantPeriod) before Global."HospitalizationWithObservationAndOutpatientSurgeryService"(QualifyingEncounter) ) and SmokingStatus.result is not null and SmokingStatus.result in "Smoking status" sort by Global."LatestOf"(relevantDatetime, relevantPeriod) ).result
Measure Set |
|
---|