Development and Internal Validation of a Machine Learning Model for Predicting Long‐Term Opioid Therapy After Hip Fracture Surgery in Older, Opioid‐Naïve Adults

BACKGROUND: Long-term opioid therapy (LTOT) after hip fracture surgery is a common postoperative complication associated with adverse outcomes, yet tools to identify at-risk patients among opioid-naïve older adults are lacking. This study aimed to develop and internally validate a parsimonious model to predict LTOT following hip fracture surgery. METHODS: Using Danish nationwide registries, we identified 26,057 opioid-naïve patients (≥ 65 years) undergoing hip fracture surgery (2010-2020) and analysed 29 predictors, covering demographics, comorbidities, medication, lifestyle, socioeconomics and surgical factors. LTOT was defined as redeeming ≥ 2 prescriptions between 31 and 365 days of surgery. Models were developed using four machine learning methods: logistic regression, backwards elimination, elastic net penalised logistic regression and random forest. Model performance was assessed using area under the receiver operating characteristic curve (AUC), calibration slope, intercept, Brier score and decision curve analysis. RESULTS: LTOT was identified in 8095 (31.1%) patients. The backward elimination algorithm identified the best performing model, selecting 8 of 29 predictors and achieving an AUC of 0.68, calibration slope of 0.99, intercept of 0.02 and Brier score of 0.20. Predictors included age, marital status, preoperative non-opioid pain medication, preoperative novel oral anticoagulants, fracture type, surgery delay, length of hospital stay and postoperative cumulated ambulation score at discharge. CONCLUSIONS: A prediction model was developed and validated for use at discharge to identify patients at risk of LTOT 1 year after hip fracture. The model may support risk stratification at discharge, but requires external validation and evaluation of clinical implementation before routine use. SIGNIFICANCE STATEMENT: This study presents the first internally validated prediction model for long-term opioid use in opioid-naïve older adults after hip fracture surgery. The model functions as a simple and interpretable risk stratification tool at discharge and has been incorporated in a freely available risk calculator. It addresses the lack of clinically applicable risk stratification tools in this frail population and highlights opportunities for more targeted postoperative pain management, although feasibility testing is required before clinical implementation.

Authors

Institutions

Publication Details

Journal
European Journal of Pain
Published
2026-04-26
DOI
https://doi.org/10.1002/ejp.70280
Primary Topic
Opioid Use Disorder Treatment
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Development and Internal Validation of a Machine Learning Model for Predicting Long‐Term Opioid Therapy After Hip Fracture Surgery in Older, Opioid‐Naïve Adults

Alma B Pedersen, Katie Jane Sheehan, Jensen, Yasmina Maria Tudorache et al.
European Journal of Pain
Opioid Use Disorder Treatment
article

Development and Internal Validation of a Machine Learning Model for Predicting Long‐Term Opioid Therapy After Hip Fracture Surgery in Older, Opioid‐Naïve Adults

Alma B Pedersen, Katie Jane Sheehan, Jensen, Yasmina Maria Tudorache, Jan‐Erik Gjertsen
article en

Abstract

BACKGROUND: Long-term opioid therapy (LTOT) after hip fracture surgery is a common postoperative complication associated with adverse outcomes, yet tools to identify at-risk patients among opioid-naïve older adults are lacking. This study aimed to develop and internally validate a parsimonious model to predict LTOT following hip fracture surgery. METHODS: Using Danish nationwide registries, we identified 26,057 opioid-naïve patients (≥ 65 years) undergoing hip fracture surgery (2010-2020) and analysed 29 predictors, covering demographics, comorbidities, medication, lifestyle, socioeconomics and surgical factors. LTOT was defined as redeeming ≥ 2 prescriptions between 31 and 365 days of surgery. Models were developed using four machine learning methods: logistic regression, backwards elimination, elastic net penalised logistic regression and random forest. Model performance was assessed using area under the receiver operating characteristic curve (AUC), calibration slope, intercept, Brier score and decision curve analysis. RESULTS: LTOT was identified in 8095 (31.1%) patients. The backward elimination algorithm identified the best performing model, selecting 8 of 29 predictors and achieving an AUC of 0.68, calibration slope of 0.99, intercept of 0.02 and Brier score of 0.20. Predictors included age, marital status, preoperative non-opioid pain medication, preoperative novel oral anticoagulants, fracture type, surgery delay, length of hospital stay and postoperative cumulated ambulation score at discharge. CONCLUSIONS: A prediction model was developed and validated for use at discharge to identify patients at risk of LTOT 1 year after hip fracture. The model may support risk stratification at discharge, but requires external validation and evaluation of clinical implementation before routine use. SIGNIFICANCE STATEMENT: This study presents the first internally validated prediction model for long-term opioid use in opioid-naïve older adults after hip fracture surgery. The model functions as a simple and interpretable risk stratification tool at discharge and has been incorporated in a freely available risk calculator. It addresses the lack of clinically applicable risk stratification tools in this frail population and highlights opportunities for more targeted postoperative pain management, although feasibility testing is required before clinical implementation.

European Journal of PainVol. 30(5)
Queen Mary University of London (GB), Aarhus University (DK), Haukeland University Hospital (NO), Aarhus University Hospital (DK), University of Bergen (NO)
Openalex Percentile: Top 13%
Opioid Use Disorder Treatment
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.