Abstract Objectives Gallstone pancreatitis (GSP) is a leading cause of acute pancreatitis. Rising gallstone prevalence and surgical demand have lengthened waiting lists where patients remain at risk of recurrent attacks and significant morbidity, and mortality. Prioritisation is challenging, balancing urgency against waiting time. The primary objective of this study was to apply predictive analysis and machine-learning to identify patients at highest risk of early recurrence, enabling prioritisation for surgery. The secondary objective was to develop a scoring system to support surgical scheduling. Methods In collaboration with a Master’s project in Machine-learning at Cardiff University, a risk stratification model was developed using a cohort of 300 patients admitted with GSP to the Grange University Hospital, Newport between 01/01/2020–01/01/2024. Key demographics, biochemical, imaging, and intervention data were collected and incorporated into three modelling strategies: logistic regression, random forest, and XGBoost. Model performance was assessed using the area under the receiver operating characteristic curve (AUC). Results Logistic regression achieved the lowest AUC (0.49), while XGBoost performed best (0.64), demonstrating superior ability to rank high risk of recurrence. The strongest predictors of recurrence were elevated CRP (79), WCC (13.1), amylase (1044), and ALT (600). Moderate predictors included BMI, advancing age, raised urea, and raised bilirubin, while stone number and size were weak predictors. Conclusions Although XGBoost only achieved a modest predictive ability, reflecting limitations of a small dataset, this study demonstrates the potential of machine learning for risk stratification in GSP. Larger multicentre datasets are required to improve accuracy and develop clinically useful prioritisation tools.
Warrell et al. (Sun,) studied this question.