Hospital – acquired pneumonia and pneumonia in immunocompromised patients
Pneumonia that starts in hospital, or in a body whose defences are down, where the organisms are resistant gram-negatives and opportunists and the treatment depends on how long the patient has been there and what is wrong with their immunity.
- 14 min read
- 5 questions
- Checked 28 Oct 2026
Contents6 sections
At a glance
- Hospital-acquired pneumonia (HAP) begins 48 hours or more after admission. Ventilator-associated pneumonia (VAP) begins 48 hours or more after intubation. Aspiration pneumonia follows inhaled stomach or mouth contents. Pneumonia in the immunocompromised is any pneumonia in a patient with a defect of immunity, where opportunists are possible.
- The organisms differ from those of the community: gram-negative bacilli (including Pseudomonas), Staph. aureus (MRSA among them) and anaerobes. The longer the stay, the likelier the resistance.
- The usual route is microaspiration of bacteria that colonise the throat of a sick patient. An endotracheal tube bypasses the upper airway and gives bacteria a direct path.
- The diagnosis needs a new infiltrate on imaging plus clinical evidence that it is infective: a new fever, purulent secretions, a raised white count or worsening oxygenation. A respiratory sample is sent without delaying antibiotics, and treatment is chosen by time since admission, severity, local resistance and risk of a multidrug-resistant organism. Ventilator-associated pneumonia has guidance of its own.
- In the immunocompromised, the pattern of the defect predicts the infection: neutropenia gives bacteria and Aspergillus; T-cell failure gives Pneumocystis, CMV, TB and fungi. Do not delay a bronchoscopy.
- Mortality is high, 20 to 50 per cent in VAP, but a good part of it is due to the illness that put the patient in hospital.
Definition and overview
Pneumonia is classified by where it is caught, because this predicts the organisms and their resistance.
| Type | Definition |
|---|---|
| Hospital-acquired pneumonia (HAP) | pneumonia that starts 48 hours or more after admission and was not incubating on arrival. Much of it arises on general wards in patients who are not ventilated |
| Ventilator-associated pneumonia (VAP) | pneumonia that starts 48 hours or more after endotracheal intubation |
| Aspiration pneumonia | lung infection or injury after inhalation of food, saliva or stomach contents, from impaired swallowing or consciousness |
| Pneumonia in the immunocompromised | pneumonia in a patient with an inherited or acquired defect of immunity, or on immunosuppressants, where opportunistic organisms can cause disease |
Pneumonia in the first 48 hours counts as community-acquired, and UK practice also places in the HAP group people who return to hospital within 7 to 10 days of discharge. Some textbooks also count pneumonia in anyone who has been in a healthcare setting in the last 3 months, a nursing home among them. This "healthcare-associated pneumonia" category has been dropped by the American guidelines, and UK practice counts the pneumonia of a nursing-home resident as community-acquired. The bacterial and nonbacterial community-acquired pneumonias are the other topics of this group.
Etiology and pathophysiology
Organisms in hospital-acquired pneumonia
Within the first few days of an admission, a patient's mouth and throat are colonised with bacteria of the hospital, and the stomach too if acid is suppressed. The causes of HAP are:
- gram-negative bacilli: Pseudomonas species, Escherichia coli, Klebsiella, Enterobacter, Acinetobacter;
- Staphylococcus aureus, including meticillin-resistant strains (MRSA); and
- anaerobes, after aspiration.
Respiratory viruses (influenza, RSV, SARS-CoV-2) cause some hospital-acquired pneumonia in any inpatient, so test for them in season; invasive fungal pneumonia is mainly a problem of the immunocompromised. In ventilator-associated pneumonia, multidrug-resistant gram-negatives such as Acinetobacter baumannii and Pseudomonas aeruginosa are the concern. Pneumonia in the first four or five days after admission, with no recent antibiotics or hospital stays, is caused by the same organisms as CAP; late-onset pneumonia, more than 5 days after admission, is likelier to be resistant. UK practice keeps the community regimen for pneumonia that starts on days 3 to 5 in patients not at a higher risk of resistance, defined as relevant comorbidity such as severe lung disease or immunosuppression, recent broad-spectrum antibiotics, colonisation with a multidrug-resistant bacterium, and recent contact with a health or social care setting before this admission, taking account of the days in hospital before onset. For ventilator-associated pneumonia, the risks for a multidrug-resistant organism are intravenous antibiotics in the previous 90 days, septic shock at onset, ARDS before the pneumonia, 5 or more days in hospital beforehand, and acute renal replacement therapy.
Why it happens in hospital
Pneumonia needs bacteria to reach the lung and the defences to fail. Both are common in a sick, immobile patient:
- Aspiration of colonised secretions is the main route: through reduced consciousness, sedation, swallowing problems after a stroke, nasogastric tubes, vomiting and head-down positions.
- Cough is weak, because of pain after an operation (especially upper abdominal or chest), muscle weakness, and opioids, and the result is atelectasis and retained secretions.
- Mechanical ventilation: the endotracheal tube bypasses the larynx, impairs the cough and the mucociliary clearance, and carries a film of bacteria (biofilm), while secretions pool above the cuff and leak past it into the lower airway. Each day of ventilation adds to the risk.
- Impaired immunity and illness: malnutrition, diabetes, chronic lung disease, shock, steroids, and critical illness.
- Broad-spectrum antibiotics remove the normal flora and select resistant organisms.
Aspiration pneumonia
Aspiration produces two different problems. Acute inhalation of gastric contents causes a chemical injury from acid (Mendelson's syndrome, a hazard of anaesthesia and of obstetric anaesthesia in particular): within hours the patient is breathless and hypoxic, with bilateral shadowing, and it is often not infective at first, although bacteria may follow. Bacterial aspiration pneumonia follows the aspiration of mouth flora in patients with impaired swallowing, and is typically a subacute illness in dependent lung segments. Where the aspirate lands depends on posture: a patient who aspirates lying down is likely to have the posterior segments of the upper lobes or the apical (superior) segments of the lower lobes affected, and one who is upright, the basal segments of the lower lobes. The right lung is involved more often than the left, because the right main bronchus is wider and more vertical (the right middle lobe and the apical or posterior segments of the right lower lobe are the classic sites). If it persists the pneumonia may become a lung abscess, an empyema or bronchiectasis.
Point at a name or a part to light it.
A tube in the trachea bypasses the larynx and impairs the cough, and secretions from the mouth and throat pool above its cuff and leak past it. Whatever is aspirated, by a ventilated patient or by anyone who cannot protect the airway, follows gravity and the anatomy: the right main bronchus is more vertical, so it most often lands in the right lung, classically in the middle lobe and the apical or posterior segments of the lower lobe. In a patient lying down, as on a ventilator, it goes to the parts lowest for their posture: the apical segment of the lower lobe when flat on the back, the back and side of the upper lobe when turned to one side.
Simplified: the lungs seen from the front as a flat outline, so the lower lobe shows only where a front view sees it, and its apical and posterior segments, at the back, are drawn within that; the tube and cuff drawn as clear plastic, the larynx and mouth left out, and the secretions as two small pools; the sites drawn are Kumar's classic ones for aspiration, not those of a patient lying down, where the apical segment of the lower lobe and the side of the upper lobe are the likeliest; the bronchial tree drawn with far fewer branches than it has, and on top of the lungs.
3 sources
- Kumar and Clark's Clinical Medicine, 10th edition. Elsevier, 2021. Chapter 28, Respiratory disease: anatomy (pp. 930–931) and pneumonia in other settings (p. 967).
- Kalanuria AA, Ziai W, Mirski M. Ventilator-associated pneumonia in the ICU. Critical Care 2014;18(2):208.
- Corrin B, Nicholson AG. Pathology of the Lungs, 3rd edition. Churchill Livingstone, 2011. Chapter 5, Infectious diseases: bronchopneumonia and aspiration pneumonia.
The immunocompromised host
Which organisms to fear depends on which arm of the immune system is damaged.
| Defect | Examples | Typical pathogens |
|---|---|---|
| Neutropenia | chemotherapy, leukaemia | gram-negative bacteria (including Pseudomonas), Staph. aureus, Aspergillus |
| T-cell failure | HIV, transplant, corticosteroids, ciclosporin, biologics | Pneumocystis jirovecii, cytomegalovirus (CMV), Mycobacterium tuberculosis and non-tuberculous mycobacteria, Nocardia, Legionella, Cryptococcus, the endemic fungi |
| B-cell failure or low immunoglobulins | myeloma, CLL, immunodeficiency | encapsulated bacteria: pneumococcus, H. influenzae |
| Asplenia | splenectomy, sickle cell disease | pneumococcus and other encapsulated bacteria, with sudden overwhelming sepsis |
| Complement deficiency | inherited | Neisseria and encapsulated bacteria |
Candida in the sputum of a neutropenic patient is usually colonisation, and true Candida pneumonia is rare, so it is not treated on a respiratory sample alone. In HIV, the CD4 count points to the infection: Pneumocystis below 200 per µL, and CMV disease and the endemic fungi usually below 50 per µL (in HIV, CMV usually shows as retinitis or colitis rather than pneumonia). Cryptococcus also appears below about 200 per µL, but usually as meningitis.
The timing after a transplant also matters: in the first month bacteria dominate, in months 1 to 6 CMV, Pneumocystis and Aspergillus, and later the community pathogens again.
Clinical features
HAP shows as a new fever, purulent sputum or tracheal secretions, a raised white count or CRP, and a rising oxygen need, with a new or progressing shadow on the chest film. In ventilated patients, the signs are more secretions, a rising FiO2 or a falling PaO2/FiO2 ratio and difficulty with weaning. In a frail or older patient there may be only confusion or deterioration. The picture is easily confused with heart failure, atelectasis, pulmonary embolism, ARDS and aspiration pneumonitis, which are common in the same patients.
Pneumocystis pneumonia (PJP) has a subacute onset over days to weeks of fever, a dry cough and breathlessness, and a characteristic fall in saturation on exertion. In HIV the course is more indolent than in other patients, who can deteriorate abruptly. The chest film shows diffuse bilateral alveolar and interstitial shadowing from the perihilar zones outward (a "butterfly" pattern), and the film can be normal early; CT shows ground-glass change. Pneumothorax is a recognised complication, and the serum LDH is high.
Aspergillus in the neutropenic patient gives persistent fever despite broad-spectrum antibiotics, with pleuritic pain and haemoptysis. CMV pneumonitis appears 1 to 6 months after a transplant, with fever, dry cough, hypoxia and diffuse infiltrates.
Diagnosis and management
Diagnosis
- Imaging: a new or progressive infiltrate on the chest film, together with clinical evidence that it is infective: the new fever, purulent secretions, raised white count and worsening oxygenation described above. No single finding is specific. CT is more sensitive and is used when the film is unclear, and lung ultrasound helps in hospital, for example in a sick patient, or where heart failure or pleural disease is possible.
- Cultures: send a respiratory sample for microbiology, for example sputum, a nasopharyngeal swab or a tracheal aspirate, without delaying antibiotics. Blood cultures are sensible if sepsis is suspected. In ventilated patients, a tracheal aspirate or a bronchoalveolar lavage; American guidance prefers non-invasive sampling with semiquantitative cultures to invasive sampling. Test for influenza, RSV and SARS-CoV-2 in season.
- Nasal MRSA PCR: a negative result has a negative predictive value of about 96 per cent for MRSA pneumonia at a prevalence of 10 per cent in a meta-analysis (about 95 per cent in ventilator-associated pneumonia), so it can justify stopping or withholding anti-MRSA drugs.
- Procalcitonin is not used to decide whether to start antibiotics; it may help to decide when to stop them.
Treatment of hospital-acquired pneumonia
Start antibiotics as soon as the diagnosis is made and within 4 hours. The choice depends on the risk of resistance and local data. The table is the usual UK treatment of HAP in a patient who is not ventilated:
| Situation | Empirical antibiotic |
|---|---|
| Non-severe, not at higher risk of resistance | oral co-amoxiclav 500/125 mg three times daily for 5 days, then review; for penicillin allergy, doxycycline, or another drug on microbiological advice |
| Severe (for example sepsis) or at higher risk of resistance | intravenous piperacillin–tazobactam, ceftazidime, ceftriaxone, cefuroxime or meropenem (or ceftazidime–avibactam), by microbiological advice and local resistance |
| Suspected or confirmed MRSA | add vancomycin or teicoplanin; linezolid if vancomycin cannot be used, on specialist advice |
Review the antibiotics when cultures return and narrow them. Review after a total of 5 days and consider stopping if the patient is clinically stable; if there is concern about treatment failure, measure CRP or procalcitonin at 3 or 4 days. American guidance gives 7 days, not longer, for HAP and VAP. Treat the cause of any complication, such as an empyema. Fluoroquinolones are kept for when other antibiotics are unsuitable, because of their disabling side effects.
For ventilator-associated pneumonia, every empirical regimen covers Staph. aureus, Pseudomonas aeruginosa and other gram-negative bacilli, for example with piperacillin–tazobactam, cefepime or meropenem. Add cover for MRSA (vancomycin or linezolid) if there is a risk factor for a multidrug-resistant organism, or more than 10 to 20 per cent of the unit's Staph. aureus isolates are MRSA, or the local figure is unknown. Add a second antipseudomonal drug of a different class only with such a risk factor, if more than 10 per cent of the unit's gram-negative isolates are resistant to the first, or if local data are lacking. Narrow the regimen when cultures return.
Treatment of aspiration pneumonia is directed by cultures; if there are none, co-amoxiclav is a usual choice for mild to moderate illness, and the antibiotic is escalated for severe illness or poor response. Routine anaerobic cover is not added unless there is a lung abscess or empyema (a conditional recommendation, on very low-quality evidence). Co-amoxiclav already covers the usual mouth flora, so it needs no metronidazole added. Chemical pneumonitis alone does not need antibiotics, only supportive care, and antibiotics follow if it does not settle within two days. Find and correct the reason for aspiration, because it will recur: a swallowing assessment, speech therapy, and feeding access.
Prevention matters because HAP is so common and so lethal. The measures include:
- hand hygiene;
- raising the head of the bed to 30 to 45 degrees;
- minimal sedation, daily review of the need for the endotracheal tube, early extubation and mobilisation;
- oral care, a swallowing assessment for patients at risk, and sitting up to eat and drink, which also help patients who are not ventilated;
- subglottic secretion drainage in patients ventilated for a long time;
- avoiding unnecessary acid suppression, nasogastric feeding when oral feeding is safe, and unnecessary broad-spectrum antibiotics;
- after surgery, early mobilisation and analgesia that allows deep breathing and coughing; and
- vaccination against influenza and pneumococcus.
The immunocompromised patient
Think of the defect, make the diagnosis early, and treat empirically for the likeliest causes. A CT of the chest and early bronchoscopy with lavage (for Gram stain, culture, PCR for viruses and Pneumocystis, galactomannan, and cytology) get the diagnosis in many cases. Blood tests include culture, CMV PCR, serum galactomannan and β-D-glucan. Involve the microbiologist or infectious diseases team.
- Neutropenic fever with a pulmonary infiltrate: an intravenous antipseudomonal β-lactam such as piperacillin–tazobactam within an hour. If fever lasts 4 to 7 days despite antibiotics, look for fungi, and add an antifungal drug.
- Pneumocystis jirovecii pneumonia: first-line is high-dose co-trimoxazole (trimethoprim 15 to 20 mg/kg a day in divided doses) for 21 days. In HIV, corticosteroids (prednisolone 40 mg twice a day for 5 days, then 40 mg daily for 5 days, then 20 mg daily for 11 days) are started within 72 hours when the PaO2 on air is below 9.3 kPa (70 mmHg) or the alveolar–arterial gradient is 35 mmHg or more (some textbooks define severe disease as a PaO2 below 8 kPa). In patients without HIV the benefit of steroids is less certain, because the evidence is observational and conflicting, though many centres still give them in severe disease. Alternatives are intravenous pentamidine, and clindamycin with primaquine (check G6PD before primaquine or dapsone); oral atovaquone is an option in mild to moderate disease when co-trimoxazole cannot be used. Confirm the diagnosis by immunofluorescence or PCR on induced sputum or lavage, although in a very sick high-risk patient treatment is started first. The serum β-D-glucan is high. Prophylaxis with co-trimoxazole prevents it in HIV with a CD4 count below 200 per µL, and in other high-risk groups (for example, prolonged high-dose steroids or after a transplant).
- Invasive aspergillosis: voriconazole or isavuconazole; liposomal amphotericin B is an alternative. CT shows nodules with a halo of ground-glass opacification.
- CMV pneumonitis: intravenous ganciclovir, or foscarnet if ganciclovir cannot be used; oral valganciclovir is for milder disease or to complete treatment. The diagnosis needs the characteristic "owl's eye" inclusion bodies on cytology or biopsy (or immunostaining) in a patient with compatible lung disease. A positive PCR on lavage can reflect shedding and is not enough on its own.
- HIV: start antiretroviral therapy; the timing after treating an opportunistic infection is a specialist decision.
Epidemiology
Hospital-acquired pneumonia is among the commonest healthcare-associated infections. In a survey of European hospitals in 2022 to 2023, respiratory tract infections (pneumonia included, with healthcare-associated COVID-19) were the largest group, nearly a third of the total, and pneumonia makes up about 22 per cent in the United States. Older counts put it second after urinary tract infection. In intensive care it is among the most frequent, and VAP develops in about 10 per cent of patients who need mechanical ventilation. The risk is greatest in the elderly, after stroke, and with chronic lung disease, diabetes, surgery on the chest or upper abdomen, and a stay in intensive care. Pneumonia in the immunocompromised has grown with the number of people on chemotherapy, biologics and transplants, and Pneumocystis pneumonia in HIV has fallen with antiretroviral therapy and prophylaxis.
Prognosis
HAP carries a significant mortality, especially in the elderly and those with stroke, lung disease or diabetes. In VAP, all-cause mortality is reported at 20 to 50 per cent, but much of it comes from the underlying illness, and the attributable mortality has been estimated at 13 per cent. Resistant organisms, late-onset disease, shock and delay in effective treatment all worsen the outlook. Hospital stay is lengthened by many days.
In the immunocompromised, the prognosis depends on the organism and the underlying disease. Treated Pneumocystis pneumonia in HIV is mostly survived (the mortality is roughly 10 to 20 per cent), and the outcome is poorer in patients without HIV, who present later. Invasive aspergillosis in haematology patients carries a high mortality, and recovery of neutrophils is the strongest factor in survival. Pneumonia that needs ventilation in an immunosuppressed patient carries a high mortality.
Check yourselfAnswer, then say how sure you were: a lucky guess still counts as a weak point.
1How long after admission does a new pneumonia count as hospital-acquired?
2Which of these puts a patient with hospital-acquired pneumonia at higher risk of a resistant organism?
3A man with HIV and a CD4 count of 120 per µL has two weeks of dry cough, and desaturates on walking. X-ray shows bilateral perihilar ground-glass shadowing. What is first-line treatment?
4A patient has been neutropenic for two weeks and still has a fever on broad-spectrum antibiotics. CT shows nodules with a surrounding halo. What is the most likely cause?
5Which measure helps prevent ventilator-associated pneumonia?
Linked topicsThe concepts this topic shares, and the topics they tie it to.
See on the mapPneumonia
Starts 48 hours or more after admission; gram-negatives and S. aureus are common causes, some resistant.
- Antibiotics: classification; mechanisms, type and spectrum of action. Principles of the rational antibiotic therapy and prophylaxisPharmacologyTreat first by the likely germ, then narrow once it is known.
- PenicillinsPharmacologyAmoxicillin for most pneumonia caught in the community.
- Macrolides and ketolides (50S inhibitors)PharmacologyClarithromycin or azithromycin add cover for atypical bacteria.
- QuinolonesPharmacologyLevofloxacin and moxifloxacin, the respiratory quinolones, are kept for when first choices can’t be used.
- Antiviral drugsPharmacologyNot written yetOseltamivir for influenza.
- SulfonamidesPharmacologyCo-trimoxazole treats Pneumocystis pneumonia in immunocompromised patients.
- Bacterial community – acquired pneumoniaPulmonary diseasesStreptococcus pneumoniae is the commonest cause.
- Nonbacterial community – acquired pneumoniaPulmonary diseasesViruses such as influenza and SARS-CoV-2.
- Treatment of pneumoniasPulmonary diseasesChoosing the antibiotic by severity and setting.
Bacterial cell wall
Ceftriaxone or ertapenem if resistance is unlikely; piperacillin–tazobactam or meropenem if it is likely.
- Origin and evolution of cells. Prokaryotes, eukaryotes, Escherichia coliBiologyProkaryotes such as E. coli, and the cell wall our cells lack.
- Antibiotics: classification; mechanisms, type and spectrum of action. Principles of the rational antibiotic therapy and prophylaxisPharmacologyAntibiotics are grouped by their target; the cell wall is one of the main ones.
- β-lactam antibiotics: overviewPharmacologyA β-lactam binds the penicillin-binding proteins, so new peptidoglycan isn’t cross-linked.
- PenicillinsPharmacologyThe first β-lactams, from benzylpenicillin to amoxicillin and piperacillin.
- CephalosporinsPharmacologyβ-lactams in generations: the first three reach ever more gram-negatives, the fifth MRSA too.
- Carbapenems and monobactams. GlycopeptidesPharmacologyCarbapenems are the broadest β-lactams; vancomycin blocks the wall by binding D-Ala-D-Ala itself.
- Bacterial community – acquired pneumoniaPulmonary diseasesAmoxicillin treats most pneumococcal pneumonia.
- EndocarditisCardiovascular diseasesWeeks of intravenous β-lactams, or vancomycin, chosen by the organism.