The findings suggest that nutritional status is significantly associated with the severity of PTB, and immune function mediates the effects of nutritional status on the severity of PTB. Maintaining adequate BMI, PNI levels, and immune function or reducing PLR levels helps reduce the risk of severe PTB.