Pneumocystis jirovecii Pneumonia and HIV: A Practical Guide for ED Diagnosis and Management

Authors: Kamoga Dickson, MD (EM Resident Physician, Makerere University of Health Sciences); Jessica Pelletier, DO (EM Education Fellow, Washington University in St. Louis) // Reviewed by: Joshua Lowe, MD (USAF Physician); Alex Koyfman, MD (@EMHighAK); Brit Long, MD (@long_brit)


A 42-year-old female with advanced acquired immunodeficiency syndrome (AIDS) presents to the Emergency Department (ED) with two weeks of progressive dyspnea that worsens with exertion, associated with a dry cough and low-grade fever. She reports occasional central chest pain exacerbated by coughing. She denies a history of drenching night sweats, lower limb swelling, orthopnea, or paroxysmal nocturnal dyspnea. On initial evaluation, the patient looks cachectic, she is afebrile at 37.30C, and has no jaundice. She is dyspneic with a respiratory rate of 31 bpm, SPO2 of 86% on room air (RA), and has equal air entry in both lungs with no adventitious breath sounds. No peripheral edema is noted and she has a regular full volume pulse at a rate of 113 bpm with normal heart sounds. A bedside lung ultrasonography (LUS) is performed which reveals asymmetrical B-lines with an irregular pleural line bilaterally and subpleural consolidations (“shred sign”), but no pleural effusion, hepatization, or air bronchograms. A chest computed tomography (CT) scan without contrast is urgently ordered and shows bilateral ground glass opacities in the setting of negative COVID-19 testing consistent with interstitial lung disease, concerning for Pneumocystis jirovecii pneumonia (PJP). Laboratory evaluations that return after admission to the hospital are remarkable for microcytic hypochromic anemia (hemoglobin 9.2 g/dL) and marked lymphopenia. A polymerase chain reaction (PCR) test of an induced sputum (IS) sample confirms the diagnosis of PJP. Additional laboratory tests show decreased CD4 count and elevated HIV viral RNA levels.



Pneumocystis jirovecii (PJ) is an opportunistic fungal pathogen that causes life-threatening cases of PJP in immunocompromised patients. PJ is ubiquitous, and many humans are exposed by 2 years of age.1 While PJP gained significant recognition among HIV-positive adults during the early AIDS epidemic, the growing utilization of immunosuppressants has resulted in an increased incidence of the disease in individuals who are HIV-negative.2 Before the routine implementation of prophylactic measures against PJP, the incidence of infection in lung transplant patients was up to 88%.3 Similarly, in patients with HIV infection, the rate of PJP was estimated to be between 70-80% prior to the extensive use of highly active antiretroviral therapy (HAART).3 Since the introduction of these preventive strategies, there has been a significant decline in the prevalence of PJP in both patient groups. A recent study by Gaborit et al. reported an incidence of 20%, 25%, 35%, 12% among HIV positive, solid organ transplant, hematological malignancy patients and patients with systemic disease respectively.4

Early diagnosis is key to allow for early treatment to improve outcomes. Because PJ is extremely difficult to culture in vitro, the diagnosis has traditionally relied upon clinical symptoms, radiographic findings, and confirmation via visualization of the organism on staining of lung specimens such as bronchoalveolar lavage fluid (BAL) or IS.5 These staining methods have been shown to have lower diagnostic yield for detection of PJ, and new molecular methods including PCR, loop-mediated isothermal amplification (LAMP), and antibody-antigen testing on less invasive samples have been developed for the diagnosis of PJP (Table 1).5 However, molecular tests are often inaccessible in numerous low-resource clinical settings, particularly where HIV/AIDS significantly contributes to the disease burden. Therefore, it is of critical importance to develop cost-effective methods for early detection to improve the diagnosis of PJP in resource-limited settings.



PJ organisms gain entry into the alveoli via respiratory droplets, traversing the respiratory passages. They attach to type 1 pneumocytes, resulting in diffuse alveolar damage through the erosion of these pneumocytes.6 Under normal circumstances, the host’s immune response effectively eliminates the fungus, primarily through the activity of alveolar macrophages. In individuals with compromised immune systems, particularly a reduction in CD4 T-lymphocytes, an immune response mediated by CD8 T-cells becomes activated. This altered immune response not only fails to eradicate the fungus but also leads to lung tissue damage via action of the cytotoxic CD8 T-cells which hinders gaseous exchange. The result is a state where the fungus persists despite the immune response, contributing to the impairment of respiratory function.7 PJP impairs gas exchange via multiple mechanisms. The pathogenesis has been linked to the inhibition of phospholipid secretion. This process is facilitated by a surface antigen known as the major surface glycoprotein (MSG) antigen.8 The MSG antigen’s interference with phospholipid secretion leads to significant changes in the composition of lung surfactant. These alterations contribute to decreased alveolar compliance and increased incidence of atelectasis, both of which severely impair the lungs’ ability to facilitate effective gas exchange.8 Additionally, histological examination of lung tissue affected by PJP reveals characteristic changes.8 Notably, there is the presence of eosinophilic amorphous exudates within the alveolar spaces. These exudates contribute to the distinctive honeycomb appearance observed in infected lung tissue. Furthermore, lymphocytic infiltration within the interstitial spaces of the lung is commonly seen. This infiltration indicates an immune response to the infection, further contributing to the pathological changes observed in PJP and its impact on pulmonary function.8


Clinical Presentation and Risk Factors

Immunocompromised status is the most important risk factor for PJP infection. Additionally in HIV patients, CD4 counts of less than 200 cells/mm3, high HIV viral load, recurrent bacterial pneumonia, prior history of PJP infection, and weight loss are considered risk factors.9

The signs and symptoms of PJP infection are non-specific. Due to the overlapping nature of symptoms with community-acquired pneumonia and various other respiratory illnesses, obtaining a thorough history of immunocompromise from the patient plays a pivotal role in establishing the diagnosis promptly. The ED clinician should inquire about a relevant history of HIV infection, malignancy, high-dose corticosteroid use, chemotherapy, organ transplant, or use of immunosuppressive drugs for other indications.10

The triad of PJP symptoms includes dry cough (95%), progressive dyspnea (95%), and low-grade fever (80%).11 The progression of symptom onset is typically more rapid in non-HIV patients (5-6 days) compared with 25–28 days in HIV patients.12 This difference is attributed to a heightened immune response to PJP in the lungs in non-HIV patients compared with HIV patients.10 In 2-4% of patients the initial presentation for PJP is pneumothorax.13 Severe PJP results in pronounced hypoxia, characterized by an elevated alveolar-arterial (A-a) gradient and respiratory failure. PJP mortality in non-HIV immunocompromised patients can be as high as 30-60% compared with 10-20% in HIV patients.14


Differential Diagnosis

The differential diagnosis of PJP includes acute respiratory distress syndrome (ARDS), tuberculosis (TB), cytomegalovirus (CMV), Legionella pneumonia, Mycoplasma pneumoniae pneumonia, other viral or bacterial pneumonia, pulmonary embolism (PE), lymphocytic interstitial pneumonia, and COVID-19 infection.15


Diagnostic considerations

Timely diagnosis of PJP is absolutely essential for effective management and improved disease outcomes.2 To achieve this, a range of imaging and laboratory tests are employed to establish an accurate diagnosis.




There is anecdotal evidence on the role of LUS in the diagnosis of interstitial lung disease among HIV patients. One study found that LUS was effective in detecting interstitial HIV-associated lung disease (n=21) with a sensitivity of 90.7% for any abnormality (including B-lines, effusion, or consolidation) compared with 83.3% for CXR.16 B-lines were the most common and most reliable finding (seen in 85.7% of PJP patients with sensitivity of 86.5% and specificity of 71.4%).16 The authors recommended the use of LUS as a screening tool to aid in deciding which patients need further diagnostics because it is not only sensitive but also readily available and non-irradiating.16

In another study, a series of six HIV patients with confirmed PJP that were analyzed by Limonta et al. also demonstrated that multiple B-lines were the commonest LUS feature in PJP, present in all the six cases at admission. The B-lines had a bilateral asymmetric pattern mostly localized in the middle and upper lobes and substantially improved in all patients with clinical amelioration of disease.17 Based on the limited data available to date, LUS shows potential as an easy to use, inexpensive, reproducible, rapid and non-irradiating imaging modality to help the clinician determine whether further imaging is needed in patients for whom PJP is suspected. The presence of multiple (3+) bilateral B-lines, an irregular and thickened pleural line, or subpleural consolidations with a positive shred sign in patients with symptoms worrisome for PJP should undergo further diagnostic imaging. In cases where suggestive features are already present on LUS, a chest X-ray (CXR) may offer no additional diagnostic information and may expose the patient to unnecessary radiation. Though not specific to PJP, when compared with CT, CXR has a sensitivity of 43.5%, specificity of 93.0%, and NPV of 96.5% for detecting pulmonary opacities.18 The sensitivity and PPV of any abnormality on CXR for identifying PJP are only 83.3% and 62.5%, respectively.16 There is a need for a meticulously designed diagnostic performance study comparing LUS to the current gold standard imaging test (CT scan) to establish the true reliability of LUS in the diagnosis of PJP and to clearly define the characteristic LUS lesions across a substantial patient population.

Figure 1. Lung ultrasonography of patient in the introductory vignette showing irregular pleural line marked by blue arrows and B-lines which are seen as vertical white beams arising from the pleura.

Figure 2. Lung ultrasonography of patient in the introductory vignette showing large consolidation (small blue arrows) that appears hypoechoic and tissue-like, comparable to the liver parenchyma. There are also linear air bronchograms (hyperechoic linear areas within the tissue-like structure). The shred sign refers to its irregular, hyperechoic borders (black arrows) that indicate aerated lung.

Figure 3. Lung ultrasonography of patient in the introductory vignette showing small subpleural consolidations indenting the pleural line marked by blue downward arrows, large confluent B-line erasing A-lines marked by inward-facing horizontal blue arrows. The outward-facing horizontal blue arrows are pointing to the black rib shadows.


Chest Radiograph

This is the most widely utilized preliminary imaging test used in patients with suspected PJP.  Characteristic findings of PJP on chest radiograph include bilateral interstitial pattern characterized by finely granular, reticular, or ground-glass opacities. Owing to its low sensitivity (83.3% for any abnormality in the setting of PJP),16 a normal CXR does not rule out a diagnosis of PJP.2

Figure 4. Antero-posterior (AP) chest x-ray findings in PJP, seen in the patient discussed in the introductory case. CXR shows bilateral nearly symmetrical pulmonary infiltrates that spread away from the hilar area.

Chest CT

Current guidelines recommend that a chest CT be obtained if CXR is inconclusive, but the history and clinical presentation remain suggestive of PJP. Ground-glass attenuation is a characteristic finding on chest CT, with less common findings including diffuse nodular patterns, unilateral infiltrates and solitary pulmonary nodules.19 While non-HIV immunocompromised patients mostly present with typical ground-glass opacities, cystic pulmonary lesions can also be seen.20

Figure 5. Non-contrast CT scan of PJP showing ground-glass opacities, septal thickening, and cystic lesions. Image credit: Amini B, Pneumocystis carinii pneumonia. Case study, (Accessed on 07 Dec 2023)

Laboratory Tests

Cultures are infrequently employed in the diagnosis of PJP due to the challenges associated with growing the fungus. Consequently, a definitive diagnosis of PJP necessitates the application of molecular, genetic, or direct visualization techniques on IS or BAL fluid to detect PJ. Initially, IS may be utilized for microscopy with staining or molecular and other testing. If this is not diagnostic, BAL fluid may be used. Despite its invasiveness, BAL tends to offer a higher diagnostic yield.2 Table 1 summarizes the current laboratory tests used in the diagnosis of PJP.


The first-line therapy for PJP is trimethoprim-sulfamethoxazole (TMP/SMX). Alternative regimens available include pentamidine, atovaquone, clindamycin, and primaquine. Polyenes or azoles antifungals are not effective since PJ does not contain ergosterol in the cell wall.2

In the three-center study of 82 patients by Benfield et al, treatment response rates were almost comparable between TMP-SMX (73%) and clindamycin-primaquine (68%). The response rate was significantly lower with pentamidine with increased mortality at 3 months, and atovaquone showed no significant benefit as a second-line treatment.32 These results indicate that clindamycin-primaquine is a good alternative treatment modality for PJP in patients who may have a contraindication to TMP-SMX or in a situation where it is not available.

Corticosteroids have shown to be efficacious in HIV-infected individuals with moderate-to-severe PJP. A meta-analysis by Wang et al, which included 548 cases of HIV-PJP across six randomized controlled trials (RCTs), found a 50% reduction in mortality in the corticosteroid group compared with the control group.33

* = uncommon with short courses. AKI = acute kidney injury, ETC = electron transport chain, GI = gastrointestinal, LAD = lymphadenopathy, LFT = liver function tests, SJS/TEN = Stevens-Johnson syndrome/toxic epidermal necrolysis



Patients with mild disease (Table 2) not requiring supplemental oxygen can be treated in the outpatient setting on oral TMP-SMX provided there is reliable follow-up care.  Those with moderate to severe disease (Table 2) with hypoxia requiring oxygen supplementation (SPO2 < 94%) should be admitted for continued observation while those with progressive hypoxemic respiratory failure should be considered for mechanical ventilation and ICU admission.5


Case Conclusion

The patient was initiated on trimethoprim-sulfamethoxazole (TMP-SMX) combination therapy and 40mg of prednisolone twice a day. Her condition improved greatly and she was discharged after three weeks. Serial LUS examinations were done, which showed a marked reduction in the number of B-lines during the course of treatment and which had completely resolved at the time of discharge. The disappearance of B-lines strongly correlated with the resolution of symptoms.


Pearls and Pitfalls

  • The classic symptoms of PJP include progressive dyspnea, dry cough, and low-grade fever.
  • Patient must be monitored closely for potential respiratory failure.
  • LUS can be used to risk stratify patients for further imaging in resource-constrained settings.
  • CT is highly sensitive for PJP, and ground glass attenuation is the most common finding.
  • First-line treatment is TMP-SMX combined with corticosteroids.


  1. Thomas CF, Limper AH. Pneumocystis Pneumonia. N Engl J Med. 2004;350(24):2487-2498. doi:10.1056/NEJMra032588
  2. Ibrahim A, Chattaraj A, Iqbal Q, et al. Pneumocystis jiroveci Pneumonia: A Review of Management in Human Immunodeficiency Virus (HIV) and Non-HIV Immunocompromised Patients. Avicenna J Med. 2023;13(1):23-34. doi:10.1055/s-0043-1764375
  3. Abouya YL, Beaumel A, Lucas S, et al. Pneumocystis carinii pneumonia. An uncommon cause of death in African patients with acquired immunodeficiency syndrome. Am Rev Respir Dis. 1992;145(3):617-620. doi:10.1164/ajrccm/145.3.617
  4. Gaborit BJ, Tessoulin B, Lavergne RA, et al. Outcome and prognostic factors of Pneumocystis jirovecii pneumonia in immunocompromised adults: a prospective observational study. Ann Intensive Care. 2019;9(1):131. doi:10.1186/s13613-019-0604-x
  5. Bateman M, Oladele R, Kolls JK. Diagnosing Pneumocystis jirovecii pneumonia: A review of current methods and novel approaches. Med Mycol. 2020;58(8):1015-1028. doi:10.1093/mmy/myaa024
  6. Walzer PD. Pneumocystis carinii: recent advances in basic biology and their clinical application. AIDS Lond Engl. 1993;7(10):1293-1305.
  7. Castro JG, Morrison-Bryant M. Management of Pneumocystis Jirovecii pneumonia in HIV infected patients: current options, challenges and future directions. HIVAIDS Auckl NZ. 2010;2:123-134. doi:10.2147/hiv.s7720
  8. Walzer PD. Immunological features of Pneumocystis carinii infection in humans. Clin Diagn Lab Immunol. 1999;6(2):149-155. doi:10.1128/CDLI.6.2.149-155.1999
  9. Wang HW, Lin CC, Kuo CF, Liu CP, Lee CM. Mortality predictors of Pneumocystis jirovecii pneumonia in human immunodeficiency virus-infected patients at presentation: Experience in a tertiary care hospital of northern Taiwan. J Microbiol Immunol Infect Wei Mian Yu Gan Ran Za Zhi. 2011;44(4):274-281. doi:10.1016/j.jmii.2010.08.006
  10. Li MC, Lee NY, Lee CC, Lee HC, Chang CM, Ko WC. Pneumocystis jiroveci pneumonia in immunocompromised patients: delayed diagnosis and poor outcomes in non-HIV-infected individuals. J Microbiol Immunol Infect Wei Mian Yu Gan Ran Za Zhi. 2014;47(1):42-47. doi:10.1016/j.jmii.2012.08.024
  11. Fujii T, Nakamura T, Iwamoto A. Pneumocystis pneumonia in patients with HIV infection: clinical manifestations, laboratory findings, and radiological features. J Infect Chemother Off J Jpn Soc Chemother. 2007;13(1):1-7. doi:10.1007/s10156-006-0484-5
  12. Russian DA, Levine SJ. Pneumocystis carinii pneumonia in patients without HIV infection. Am J Med Sci. 2001;321(1):56-65. doi:10.1097/00000441-200101000-00009
  13. Sepkowitz KA, Telzak EE, Gold JW, et al. Pneumothorax in AIDS. Ann Intern Med. 1991;114(6):455-459. doi:10.7326/0003-4819-114-6-455
  14. Kovacs JA, Hiemenz JW, Macher AM, et al. Pneumocystis carinii pneumonia: a comparison between patients with the acquired immunodeficiency syndrome and patients with other immunodeficiencies. Ann Intern Med. 1984;100(5):663-671. doi:10.7326/0003-4819-100-5-663
  15. Mouren D, Goyard C, Catherinot E, et al. COVID-19 and Pneumocystis jirovecii pneumonia: Back to the basics. Respir Med Res. 2021;79:100814. doi:10.1016/j.resmer.2021.100814
  16. Marggrander DT, Koç-Günel S, Tekeli-Camcı N, Martin S, Golbach R, Wolf T. Lung Ultrasound Effectively Detects HIV-Associated Interstitial Pulmonary Disease. Int J Infect Dis IJID Off Publ Int Soc Infect Dis. 2021;111:204-210. doi:10.1016/j.ijid.2021.08.030
  17. Limonta S, Monge E, Montuori M, Morosi M, Galli M, Franzetti F. Lung ultrasound in the management of pneumocystis pneumonia: A case series. Int J STD AIDS. 2019;30(2):188-193. doi:10.1177/0956462418797872
  18. Self WH, Courtney DM, McNaughton CD, Wunderink RG, Kline JA. High discordance of chest x-ray and computed tomography for detection of pulmonary opacities in ED patients: implications for diagnosing pneumonia. Am J Emerg Med. 2013;31(2):401-405. doi:10.1016/j.ajem.2012.08.041
  19. Kim HS, Shin KE, Lee JH. Single nodular opacity of granulomatous pneumocystis jirovecii pneumonia in an asymptomatic lymphoma patient. Korean J Radiol. 2015;16(2):440-443. doi:10.3348/kjr.2015.16.2.440
  20. Hardak E, Brook O, Yigla M. Radiological features of Pneumocystis jirovecii Pneumonia in immunocompromised patients with and without AIDS. Lung. 2010;188(2):159-163. doi:10.1007/s00408-009-9214-y
  21. Azoulay É, Bergeron A, Chevret S, Bele N, Schlemmer B, Menotti J. Polymerase chain reaction for diagnosing pneumocystis pneumonia in non-HIV immunocompromised patients with pulmonary infiltrates. Chest. 2009;135(3):655-661. doi:10.1378/chest.08-1309
  22. Weig M, Klinker H, Bögner BH, Meier A, Gross U. Usefulness of PCR for diagnosis of Pneumocystis carinii pneumonia in different patient groups. J Clin Microbiol. 1997;35(6):1445-1449. doi:10.1128/jcm.35.6.1445-1449.1997
  23. Sarasombath PT, Thongpiya J, Chulanetra M, et al. Quantitative PCR to Discriminate Between Pneumocystis Pneumonia and Colonization in HIV and Non-HIV Immunocompromised Patients. Front Microbiol. 2021;12:729193. doi:10.3389/fmicb.2021.729193
  24. Huang L, Cattamanchi A, Davis JL, et al. HIV-associated Pneumocystis pneumonia. Proc Am Thorac Soc. 2011;8(3):294-300. doi:10.1513/pats.201009-062WR
  25. Alanio A, Hauser PM, Lagrou K, et al. ECIL guidelines for the diagnosis of Pneumocystis jirovecii pneumonia in patients with haematological malignancies and stem cell transplant recipients. J Antimicrob Chemother. 2016;71(9):2386-2396. doi:10.1093/jac/dkw156
  26. Esteves F, Calé SS, Badura R, et al. Diagnosis of Pneumocystis pneumonia: evaluation of four serologic biomarkers. Clin Microbiol Infect. 2015;21(4):379.e1-379.e10. doi:10.1016/j.cmi.2014.11.025
  27. Procop GW, Haddad S, Quinn J, et al. Detection of Pneumocystis jiroveci in respiratory specimens by four staining methods. J Clin Microbiol. 2004;42(7):3333-3335. doi:10.1128/JCM.42.7.3333-3335.2004
  28. Corsi-Vasquez G, Ostrosky-Zeichner L, Pilkington EF, Sax PE. Point-Counterpoint: Should Serum β-d-Glucan Testing Be Used for the Diagnosis of Pneumocystis jirovecii Pneumonia? J Clin Microbiol. 2019;58(1):e01340-19. doi:10.1128/JCM.01340-19
  29. Li WJ, Guo YL, Liu TJ, Wang K, Kong JL. Diagnosis of pneumocystis pneumonia using serum (1-3)-β-D-Glucan: a bivariate meta-analysis and systematic review. J Thorac Dis. 2015;7(12):2214-2225. doi:10.3978/j.issn.2072-1439.2015.12.27
  30. Karageorgopoulos DE, Qu JM, Korbila IP, Zhu YG, Vasileiou VA, Falagas ME. Accuracy of β-D-glucan for the diagnosis of Pneumocystis jirovecii pneumonia: a meta-analysis. Clin Microbiol Infect Off Publ Eur Soc Clin Microbiol Infect Dis. 2013;19(1):39-49. doi:10.1111/j.1469-0691.2011.03760.x
  31. Xie D, Xu W, You J, et al. Clinical descriptive analysis of severe Pneumocystis jirovecii pneumonia in renal transplantation recipients. Bioengineered. 2021;12(1):1264-1272. doi:10.1080/21655979.2021.1911203
  32. Benfield T, Atzori C, Miller RF, Helweg-Larsen J. Second-line salvage treatment of AIDS-associated Pneumocystis jirovecii pneumonia: a case series and systematic review. J Acquir Immune Defic Syndr 1999. 2008;48(1):63-67. doi:10.1097/QAI.0b013e31816de84d
  33. Wang LI, Liang H, Ye LI, Jiang J, Liang B, Huang J. Adjunctive corticosteroids for the treatment of Pneumocystis jiroveci pneumonia in patients with HIV: A meta-analysis. Exp Ther Med. 2016;11(2):683-687. doi:10.3892/etm.2015.2929
  34. Weyant RB, Kabbani D, Doucette K, Lau C, Cervera C. Pneumocystis jirovecii: a review with a focus on prevention and treatment. Expert Opin Pharmacother. 2021;22(12):1579-1592. doi:10.1080/14656566.2021.1915989

2 thoughts on “Pneumocystis jirovecii Pneumonia and HIV: A Practical Guide for ED Diagnosis and Management”

  1. Suspect PJP with the old triad:

    1. interstitial pneumonia

    2. oral thrush

    3. LDH increase

Leave a Reply

Your email address will not be published. Required fields are marked *