Predicting length of hospital stay in community-acquired pneumonia using clinical and treatment factors: a retrospective study with restricted cubic spline and piecewise regression analysis.
IF 3.4 3区 医学Q2 PUBLIC, ENVIRONMENTAL & OCCUPATIONAL HEALTH
Hualong Zeng, Chengqing Yang, Min Jiang, Xiaohui Luo, Genxiu Luo, Xianyang Chen, Yige Song, Lei Wang, Xiaojun Zhu, Xiaomin Zheng, Hong Wei, Juewei Pan, Feng Lin
{"title":"Predicting length of hospital stay in community-acquired pneumonia using clinical and treatment factors: a retrospective study with restricted cubic spline and piecewise regression analysis.","authors":"Hualong Zeng, Chengqing Yang, Min Jiang, Xiaohui Luo, Genxiu Luo, Xianyang Chen, Yige Song, Lei Wang, Xiaojun Zhu, Xiaomin Zheng, Hong Wei, Juewei Pan, Feng Lin","doi":"10.3389/fpubh.2026.1768432","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Community-acquired pneumonia (CAP) remains a leading cause of hospitalization worldwide. Accurate prediction of length of stay (LOS) is crucial for optimizing hospital bed turnover, improving clinical resource allocation, and facilitating the development of individualized discharge plans, thereby reducing the strain on healthcare systems.</p><p><strong>Methods: </strong>We retrospectively analyzed 423 adults hospitalized with CAP from January 2022 to December 2023. Clinical characteristics, laboratory data, comorbidities, and treatment variables were extracted from electronic health records. Univariate and multivariable linear regression models were initially employed to identify independent predictors of LOS. The predictive performance of the final multivariable model was assessed using R<sup>2</sup>, adjusted R<sup>2</sup>, Akaike Information Criterion, and 10-fold cross-validation. To further explain the complex relationship between specific treatment factors and LOS, restricted cubic splines and piecewise regression were utilized, specifically to evaluate non-linear associations and identify clinical inflection points.</p><p><strong>Results: </strong>The final model showed strong performance (R<sup>2</sup> = 0.864; adjusted R<sup>2</sup> = 0.862). Independent predictors of prolonged LOS included respiratory failure, pressure ulcers, elevated blood urea nitrogen, antibiotic modification during hospitalization, traditional Chinese medicine use, and antibiotic duration. Restricted cubic spline analysis demonstrated a significant non-linear relationship between antibiotic duration and LOS (<i>P</i> < 0.05). Piecewise regression identified an inflection point at 7.398 days, after which LOS increased more rapidly.</p><p><strong>Conclusions: </strong>Multiple clinical and treatment-related factors were associated with LOS in CAP. Antibiotic duration showed a pronounced non-linear pattern, with treatment beyond 1 week linked to markedly longer hospitalization. These findings may help identify patients at risk of prolonged LOS and support more efficient clinical decision-making.</p>","PeriodicalId":12548,"journal":{"name":"Frontiers in Public Health","volume":"14 ","pages":"1768432"},"PeriodicalIF":3.4000,"publicationDate":"2026-04-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13144054/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Frontiers in Public Health","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.3389/fpubh.2026.1768432","RegionNum":3,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/1/1 0:00:00","PubModel":"eCollection","JCR":"Q2","JCRName":"PUBLIC, ENVIRONMENTAL & OCCUPATIONAL HEALTH","Score":null,"Total":0}
引用次数: 0
Abstract
Background: Community-acquired pneumonia (CAP) remains a leading cause of hospitalization worldwide. Accurate prediction of length of stay (LOS) is crucial for optimizing hospital bed turnover, improving clinical resource allocation, and facilitating the development of individualized discharge plans, thereby reducing the strain on healthcare systems.
Methods: We retrospectively analyzed 423 adults hospitalized with CAP from January 2022 to December 2023. Clinical characteristics, laboratory data, comorbidities, and treatment variables were extracted from electronic health records. Univariate and multivariable linear regression models were initially employed to identify independent predictors of LOS. The predictive performance of the final multivariable model was assessed using R2, adjusted R2, Akaike Information Criterion, and 10-fold cross-validation. To further explain the complex relationship between specific treatment factors and LOS, restricted cubic splines and piecewise regression were utilized, specifically to evaluate non-linear associations and identify clinical inflection points.
Results: The final model showed strong performance (R2 = 0.864; adjusted R2 = 0.862). Independent predictors of prolonged LOS included respiratory failure, pressure ulcers, elevated blood urea nitrogen, antibiotic modification during hospitalization, traditional Chinese medicine use, and antibiotic duration. Restricted cubic spline analysis demonstrated a significant non-linear relationship between antibiotic duration and LOS (P < 0.05). Piecewise regression identified an inflection point at 7.398 days, after which LOS increased more rapidly.
Conclusions: Multiple clinical and treatment-related factors were associated with LOS in CAP. Antibiotic duration showed a pronounced non-linear pattern, with treatment beyond 1 week linked to markedly longer hospitalization. These findings may help identify patients at risk of prolonged LOS and support more efficient clinical decision-making.
期刊介绍:
Frontiers in Public Health is a multidisciplinary open-access journal which publishes rigorously peer-reviewed research and is at the forefront of disseminating and communicating scientific knowledge and impactful discoveries to researchers, academics, clinicians, policy makers and the public worldwide. The journal aims at overcoming current fragmentation in research and publication, promoting consistency in pursuing relevant scientific themes, and supporting finding dissemination and translation into practice.
Frontiers in Public Health is organized into Specialty Sections that cover different areas of research in the field. Please refer to the author guidelines for details on article types and the submission process.