Introduction

Pyogenic liver abscess (PLA) is a common clinical hepatic infectious disease, and its occurrence is usually closely related to factors such as bacterial infections, biliary diseases, liver damage, and impaired immune function1,2. Despite significant advancements in antibiotic therapy and minimally invasive treatments in modern medicine, the treatment of liver abscesses still presents certain challenges3. Globally, the incidence of liver abscesses has been increasing annually, especially among diabetic patients, who experience higher morbidity and mortality rates4,5. According to existing epidemiological studies, diabetes is one of the independent risk factors for liver abscesses, and the weakened immune system in diabetic patients makes them face greater challenges in infection control6.

In clinical practice, the treatment of PLA primarily relies on antibiotic therapy, but the treatment outcomes are often influenced by factors such as the patient’s physical condition, comorbidities, and the type of pathogenic microorganisms7. There is currently no effective tool that can universally predict the duration of antibiotic treatment required for patients. Existing studies mainly focus on the clinical features, treatment strategies, and microbiological characteristics of PLA7,8. However, systematic studies on the factors influencing recovery in diabetic patients are relatively limited. Research has shown that the effectiveness of antibiotic therapy is closely related to various factors, including the size of the primary infection site, levels of various inflammatory markers, and the severity of comorbidities9. For diabetic patients with PLA, studies have found that their recovery time is significantly longer than that of non-diabetic patients, which is closely related to the impaired immune response and chronic hyperglycemia associated with diabetes10. However, there is no specific study on the independent factors affecting the hospital stay of these patients.

Therefore, this study aims to identify the recovery predictors for diabetic patients with PLA undergoing antibiotic treatment and to develop an effective nomogram for predicting the ORT through univariate and multivariate analysis. Through retrospective analysis, this study will explore how factors such as chills and fever, pre-treatment shock, and abscess diameter affect the recovery time of patients, providing scientific evidence for clinical decision-making. Furthermore, by developing the nomogram tool, this study aims to help clinicians more accurately predict recovery time and provide a basis for the rational adjustment of antibiotic use, thereby improving treatment outcomes and reducing unnecessary treatment burdens.

Materials and methods

Patient selection

This study conducted a retrospective analysis of 139 patients with PLA treated at the Eighth People’s Hospital of Qingdao from January 2015 to December 2022. This study adopted a comprehensive diagnostic criterion, requiring at least two of the following core criteria for confirmation: (1) ultrasound or CT showing typical features of a pyogenic liver abscess; (2) isolation of pathogenic bacteria from pus or blood cultures; (3) confirmation through pathology from aspiration or surgical specimens. Supportive criteria included: (1) common clinical manifestations such as chills, fever, and limb weakness, with tenderness in the liver area being the main physical sign; (2) improvement in symptoms after antibiotic treatment. All patients were screened to exclude other causes, such as hepatocellular carcinoma and amebic liver abscess.

The following patients were excluded from the study: (1) pregnant or breastfeeding women; (2) patients currently participating in or having participated in clinical trials within the past six months; (3) patients diagnosed with fever caused by non-infectious diseases, such as autoimmune diseases (e.g., rheumatoid arthritis), neoplastic diseases, or post-surgical absorbent fever; (4) patients with non-abscess liver space-occupying lesions, such as liver cysts, malignant liver tumors, or benign tumors; (5) patients without diabetes; (6) patients with unclear bacterial culture results.

As this was a retrospective study, no formal sample size calculation or power analysis was performed. We included all eligible consecutive patients diagnosed and treated at our institution during the study period (n = 139) to maximize the representativeness and generalizability of our findings.

Data collection

Data were collected from the hospital’s case management system, including the patients’ basic information (age, gender), clinical manifestations (chills and high fever, abdominal pain, septic shock), comorbidities (biliary stones, hypertension, pneumonia), and whether they underwent biliary puncture drainage. The laboratory indicators collected included white blood cell count (WBC), hemoglobin (HB), procalcitonin (PCT), C-reactive protein (CRP), aspartate aminotransferase (AST), alanine aminotransferase (ALT), and D-dimer (D-D). Additionally, the types of bacteria were recorded, as well as the time from the initiation of antibiotic treatment to its cessation. Liver abscess size was measured as the maximum diameter observed on pre-treatment CT imaging. ORT (antibiotic treatment duration) was defined as the time from the initiation to the cessation of antibiotic therapy. Upon diagnosis of pyogenic liver abscess, all patients received empirical antibiotic therapy with third-generation cephalosporins, which was subsequently adjusted based on individual antibiotic susceptibility results. In addition, ultrasound-guided percutaneous drainage procedures were performed by the same senior physician for all cases. All patients recovered and were discharged.

Statistical analysis and nomograph construction

The statistical analysis in this study was performed using R software (version 4.3.2; http://www.r-project.org/). Categorical variables were described using frequencies and percentages, while continuous variables were expressed as mean ± standard deviation (x̅±s) or median (P_25, P_75). Univariate regression analysis was performed to identify variables associated with the ORT, followed by multivariate Cox regression analysis to determine independent predictors. The stepwise method was used for variable selection in Cox regression analysis to identify independent risk factors related to ORT. Additionally, variance inflation factor (VIF) analysis was conducted to assess multicollinearity among the included variables. All VIF values were found to be below 2 (age: 1.134; fever: 1.272; shock: 1.051; drainage: 1.352; abscess size: 1.762; bacterial species: 1.509; white blood cell count: 1.267; AST: 1.353), indicating no significant multicollinearity. Based on the independent prognostic factors identified in the multivariate regression analysis, Kaplan-Meier survival curves were plotted and a nomogram was constructed to predict the ORT. To ensure the stability and accuracy of the model, internal validation was performed, and the model’s discriminative ability and predictive accuracy were assessed using the concordance index (C-index) and calibration curves. A p-value of less than 0.05 was considered statistically significant.

Results

Basic information of patients

From January 2015 to December 2022, this study selected 139 patients with bacterial PLA and diabetes who were treated at the Eighth People’s Hospital of Qingdao. All patients had positive bacterial cultures and were switched to sensitive antibiotics based on the drug sensitivity results after initial empirical treatment. As shown in Table 1, there were 85 male patients (61.2%) and 54 female patients (38.2%), with a significantly higher proportion of male patients. The average age of the patients was 61.4 ± 16.2 years. Among all the patients, 62 (44.6%) experienced chills and high fever, and 25 (18.0%) had septic shock before treatment. Regarding other comorbidities, 25 patients (18.0%) had a history of biliary stones, 63 patients (45.3%) had hypertension, and 36 patients (25.9%) had pneumonia. After bacterial culture, 109 cases (78.4%) were infected with Klebsiella pneumoniae, which was the dominant pathogen. Other pathogens included Escherichia coli (17 cases), Staphylococcus aureus (7 cases), Pseudomonas aeruginosa (3 cases), and Streptococcus viridans (3 cases), which were grouped together as other bacterial infections (30 cases, 21.6%). Among the abscess locations, 97 patients (69.8%) had right lobe abscesses, 24 patients (17.3%) had left lobe abscesses, and 18 patients (12.9%) had multiple abscesses within the liver. A total of 115 patients (82.7%) underwent ultrasound-guided biliary puncture drainage, all performed by a senior ultrasound physician at the hospital. A typical CT scan of the process of percutaneous puncture drainage treatment for pyogenic liver abscess is shown in Fig. 1. After appropriate treatment, the median ORT of the patients was 17 days (range: 13–22 days).

Table 1 Clinical baseline characteristics of pyogenic liver abscess with diabetes.
Fig. 1
figure 1

(A-B) Typical imaging of a patient with a solitary liver abscess (2 × 1.5 cm) in the left lobe, before and 3 days after puncture drainage treatment. C-D: Typical imaging of a patient with a giant liver abscess (12 × 9 cm) in the right lobe, before treatment and 30 days after puncture drainage.

Selection of risk factors

We performed univariate and multivariate analyses, with the results shown in Table 2; Fig. 2. In the univariate analysis, we found that age (P = 0.026, HR = 0.987), high fever (P = 0.002, HR = 0.570), septic shock (P < 0.01, HR = 0.340), abscess puncture drainage (P = 0.011, HR = 0.556), abscess size (P < 0.01, HR = 0.867), bacterial species (P = 0.040, HR = 1.542), white blood cell count (P = 0.024, HR = 0.963), and AST levels (P < 0.01, HR = 0.995) were significantly correlated with the duration of antibiotic treatment (ORT). Further multivariate Cox regression analysis, including the significant variables from univariate analysis, showed that age (P = 0.024, HR = 0.673), high fever (P < 0.01, HR = 0.500), septic shock (P < 0.01, HR = 0.34), and abscess size (P < 0.01, HR = 0.51) were associated with the hospital stay. Kaplan-Meier survival curves were subsequently plotted (see Fig. 3), but no significant differences were observed between the older and younger groups.

Table 2 Univariate regression analysis to identify risk factors affecting the treatment time of PLA. (The outcome of this study is the number of days of treatment received by the patients. A lower HR indicates a longer duration of treatment required for the patients).
Fig. 2
figure 2

Forest plot of multivariate Cox regression analysis.

Fig. 3
figure 3

Kaplan-Meier survival analysis curves of partial risk factors. (A): Treatment time curve for patients with or without chills and high fever; (B): Treatment time curve for patients with or without septic shock; (C): Treatment time curve for patients with abscesses smaller than 5 cm and those with abscesses 5 cm or larger; (D): Treatment time curve for patients with normal white blood cell count and those with elevated white blood cell count.

Nomogram creation

Finally, a nomogram was constructed to predict the duration of antibiotic treatment for PLA patients with diabetes based on the three independent predictive factors: high fever, septic shock, abscess size, and WBC count (see Fig. 4). After internal validation, the model’s Harrell’s C-statistic was 0.75, and the calibration curve shown in Fig. 5 demonstrated good consistency between the predicted treatment time and the observed days.

To illustrate the use of the nomogram, consider a diabetic PLA patient diagnosed by bacterial culture and imaging, with an abscess maximum diameter of 8 cm (50 points), septic shock prior to treatment (68 points), and a white blood cell count of 12 × 10⁹/L (18 points). The patient’s total score would be 136 points, corresponding to an estimated antibiotic treatment duration of approximately 25 days. This means that the patient may require 25 days of continuous antibiotic treatment for recovery.

Fig. 4
figure 4

Prognostic nomogram for patients with liver abscess complicated by diabetes, with four risk factors from the multivariate analysis included in the model.

Fig. 5
figure 5

Calibration curve of the prognostic prediction model for liver abscess.

Clinical outcomes and ORT

All patients started empirical antibiotic therapy after a clear diagnosis, and the antibiotics were switched to sensitive ones based on drug sensitivity results. The drug sensitivity test showed that 95% of Klebsiella pneumoniae strains were sensitive to third-generation cephalosporins or carbapenems. All ultrasound-guided percutaneous biliary drainage procedures were performed by the same senior ultrasound physician at the hospital. For multi-loculated abscesses, the larger abscess cavity was chosen for puncture, and all punctures were successful on the first attempt. All patients were eventually discharged after recovery, with no mortality. The median ORT for the patients was 17 days (range: 13–22 days).

Discussion

Pyogenic liver abscess (PLA) is a disease caused by bacterial invasion of the liver through various mechanisms, leading to hepatic suppurative inflammation. In the early reports on PLA, scholars generally considered biliary tract diseases as the primary cause of PLA and believed that Escherichia coli was the most common pathogen11,12,13. However, with improvements in healthcare conditions, the spectrum of pathogens causing PLA has undergone significant changes. Over the past 20 years, Klebsiella pneumoniae has gradually become the predominant pathogen of PLA14,15,16. Additionally, we observed that most patients with liver abscesses typically have a short hospital stay and a good prognosis after active drainage and antibiotic therapy17,18. However, diabetic patients have been shown to have a worse prognosis, as multiple studies have confirmed19. The incidence of diabetes continues to rise globally, with China having the largest number of diabetic patients, accounting for about one-quarter of the global diabetic population20.

The elevated blood glucose levels in diabetic patients cause multifaceted effects on their physiological state. Hyperglycemia inhibits the chemotaxis and phagocytic function of white blood cells, lowers immunity, and promotes vascular sclerosis and reduced blood flow, which further restricts the mobilization of white blood cells. These pathophysiological changes lead to more severe clinical symptoms and worse prognosis in diabetic patients with bacterial liver abscess21,22. Currently, there is no dedicated prognosis analysis for PLA patients with diabetes. Our study fills this gap by developing a prognostic nomogram.

Our research indicates that fever, pre-treatment septic shock, abscess size larger than 5 cm, and elevated white blood cell count are independent risk factors for prolonged ORT. These factors are closely related to the recovery time of patients, and our model’s C-index of 0.75 demonstrates higher accuracy compared to previous studies23. Moreover, previous research often focused on extreme indicators that lead to very poor prognosis, such as the studies by Xu et al., which overemphasized the adverse impact of gas formation and shock, while some patients did not show abnormalities in these two indicators, making it difficult to effectively identify the duration of hospitalization for these patients23.

Studies have shown that high fever is an important indicator of bacterial infection activity, and several studies have confirmed that high fever significantly affects the prognosis of patients24,25. Our study supports this view, indicating that fever significantly affects the duration of antibiotic treatment, although it contradicts the conclusions of Yu et al.26. Pre-treatment septic shock is another significant prognostic factor, which is consistent with several previous studies. Septic shock is an important factor affecting the prognosis of patients with septic liver abscess and is usually associated with a longer treatment time27,28. We found that patients with septic shock before treatment had significantly prolonged ORT, which may be related to the increased risk of systemic inflammatory response and multi-organ failure29. Therefore, early identification and active intervention for these patients are crucial. For patients who have not developed shock, white blood cell count remains an effective marker of inflammation, and in our nomogram, we included white blood cell count as a risk factor.

Additionally, abscess size was also identified as a key factor affecting ORT in this study, which is consistent with the research by Chang et al.30. Patients with an abscess diameter larger than 5 cm had a significantly longer treatment time than those with smaller abscesses. These patients often required puncture drainage treatment, which may explain why patients who underwent this more aggressive treatment had worse outcomes compared to those without puncture drainage.

In conclusion, this study highlights the critical role of factors such as fever, pre-treatment septic shock, abscess size, and white blood cell count in predicting the duration of antibiotic treatment for diabetic patients with liver abscesses. We have developed an effective predictive tool to estimate the ORT. The model’s Harrell C-statistic of 0.75 demonstrates good predictive accuracy, and the calibration curve shows good consistency between the predicted and actual ORT, further validating the model’s reliability. This tool not only provides a simple and practical assessment for clinicians but also helps guide the appropriate cessation of antibiotic treatment, thereby reducing unnecessary treatment burdens.

However, this study has several limitations. In order to ensure data accuracy and to specifically develop a predictive model for PLA patients with diabetes, the total number of cases included was limited to 139. Additionally, we were unable to perform external validation of the nomogram, which may restrict the generalizability of our findings to broader and more diverse populations. Future large-scale, multi-center or population-based studies are needed to validate the applicability of these results across different clinical settings. Moreover, due to data limitations, we were unable to evaluate the potential impact of nutritional status indicators, such as serum albumin levels, on the duration of antibiotic therapy. Future studies should incorporate these variables to further enhance the model’s predictive accuracy. Overall, prospective, multi-center studies with external validation are essential to strengthen our findings and extend their clinical applicability.