2024Lowering Patient Wait Times

BASc Thesis

My undergrad thesis: using machine learning on the MIMIC-IV dataset to predict which medications emergency patients will need, focusing on urinary tract infections and brain trauma injuries.

In the emergency department, conditions like UTIs and brain trauma injuries are hard to plan for. Severity varies a lot and assessment takes time. My thesis asked whether patient vitals (blood pressure, heart rate), acuity scores, and clinical history could predict medication needs before the patient even arrives.

I worked with MIMIC-IV, which has 299,712+ patient records from Beth Israel Deaconess Medical Center. I trained Random Forest and Decision Tree classifiers and used process mining (pm4py) to find patterns in how medications are given and where pre-arrival treatment could be improved.

01

Data Preprocessing & Event Log Construction

Cleaned up MIMIC-IV by removing blank and nonsensical entries, standardizing column names, and making values consistent. I grouped medications by key ingredient so the same drug at different doses counted as one, then reshaped the patient data into event logs for process mining.

02

Feature Engineering & Model Development

Looked at vitals (blood pressure, heart rate), acuity scores, and injury severity, then trained Random Forest and Decision Tree models to predict medication patterns and see how the variables interact. Class weighting helped with how unevenly medications show up.

03

Process Mining & Performance Evaluation

Used pm4py and Graphviz to map out patient care pathways and medication workflows. On held-out test data, Random Forests outperformed Decision Trees on the multi-class task. I also documented the limits from encrypted data and missing patient-specific details, with ideas for collecting better data next time.

Built models to predict medication administration and found that Random Forests beat Decision Trees on the multi-class task.

Cleaned and prepped the data by filtering medications by key ingredient, standardizing drug names, and turning records into event logs that pm4py and Graphviz could visualize.

Ran into real limits from class imbalance and thin patient-specific data, and wrote up recommendations for better data collection and stratified sampling.

MIMIC-IV showed me that clinical prediction is limited by the data you can actually use. Class imbalance and missing patient-level detail mattered as much as picking Random Forests over Decision Trees.