Related Experiment Video
Updated: Jun 27, 2025

An Experimental Paradigm for the Prediction of Post-Operative Pain PPOP
Published on: January 27, 2010
Predicting Postoperative Pain and Opioid Use with Machine Learning Applied to Longitudinal Electronic Health Record
Nidhi Soley1,2, Traci J Speed3, Anping Xie4,5
1Institute for Computational Medicine, Whiting School of Engineering, Johns Hopkins University, Baltimore, Maryland, United States.
Background:
Managing acute postoperative pain and minimizing chronic opioid use are crucial for patient recovery and long-term well-being.
Objectives:
This study explored using preoperative electronic health record (EHR) and wearable device data for machine-learning models that predict postoperative acute pain and chronic opioid use.
Methods:
The study cohort consisted of approximately 347 All of Us Research Program participants who underwent one of eight surgical procedures and shared EHR and wearable device data. We developed four machine learning models and used the Shapley additive explanations (SHAP) technique to identify the most relevant predictors of acute pain and chronic opioid use.
Results:
The stacking ensemble model achieved the highest accuracy in predicting acute pain (0.68) and chronic opioid use (0.89). The area under the curve score for severe pain versus other pain was highest (0.88) when predicting acute postoperative pain. Values of logistic regression, random forest, extreme gradient boosting, and stacking ensemble ranged from 0.74 to 0.90 when predicting postoperative chronic opioid use. Variables from wearable devices played a prominent role in predicting both outcomes.
Conclusion:
SHAP detection of individual risk factors for severe pain can help health care providers tailor pain management plans. Accurate prediction of postoperative chronic opioid use before surgery can help mitigate the risk for the outcomes we studied. Prediction can also reduce the chances of opioid overuse and dependence. Such mitigation can promote safer and more effective pain control for patients during their recovery.
More Related Videos
09:38Determining Pain Detection and Tolerance Thresholds Using an Integrated, Multi-Modal Pain Task Battery
Published on: April 14, 2016
04:09Predicting Treatment Response to Image-Guided Therapies Using Machine Learning: An Example for Trans-Arterial Treatment of Hepatocellular Carcinoma
Published on: October 10, 2018
Related Concept Videos
Analgesia and Pain Management
Opioid Analgesics: Synthetic and Semisynthetic Opioids