Update README.md
Browse files
README.md
CHANGED
|
@@ -360,3 +360,84 @@ configs:
|
|
| 360 |
- split: weight_full
|
| 361 |
path: weight_data/weight_full-*
|
| 362 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
- split: weight_full
|
| 361 |
path: weight_data/weight_full-*
|
| 362 |
---
|
| 363 |
+
|
| 364 |
+
# Cohort Data
|
| 365 |
+
|
| 366 |
+
Processed ED patient cohort derived from MIMIC-IV. One row per ED visit (`ed_stay_id`). Built from cohort_base (BigQuery) with the following post-processing steps:
|
| 367 |
+
|
| 368 |
+
- AGAINST ADVICE discharge_location records removed — patient-driven departures are out of scope.
|
| 369 |
+
- Consecutive ED visits sharing a hadm_id collapsed into single rows; second ed_stay_id stored in `ed_stay_id_2`.
|
| 370 |
+
- `stay_window_start`/`stay_window_end` columns added covering ED arrival to final discharge.
|
| 371 |
+
- `ed_boarding_time_min` added: minutes in ED after admission decision (null for ED-only patients).
|
| 372 |
+
|
| 373 |
+
Intended as the primary cohort table for feature engineering and RL state construction.
|
| 374 |
+
|
| 375 |
+
# Dispensed Meds
|
| 376 |
+
|
| 377 |
+
Dispensed medication records for all cohort patients across two phases and two populations.
|
| 378 |
+
|
| 379 |
+
ED phase (`in_er`=True): Pyxis dispenses for all patients (admitted and ED-only) while physically in the ED, derived from `ed.pyxis`.
|
| 380 |
+
Ward phase (`in_er`=False): eMAR administration records for admitted patients from ED departure up to ICU transfer, derived from `hosp.emar`.
|
| 381 |
+
|
| 382 |
+
`event_txt` filtered to administration and rate-change events only.
|
| 383 |
+
|
| 384 |
+
Medication names mapped to a 22-class drug vocabulary via regex. Each record includes `minutes_into_stay` (time since ED arrival) and time_step bucket (floor(minutes / time_block)).
|
| 385 |
+
|
| 386 |
+
# ECG Data
|
| 387 |
+
|
| 388 |
+
ECG acuity labels derived from `mimiciv_ecg.machine_measurements` for cohort patients. Each of the 18 report columns is classified independently
|
| 389 |
+
via regex with priority order: abnormal (2) > neutral (1) > normal (0) > empty (-1).
|
| 390 |
+
|
| 391 |
+
Row-level max across all 18 columns gives `ecg_acuity`: 0=normal, 1=neutral/unknown, 2=abnormal.
|
| 392 |
+
|
| 393 |
+
Patients with all 18 columns empty are assigned 1 (missing ECG ≠ normal ECG).
|
| 394 |
+
|
| 395 |
+
Multiple ECGs per ED stay resolved to one row: highest acuity kept, ties broken by earliest ecg_time.
|
| 396 |
+
|
| 397 |
+
Window covers ED arrival through hospital ward stay (capped at ICU transfer if applicable), with ±1 hour buffer for ECG machine clock drift.
|
| 398 |
+
|
| 399 |
+
# Labs Data
|
| 400 |
+
|
| 401 |
+
Laboratory results from `hosp.labevents` for cohort patients during their stay window.
|
| 402 |
+
|
| 403 |
+
Grouped by category x fluid (19 unique combinations) rather than individual test label to reduce action space.
|
| 404 |
+
|
| 405 |
+
Each result includes the abnormal flag for worst-case aggregation. Intended as the primary lab state feature source.
|
| 406 |
+
|
| 407 |
+
# Medrecon Data
|
| 408 |
+
|
| 409 |
+
Medication reconciliation records from `ed.medrecon` — medications the patient was taking prior to ED arrival.
|
| 410 |
+
One row per medication per ED visit. Represents pre-arrival medication state, not actions taken during the visit.
|
| 411 |
+
|
| 412 |
+
# Microbiology Data
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
Microbiology culture events from `hosp.microbiologyevents` for cohort patients during their stay window.
|
| 416 |
+
Includes culture order time, specimen type, organism name, and antibiotic sensitivity results.
|
| 417 |
+
|
| 418 |
+
`culture_ordered` is the real-time state signal; culture_positive is a retrospective label only (~2% of results available before ED discharge).
|
| 419 |
+
|
| 420 |
+
# OMR Data
|
| 421 |
+
|
| 422 |
+
Height and weight measurement records from `hosp.omr` for cohort patients — separated to take single measurements of height as an average of all available height measurements for a patient and retaining all separate weight measurements.
|
| 423 |
+
Duplicates were dropped. Used to supplement ED and inpatient state features with recent baseline measurements.
|
| 424 |
+
|
| 425 |
+
# Radiology Data
|
| 426 |
+
|
| 427 |
+
Radiology report text from `mimiciv_note.radiology` for cohort patients. Covers all imaging modalities (CXR, CT, MRI, ultrasound, etc.).
|
| 428 |
+
Primary reports only (note_type=RR). Window covers ED arrival through hospital ward stay (capped at ICU transfer if applicable).
|
| 429 |
+
`hadm_id` is NULL for ED-only patients and populated for admitted patients. `exam_name` and `cpt_code` included from radiology_detail to identify
|
| 430 |
+
imaging modality.
|
| 431 |
+
|
| 432 |
+
# Triage_Vitals
|
| 433 |
+
|
| 434 |
+
Combined triage and vital signs time series — one row per (`ed_stay_id`, `charttime`) timestep.
|
| 435 |
+
Triage records (ed.triage) provide the baseline reading at `ed_intime`; subsequent vitals (`ed.vitalsign`) provide follow-up readings.
|
| 436 |
+
`stay_id` remapping applied so that vitals from a patient's second consecutive ED visit are attributed to the canonical (first) stay_id.
|
| 437 |
+
Rows recorded before `ed_intime` are dropped; records from vitals with `charttime` == `ed_intime` are dropped as duplicates of the triage records.
|
| 438 |
+
|
| 439 |
+
**Preprocessing**: `pain` column normalized and coerced to numeric, physiologically implausible vital values nulled. Missing indicators created before forward-fill.
|
| 440 |
+
Vitals forward-filled within stay, then mean-imputed for any remaining NaN.
|
| 441 |
+
|
| 442 |
+
**Feature engineering**: `time_since_last_min`, per-column deltas and rates of change (units/min), 1-hour rolling averages, mean arterial pressure (dbp + (sbp - dbp) / 3).
|
| 443 |
+
Triage rows get 0 for all delta/rate columns. Final vital columns renamed to current_{col}.
|