In univariable analysis, age ≥60 years old, chemotherapy history, platelet count <100×10^9/L, NLR≥20, LDH≥454 IU/L, CD4+ T cell count < 232/μl, CD8+ T cell count <115/μl, percentage of BALF-neutrophils ≥50%, percentage of BALF-lymphocytes <20%, infection with hospital-acquired pneumonia-associated pathogens, pneumothorax, withdrawal of corticosteroids to the onset of symptoms ≤5 days, and time from visit to initiation of sulfonamides therapy ≥2 days were associated with prognosis in non-HIV-PCP patients with RF (P < 0.05). The gene discussed is CD8A; the disease is infection.