University of California, San Francisco Logo

University of California, San Francisco | About UCSF | Search UCSF | UCSF Medical Center

Management Recommendations > Pneumocystis

Ward 86 Management Recommendations

Diagnosis and Management of Pneumocystis Pneumonia

updated August 2018

Contributors: Laurence Huang, MD
Mark A. Jacobson, MD

Diagnosis of Pneumocystis Pneumonia

  1. When to suspect Pneumocystis pneumonia. Among HIV-infected patients, most Pneumocystis pneumonia cases occur in those who are not receiving antiretroviral therapy (ART) or Pneumocystis pneumonia prophylaxis and who have an absolute CD4 T-cell count of <100 cells/µL. We continue to see patients whose initial HIV diagnosis occurs at the time of an opportunistic infection presentation, with Pneumocystis and bacterial pneumonia being the most common. If a patient's CD4 cell count is unknown and a current level is pending, a useful marker for Pneumocystis risk is the absolute lymphocyte count, obtainable from the differential of a complete blood count. In our hospital, a normal absolute lymphocyte count has a 96% predictive value for the absolute CD4 count being >100 cells/µL.(1) Thus, a normal absolute lymphocyte count makes a Pneumocystis diagnosis very unlikely. Pneumocystis pneumonia is extremely uncommon in patients virally suppressed on ART. (Of note, although a CD4 count threshold of <200 cells/µL remains our recommended threshold for initiating Pneumocystis prophylaxis as discussed below, it derives from observational data obtained during the premodern ART era when the natural history of HIV disease was a rapid decline in CD4 count once this threshold was crossed. Prophylaxis was instituted at this threshold so that patients could be protected against Pneumocystis before they entered the high-risk zone for this most common of the life-threatening, AIDS-associated opportunistic infections.)

  2. Clinical presentation. Dyspnea on exertion and cough, which is usually nonproductive, are the most common presenting symptoms. Onset is often indolent. Many patients present with a history of such symptoms for 2 weeks or more. Weight loss and fever may be associated. Lung examination may reveal inspiratory crackles. Patients with moderate-to-severe disease have chest X-ray abnormalities, elevated serum lactate dehydrogenase (LDH), and decreased oxygen saturation or hypoxia at rest. Those with milder disease may have a normal chest X-ray result, serum LDH level, and room air oxygen saturation as measured by pulse oximetry; however, the oxygen saturation typically will drop with vigorous ambulation. Normal oxygen saturation at rest and with exercise virtually excludes the diagnosis of Pneumocystis pneumonia.

  3. Confirming the diagnosis

    1. Chest X rays characteristically demonstrate bilateral interstitial/reticular or granular opacities, but Pneumocystis pneumonia may present with a normal or minimally abnormal chest X ray in a subset of cases. If our clinical suspicion for Pneumocystis pneumonia is high, yet a plain chest film does not show characteristic interstitial infiltrates, we obtain a high-resolution chest computed tomography (CT) scan. The presence of ground-glass shadowing on chest CT is a highly sensitive finding for Pneumocystis pneumonia, though it is not specific, as other pulmonary conditions can cause this finding. More importantly, absence of ground-glass opacities on a chest CT strongly argues against the diagnosis of Pneumocystis pneumonia, and the focus of diagnosis and treatment should be elsewhere.

    2. Diagnosis requires microbiologic confirmation. Pneumocystis cannot be cultured, and bronchoalveolar lavage (BAL) with visualization of Pneumocystis organisms is the gold standard diagnostic test. At some hospitals, induced sputum has been used to diagnose Pneumocystis pneumonia successfully, and its use decreases the need for bronchoscopy. However, this test is less sensitive than BAL. Thus, a negative induced-sputum result still requires BAL confirmation before Pneumocystis pneumonia can be ruled out.

      1. A variety of stains (methenamine silver, toluidine blue O, cresyl violet, Diff-Quik, Wright-Giemsa) can be used to identify the organisms in a respiratory specimen. Pneumocystis-specific monoclonal antibodies and immunofluorescence stains also can be used to identify the organism.

      2. The diagnostic/empiric treatment algorithm that we have found to be most cost-effective, given the high cost of Pneumocystis-specific monoclonal antibody testing and immunofluorescence stains and the necessity of confirming any negative induced-sputum results by BAL, is shown in the figure below.

      3. In clinical settings where definitive diagnostic testing (eg, bronchoscopy or induced sputum) is unavailable, a serum (1-3)-β-D-Glucan (BG) assay may have limited utility in ruling out this infection if the serum result is negative. The BG assay has high sensitivity but poor specificity in the diagnosis of Pneumocystis pneumonia.(2)


The typical duration of Pneumocystis pneumonia treatment in persons with HIV infection is 21 days. Secondary prophylaxis (see below) should be started immediately after the completion of Pneumocystis pneumonia treatment.

  1. Therapy for mild disease (oxygen saturation ≥92% or PaO2 ≥70 mm Hg with an alveolar-arterial [A-a] oxygen gradient <35 mm Hg while breathing room air) is, in order of preference:

    1. Trimethoprim-sulfamethoxazole (TMP-SMX) PO at a dosage of 15 mg/kg/day of the TMP component divided into 2-3 doses per day.

    2. TMP PO 15 mg/kg/day in divided doses plus dapsone PO 100 mg once daily. (As severe hemolysis can occur when dapsone is administered to persons with G6PD deficiency, a serum G6PD level should be checked and this regimen discontinued if the level is below normal.)

    3. Clindamycin PO 450 mg TID plus primaquine (base) PO 30 mg once daily. (Primaquine also can cause severe hemolysis in persons with G6PD deficiency. Serum G6PD level should be checked and this regimen discontinued if the level is below normal.)

    4. Atovaquone PO 750 mg BID with food.

  2. Therapy for moderate-to-severe disease (oxygen saturation <92%, PaO2 <70 mm Hg, or A-a O2 gradient ≥35 mm Hg while breathing room air) is:

    1. Prednisone PO 40 mg BID for 5 days, then 40 mg daily for 5 days, then 20 mg daily for 11 days. As an alternative, methylprednisolone IV can be given at 75% of the prednisone dosage.

    2. PLUS, in order of preference:

      1. TMP-SMX, PO or IV, 15 mg/kg/day of trimethoprim component in 3-4 divided doses. This drug is 100% bioavailable.

      2. Clindamycin IV 600 mg QID plus primaquine (base) PO 30 mg once daily (check G6PD). Both these drugs also have high bioavailability.

      3. Pentamidine IV 4 mg/kg/day.

  3. Managing adverse effects of therapy.

    1. TMP-SMX toxicity is common but not always treatment-limiting and supportive care for milder adverse effects should be attempted before discontinuing TMP-SMX. Most side effects occur within the first 2 weeks of treatment. Overall, neutropenia and anemia each occur in up to 40% of patients, rash in 55%, fever in 40%, abnormal liver function tests in 20%, and azotemia in 5%. Hyperkalemia may occur as a result of the effect of TMP on renal tubular potassium transport but rarely requires treatment discontinuation. For all adverse effects, except severe rash such as Stevens-Johnson syndrome, supportive care should be attempted before TMP-SMX is discontinued. Treatment-limiting neutropenia (ie, absolute neutrophil count of <500 cells/µL) can be reversed by administering granulocyte-colony stimulating factor--see section on Management of Neutropenia in Patients with HIV Disease.

    2. Dapsone and primaquine can cause symptomatic methemoglobinemia, which presents with increased dyspnea, cyanosis, and a drop in oxygen measured by pulse oximetry but not by blood gas. If severe, this condition can be reversed by administering methylene blue.

  4. A history of TMP-SMX intolerance should not exclude use of this drug unless the adverse reaction was life-threatening (eg, Stevens-Johnson syndrome or toxic epidermal necrosis). Approximately half of AIDS patients who have had adverse reactions to TMP-SMX treatment in the past (eg, macular rash, fever, transaminitis) can tolerate rechallenge, possibly because of the dynamic nature of hepatic metabolism of sulfa drugs in patients with AIDS.

  5. Pentamidine should be used with caution. This drug can cause irreversible renal and pancreatic islet cell toxicity, as well as severe orthostatic hypotension, profound hypoglycemia, diabetes, and cytopenias. Of note, a retrospective European cohort study that examined 1,188 episodes of Pneumocystis pneumonia reported pentamidine to be associated with increased mortality compared with clindamycin plus primaquine when used as second-line therapy.(3)

Timing of ART initiation in a patient with Pneumocystis pneumonia: See section on Initiating Antiretroviral Therapy in Hospitalized HIV-infected Patients.


  1. Primary Pneumocystis prophylaxis is indicated for patients with an absolute CD4 count of <200 cells/µL, oropharyngeal candidiasis, or any AIDS-defining condition; secondary prophylaxis is indicated after treatment for Pneumocystis pneumonia. Prophylaxis can be discontinued once the CD4 count on ART has been ≥200 cells/ÁL for 3-6 months. However, because HIV viral load is an independent predictor of Pneumocystis pneumonia risk, prophylaxis appears to be unnecessary for patients suppressed on ART who have sustained CD4 counts of >100 cells/µL.(4,5)

  2. Recommended prophylactic regimens, in order of preference, are:

    1. TMP-SMX double-strength PO daily

    2. TMP-SMX double-strength PO 3 times/week or TMP-SMX single-strength daily

    3. Dapsone 100 mg PO daily (check G6PD, as discussed above)

    4. Atovaquone 1,500 mg PO daily with food

    5. Aerosolized pentamidine 300 mg administered monthly with the Respirgard II nebulizer (manufactured by Marquest; Englewood, Colorado)

  3. Of note, TMP-SMX and atovaquone are each adequate prophylaxis to prevent toxoplasmic encephalitis in AIDS patients with CD4 counts of <200 cells/µL and a positive serum Toxoplasma gondii IgG titer. However, if dapsone is used for Pneumocystis prophylaxis in such patients, pyrimethamine 50 mg weekly and leucovorin 25 mg weekly should be added for Toxoplasma prophylaxis.

  4. Prophylaxis should be restarted if the CD4 count decreases to <200 cells/µL.


  1. Jacobson MA, Liu L, Khayam-Bashi H, et al. Absolute or total lymphocyte count as a marker for the CD4 T lymphocyte criterion for initiating antiretroviral therapy. AIDS. 2003 Apr 11;17(6):917-9.
  2. Li WJ, Guo YL, Liu TJ, et al. Diagnosis of Pneumocystis pneumonia using serum (1-3)-β-D-Glucan: a bivariate meta-analysis and systematic review. J Thorac Dis. 2015 Dec;7(12):2214-25.
  3. Helweg-Larsen J, Benfield T, Atzori C, et al. Clinical efficacy of first- and second-line treatments for HIV-associated Pneumocystis jirovecii pneumonia: a tri-centre cohort study. J Antimicrob Chemother. 2009 Dec;64(6):1282-90.
  4. Denis B, Guiguet M, de Castro N, et al. Critical importance of long-term adherence to care in HIV-infected patients in the cART era: new insights from Pneumocystis jirovecii pneumonia cases over 2004-2011 in the FHDH-ANRS CO4 cohort. PLoS One. 2014 Apr 11;9(4):e94183.
  5. Costiniuk CT, Fergusson DA, Doucette S, et al. Discontinuation of Pneumocystis jirovecii pneumonia prophylaxis with CD4 count <200 cells/µL and virologic suppression: a systematic review. PLoS One. 2011;6(12):e28570.

Figure. Our Diagnostic/Treatment Algorithm for Pneumocystis Pneumonia

Diagnosis and Management of Pneumocystis Pneumonia