Prediction of Sepsis after Endourologic Kidney Stone Surgery: A Machine Learning Approach.
Academic Article
Overview
abstract
Introduction: Sepsis secondary to urinary tract infection after kidney stone surgery is associated with considerable morbidity. Limited research examines the use of hemoglobin A1c (HbA1c) to predict postoperative sepsis after endourologic procedures. We developed a machine learning (ML) model trained on demographic and clinical data to predict postoperative sepsis and better identify patients requiring preoperative optimization. Methods: Patients undergoing ureteroscopy, shockwave lithotripsy, or percutaneous nephrolithotomy at a tertiary care center were identified. Postoperative sepsis was defined as Systemic Inflammatory Response Syndrome (SIRS) scores ≥2. Five supervised ML models were developed: elastic-net penalized logistic regression, random forest, neural network, support vector machine, and naïve Bayes. The dataset was partitioned into training (80%) and testing (20%) sets; fivefold cross-validation was employed. Models were assessed for accuracy, discrimination via area under the receiver operating characteristic curve (AUCROC), calibration, and Brier score on the hold-out test set. Results: A total of 382 patients with complete data from a total cohort of 2,938 patients undergoing stone surgery from 2020 to 2023 were included with a mean age of 59.9 years (standard deviation [SD] ±14.9). Mean HbA1c was 6.34% (SD ±1.39). 15.2% (58/382) of patients in the study group developed postoperative sepsis, however the overall sepsis rate was 3.1% in the total cohort. Random forest modeling achieved the best performance in the hold-out test set with 91% accuracy, 0.88 AUCROC, calibration slope of 1.26, calibration intercept of -0.21, and Brier score of 0.09. The five most important urosepsis predictors, in descending order, were preoperative hemoglobin, HbA1c, stone size, length of surgery, and body mass index. The random forest model may be accessed at https://urol.shinyapps.io/sepsis_predict/. Conclusions: A random forest model performed well in predicting sepsis after kidney stone surgery. Our model may help guide preoperative surgical optimization and planning as well as postoperative monitoring, pending further validation.