Immunodeficiency and HIV
Immunodeficiency Disorders and HIV: Primary, Secondary and Opportunistic Infections
Primary immunodeficiencies (Bruton, DiGeorge, SCID, CGD, hyper-IgE, complement), secondary causes, and HIV testing, CD4 thresholds and treatment. Each defect is linked to the infections it allows, so the pattern of infection points to the missing arm of immunity.
Matching the defect to the infections
- Each arm of immunity guards against particular organisms, so the pattern of infection tells you which arm is missing.
| Defect | Typical infections |
|---|---|
| B cells / antibodies | Recurrent encapsulated bacteria (pneumococcus, Haemophilus): otitis, sinusitis, pneumonia, bronchiectasis; enteroviruses; Giardia |
| T cells | Viruses, fungi (Candida, Pneumocystis), intracellular bacteria (mycobacteria, Listeria), protozoa; failure to thrive |
| Th17 / IL-17 | Chronic mucocutaneous candidiasis of mouth, nails and skin without invasive disease |
| Neutrophils | Staphylococcus aureus, Gram-negatives, Aspergillus; abscesses, poor wound healing |
| Early complement (C1–C4) | SLE-like immune complex disease |
| C3 | Severe pyogenic infections |
| Terminal complement (C5–C9) | Recurrent Neisseria infections |
- Superficial Candida (mouth, nails, skin) points to Th17 failure; invasive Candida or Aspergillus points to neutrophil failure.
Antibody and T-cell disorders
| Disorder | Defect | Key features |
|---|---|---|
| X-linked agammaglobulinaemia (Bruton) | BTK; B cells cannot mature | Boys; infections from about 6 months when maternal IgG wanes; no B cells, all Ig low; tiny tonsils; no live polio vaccine |
| Common variable immunodeficiency | B cells fail to become plasma cells | Teens or adults; low Ig with B cells present; bronchiectasis, Giardia, autoimmunity, lymphoma |
| Selective IgA deficiency | Low IgA | Commonest primary immunodeficiency; often silent; coeliac disease; anaphylaxis to IgA in blood products |
| Hyper-IgM syndrome | CD40 ligand (X-linked): no class switch | Normal or high IgM, low IgG, IgA, IgE; Pneumocystis, Cryptosporidium |
| DiGeorge syndrome | 22q11 deletion; 3rd and 4th pharyngeal pouches | Thymic hypoplasia, hypocalcaemia, conotruncal heart defects, cleft palate |
| SCID | X-linked γ-chain (commonest) or ADA deficiency | T and B fail; thrush, Pneumocystis, diarrhoea in early infancy; no thymic shadow; stem cell transplant; no live vaccines |
| Wiskott–Aldrich | WAS gene (X-linked) | Eczema, thrombocytopenia with small platelets, recurrent infections; lymphoma |
| Ataxia-telangiectasia | ATM (DNA repair) | Ataxia, telangiectasia, IgA deficiency, raised AFP, radiosensitivity |
| Hyper-IgE (Job) syndrome | STAT3 (autosomal dominant); poor Th17 response | Eczema, cold staphylococcal abscesses, pneumonias leaving lung cysts (pneumatoceles), retained primary teeth, coarse face, very high IgE, eosinophilia |
- Eczema with infections is not always Wiskott–Aldrich: check the platelets (small and low in WAS) and IgE (very high in hyper-IgE).
Phagocyte disorders
- Chronic granulomatous disease (CGD): NADPH oxidase defect, so neutrophils cannot make superoxide (no respiratory burst). Infections with catalase-positive organisms: S. aureus, Aspergillus (a leading cause of death), Serratia, Nocardia, Burkholderia, Klebsiella; granulomas; recurrent lymphadenitis and liver abscesses.
- Why catalase matters: catalase-negative bacteria (streptococci) release their own H₂O₂, which the neutrophil's myeloperoxidase can use to kill them. Catalase-positive organisms destroy their own H₂O₂, so the neutrophil has nothing to work with.
- Test: nitroblue tetrazolium fails to turn blue, or dihydrorhodamine flow test is abnormal. Treat with prophylactic co-trimoxazole and itraconazole, interferon-γ, stem cell transplant.
- Myeloperoxidase deficiency: normal NBT test (respiratory burst intact) but neutrophils lack MPO staining; usually mild; recurrent Candida, especially in diabetics.
- Leucocyte adhesion deficiency (CD18): delayed umbilical cord separation, neutrophilia without pus. Chédiak–Higashi (LYST): giant granules, partial albinism, neuropathy.
Exam trap A normal NBT test excludes CGD; consider MPO deficiency when neutrophils lack the MPO granule enzyme.
Complement disorders and hereditary angioedema
- Terminal complement (C5–C9) deficiency: recurrent meningococcal infection; vaccinate.
- Hereditary angioedema (C1 esterase inhibitor deficiency, autosomal dominant): recurrent non-itchy swelling of face, larynx and gut (colicky pain) without urticaria, often triggered by trauma or dental work. Uncontrolled C1 activation consumes C4 and generates bradykinin.
- Serum C4 is the best screening test between attacks (low); C1 inhibitor level and function confirm.
- Acute attacks: C1 inhibitor concentrate or icatibant (bradykinin B2 antagonist); antihistamines, steroids and adrenaline work poorly. ACE inhibitors worsen it.
Secondary immunodeficiency
- Far commoner than primary: malnutrition (commonest worldwide), HIV, diabetes, kidney and liver disease, malignancy (lymphoma, myeloma, CLL), chemotherapy, steroids, burns, old age.
- Nephrotic syndrome: urinary loss of IgG and factor B (alternative complement pathway) explains pneumococcal peritonitis in children with relapsing nephrotic syndrome.
- Splenectomy: overwhelming infection with encapsulated bacteria (pneumococcus, meningococcus, Haemophilus); vaccinate and give prophylactic penicillin.
- Burns: Candida is the commonest non-bacterial opportunistic organism.
HIV: the virus and its target
- RNA retrovirus (lentivirus), not a DNA virus: reverse transcriptase copies RNA into DNA, integrase inserts it into the host genome.
- Envelope gp120 binds CD4, with co-receptor CCR5 (early) or CXCR4 (later); gp41 mediates fusion. Targets: CD4 T cells, macrophages, dendritic cells, microglia.
- Course: acute seroconversion illness (fever, rash, lymphadenopathy), a long latent period with falling CD4 (HIV has one of the longest incubation periods to clinical disease), then AIDS (CD4 below 200 or an AIDS-defining illness).
HIV testing
- Adults: fourth-generation test (antibody plus p24 antigen) shortens the window period; positives are confirmed with a different assay (Western blot formerly) and viral load by RNA PCR.
- Infants of HIV-positive mothers: maternal IgG crosses the placenta and persists up to 18 months, so antibody tests are useless; confirm with an HIV nucleic acid test (DNA or RNA PCR) at birth, 6 weeks and later.
Opportunistic infections and cancers
| CD4 count (cells/µL) | Typical problems |
|---|---|
| Any | TB (commonest serious OI in Pakistan), zoster, oral candida, bacterial pneumonia |
| Below 200 | Pneumocystis pneumonia (start co-trimoxazole prophylaxis), oesophageal candidiasis |
| Below 100 | Toxoplasma encephalitis (ring-enhancing lesions), cryptococcal meningitis |
| Below 50 | CMV retinitis, M. avium complex, primary CNS lymphoma (EBV), PML (JC virus) |
- Pneumocystis jirovecii pneumonia is the classic AIDS-defining infection: dry cough, breathlessness, hypoxia on exertion, bilateral perihilar shadowing.
- Oesophageal candidiasis (painful swallowing, white plaques): oral fluconazole empirically; failure to respond needs endoscopy for HSV, CMV or resistant Candida.
- Cryptococcal meningitis may have nearly normal CSF cells and glucose; test CSF cryptococcal antigen or India ink. Cryptosporidium causes chronic watery diarrhoea.
- Cancers: Kaposi sarcoma (HHV-8) is the commonest tumour and skin malignancy in advanced HIV; non-Hodgkin lymphoma (EBV-driven, often extranodal or CNS); invasive cervical cancer (HPV).
HIV treatment and prevention
- Everyone diagnosed starts combination ART regardless of CD4, typically two nucleoside reverse transcriptase inhibitors (tenofovir with lamivudine or emtricitabine) plus dolutegravir.
- Abacavir: test HLA-B*57:01 first; carriers risk a fatal hypersensitivity reaction, and abacavir is never restarted after a suspected reaction.
- Pre-exposure prophylaxis (PrEP): daily tenofovir–emtricitabine for HIV-negative people at ongoing high risk; confirm HIV-negative first, because PrEP in undiagnosed HIV breeds resistance.
- Post-exposure prophylaxis: tenofovir, lamivudine and dolutegravir within 72 hours for 28 days.
- Mother-to-child transmission: maternal ART through pregnancy and breastfeeding (historically zidovudine alone), infant prophylaxis (nevirapine or zidovudine), and infant NAT testing.
Remember Antibodies fight encapsulated bacteria, T cells fight viruses and fungi, neutrophils fight staph and Aspergillus, terminal complement fights Neisseria.
Exam trap Babies of HIV-positive mothers need nucleic acid testing; their antibody test reflects the mother's IgG.
How FCPS asks about this
- Test confirming HIV in a 3-month-old of an HIV-positive mother: HIV nucleic acid test (PCR).
- HIV protein binding CD4: gp120 (co-receptor CCR5).
- CD4 count for PCP prophylaxis: below 200; co-trimoxazole.
- Why CGD spares catalase-negative organisms: they supply their own H₂O₂.
- Eczema, cold abscesses, lung cysts, retained teeth, high IgE: hyper-IgE syndrome, STAT3.
- Recurrent non-itchy swelling without urticaria: hereditary angioedema; screen with serum C4.
- Test before abacavir: HLA-B*57:01; commonest tumour in AIDS is Kaposi sarcoma (HHV-8).
Test yourself on this topic
5 of the 51 questions in our bank on this topic. Choose an answer to see why every option is right or wrong.
A 5-year-old boy with relapsing nephrotic syndrome develops fever, abdominal pain and tenderness with ascites. Ascitic fluid grows Streptococcus pneumoniae. Why is he prone to this infection?
Answer: Urinary loss of IgG and factor B
In nephrotic syndrome, protein leaks through the damaged glomerular barrier. Along with albumin, IgG and the alternative pathway protein factor B are lost in the urine. This reduces opsonisation of encapsulated bacteria. Children therefore get pneumococcal peritonitis and cellulitis, worsened by steroid treatment and the ascites as a culture medium.
Nephrotic infections
- Lose IgG in the urine
- Lose factor B (alternative pathway)
- Poor opsonisation
- Pneumococcal peritonitis
Remember Nephrotic child with peritonitis: think pneumococcus.
Exam trap Secondary immunodeficiency is far more common than primary.
Why the other options are wrong
- Steroids destroy splenic macrophages Steroids impair immunity but do not destroy the spleen.
- Proteinuria blocks neutrophil migration Not the main mechanism.
- Low albumin stops complement production The liver still makes complement.
- Hypercholesterolaemia impairs B cells Lipids do not explain the infection risk.
A 6-year-old has had repeated pneumococcal pneumonia, meningitis and Haemophilus otitis since infancy. Immunoglobulins and T cells are normal. Which complement deficiency best explains this?
Answer: C3
C3 sits at the meeting point of all three complement pathways. C3b is the main opsonin, and C3 is also needed to form the C5 convertase and the membrane attack complex. Lack of C3 therefore causes severe recurrent pyogenic infections with encapsulated bacteria from early life, and immune complex glomerulonephritis. Early classical deficiency mainly predisposes to SLE, and terminal deficiency to Neisseria.
C3 deficiency
- C3 is the hub of all pathways
- Loss of C3b opsonin
- Severe pyogenic infections
- Immune complex GN
Remember No C3: no opsonin, severe pyogenic infections.
Exam trap Normal immunoglobulins do not exclude a defect in opsonisation.
Why the other options are wrong
- C1q Mainly predisposes to SLE.
- C9 Mild Neisseria risk only.
- C1 esterase inhibitor Causes hereditary angioedema.
- Factor D Rare; Neisseria infections mainly.
A 2-year-old boy has eczema, recurrent ear infections and bloody diarrhoea. Platelets are low and unusually small. What is the diagnosis?
Answer: Wiskott-Aldrich syndrome
Wiskott-Aldrich syndrome is X-linked (WAS gene affecting the actin cytoskeleton of haematopoietic cells): triad of eczema, thrombocytopenia with small platelets (bleeding, bloody diarrhoea) and recurrent infections (combined immunodeficiency, especially to polysaccharide antigens; low IgM). There is an increased risk of autoimmunity and lymphoma. Treatment: stem cell transplantation. ITP has normal or large platelets; Bernard-Soulier has giant platelets; Glanzmann has normal counts.
Wiskott-Aldrich syndrome
- X-linked (WAS gene)
- Triad: eczema, thrombocytopenia (small platelets), infections
- ↓ IgM; risk of lymphoma
Remember WATER: Wiskott-Aldrich, Thrombocytopenia, Eczema, Recurrent infections.
Why the other options are wrong
- Immune thrombocytopenic purpura Platelets normal or large; no eczema or infections.
- Bernard-Soulier syndrome Giant platelets.
- DiGeorge syndrome Hypocalcaemia, heart defects.
- Glanzmann thrombasthenia Normal platelet count.
A man with advanced HIV has painful swallowing and white plaques in the mouth. Endoscopy shows white plaques along the oesophagus. What is the treatment?
Answer: Oral fluconazole
Oesophageal candidiasis is an AIDS-defining illness, usually with a CD4 count under 200 cells/µL. Painful swallowing with oral thrush is enough to treat. Systemic therapy is needed: oral fluconazole for 2–3 weeks. Topical agents cannot reach the oesophagus well. Antiretroviral therapy should be started or optimised.
Oesophageal candidiasis
- AIDS-defining
- Odynophagia with oral thrush
- Treat with oral fluconazole
- Start ART
Remember Thrush plus painful swallowing: treat the oesophagus systemically.
Exam trap Failure to improve on fluconazole needs endoscopy for HSV, CMV or resistant Candida.
Why the other options are wrong
- Topical nystatin only Not enough for oesophageal disease.
- Oral aciclovir For herpes oesophagitis.
- Oral metronidazole Not antifungal.
- IV amphotericin as first choice Reserved for resistant or severe cases.
A 6-year-old has a wobbly gait since infancy, dilated blood vessels on the conjunctivae and recurrent sinus and chest infections. IgA is low and AFP is raised. Which gene is affected?
Answer: ATM
Ataxia telangiectasia is autosomal recessive, caused by ATM mutations that impair repair of double-strand DNA breaks. Features: cerebellar ataxia from early childhood, oculocutaneous telangiectasia, IgA (and IgG2) deficiency with sinopulmonary infections, raised AFP, extreme sensitivity to radiation, and a high risk of lymphoma and leukaemia. X-rays and radiotherapy should be minimised.
Ataxia telangiectasia
- Gene: ATM (DNA break repair)
- Ataxia + telangiectasia
- Low IgA, infections
- Raised AFP
- Radiation sensitive, lymphoma risk
Remember Wobbly, red-eyed, low IgA, high AFP.
Exam trap Avoid unnecessary X-rays: they cause DNA damage these patients cannot repair.
Why the other options are wrong
- BTK Bruton agammaglobulinaemia: no ataxia.
- WAS Wiskott–Aldrich: eczema, small platelets.
- CD40 ligand Hyper-IgM syndrome.
- NADPH oxidase Chronic granulomatous disease.
Where this sits in the CPSP syllabus
- Medicine & Allied, Paper 2: Immunopathology, Immunodeficiency disorders including HIV
Read next
Drug dose pages
Doses, cautions and practical tips for drugs in this chapter.