Objective Focusing on gynecological surgery, we constructed a prediction model for surgical duration by extracting features from unstructured surgical planning texts and integrating multimodal data via artificial intelligence technology.
Methods The clinical data of 34614 patients who underwent gynecologic surgeries at West China Second University Hospital, Sichuan University between January 2022 and October 2024 were collected. An embedding-transformer model was constructed to convert surgical planning texts into a one-dimensional numerical feature, referred to as the step feature. The predictive value of the step feature was assessed by comparing the performance improvements of linear regression, random forest, eXtreme Gradient Boosting (XGBoost), support vector regression, K-nearest neighbor regression, and artificial neural network algorithms in two scenarios—with and without the step feature as an input. The out-of-sample prediction accuracy of the models was assessed using mean absolute error (MAE), root mean squared error (RMSE), and R-squared (R2). Furthermore, the model interpretability was examined using SHapley Additive exPlanations (SHAP) values.
Results SHAP results showed that the step feature had the highest predictive contribution. Temporal factors in surgical scheduling also influenced gynecological surgery duration. The XGBoost model demonstrated optimal performance on the test set, significantly improving prediction accuracy with a 40.43% increase in R2, while reducing MAE and RMSE by 21.27% and 20.13%, respectively, compared to the baseline model without the step feature.
Conclusion The embedding-transformer model developed in this study effectively extracts features from surgical planning texts and enhances the predictive performance of machine learning models. The XGBoost prediction model can assist hospital administrators in implementing more refined management of gynecological surgeries and improving the utilization efficiency of surgical resources.