Our study revealed that low CD4+ T cell, CD8+ T cell, and NK cell counts were correlated with a poor prognosis of PCP, especially CD8+ T cell counts. The gene discussed is CD8A; the disease is pneumocystosis.