Postoperative delirium prediction using machine learning models and preoperative electronic health record data

Andrew Bishara, Catherine Chiu, Elizabeth L. Whitlock, Vanja C. Douglas, Sei Lee, Atul J. Butte, Jacqueline M. Leung, Anne L. DonovanBMC 2022

Abstract

Using pragmatically collected EHR data, two ML models predicted POD in a broad perioperative population with high discrimination. Optimal application of the models would provide automated, real-time delirium risk stratification to improve perioperative management of surgical patients at risk for POD.

Introduction

Postoperative delirium (POD) is a state of acute confusion and disorientation following surgery that primarily affects older adults. It is associated with significant adverse outcomes, including prolonged hospital stays, permanent cognitive decline, and increased mortality. While many instances of POD are preventable through targeted interventions such as geriatric consultations or specialized nursing protocols, these resources are often limited. Effective risk stratification is therefore essential to identify patients who would benefit most from these interventions. Traditional risk assessment tools often rely on manual input or a limited set of variables, potentially overlooking the complex, non-linear interactions within a patient's medical history.

Methods and Data

This study involved a retrospective analysis of surgical encounters within the University of California, San Francisco (UCSF) health system between 2016 and 2019. The researchers aimed to develop and validate predictive models using "pragmatically collected" data—information already present in the electronic health record (EHR) before surgery, such as demographics, comorbidities, nursing assessments, and surgery type.

Flowchart of the study population selection process, showing the exclusion criteria and the final cohort of 24,885 cases.

The final cohort consisted of 24,885 adult patients undergoing procedures requiring anesthesia with at least an overnight stay. POD was defined by a positive score on the Nursing Delirium Screening Scale (NuDESC) or the Confusion Assessment Method for the Intensive Care Unit (CAM-ICU) within seven days post-surgery.

Several models were evaluated:

  • Machine Learning Models: An Artificial Neural Network (ANN) and an XGBoost (gradient boosting) model using 115 preoperative features.
  • Benchmarks: A clinician-guided Logistic Regression (20 variables from literature), an ML-Hybrid Regression (top 20 variables selected by XGBoost), and the validated AWOL-S clinical tool.

Results

Delirium occurred in 5.3% of the study population. The machine learning models demonstrated superior performance compared to traditional methods:

  • Discrimination: XGBoost achieved the highest discrimination with an AUC-ROC of 0.851, followed by the Neural Network at 0.841. Both significantly outperformed the clinician-guided model (AUC 0.763) and the AWOL-S tool (AUC 0.762).
  • Clinical Utility: At its optimal threshold, the XGBoost model provided a sensitivity of 80.6% and a specificity of 73.7%.
  • Calibration: The ML models showed excellent calibration, meaning the predicted risk closely matched the observed incidence, whereas traditional models tended to overestimate risk in high-risk categories.
  • Feature Importance: The "ML-Hybrid" model outperformed the clinician-guided model, suggesting that machine learning is more effective at identifying relevant predictors within specific hospital data than human experts relying on generalized literature. SHAP value analysis also identified unexpected protective factors, such as private insurance and self-reported alcohol use, which may serve as proxies for socioeconomic status or baseline functional health.

Discussion and Conclusion

The superior performance of XGBoost and Neural Networks indicates that POD risk is driven by higher-order interactions between variables that linear models fail to capture. By leveraging existing EHR data, these models offer a scalable, automated solution for real-time risk stratification.

Limitations include potential single-center bias and reliance on nursing screening tools rather than gold-standard psychiatric evaluations. Future work will focus on the real-time integration of these models into clinical workflows, allowing for automated risk scores to trigger preventive care as soon as a surgery is scheduled.

Summary updated

BibTeX
@inproceedings{bishara2022postoperative,
  author = {Andrew Bishara and Catherine Chiu and Elizabeth L. Whitlock and Vanja C. Douglas and Sei Lee and Atul J. Butte and Jacqueline M. Leung and Anne L. Donovan},
  title = {{Postoperative delirium prediction using machine learning models and preoperative electronic health record data}},
  booktitle = {BMC},
  year = {2022},
  doi = {10.1186/s12871-021-01543-y},
}
Figure