interim_data / README.md
tkbarb10's picture
Upload dataset
681c71e verified
---
dataset_info:
- config_name: cohort_full
features:
- name: subject_id
dtype: int64
- name: ed_stay_id
dtype: int64
- name: hadm_id
dtype: int64
- name: ed_intime
dtype: timestamp[us]
- name: ed_outtime
dtype: timestamp[us]
- name: disposition
dtype: large_string
- name: race
dtype: large_string
- name: arrival_transport
dtype: large_string
- name: first_careunit
dtype: large_string
- name: first_icu_intime
dtype: timestamp[us]
- name: cohort_label
dtype: large_string
- name: gender
dtype: large_string
- name: anchor_age
dtype: int64
- name: anchor_year
dtype: int64
- name: admittime
dtype: timestamp[us]
- name: dischtime
dtype: timestamp[us]
- name: admission_type
dtype: large_string
- name: discharge_location
dtype: large_string
- name: insurance
dtype: large_string
- name: language
dtype: large_string
- name: marital_status
dtype: large_string
- name: ed_stay_id_2
dtype: float64
- name: stay_window_start
dtype: timestamp[us]
- name: stay_window_end
dtype: timestamp[us]
- name: ed_boarding_time_min
dtype: float64
- name: time_steps
dtype: int64
splits:
- name: cohort_base
num_bytes: 108446901
num_examples: 397670
download_size: 25727336
dataset_size: 108446901
- config_name: dispensed_meds
features:
- name: ed_stay_id
dtype: int64
- name: subject_id
dtype: int64
- name: hadm_id
dtype: int64
- name: charttime
dtype: timestamp[us]
- name: medication
dtype: large_string
- name: event_txt
dtype: large_string
- name: in_er
dtype: bool
- name: drug_class
dtype: large_string
- name: action_idx
dtype: int64
- name: minutes_into_stay
dtype: float64
- name: time_step
dtype: int64
splits:
- name: er_and_ward
num_bytes: 311238084
num_examples: 2675531
download_size: 33872234
dataset_size: 311238084
- config_name: ecg_results
features:
- name: ed_stay_id
dtype: int64
- name: subject_id
dtype: int64
- name: hadm_id
dtype: int64
- name: ecg_time
dtype: timestamp[us]
- name: ecg_acuity
dtype: int64
splits:
- name: full_ecg
num_bytes: 6226839
num_examples: 155186
download_size: 4053167
dataset_size: 6226839
- config_name: empty_patient_state
features:
- name: ed_stay_id
dtype: int64
- name: subject_id
dtype: int64
- name: hadm_id
dtype: float64
- name: time_steps
dtype: int64
splits:
- name: empty_patient_state
num_bytes: 1454310797
num_examples: 45270375
download_size: 10265748
dataset_size: 1454310797
- config_name: height
features:
- name: subject_id
dtype: int64
- name: chartdate
dtype: date32
- name: result_name
dtype: large_string
- name: result_value
dtype: float64
splits:
- name: height_full
num_bytes: 22419409
num_examples: 656979
download_size: 3891379
dataset_size: 22419409
- config_name: lab_results
features:
- name: ed_stay_id
dtype: int64
- name: category
dtype: large_string
- name: fluid
dtype: large_string
- name: order_time
dtype: timestamp[us]
- name: subject_id
dtype: int64
- name: hadm_id
dtype: int64
- name: result_time
dtype: timestamp[us]
- name: ordered_location
dtype: large_string
- name: abnormal
dtype: bool
- name: action
dtype: large_string
splits:
- name: labs_full
num_bytes: 269113124
num_examples: 2542661
download_size: 43257327
dataset_size: 269113124
- config_name: medrecon
features:
- name: ed_stay_id
dtype: int64
- name: subject_id
dtype: int64
- name: recon_ace_inhibitor
dtype: uint8
- name: recon_analgesic___nsaid
dtype: uint8
- name: recon_analgesic___opioid_nsaid
dtype: uint8
- name: recon_antiarrhythmic
dtype: uint8
- name: recon_antibiotic
dtype: uint8
- name: recon_anticoagulant
dtype: uint8
- name: recon_anticonvulsant
dtype: uint8
- name: recon_antiemetic
dtype: uint8
- name: recon_antiplatelet
dtype: uint8
- name: recon_antipsychotic
dtype: uint8
- name: recon_benzodiazepine___sedative_anxiolytic
dtype: uint8
- name: recon_beta_blocker
dtype: uint8
- name: recon_bronchodilator
dtype: uint8
- name: recon_calcium_channel_blocker
dtype: uint8
- name: recon_corticosteroid
dtype: uint8
- name: recon_diuretic
dtype: uint8
- name: recon_gi___acid_suppression
dtype: uint8
- name: recon_insulin_glucose
dtype: uint8
- name: recon_nitrate
dtype: uint8
- name: recon_n_total_meds
dtype: int64
- name: recon_n_drug_classes
dtype: int64
splits:
- name: medrecon_full
num_bytes: 15100539
num_examples: 296089
download_size: 4092329
dataset_size: 15100539
- config_name: microbiology
features:
- name: subject_id
dtype: int64
- name: ed_stay_id
dtype: int64
- name: hadm_id
dtype: int64
- name: charttime
dtype: timestamp[us]
- name: storetime
dtype: timestamp[us]
- name: action_space
dtype: large_string
- name: culture_result
dtype: large_string
splits:
- name: microbiology_full
num_bytes: 13591066
num_examples: 185552
download_size: 5278498
dataset_size: 13591066
- config_name: rad_results
features:
- name: ed_stay_id
dtype: int64
- name: subject_id
dtype: int64
- name: hadm_id
dtype: int64
- name: exam_time
dtype: timestamp[us]
- name: rad_acuity_level
dtype: int64
splits:
- name: rad_full
num_bytes: 10801289
num_examples: 269191
download_size: 6246623
dataset_size: 10801289
- config_name: triage_vitals
features:
- name: charttime
dtype: timestamp[us]
- name: ed_stay_id
dtype: int64
- name: subject_id
dtype: int64
- name: current_temperature
dtype: float64
- name: current_heartrate
dtype: float64
- name: current_resprate
dtype: float64
- name: current_o2sat
dtype: float64
- name: current_sbp
dtype: float64
- name: current_dbp
dtype: float64
- name: current_pain
dtype: float64
- name: acuity
dtype: float64
- name: chiefcomplaint
dtype: large_string
- name: source
dtype: large_string
- name: time_since_last_min
dtype: float64
- name: pain_missing
dtype: int64
- name: heartrate_missing
dtype: int64
- name: o2sat_missing
dtype: int64
- name: acuity_missing
dtype: int64
- name: chiefcomplaint_missing
dtype: int64
- name: resprate_missing
dtype: int64
- name: sbp_missing
dtype: int64
- name: dbp_missing
dtype: int64
- name: temperature_missing
dtype: int64
- name: temperature_delta
dtype: float64
- name: heartrate_delta
dtype: float64
- name: resprate_delta
dtype: float64
- name: o2sat_delta
dtype: float64
- name: sbp_delta
dtype: float64
- name: dbp_delta
dtype: float64
- name: pain_delta
dtype: float64
- name: temperature_rate_per_min
dtype: float64
- name: heartrate_rate_per_min
dtype: float64
- name: resprate_rate_per_min
dtype: float64
- name: o2sat_rate_per_min
dtype: float64
- name: sbp_rate_per_min
dtype: float64
- name: dbp_rate_per_min
dtype: float64
- name: current_mean_arterial_pressure
dtype: float64
- name: temperature_rolling1h
dtype: float64
- name: heartrate_rolling1h
dtype: float64
- name: resprate_rolling1h
dtype: float64
- name: o2sat_rolling1h
dtype: float64
- name: sbp_rolling1h
dtype: float64
- name: dbp_rolling1h
dtype: float64
splits:
- name: triage_vitals_full
num_bytes: 661714092
num_examples: 1811202
download_size: 88016187
dataset_size: 661714092
- config_name: weight
features:
- name: subject_id
dtype: int64
- name: chartdate
dtype: date32
- name: result_name
dtype: large_string
- name: result_value
dtype: float64
splits:
- name: weight_full
num_bytes: 56211758
num_examples: 1647231
download_size: 9166863
dataset_size: 56211758
configs:
- config_name: cohort_full
data_files:
- split: cohort_base
path: cohort/cohort_base-*
- config_name: dispensed_meds
data_files:
- split: er_and_ward
path: dispensed_meds/er_and_ward-*
- config_name: ecg_results
data_files:
- split: full_ecg
path: ecg/full_ecg-*
- config_name: empty_patient_state
data_files:
- split: empty_patient_state
path: patient_state/empty_patient_state-*
- config_name: height
data_files:
- split: height_full
path: height_data/height_full-*
- config_name: lab_results
data_files:
- split: labs_full
path: labs/labs_full-*
- config_name: medrecon
data_files:
- split: medrecon_full
path: medrecon_data/medrecon_full-*
- config_name: microbiology
data_files:
- split: microbiology_full
path: microbiology_data/microbiology_full-*
- config_name: rad_results
data_files:
- split: rad_full
path: rad_data/rad_full-*
- config_name: triage_vitals
data_files:
- split: triage_vitals_full
path: triage_vitals_data/triage_vitals_full-*
- config_name: weight
data_files:
- split: weight_full
path: weight_data/weight_full-*
---
# Cohort Data
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:
- AGAINST ADVICE discharge_location records removed — patient-driven departures are out of scope.
- Consecutive ED visits sharing a hadm_id collapsed into single rows; second ed_stay_id stored in `ed_stay_id_2`.
- `stay_window_start`/`stay_window_end` columns added covering ED arrival to final discharge.
- `ed_boarding_time_min` added: minutes in ED after admission decision (null for ED-only patients).
Intended as the primary cohort table for feature engineering and RL state construction.
# Dispensed Meds
Dispensed medication records for all cohort patients across two phases and two populations.
ED phase (`in_er`=True): Pyxis dispenses for all patients (admitted and ED-only) while physically in the ED, derived from `ed.pyxis`.
Ward phase (`in_er`=False): eMAR administration records for admitted patients from ED departure up to ICU transfer, derived from `hosp.emar`.
`event_txt` filtered to administration and rate-change events only.
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)).
# ECG Data
ECG acuity labels derived from `mimiciv_ecg.machine_measurements` for cohort patients. Each of the 18 report columns is classified independently
via regex with priority order: abnormal (2) > neutral (1) > normal (0) > empty (-1).
Row-level max across all 18 columns gives `ecg_acuity`: 0=normal, 1=neutral/unknown, 2=abnormal.
Patients with all 18 columns empty are assigned 1 (missing ECG ≠ normal ECG).
Multiple ECGs per ED stay resolved to one row: highest acuity kept, ties broken by earliest ecg_time.
Window covers ED arrival through hospital ward stay (capped at ICU transfer if applicable), with ±1 hour buffer for ECG machine clock drift.
# Labs Data
Laboratory results from `hosp.labevents` for cohort patients during their stay window.
Grouped by category x fluid (19 unique combinations) rather than individual test label to reduce action space.
Each result includes the abnormal flag for worst-case aggregation. Intended as the primary lab state feature source.
# Medrecon Data
Medication reconciliation records from `ed.medrecon` — medications the patient was taking prior to ED arrival.
One row per medication per ED visit. Represents pre-arrival medication state, not actions taken during the visit.
# Microbiology Data
Microbiology culture events from `hosp.microbiologyevents` for cohort patients during their stay window.
Includes culture order time, specimen type, organism name, and antibiotic sensitivity results.
`culture_ordered` is the real-time state signal; culture_positive is a retrospective label only (~2% of results available before ED discharge).
# OMR Data
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.
Duplicates were dropped. Used to supplement ED and inpatient state features with recent baseline measurements.
# Radiology Data
Radiology report text from `mimiciv_note.radiology` for cohort patients. Covers all imaging modalities (CXR, CT, MRI, ultrasound, etc.).
Primary reports only (note_type=RR). Window covers ED arrival through hospital ward stay (capped at ICU transfer if applicable).
`hadm_id` is NULL for ED-only patients and populated for admitted patients. `exam_name` and `cpt_code` included from radiology_detail to identify
imaging modality.
# Triage_Vitals
Combined triage and vital signs time series — one row per (`ed_stay_id`, `charttime`) timestep.
Triage records (ed.triage) provide the baseline reading at `ed_intime`; subsequent vitals (`ed.vitalsign`) provide follow-up readings.
`stay_id` remapping applied so that vitals from a patient's second consecutive ED visit are attributed to the canonical (first) stay_id.
Rows recorded before `ed_intime` are dropped; records from vitals with `charttime` == `ed_intime` are dropped as duplicates of the triage records.
**Preprocessing**: `pain` column normalized and coerced to numeric, physiologically implausible vital values nulled. Missing indicators created before forward-fill.
Vitals forward-filled within stay, then mean-imputed for any remaining NaN.
**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).
Triage rows get 0 for all delta/rate columns. Final vital columns renamed to current_{col}.