Abstract:Objective To develop a prediction model for in-hospital mortality in elderly patients with community-acquired pneumonia (CAP) and evaluate its predictive efficacy. Methods This was a retrospective study of 576 CAP patients hospitalized in The First Hospital of Harbin Medical University from January 2018 to June 2022 (modeling dataset, internal validation dataset) and 376 elderly CAP patients from January 2015 to December 2017 (external validation dataset). The modelling dataset was divided into 61 cases (10.59%) in the death group and 515 cases (89.41%) in the survival group based on clinical regression during hospitalization. Clinical data of patients were collected online through the electronic medical record system, and independent risk factors for in-hospital mortality in CAP patients were analyzed using multi-factor Logistic regression, and a prediction model was constructed based on the screened parameters. The ROC curve was used to internally validate and externally validate the model's discrimination in predicting CAP in-hospital mortality. Results Univariate analysis showed that, compared with the survival group, the proportions of the death group aged>70 years, diabetes mellitus, hypomagnesaemia and the proportions of platelets, red blood cell volume distribution width (RDW), prothrombin time (PT), activated partial thromboplastin time ( activated partial thromboplastin time (APTT), lactate (LA), CURB-65, and quick sequential organ failure assessment (qSOFA) scores were all elevated, with statistically significant differences (P<0.05). The differences were statistically significant (P<0.05). Multi-factor Logistic regression analysis showed that CURB-65>4, LA>2 mmol/L, RDW>15%, APTT>45 s and hypomagnesemia were independent risk factors for in-hospital death in elderly CAP. A prediction model (CIndex) for the risk of in-hospital death in elderly CAP patients was developed based on multifactorial Logistic regression analysis with CIndex=-1.560+0.389 (hypomagnesaemia)+0.566 (RDW)+0.430 (APTT)+0.509 (LA)+0.861 (CURB-65). the ROC curve showed that the AUC of CIndex for predicting in-hospital death in elderly CAP patients at internal validation was 0.862 (95% CI:0.803-0.921), with a sensitivity of 82.26%, specificity of 78.04% and accuracy of 77.08%; at external validation, the AUC was 0.816 (95% CI:0.754-0.877), with a sensitivity of 85.48%, specificity 66.36% and accuracy 71.28%. Conclusion Increased CURB-65, LA, RDW, APTT and hypomagnesemia are independent risk factors for in-hospital mortality in elderly CAP, and the model developed in this way has high predictive power for the risk of in-hospital mortality in such patients