Introduction

Tuberculosis (TB) is an infectious disease caused by Mycobacterium tuberculosis (MTB), with pulmonary tuberculosis being the most common type, accounting for 80–90% of all cases [1,2,3]. Patients with Pulmonary tuberculosis infection are susceptible to combined infection due to other pathogens, including pulmonary fungal infection due to hypoimmunity, altered bronchial structure, and lung tissue injury [6]. Pulmonary fungal infection is a respiratory disease caused by various pathogens including yeast species like Candida albicans and molds like Aspergillus fumigatus. Studies worldwide have reported pulmonary fungal coinfections among PTB patients, with Aspergillus spp as the predominant pathogen [4,5,6]. Some others have reported Candida albicans as the most prevalent fungi spp [7, 10]. Regardless of aspergillosis caused by Aspergillus, candidiasis caused by Candida albicans, or other types of pulmonary fungal infections, similarities in clinical symptoms and radiological features with PTB are present, which can easily lead to misdiagnosis and contribute to a high rate of mortality [8, 31, 33, 35]. A study illustrated that up to 1 million people recovering from tuberculosis developed pulmonary fungal coinfections annually and were mostly misdiagnosed as cases of relapsed PTB [9]. However, at present, some clinicians do not pay enough attention to this problem [32]. Therefore, related studies on coinfection with PTB and pulmonary fungal infection are needed so that these patients may benefit from targeted antifungal agents promptly [36]. Some existing research on clinical features of coinfection with PTB and pulmonary fungal infection has been published but corresponding predictive models are scarce even though the nomogram is a reliable tool to create an intuitive graph based on a statistical predictive model to quantify the risk of a clinical event [11, 12]. Given this background, we aimed to build a predictive model for assessing the probability of pulmonary fungal coinfection in patients with PTB.

Methods

study design and patients

A retrospective case–control study was designed and conducted to identify the clinical characteristics of PTB patients with pulmonary fungal coinfection and develop a corresponding prediction model. First, we retrospectively retrieved data from 1151 PTB patients who had received treatment in Beijing Chest Hospital, Capital Medical University, from 2016.12.6–2021.12.6 (including 145 patients with pulmonary fungal coinfection who were assigned to the case group) using the electronic medical record system. Next, we randomly selected 450 PTB patients without pulmonary fungal coinfection as the control group. The two groups of patients (case:control) were matched by sex and address characteristics in a ratio of 1:1. Finally, 143 patients each (2 case subjects were excluded as they could not be matched) in the case group and control group were included. Subsequently, these 286 patients were randomly divided into a training set and an internal validation set in a ratio of 3:1. Univariate analysis and multivariate logistic regression analysis were performed in the training set to evaluate the probability of pulmonary fungal coinfection in PTB patients and construct a prediction model. A nomogram was developed using selected predictors. Bootstrapping was performed for internal validation. (Fig. 1).

Fig. 1
figure 1

Study flow chart of patients selection

Inclusion and exclusion criteria

Case group: Eligible patients included those with confirmed PTB and pulmonary fungal infection who simultaneously meet the diagnostic criteria for tuberculosis according to the “Health Industry Standards of the People's Republic of China” issued in 2017 [13] and pulmonary fungal infection according to the “Expert Consensus on the Diagnosis and Treatment of Pulmonary Mycosis” proposed by the Infections Group of the Respiratory Society of the Chinese Medical Association in 2007 [14]. Other criteria were as follows: age, 16 years or older, and those who were hospitalized. Patients with missing information were excluded.

Control group: Eligible patients included those with confirmed PTB but without pulmonary fungal infection who only meet the diagnostic criteria for tuberculosis according to the “Health Industry Standards of the People's Republic of China” issued in 2017 [13] but not for pulmonary mycosis as stated in the “Expert Consensus on the Diagnosis and Treatment of Pulmonary mycosis” issued by the Infectious Diseases Group of the Respiratory Society of the Chinese Medical Association in 2007 [14]. Other criteria were as follows: age, 16 years or older, and those who were hospitalized. Patients with missing information and those with suspected pulmonary fungal infection were excluded.

Following are the diagnostic criteria for pulmonary fungal infection according to the “Expert Consensus on the Diagnosis and Treatment of Pulmonary Mycosis” proposed by the Infections Group of the Respiratory Society of the Chinese Medical Association in 2007: 1. at least present one host incidence risk factor. 2. Those who meet clinical characteristics of pulmonary mycosis {(1) Main clinical features: 1. invasive pulmonary aspergillosis with chest X-ray and Computed Tomography examination showing increased subpleural nodules or halo symptoms around the lesions in the early stages of the disease; chest X-ray and CT examination showing pulmonary cavity or a crescent sign 10–15 days after onset; 2. Pneumocyte pneumonia: chest CT examination showing hair glass lung interstitial infiltration. (2) Secondary clinical features: 1. continuous fever > 96 h with no significant improvement after aggressive antibiotic treatment; 2. symptoms and signs of a lung infection, including cough, expectoration, hemoptysis, chest pain, dyspnea, moist rales or pleural friction sound; 3. imaging examination showing new non-specific lung infiltration other than the main clinical features}, 3. Those presenting lung histopathological evidence. 4. Those with microbiological evidence {(1) direct microscopy of the endotracheal attractor or qualified sputum samples showing hyphae, and the same fungus is isolated two consecutive times in the culture. (2) BALF is detected by direct microscopy with a positive fungal culture. (3) Qualified sputum or BALF direct microscopy or culture showing Cryptococcus neoformans. (4) Positive for Crycoccus capsular polysaccharide antigen by latex coagulation. (5) The G-test is positive two consecutive times. (6) The GM-test is positive two consecutive times}.

Candidate predictors

We reviewed the relevant literature on the clinical characteristics of coinfection with PTB and pulmonary fungal infection and based on the existing evidence [15,16,17, 27, 34, 37], the following patient data variables were collected as candidate predictors: 1. demographic features including age (> 65/ ≤ 65 years), sex (male/female), and address (north/south, considering that the pathogens and incidence rate of pulmonary fungal infection vary by area, which we classified as north and south rather than rural and urban); 2. personal histories such as smoking and drinking habits (yes/no, the “no” means “never”); 3. features of PTB including category (initial/recurrent), drug resistance (no/single drug resistance/other drug resistance, “single-drug resistance including MR or RR”, “other drug resistance including PDR or MDR or Pre-XDR or XDR”), and illness course (from the time of onset to the time of hospitalization); 4. imaging findings including pulmonary cavitation (yes/no) and pleural effusion (yes/no); 5. medication including regular anti-TB treatment (yes/no), use of broad-spectrum antibiotics for at least 1 week (yes/no), use of glucocorticoids for at least 2 weeks (yes/no), and chemotherapy or immunosuppressant use (yes/no); 6. therapeutic operations including invasive operation (yes/no, invasive operation refers to the operations requiring access to human sterile tissues, organs, vasculature or contact with skin mucosa for diagnosis and treatment, including arteriovenous catheterization, ventilator application, endoscopy, endotracheal intubation, tracheotomy, hemodialysis, puncture operations such as thoracentesis, bone marrow aspiration, lumbar puncture, abdominocentesis, and other interventional operations) and surgical history (yes/no); 7. comorbidities including bacterial pneumonia (yes/no), chronic bronchitis or chronic obstructive pulmonary disease or bronchiectasis or asthma (yes/no), silicosis (yes/no), interstitial lung disease (yes/no), hepatic injury (yes/no), renal inadequacy (yes/no), tumors or hematological diseases (yes/no), anemia (yes/no), and hypoproteinemia and diabetes (yes/no). All variables were collected at the time of hospital admission as baseline data except for the use of broad-spectrum antibiotics for at least 1 week and glucocorticoids for at least 2 weeks. These two excluded factors were collected in the period corresponding to 6 months prior to hospitalization to hospitalization.

Statistical analysis

We used SPSS 25.0 and R 4.2.0 for statistical analyses which were all two-tailed, and a P-value < 0.05 represented statistical significance. All candidate predictors were categorical variables summarized as a frequency in counts and percentages. In the training set, the chi-square test or Fisher's exact test was used for conducting univariate analysis to compare differences in features between PTB patients with and without pulmonary fungal coinfection. Based on the results of the univariate analysis, significant variables with P < 0.05 were used as input in the multivariate logistic regression model, from which significant variables were deemed as predictive factors to establish the prediction model for assessing the probability of pulmonary fungal coinfection in PTB patients. Finally, a nomogram was constructed according to the model. The area under the curve (AUC) was calculated to assess the discrimination capacity of the model, and internal validation was performed by bootstrapping with 1000 iterations [16]. Additionally, the model’s calibration was assessed using calibration curves.

Results

A total of 286 patients were included in this study, of which 143 were case subjects and 143 were control subjects. The 286 patients were randomly divided into the training and internal validation sets in a ratio of 3:1. The training set comprised 102 case subjects and 112 control subjects who were used to develop the model and nomogram. The validation set containing 40 case subjects and 32 control subjects was used for internal validation. Table 1 lists the demographic and clinical characteristics of PTB patients in the training and validation sets. As shown, the ratio of case subjects to all subjects was comparable between the two data sets (47.7% vs 56.9%; P = 0.173).

Table1 Clinical characteristics of PTB patients in the training set and validation set

Predictors entering the model

The characteristics of PTB patients with and without pulmonary fungal coinfection in the training set are summarized in Table 2. Age, category, illness course, pulmonary cavitation, pleural effusion, use of broad-spectrum antibiotics for at least 1 week, chemotherapy or immunosuppressants, surgery, bacterial pneumonia, chronic bronchitis or chronic obstructive pulmonary disease or bronchiectasis or asthma, hypoproteinemia, and anemia were significantly associated with pulmonary fungal coinfection, as evaluated by univariate analyses. Table 3 shows the results from the multivariate logistic analyses. The following seven factors were statistically significant: illness course, pulmonary cavitation, use of broad-spectrum antibiotics for at least 1 week, chemotherapy or immunosuppressants, surgery, bacterial pneumonia, and hypoproteinemia (Tables 2 and 3).

Table 2 Univariate analysis of PTB patients with pulmonary fungal coinfection (training dataset, N = 214)
Table 3 Multivariate analysis of PTB patients with pulmonary fungal coinfection(training dataset, N = 214)

Establishment and internal validation of the model and the nomogram

We developed a predictive model for assessing the probability of pulmonary fungal coinfection in PTB patients based on the aforementioned 7 predictors. The Odds Ratios of predictors entered in the model were as follows:1 year < illness course ≤ 5 years, 3.978; 5 years < illness course ≤ 10 years, 4.180; illness course > 10 years, 11.368; pulmonary cavitation, 3.460; use of broad-spectrum antibiotics for at least 1 week, 3.153; chemotherapy or immunosuppressants, 20.646; surgery, 2.157; bacterial pneumonia, 6.645, and hypoproteinemia, 6.054. As shown in Figs. 1 and 2, the predictive model showed good discrimination in both training [area under the curve (AUC) = 0.860, 95% confidence interval (CI) = 0.811–0.909, in Fig. 2] and internal validation (AUC = 0.884, 95% CI = 0.799–0.970, in Fig. 3) sets following bootstrapping (resampling = 1000 times). The optimal cutoff was 0.5 according to the receiver operating characteristic (ROC) curve and the sensitivity and specificity were 0.777 and 0.804, respectively, in the training set (Fig. 2). Moreover, the sensitivity and specificity of the ROC curve in internal validation were 0.71 and 0.951, respectively (Fig. 3). The calibration curves also showed that the probabilities assessed using the prediction model displayed a satisfactory consistency with the actual probability for both the training and internal validation sets (Figs. 4 and 5).

Fig. 2
figure 2

ROC curve of the established model in training set

Fig. 3
figure 3

ROC curve of the established model in validation set. *ROC curve of the established model and in the internal validation. AUC (1) shows the discrimination in the model, and AUC (2) of the internal validation. ROC, receiver operating characteristic; AUC, area under the curve

Fig. 4
figure 4

Calibration curve in training set

Fig. 5
figure 5

Calibration curve in validation set

To provide physicians with a quantitative tool for individualized prediction of pulmonary fungal coinfection, a nomogram was constructed according to the results of multivariable logistic regression (Fig. 6). The formula based on the model was as follows: Logit(P) = -2.970 + 1.381*illness course (> 1 year, ≤ 5 years) + 1.430*illness course (> 5 years, ≤ 10 years) + 2.431*illness course (> 10 years) + 1.241*pulmonary cavitation(yes = 1; no = 0) + 1.148*broad-spectrum antibiotics use for at least 1 week(yes = 1; no = 0) + 3.028*chemotherapy or immunosuppressants(yes = 1; no = 0) + 0.769*surgery(yes = 1; no = 0) + 1.894*bacterial pneumonia(yes = 1; no = 0) + 1.801*hypoproteinemia(yes = 1; no = 0).

Fig. 6
figure 6

Nomogram for predicting the probability of pulmonary fungal coinfection in PTB patients. *Nomogram for predicting the probability of pulmonary fungal coinfection in PTB patients and its predictive performance. First, find the points for each predictor (variable) of a patient on the uppermost rule; then, add all points to calculate the “total points;” finally find the corresponding predicted probability of pulmonary fungal coinfection on the lowest rule.

Discussion

People are susceptible to PTB or fungal infection when their immunity weakens. Both TB and pulmonary fungal infections increase the risk of co-infection with another disease, which may cause pulmonary disability and even death [6, 8]. For PTB patients, if pulmonary fungal coinfection is diagnosed early, it can be treated efficiently, and serious consequences can be prevented [31, 38]. Hence, coinfection with PTB and pulmonary fungal infection should be considered. An accurate predictive model is imperative for clinicians and PTB patients. Although several clinical characteristics have been proposed previously, models predicting the probability of pulmonary fungal coinfection for PTB patients are lacking. No corresponding model predicting the probability of combined pulmonary fungal infection in PTB patients has been reported to date. Considering these reasons, in this real-world retrospective study, a multivariable model based on easily accessible clinical parameters was developed and internally validated.

Clinical characteristics of PTB patients with pulmonary fungal coinfection were associated with the illness course, pulmonary cavitation, use of broad-spectrum antibiotics for at least 1 week, chemotherapy or immunosuppressants, surgery, bacterial pneumonia, and hypoproteinemia, consistent with the findings of some previous studies [10, 15,16,17, 19,20,21,22,23,24,25, 27, 28]. Patients with a long illness course may suffer from recurrence and more severe lung tissue destruction, resulting in pulmonary fungal coinfection. In line with our study, Page et al. found that pulmonary cavitation was a predictor of fungal pulmonary coinfection [29, 30]. These cavities form an ideal culture plate for the fungi by providing plenty of oxygen along with necrotic tissue material, stimulating the occurrence of pulmonary fungal coinfection. The use of broad-spectrum antibiotics and bacterial pneumonia not only breaks the balance of airway microecology but also reduces airway resistance to fungi. Hypoproteinemia and chemotherapy or immunosuppressant use were also significant variables predictive of pulmonary fungal coinfection in PTB patients, likely because these factors may decrease immunity, thus making the patients more susceptible to fungal coinfection. Although our data also showed that age, recurrent TB, and invasive operations were significant predictors in the univariate analysis [10, 15,16,17, 27], these were subsequently excluded as they were insignificant according to multivariate logistic regression analysis. The use of glucocorticoids has been identified as a potential variable in some studies [10, 15,16,17, 25,26,27], while our findings differ, probably because of the limited number of cases (n = 31), and warrant further investigation. Drug resistance was also observed as a possible predictor in previous research [5, 10, 15,16,17, 27] but this was statistically insignificant herein.

A nomogram was developed using the above predictors for facilitating individualized prediction of pulmonary fungal coinfection. For example, using the nomogram, we found that a PTB patient with pulmonary cavitation and an illness course of more than 1 year but no more than 5 years, had a 30% likelihood of pulmonary fungal coinfection. The nomogram can help clinicians improve decision-making for these patients.

However, there are some limitations to our study. First, the training set was randomly selected from all PTB patients leading to lower evidence strength and failure in showing the incidence rate. Second, this was a single-center retrospective study, which inevitably suffered from confounding biases. Third, our predictive model is diagnostic but diagnosis requires some auxiliary examinations and is correspondingly time-consuming. The time for collecting outcome variables (maybe several days after hospital admission) sometimes may be several days compared to the predictors (hospital admission), contributing to a lower accuracy of the prediction model. Finally, only internal validation was performed to evaluate the discrimination ability and calibration of the scoring model, and external validation is warranted to confirm the performance of the nomogram (Additional file 1).

Conclusion

In conclusion, a prediction model, comprising seven independent predictors, may empower clinicians and PTB patients for timely and early assessment and inform them of the likelihood of pulmonary fungal coinfection more precisely, facilitating better management. Its favorable calibration and discrimination might permit it to be suitable for routine clinical practice in most hospitals.