We found that: (1) CPC intervention can improve the ID patient prognosis when other confounders are controlled; (2) the effectiveness of CPC delivered by ID and non-ID clinical pharmacist might be equivalent in the treatment of ID; (3) factors including sex, department, consultation type, surgical treatment, serum albumin level, liver function, specific imaging evidence, high-risk factors of infection, and infection severity are associated with the outcome of ID patients. Here, ALB is linked to infection.