Machine learning models incorporating somatic and mental comorbidities for prolonged length-of-stay prediction in a maximum care university hospital

Knowledge about the influencing factors on hospital in-patient length-of-stay is integral for optimizing care and resource planning. Many existing studies on prolonged length-of-stay prediction choose a single threshold for the number of days that classifies the length-of-stay as prolonged. The analyses are based on either very heterogeneous or specific cohorts. Most studies take somatic comorbidities into account, while only a few incorporate mental comorbidities. (I) After which timeframe does the number of days of inpatient treatment indicate a prolonged length-of-stay if the threshold for outliers is computed department-wise in a maximum care internal medicine university hospital? (II) How accurately can machine learning models predict prolonged length-of-stay in internal medicine patients? (III) Which mental and somatic comorbidities have the strongest influence on length-of-stay prediction? N = 28,536 internal medicine cases treated as inpatients at the German University Hospital in Heidelberg in the years 2017 to 2019 comprised the study population. For each of six internal medicine departments, the threshold for prolonged length-of-stay was computed based on median absolute deviation. Department-wise machine learning models for prolonged length-of-stay classification (Random Forest, XGBoost, LightGBM, Logistic Regression) were built on 80% train data employing cross-validation and the Optuna framework for hyperparameter optimization. Model performance was assessed on 20% test data mainly by Area under the Receiver Operator Curve (AUROC). The models incorporated features derived from demographics and mental as well as somatic comorbidities. Length-of-stay was classified as prolonged if the number of days at the hospital equaled or exceeded 9 (Cardiology), 10 (General and Psychosomatics, Gastroenterology, Medical Oncology), 11 (Endocrinology) or 26 (Hematology). With AUROC = 0.89 the random forest for the Department of Hematology had the highest predictive power, the random forest for the Department of General and Psychosomatic with AUROC = 0.72 the lowest. The variables with strongest influence on prediction comprised the number of somatic comorbidities, the age at diagnosis, mental and somatic comorbidity subgroups. Among the mental comorbidities, stress-related adjustment disorder was the most prominent factor. Consideration of department-level factors is recommended for prolonged length-of-stay prediction models. Mental as well as somatic comorbidities were among the most relevant factors for the prediction of prolonged length-of-stay and require adequate treatment and reimbursement opportunities.

Authors

Institutions

Publication Details

Journal
BMC Medical Informatics and Decision Making
Published
2025-11-26
DOI
https://doi.org/10.1186/s12911-025-03290-3
Primary Topic
Sepsis Diagnosis and Treatment
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Machine learning models incorporating somatic and mental comorbidities for prolonged length-of-stay prediction in a maximum care university hospital

Dirk Jäger, Norbert Frey, Sophia Stahl-Toyota, Patrick Michl et al.
BMC Medical Informatics and Decision Making
Sepsis Diagnosis and Treatment
article

Machine learning models incorporating somatic and mental comorbidities for prolonged length-of-stay prediction in a maximum care university hospital

Dirk Jäger, Norbert Frey, Sophia Stahl-Toyota, Patrick Michl, Carsten Müller‐Tidow, Julia Szendrödi, Christoph Nikendei, Inga Unger, Ede Nagy, Ivo Rollmann, Hans‐Christoph Friederich, Achim Hochlehnert
article en

Abstract

Knowledge about the influencing factors on hospital in-patient length-of-stay is integral for optimizing care and resource planning. Many existing studies on prolonged length-of-stay prediction choose a single threshold for the number of days that classifies the length-of-stay as prolonged. The analyses are based on either very heterogeneous or specific cohorts. Most studies take somatic comorbidities into account, while only a few incorporate mental comorbidities. (I) After which timeframe does the number of days of inpatient treatment indicate a prolonged length-of-stay if the threshold for outliers is computed department-wise in a maximum care internal medicine university hospital? (II) How accurately can machine learning models predict prolonged length-of-stay in internal medicine patients? (III) Which mental and somatic comorbidities have the strongest influence on length-of-stay prediction? N = 28,536 internal medicine cases treated as inpatients at the German University Hospital in Heidelberg in the years 2017 to 2019 comprised the study population. For each of six internal medicine departments, the threshold for prolonged length-of-stay was computed based on median absolute deviation. Department-wise machine learning models for prolonged length-of-stay classification (Random Forest, XGBoost, LightGBM, Logistic Regression) were built on 80% train data employing cross-validation and the Optuna framework for hyperparameter optimization. Model performance was assessed on 20% test data mainly by Area under the Receiver Operator Curve (AUROC). The models incorporated features derived from demographics and mental as well as somatic comorbidities. Length-of-stay was classified as prolonged if the number of days at the hospital equaled or exceeded 9 (Cardiology), 10 (General and Psychosomatics, Gastroenterology, Medical Oncology), 11 (Endocrinology) or 26 (Hematology). With AUROC = 0.89 the random forest for the Department of Hematology had the highest predictive power, the random forest for the Department of General and Psychosomatic with AUROC = 0.72 the lowest. The variables with strongest influence on prediction comprised the number of somatic comorbidities, the age at diagnosis, mental and somatic comorbidity subgroups. Among the mental comorbidities, stress-related adjustment disorder was the most prominent factor. Consideration of department-level factors is recommended for prolonged length-of-stay prediction models. Mental as well as somatic comorbidities were among the most relevant factors for the prediction of prolonged length-of-stay and require adequate treatment and reimbursement opportunities.

BMC Medical Informatics and Decision MakingVol. 25(1)
Heidelberg University (DE), University Hospital Heidelberg (DE), National Center for Tumor Diseases (DE)
Openalex Percentile: Top 52%
Sepsis Diagnosis and 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.