DPDoctor's PassportEducation
Educational draft · awaiting clinical reviewThe full textbook explains uncertainty but does not replace live national or local guidance, specialist advice, or current prescribing information.
Full textbookMLAMSRAFoundation

Opportunistic infection in HIV

Use CD4 count and organ syndrome to identify HIV-related opportunistic infection, obtain decisive samples, start time-critical therapy and sequence ART to avoid preventable immune-reconstitution harm.

!
Hypoxia, raised intracranial pressure or sight loss

Severe PCP hypoxia, cryptococcal or TB meningitis with raised pressure, focal brain disease, CMV retinal symptoms, sepsis or profound cytopenia in advanced HIV is immediately organ threatening.

Action: Use ABCDE, involve HIV and infection specialists, obtain arterial gas, neuroimaging, lumbar-puncture opening pressure or urgent retinal examination as indicated, and begin syndrome-specific treatment before routine ART initiation.

Open the sections you need. The overview is shown first.
01OverviewDefinition, clinical context and the essential points that orientate the chapter.

Opportunistic infections emerge as HIV-mediated cellular immunity declines. Organism probability reflects CD4 count, geography, previous exposure, prophylaxis and ART status, but the clinical syndrome directs immediate testing.

Respiratory disease includes PCP, tuberculosis and bacterial pneumonia; neurological disease includes cryptococcus, toxoplasma, TB, lymphoma and progressive multifocal leukoencephalopathy; visual disease includes CMV retinitis and ocular syphilis.

Definitive diagnosis matters because treatments are prolonged and toxic. Bronchoalveolar lavage, CSF opening pressure and antigen, brain imaging, retinal examination, tissue biopsy and microbiological culture are selected early rather than relying on nonspecific blood tests.

ART restores immunity and is essential to cure, yet timing interacts with pathogen burden. Uncontrolled intracranial cryptococcal or TB inflammation can worsen when ART is started too soon, while unnecessary delay during PCP or bacterial disease increases HIV risk.

Key points

  • CD4 count predicts probability: PCP rises below 200, toxoplasma and cryptococcus below about 100, and CMV or disseminated MAC below about 50 cells/µL.
  • Never use CD4 threshold alone; tuberculosis, bacterial infection and some malignancies occur at any count.
  • PCP usually causes subacute dry cough, fever, exertional dyspnoea and diffuse ground-glass change with marked hypoxia.
  • Serum cryptococcal antigen and lumbar puncture with opening pressure are central in headache with advanced HIV.
  • Multiple basal-ganglia ring-enhancing lesions with positive toxoplasma IgG support cerebral toxoplasmosis, but lymphoma remains a key alternative.
  • CMV retinitis is a clinical ophthalmic emergency diagnosed by dilated retinal examination, not by blood PCR alone.
  • Start ART early during most opportunistic infections, but delay after cryptococcal meningitis and use a specialist timing plan for TB meningitis.
  • Begin co-trimoxazole PCP prophylaxis at the current CD4 or clinical threshold and stop only after sustained immune recovery on ART.
02AetiologyUnderlying causes, associations and risk factors, with why each one matters.
01

Reactivation of latent infection

Latent Toxoplasma, tuberculosis and other previously controlled organisms can reactivate when pathogen-specific cellular immunity declines below the level needed for containment.

02

Environmental fungal acquisition

Inhaled Pneumocystis and Cryptococcus exploit impaired T-cell and macrophage defences during advanced immunodeficiency, causing pulmonary or disseminated disease.

03

Persistent herpesvirus infection

Latent CMV reactivates and disseminates to retina, gut, nervous system or other organs at very low CD4 counts.

04

New community exposure

Bacterial pneumonia, TB and enteric pathogens may be newly acquired and cause greater severity in untreated HIV.

03PathophysiologyThe causal sequence from the underlying abnormality to symptoms and harm.
  1. 1
    CD4-threshold vulnerability

    Loss of helper T-cell signalling progressively impairs macrophage activation, cytotoxic responses and maintenance of latent-pathogen control.

  2. 2
    Alveolar filling

    Pneumocystis organisms and foamy alveolar material impair gas diffusion, producing exertional desaturation that can progress to profound resting hypoxaemia.

  3. 3
    Intracranial fungal burden

    Cryptococcal organisms and capsular products obstruct CSF resorption, producing dangerous intracranial hypertension despite relatively modest meningeal inflammation and examination findings.

  4. 4
    Tissue-destructive reactivation

    Toxoplasma necroses brain, CMV injures retinal vessels and TB produces disseminated granulomatous or poorly formed lesions.

04Clinical features and red flagsSymptoms, examination findings, patterns of presentation and time-critical warnings.
Pneumocystis pneumoniaRed flag

Weeks of dry cough, fever, progressive exertional dyspnoea, tachypnoea and disproportionate hypoxia occurs commonly below CD4 200.

Cryptococcal meningitisRed flag

Subacute headache, fever, cognitive change, cranial neuropathy or visual symptoms may occur with little meningism below CD4 100.

Cerebral toxoplasmosisRed flag

Headache, fever, seizures and focal deficits with multiple ring-enhancing brain lesions usually occurs below CD4 100.

CMV retinitisRed flag

Floaters, flashing lights, scotoma or reduced vision with haemorrhagic retinal lesions threatens permanent sight below CD4 50.

TuberculosisRed flag

Fever, weight loss, cough, lymphadenopathy or disseminated organ disease can occur at any CD4 count and becomes less cavitating when advanced.

Oesophageal candidiasis

Odynophagia or retrosternal pain with oral candidiasis suggests oesophageal disease, but CMV and HSV remain alternatives.

Red flags requiring action

  • Resting or exertional hypoxia with dry cough and bilateral interstitial change suggests PCP and needs urgent arterial blood gas.
  • Headache, confusion or cranial neuropathy with CD4 below 100 cells/µL requires cryptococcal antigen and pressure-aware lumbar puncture.
  • Visual floaters, scotoma or acuity loss at CD4 below 50 cells/µL needs same-day dilated retinal examination for CMV.
  • Focal neurology, seizure or ring-enhancing lesions suggest cerebral toxoplasmosis, lymphoma, TB or fungal disease.
  • Clinical deterioration after ART may be immune-reconstitution inflammation, but treatment failure, resistance and a new infection must be excluded.
  • Cryptococcal or TB meningitis requires specialist delay of ART because early immune recovery can worsen intracranial inflammation.
05InvestigationsWhat to request, why it matters and how to interpret it.
Investigation order

Read from the initial assessment onwards. Tests may run in parallel in urgent care; first-line, preferred, confirmatory, definitive and gold-standard labels appear only when the chapter explicitly states them.

  1. 01
    CD4 count and HIV viral loadFirst step
    Why
    Map immune risk, baseline HIV activity and prophylaxis or ART urgency.
    Interpretation and limitations
    A count supports but never proves the organism; acute infection and steroids can alter CD4 transiently.
  2. 02
    Arterial blood gas and chest CT
    Why
    Grade PCP gas-exchange failure and identify diffuse ground-glass or alternative pulmonary disease.
    Interpretation and limitations
    PaO2 below 9.3 kPa or alveolar–arterial gradient above 4.7 kPa supports adjunctive corticosteroids in PCP.
  3. 03
    Induced sputum or bronchoalveolar lavage
    Why
    Detect Pneumocystis by PCR or microscopy and culture or test for TB, bacteria and fungi.
    Interpretation and limitations
    A highly sensitive PCR may detect colonisation; organism burden, microscopy, beta-D-glucan and clinical pattern support attribution.
  4. 04
    Serum cryptococcal antigen and lumbar puncture
    Why
    Diagnose cryptococcosis and measure dangerous intracranial pressure.
    Interpretation and limitations
    Record opening pressure, cells, protein, glucose, antigen and fungal culture; repeat therapeutic drainage when symptomatic pressure is elevated.
  5. 05
    Contrast brain MRI
    Why
    Differentiate toxoplasma, lymphoma, tuberculoma, PML and other focal pathology.
    Interpretation and limitations
    Multiple ring-enhancing basal-ganglia lesions favour toxoplasma; absent response to empirical therapy prompts biopsy or alternative testing.
  6. 06
    Dilated retinal examination
    Why
    Diagnose CMV retinitis and define macular, optic-disc and detachment risk.
    Interpretation and limitations
    Urgent ophthalmic appearance is decisive; blood CMV PCR can support systemic disease but cannot exclude retinitis.
  7. 07
    Mycobacterial sampling
    Why
    Confirm pulmonary or disseminated TB and identify drug resistance.
    Interpretation and limitations
    Send respiratory, lymph-node, blood, CSF or tissue NAAT and culture according to site before therapy where safe.
06Differential diagnosisRealistic alternatives and the features that help distinguish them.
01

Bacterial pneumonia

Acute productive cough, focal consolidation and neutrophilia favour bacterial pneumonia, which can coexist with HIV and occur at any CD4 count.

02

HIV-associated lymphoma

Primary CNS lymphoma causes solitary or multiple enhancing lesions and may resemble toxoplasmosis without treatment response.

03

Progressive multifocal leukoencephalopathy

JC-virus demyelination causes progressive focal deficits with non-enhancing white-matter lesions and little mass effect, unlike an abscess or lymphoma.

04

Medication toxicity

Drug-induced pneumonitis, cytopenia, renal injury or neurological symptoms can mimic opportunistic disease; the medicine timeline and targeted testing guide attribution.

05

Immune-reconstitution syndrome

Recovering pathogen-specific responses can unmask or paradoxically worsen infection after ART despite falling viral load and improving immune control.

07ManagementImmediate care, first-line treatment, alternatives and escalation.
01LUNGTreat suspected PCP promptlyFirst stepSubacute respiratory illness, compatible imaging and immune deficiency produce hypoxia.
  1. 1Use ABCDE, obtain arterial gas, chest imaging, LDH and beta-D-glucan and send induced sputum or bronchoalveolar samples.
  2. 2Start high-dose co-trimoxazole immediately when probability is high, adjusting for weight, renal function and severe allergy.
  3. 3Add corticosteroids within 72 hours when PaO2 is below 9.3 kPa or the alveolar–arterial gradient exceeds 4.7 kPa.
  4. 4Treat for 21 days and start ART within about two weeks when clinically stable and no competing CNS infection changes timing.
02HEADACHEControl cryptococcal pressureAdvanced HIV with headache, cognitive change or positive cryptococcal antigen suggests meningitis.
  1. 1Obtain urgent brain assessment and lumbar puncture with a measured opening pressure unless imaging or physiology makes it unsafe.
  2. 2Start specialist induction with liposomal amphotericin B plus flucytosine and monitor renal, electrolyte and marrow toxicity.
  3. 3Use repeated therapeutic lumbar puncture for symptomatic raised pressure rather than relying on mannitol or corticosteroids.
  4. 4Delay ART for the evidence-based specialist interval, commonly four to six weeks, to reduce fatal intracranial immune reconstitution.
03FOCALManage cerebral mass lesionsSeizure, focal deficit or brain imaging shows one or more lesions in advanced HIV.
  1. 1Stabilise seizure and raised pressure, obtain contrast MRI and toxoplasma IgG and assess TB, fungal and lymphoma evidence.
  2. 2DefinitiveBegin specialist toxoplasma therapy for a typical multiple-lesion syndrome while arranging definitive tests.
  3. 3AlternativeRepeat clinical and radiological assessment after 10 to 14 days; absent improvement prompts biopsy or alternative lymphoma and infection work-up.
  4. 4Start ART using pathogen-specific timing and continue secondary prophylaxis until sustained immune recovery.
04VISIONProtect sight from CMVFloaters, scotoma, visual reduction or retinal abnormality occurs with severe immune suppression.
  1. 1Arrange same-day dilated retinal examination and retinal imaging through ophthalmology.
  2. 2Begin renal-adjusted systemic valganciclovir or intravenous ganciclovir immediately when CMV retinitis is confirmed.
  3. 3Add intravitreal treatment for lesions threatening macula or optic disc according to ophthalmic assessment.
  4. 4Start or optimise ART and monitor the fellow eye, marrow, kidney and immune-recovery inflammation.
Key medicines and prescribing safety4 treatments · regimens, roles and cautions
Provides first-choice treatment for mild through severe Pneumocystis jirovecii pneumonia.

Co-trimoxazole for PCP treatment

Give trimethoprim 15 to 20 mg/kg/day with sulfamethoxazole 75 to 100 mg/kg/day orally or intravenously in three or four divided doses for 21 days.

Use the trimethoprim component for dosing, adjust renal function and monitor rash, marrow, potassium, creatinine and liver; seek specialist alternatives for severe allergy.

Reduces inflammatory respiratory deterioration when PaO2 is below 9.3 kPa or the alveolar–arterial gradient exceeds 4.7 kPa.

Prednisolone for moderate or severe PCP

Give 40 mg orally twice daily on days 1 to 5, 40 mg once daily on days 6 to 10, then 20 mg once daily on days 11 to 21.

Start within 72 hours of PCP therapy, exclude competing steroid-harmed infection as far as possible and monitor glucose, mood and secondary infection.

Rapidly sterilises CSF before fluconazole consolidation and maintenance.

Cryptococcal induction therapy

Give liposomal amphotericin B 3 mg/kg intravenously once daily plus flucytosine 25 mg/kg orally four times daily for 14 days under specialist guidance.

Monitor daily renal function, potassium and magnesium and frequent blood count; adjust flucytosine for renal function and manage raised pressure separately.

Treats retinal and systemic CMV while ART restores CMV-specific immunity.

Valganciclovir for CMV retinitis

Give 900 mg orally twice daily for 14 to 21 days for induction, then 900 mg once daily maintenance when ophthalmology and HIV specialists select oral therapy.

Adjust for renal function, monitor neutropenia, anaemia and platelets, review pregnancy and contraception toxicity, and add local ocular therapy when sight is threatened.

08ComplicationsImportant consequences, why they occur and why they matter clinically.
01

Respiratory failure

Progressive PCP or another pulmonary opportunistic infection can cause severe hypoxaemia, pneumothorax, ventilatory failure and urgent critical-care need.

02

Permanent neurological injury

CNS infection, raised intracranial pressure, infarction or mass lesions can leave permanent cognitive, cranial-nerve, seizure and motor disability.

03

Irreversible visual loss

CMV retinal necrosis, retinal detachment or cryptococcal intracranial pressure can irreversibly damage the macula, optic nerve and visual pathways.

04

Treatment toxicity

Amphotericin, flucytosine, co-trimoxazole and ganciclovir can cause renal, electrolyte, marrow, hepatic or hypersensitivity toxicity that requires scheduled laboratory surveillance.

05

Immune-reconstitution inflammation

Rapid pathogen-specific immune recovery after ART can cause paradoxical lesion enlargement, fever or organ dysfunction around viable organisms or residual antigen.

09Monitoring and follow-upTreatment response, safety checks and longer-term review.
  • Track oxygen saturation at rest and exertion, arterial gas and respiratory work during PCP treatment.
  • Monitor co-trimoxazole blood count, creatinine, potassium, liver and severe rash or mucosal toxicity.
  • During amphotericin and flucytosine therapy check renal function, potassium, magnesium and blood count frequently and measure cryptococcal culture response.
  • Record cryptococcal opening pressure and repeat therapeutic lumbar puncture for recurrent pressure symptoms.
  • Repeat brain imaging after empirical toxoplasma therapy and escalate absent clinical response at 10 to 14 days.
  • Perform serial retinal examination during CMV induction, maintenance and immune recovery.
  • Plan ART and primary or secondary prophylaxis start and stop dates from pathogen, CD4 recovery and sustained viral suppression.
10Special situationsVariants, exceptions and circumstances that change the usual approach.

PCP can have a normal radiograph

Early chest radiography may be unrevealing despite exertional desaturation; CT and gas exchange reveal clinically important disease.

Cryptococcal pressure kills

Repeated lumbar drainage is a treatment, not merely a diagnostic procedure, when raised pressure drives headache and visual risk.

Steroids are threshold based

Adjunctive corticosteroids benefit hypoxic PCP but are not routine for mild disease or uncontrolled cryptococcal pressure.

Blood CMV is not retinal diagnosis

Retinitis is diagnosed through urgent ocular examination because viraemia can be absent or present without eye disease.

Toxoplasma response informs diagnosis

Clinical and radiological improvement within about two weeks supports toxoplasmosis; non-response redirects toward lymphoma, TB or biopsy.

IRIS is a diagnosis of exclusion

Worsening after ART may reflect immune recovery, but resistance, non-adherence, toxicity and uncontrolled infection must be reassessed.

11Common pitfallsFrequent interpretation and management errors.
  1. 01

    Do not give PCP treatment doses using total co-trimoxazole weight without identifying the trimethoprim component.

  2. 02

    Do not omit an arterial blood gas when oxygenation determines adjunctive steroid treatment.

  3. 03

    Do not perform lumbar puncture for cryptococcus without recording opening pressure.

  4. 04

    Do not use corticosteroids to treat raised cryptococcal pressure.

  5. 05

    Do not diagnose CMV retinitis from blood PCR without retinal examination.

  6. 06

    Do not start immediate ART in cryptococcal or TB meningitis without specialist timing.

Practice

Two practice questions

Question 1 of 20 correct
Infectious diseases, microbiology and sexual healthOriginal SBA

Adjunctive steroids in PCP

An adult with HIV has confirmed PCP and an arterial PaO2 of 8.8 kPa on room air. Which additional treatment is indicated with high-dose co-trimoxazole?

Sources and review status4 sources · checked 27 Aug 2026 · clinical review pending
Sources

Sources and review status

National guidance is shown before implementation-dependent detail. Typical adult dose examples remain subject to patient factors, contraindications and the live BNF or specialist protocol. Source check completed 27 Aug 2026; clinical approval remains outstanding.

Authoring stateComplete draftClinical stateAwaiting reviewJurisdictionUnited Kingdom