|
1 | 1 | -- THIS SCRIPT IS AUTOMATICALLY GENERATED. DO NOT EDIT IT DIRECTLY. |
2 | 2 | DROP TABLE IF EXISTS mimiciii_derived.lods; CREATE TABLE mimiciii_derived.lods AS |
3 | | -/* ------------------------------------------------------------------ */ /* Title: Logistic Organ Dysfunction Score (LODS) */ /* This query extracts the logistic organ dysfunction system. */ /* This score is a measure of organ failure in a patient. */ /* The score is calculated on the first day of each ICU patients' stay. */ /* ------------------------------------------------------------------ */ /* Reference for LODS: */ /* Le Gall, J. R., Klar, J., Lemeshow, S., Saulnier, F., Alberti, C., Artigas, A., & Teres, D. */ /* The Logistic Organ Dysfunction system: a new way to assess organ dysfunction in the intensive care unit. */ /* JAMA 276.10 (1996): 802-810. */ /* Variables used in LODS: */ /* GCS */ /* VITALS: Heart rate, systolic blood pressure */ /* FLAGS: ventilation/cpap */ /* IO: urine output */ /* LABS: blood urea nitrogen, WBC, bilirubin, creatinine, prothrombin time (PT), platelets */ /* ABG: PaO2 with associated FiO2 */ /* The following views are required to run this query: */ /* 1) urine_output_first_day - generated by urine-output-first-day.sql */ /* 2) ventilation_durations - generated by ventilation_durations.sql */ /* 3) vitals_first_day - generated by vitals-first-day.sql */ /* 4) gcs_first_day - generated by gcs-first-day.sql */ /* 5) labs_first_day - generated by labs-first-day.sql */ /* 5) blood_gas_first_day_arterial - generated by blood-gas-first-day-arterial.sql */ /* Note: */ /* The score is calculated for *all* ICU patients, with the assumption that the user will subselect appropriate ICUSTAY_IDs. */ /* For example, the score is calculated for neonates, but it is likely inappropriate to actually use the score values for these patients. */ /* extract CPAP from the "Oxygen Delivery Device" fields */ |
| 3 | +/* ------------------------------------------------------------------ */ |
| 4 | +/* Title: Logistic Organ Dysfunction Score (LODS) */ |
| 5 | +/* This query extracts the logistic organ dysfunction system. */ |
| 6 | +/* This score is a measure of organ failure in a patient. */ |
| 7 | +/* The score is calculated on the first day of each ICU patients' stay. */ |
| 8 | +/* ------------------------------------------------------------------ */ |
| 9 | +/* Reference for LODS: */ |
| 10 | +/* Le Gall, J. R., Klar, J., Lemeshow, S., Saulnier, F., Alberti, C., Artigas, A., & Teres, D. */ |
| 11 | +/* The Logistic Organ Dysfunction system: a new way to assess organ dysfunction in the intensive care unit. */ |
| 12 | +/* JAMA 276.10 (1996): 802-810. */ |
| 13 | +/* Variables used in LODS: */ |
| 14 | +/* GCS */ |
| 15 | +/* VITALS: Heart rate, systolic blood pressure */ |
| 16 | +/* FLAGS: ventilation/cpap */ |
| 17 | +/* IO: urine output */ |
| 18 | +/* LABS: blood urea nitrogen, WBC, bilirubin, creatinine, prothrombin time (PT), platelets */ |
| 19 | +/* ABG: PaO2 with associated FiO2 */ |
| 20 | +/* The following views are required to run this query: */ |
| 21 | +/* 1) urine_output_first_day - generated by urine-output-first-day.sql */ |
| 22 | +/* 2) ventilation_durations - generated by ventilation_durations.sql */ |
| 23 | +/* 3) vitals_first_day - generated by vitals-first-day.sql */ |
| 24 | +/* 4) gcs_first_day - generated by gcs-first-day.sql */ |
| 25 | +/* 5) labs_first_day - generated by labs-first-day.sql */ |
| 26 | +/* 5) blood_gas_first_day_arterial - generated by blood-gas-first-day-arterial.sql */ |
| 27 | +/* Note: */ |
| 28 | +/* The score is calculated for *all* ICU patients, with the assumption that the user will subselect appropriate ICUSTAY_IDs. */ |
| 29 | +/* For example, the score is calculated for neonates, but it is likely inappropriate to actually use the score values for these patients. */ |
| 30 | +/* extract CPAP from the "Oxygen Delivery Device" fields */ |
4 | 31 | WITH cpap AS ( |
5 | 32 | SELECT |
6 | 33 | ie.icustay_id, |
@@ -34,7 +61,8 @@ WITH cpap AS ( |
34 | 61 | GROUP BY |
35 | 62 | ie.icustay_id |
36 | 63 | ), pafi1 AS ( |
37 | | - /* join blood gas to ventilation durations to determine if patient was vent */ /* also join to cpap table for the same purpose */ |
| 64 | + /* join blood gas to ventilation durations to determine if patient was vent */ |
| 65 | + /* also join to cpap table for the same purpose */ |
38 | 66 | SELECT |
39 | 67 | bg.icustay_id, |
40 | 68 | bg.charttime, |
@@ -154,8 +182,6 @@ WITH cpap AS ( |
154 | 182 | THEN 1 |
155 | 183 | WHEN bun_max >= 17.0 |
156 | 184 | THEN 1 |
157 | | - WHEN bun_max >= 7.50 |
158 | | - THEN 1 |
159 | 185 | ELSE 0 |
160 | 186 | END AS renal, /* pulmonary */ |
161 | 187 | CASE |
|
0 commit comments