Predicting Postoperative Opioid Use with Machine Learning and Insurance Claims in Opioid-Naïve Patients


Background. The clinical impact of postoperative opioid use requires accurate prediction strategies to identify at-risk patients. We utilize preoperative claims data to predict postoperative opioid refill and new persistent use in opioid-naïve patients.

Methods. A retrospective study was conducted on 112,898 opioid-naïve adult postoperative patients from Optum’s de-identified Clinformatics® Data Mart database. Potential predictors included sociodemographic data, comorbidities, and prescriptions within one year prior to surgery.

Results. Compared to linear models, non-linear models led to modest improvements in predicting refills – area under the receiver operating characteristics curve (AUROC) 0.68 vs. 0.67 (p < 0.05) – and performed identically in predicting new persistent use – AUROC = 0.66. Undergoing major surgery, opioid prescriptions within 30 days prior to surgery, and abdominal pain were useful in predicting refills; back/joint/head pain were the most important features in predicting new persistent use.

Conclusion. Preoperative patient attributes from insurance claims could potentially be useful in guiding prescription practices for opioid-naïve patients.

The American Journal of Surgery