Identified differences in B cell and T cell subsets, and especially in the proportion of class-switched memory B cells and CD4+ T follicular cells, display a considerable diagnostic efficacy in distinguishing PID from secondary hypogammaglobulinemia due to anti-inflammatory regimens for rheumatic disease. The gene discussed is CD4; the disease is pelvic inflammatory disease.