Related Experiment Video
Updated: May 6, 2026

Augmenting Large Language Models via Vector Embeddings to Improve Domain-Specific Responsiveness
Published on: December 6, 2024
Artificial Intelligence Length-of-Stay Forecasting and Pediatric Surgical Capacity
Jay G Berry1,2, Derek Mathieu3, Steven J Staffa4
1Complex Care, Division of General Pediatrics, Boston Children's Hospital, Boston, Massachusetts.
Importance:
Hospitals are increasingly experiencing challenges with variable and unpredictable inpatient loads, including days with excessively high and excessively low capacity for surgical patients. Artificial intelligence has the potential to facilitate postoperative hospital bed management and stabilize capacity.
Objectives:
To predict hospital length of stay (LOS) following elective surgical procedures using machine learning methods, and to implement the LOS prediction model in a perioperative clinical setting and evaluate its ability to optimize elective surgical scheduling and hospital bed capacity.
Design, Setting, And Participants:
This preimplementation and postimplementation cohort study was conducted at a tertiary, freestanding, US children's hospital among patients of any age undergoing an elective surgical procedure requiring inpatient recovery. For LOS prediction, a retrospective analysis was performed on elective surgical cases from January 1, 2018, to March 31, 2022, using Extreme Gradient Boosting (XGBoost) to predict postoperative LOS based on in-training and holdout datasets, with hyperparameter tuning using 5-fold cross-validation. For implementation and evaluation of the LOS prediction model, a preimplementation and postimplementation analysis was performed from July 1, 2022, to April 30, 2024. Data analysis was conducted from June 1 to October 31, 2024.
Exposures:
Patients' type of surgery, chronic conditions, and demographic characteristics.
Main Outcomes And Measures:
Postoperative LOS, day-to-day variance in bedded days for elective surgical procedures, and days with excessively high capacity (>75th percentile of historical elective surgical census) or excessively low capacity (<25th percentile of historical elective surgical census).
Results:
There were 21 352 elective surgical cases (mean [SD] age, 10.2 [7.4] years; 10 804 [50.6%] female) for patients included in the retrospective analysis of postoperative LOS prediction and 12 522 elective surgical cases in the pretest and posttest analysis of the prediction model (premodel implementation, n = 5867; postmodel implementation, n = 6655). The postoperative LOS model had 85.6% accuracy with a 1-night leniency. The model's mean absolute error was 0.6 days. After implementation of the LOS model in elective surgery scheduling and hospital bed capacity management, the median number of elective surgical procedures increased by 5 (IQR, 4.5-5) for each weekday. Variation in postoperative bedded days across days of the week decreased significantly. The magnitude of the IQR of bedded days decreased the most during midweek: 43% and 44% reductions in the IQR occurred on Wednesdays and Thursdays, respectively. The percentage of weekdays with underused capacity (<84 patients) decreased from 33% to 10% (P < .001), without a significant increase in days with excessive capacity.
Conclusions And Relevance:
In this cohort study, use of a machine-learning, postoperative LOS model helped to reduce day-to-day variation in the number of elective surgical procedures performed, increase the total number of elective surgical procedures, and decrease underuse of hospital beds.
Related Concept Videos
Issues And Trends In Healthcare Delivery System
Cost Containment
Payment for healthcare services has historically promoted adoption of costly and often unnecessary or inefficient...
Steps in Outbreak Investigation