Data source and study population
This cohort retrospectively extracted data of patients with diabetes hospitalized with heart failure from the electronic medical record (EMR)-based multicenter database of diabetes, namely West China Electronic medical record Collaboration Of DiabEtes (WECODe) . WECODe captures longitudinal EMR data of patients with diabetes in both inpatient and outpatient settings from several tertiary hospitals in Sichuan Province, China, since January 2011 (Additional file 1: Appendix S1). The criteria for identifying people with diabetes in inpatient and outpatient settings from EMR were summarized in our previous paper, separately [17, 18]. WECODe links de-identified data from eight sources of EMR, demographic records, medical and discharge summaries, prescription records, surgery records, laboratory records, vital sign records, glucose monitoring records, and diagnosis records. The Big Data Platform at West China Hospital of Sichuan University (WCH-BDP) facilitates data storage and analysis .
Eligible adults with type 2 diabetes recorded in WECODe: (1) were discharged between January 1, 2011, and June 30, 2019; (2) had a diagnosis of “New York Heart Association (NYHA) class II, III, or IV” in the free text according to discharge diagnosis records; (3) stayed in hospital more than 2 days; and (4) had available records on diagnosis at discharge, prescription, blood glucose, and glycated hemoglobin A1c (HbA1c). Accounting for some data not missing at random, individuals were excluded if any of their key characteristics at admission were not available (serum creatinine, serum alanine aminotransferase [ALT], blood glucose, HbA1c, hemoglobin, low-density lipoprotein [LDL-c], N-terminal pro-B-type natriuretic peptide [NT-proBNP], and systolic blood pressure [BP]). Individuals were excluded if they had been admitted to, transferred to, or discharged from surgical departments.
If a patient was admitted to the hospital due to heart failure more than once, only the last record of hospitalization was assessed. The index date of each patient was the date of hospital admission. The observation period started 30 days before the index date and ended on the discharging day or 30 days after the index date. The baseline period started 30 days before the index date and ended two days after.
The ethics committee of West China Hospital, Sichuan University has approved this study (No. 2021–386; No. 2021–282; No. 2020–968). Patient consent was waived for this retrospective study of data from electronic medical records.
Data collection and baseline characteristics
We retrieved and linked all prespecified medical data during both inpatient and outpatient settings within the observed period from WECODe. Additional file 1: Appendix S2 and Additional file 1: Tables S1, S2, S3 summarized the details for data linkage and methods to identify the baseline characteristics.
The estimated glomerular rate filtration (eGFR) was calculated according to the chronic kidney disease epidemiology collaboration (CKD-EPI) formula . The status of impaired kidney function at baseline was identified as eGFR < 60 mL/min/1.73 m2 at baseline. The Charlson Comorbidity Index (CCI) was calculated to evaluate patient comorbidities based on the International Classification of Diseases 10th Revision (ICD-10) codes in the discharge diagnosis records .
Blood glucose at admission was identified as the first measurement on or next index date. Estimated average glucose levels were estimated by HbA1c using the formula, estimated average glucose level (mg/dl) = 28.7 × HbA1c (%) − 46.7 . SHR is calculated as blood glucose at admission (mg/dl)/estimated average glucose level (mg/dl) . We categorized SHR based on tertiles and set the second tertile as the reference.
Follow-up and outcomes
We followed patients from the index date until a given adverse event occurred, they were discharged from the hospital, or until 30 days after the index date, whichever came first. The primary outcomes during hospitalization included composite cardiac events (the combination of death during hospitalization, requiring cardiopulmonary resuscitation, cardiogenic shock, and new episode of acute heart failure after admission), major acute kidney injury (AKI, defined as AKI stage 2 or 3), and major systemic infection (identified by the initiation of restricted antibiotics on the third calendar days after admission or later) during follow-up duration. The initiation of a given medication during hospitalization was defined as patients not receiving a given medication on admission and the following two calendar days, but a new given medication on the third calendar day after admission or later. The secondary outcomes included the separate adverse event of composite cardiac events, AKI at any stage, and initiating any antibiotics during follow-up. We defined requiring cardiopulmonary resuscitation as initiating an infusion of intravenous epinephrine, cardiogenic shock as prolonged hypotension (SBP ≤ 85 mmHg) with the presence of prescription of inotropic agents , new episode of acute heart failure after admission as initiating an infusion of intravenous morphine, and AKI at any stage following the previous paper [15, 24]. Antibiotics, including antibacterials and antimycotics, were identified according to Anatomical Therapeutic Chemical (ATC) Classification (https://www.whocc.no/atc_ddd_index/) (Additional file 1: Table S1). Only individuals without a given adverse event occurring on the index date and the following two calendar days were included for association analyses.
For continuous variables tested normally distributed by the Kolmogorov–Smirnov test (P ≥ 0.001), the paper presented them as mean ± standard deviation (SD) and compared them with a one-way analysis of covariance (ANOVA). For those not normally distributed, we presented them as median (25% percentile, 75% percentile) and compared them with the Kruskal–Wallis H test. Categorical variables, presented as frequencies (percentages), were compared using the Chi-square test. We performed Spearman`s correlation to investigate the association of SHR at admission with other baseline characteristics.
Non-linear association of SHR at admission with outcomes
We evaluated the non-linear association of SHR as a continuous exposure with a given outcome. First, we developed entropy balancing weights via weights optimization to achieve an exact balance of covariates moments , accounting for age, sex, baseline systolic BP, baseline eGFR, baseline NT-proBNP, admission department (Department of Cardiology /others), CCI, with or without ischemic heart disease at baseline, whether the use of insulin at baseline (Yes vs no), and whether the use of venous loop diuretics at baseline (Yes vs no). Additional file 1: Fig. S1 presented the correlation of SHR with each covariate before and after applying entropy balancing. For each outcome, a generalized logistic regression model with entropy balancing weights was used to obtain the odds ratio (OR) of each SHR (referent, SHR of 0.8) and fit the non-linear model. The corresponding 95% confidence intervals (CIs) were estimated using the percentile bootstrapping method [26, 27]. The SHR at admission was modeled with restricted cubic splines, and three knots located at the 25th, 50th, and 75th percentiles of SHR.
Comparing the risks of outcomes across SHR tertiles
We compared the risk of outcomes in the first and third tertiles against the second one. The analyses balanced each group using inverse probability weighting with entropy balancing with the absolute standardized mean differences (SMD) threshold of 0.10 (Additional file 1: Fig. S2). Generalized logistic regressions with entropy balancing weights were used to estimate the average treatment effect (ATE).
Subgroup analyses and sensitivity analyses
We conducted predefined subgroup analyses to assess the effect of SHR on the primary outcomes based on NYHA class (II or III vs IV), baseline HbA1c level (< 7.0% vs ≥ 7.0% [53.0 mmol/mol]), and impaired kidney function at baseline (eGFR < 60 mL/min/1.73 m2 vs eGFR ≥ 60 mL/min/1.73 m2). This study employed two sensitivity analyses to test the robustness of the study, by excluding patients with any episode of hypoglycemia during the baseline period and by excluding patients with a hyperglycemic crisis at baseline (see Additional file 1: Appendix S3).
All analyses were conducted using RStudio 2022.7.1.554 (R version 4.2.1). Statistical code for this analysis is freely accessible for any non-commercial reuse at: https://github.com/Yiling-Zhou/SHR_in-hospital-prognosis_HFandDiabetes. A two-sided P value < 0.05 was considered statistically significant.