Primary and Secondary Immunodeficiency Diseases: Classification, Infection Patterns, Diagnosis and Emergency Care
Study level: Clinical medicine, emergency medicine and pathology | Topic: Immunopathology
Core concept: Immunodeficiency is failure of one or more immune components, causing susceptibility to infection, malignancy and sometimes autoimmunity or allergy. Primary immunodeficiencies are usually genetic and may present in infancy or adulthood; secondary immunodeficiencies are acquired and are much more common, including HIV, malnutrition, malignancy, organ failure and immunosuppressive therapy.
Learning objectives
- Define immunodeficiency and distinguish primary from secondary causes.
- Match recurrent-infection patterns to defects in antibodies, T cells, phagocytes and complement.
- Recognise important primary disorders: SCID, X-linked agammaglobulinaemia, CVID, selective IgA deficiency, DiGeorge syndrome, CGD, leukocyte adhesion deficiency and complement deficiency.
- Explain secondary immunodeficiency due to HIV, drugs, malnutrition, malignancy, protein loss, asplenia and chronic disease.
- Choose first-line investigations and interpret basic immunology results.
- Manage sepsis and opportunistic infection urgently while planning prophylaxis, replacement therapy and specialist referral.
1. Definition and consequences
An immunodeficiency is inadequate quantity or function of immune cells, antibodies, complement or innate defence pathways. The defect may be quantitative (too few cells/proteins), qualitative (cells present but dysfunctional), or both.
| Consequence | Why it occurs | Clinical examples |
|---|---|---|
| Recurrent infection | Failure to recognise, contain or clear microbes. | Otitis, sinusitis, pneumonia, skin abscess, meningitis, chronic diarrhoea. |
| Unusual organisms | Missing immune pathway permits opportunistic pathogens. | Pneumocystis, invasive fungi, mycobacteria, chronic mucocutaneous Candida. |
| Severe or prolonged infection | Weak response, poor vaccine protection or delayed clearance. | Persistent viral disease, recurrent sepsis, failure to thrive. |
| Autoimmunity/inflammation | Immune dysregulation and defective tolerance may coexist with infection susceptibility. | Cytopenias, enteropathy, granulomas, lupus-like features. |
| Malignancy | Reduced immune surveillance and chronic viral stimulation. | Lymphoma, EBV-related disease, HPV-associated cancers. |
2. Primary versus secondary immunodeficiency
| Feature | Primary (inborn) | Secondary (acquired) |
|---|---|---|
| Cause | Pathogenic variant affecting immune development/function. | Infection, medication, malnutrition, malignancy, organ disease, protein loss or ageing. |
| Onset | Infancy, childhood or adulthood depending on residual function. | Any age; often follows a new exposure or illness. |
| Family history | May show consanguinity, affected siblings or male relatives. | Usually absent unless the cause is inherited malnutrition or disease. |
| Reversibility | Often chronic; some are curable with haematopoietic stem-cell transplant or gene therapy. | May improve when the cause is treated, though HIV and some drug-related deficits persist. |
| Examples | SCID, X-linked agammaglobulinaemia, CVID, CGD, DiGeorge. | HIV, corticosteroids, chemotherapy, diabetes, nephrotic syndrome, splenectomy. |
3. Match the immune component to the infection pattern
| Defective component | Typical organisms and sites | Clues |
|---|---|---|
| B cells/antibodies | Encapsulated bacteria (Streptococcus pneumoniae, Haemophilus), Giardia; sinopulmonary and GI infections. | After maternal IgG wanes; poor vaccine antibody responses; small/absent tonsils in severe B-cell defects. |
| T cells | Viruses, fungi, protozoa and intracellular bacteria; chronic mucocutaneous Candida. | Thrush, chronic diarrhoea, severe viral disease, failure to thrive and opportunistic infection. |
| Combined T and B cells | Broad spectrum, including live vaccine organisms. | Very early severe infection, lymphopenia, absent thymic shadow or persistent diarrhoea. |
| Neutrophils/phagocytes | Staphylococcus, Gram-negative bacteria and Aspergillus; deep skin/liver/lung abscesses. | Delayed cord separation, poor pus, periodontal disease, recurrent abscesses or poor wound healing. |
| Complement | Neisseria (terminal complement), encapsulated bacteria (C3), immune-complex/autoimmune disease. | Recurrent meningococcal disease or lupus-like illness. |
| Asplenia | Encapsulated bacteria, especially pneumococcus, meningococcus and Hib. | Rapid overwhelming sepsis; Howell–Jolly bodies on blood film. |
4. Primary immunodeficiency categories and high-yield disorders
4.1 Severe combined immunodeficiency (SCID)
SCID is a group of disorders with profound T-cell dysfunction and severe impairment of cellular and humoral immunity. Causes include X-linked common-gamma-chain defects (often T−B+NK−), adenosine deaminase deficiency (often T−B−NK−), JAK3 defects, RAG defects and others.
- Presentation: infections in the first months of life, persistent oral thrush, chronic diarrhoea, pneumonia, failure to thrive and opportunistic infections.
- Laboratory pattern: severe lymphopenia, low T-cell numbers/function, abnormal mitogen responses and variable B/NK cells; newborn T-cell receptor excision circle screening helps detection.
- Emergency: fever or respiratory symptoms require immediate assessment; avoid live vaccines, especially BCG or rotavirus where relevant.
- Definitive treatment: urgent specialist referral for haematopoietic stem-cell transplantation, enzyme replacement for selected ADA deficiency or approved gene therapy pathways.
4.2 X-linked agammaglobulinaemia (Bruton disease)
BTK mutation blocks B-cell maturation. Affected boys develop profoundly low B cells and immunoglobulins after maternal IgG declines.
- Recurrent otitis, sinusitis, pneumonia and enteroviral infection; tonsils and lymph nodes may be small.
- Diagnosis: low all immunoglobulin classes, markedly reduced CD19/20 B cells and genetic confirmation.
- Management: regular immunoglobulin replacement, prompt antibiotics, vaccination planning and avoidance of live vaccines without specialist advice.
4.3 Common variable immunodeficiency (CVID)
CVID is heterogeneous, usually presenting later with low IgG plus low IgA and/or IgM and poor antibody responses despite adequate B-cell numbers.
- Recurrent sinopulmonary infection, bronchiectasis, chronic Giardia, autoimmune cytopenias, enteropathy, granulomas and lymphoma risk.
- Diagnosis requires exclusion of secondary causes, quantitative immunoglobulins and vaccine-response assessment.
- Management: immunoglobulin replacement, airway care, antibiotic treatment/prophylaxis when indicated and surveillance for lung disease, autoimmunity and malignancy.
4.4 Selective IgA deficiency
The most common clinically recognised primary antibody deficiency. Many patients are asymptomatic; others develop recurrent mucosal infection, allergies, coeliac disease or autoimmune disease.
- Low/absent IgA with normal IgG/IgM after the appropriate age and exclusion of secondary loss.
- Rare transfusion reactions to anti-IgA antibodies; alert the transfusion service if prior reaction occurred.
4.5 DiGeorge syndrome / 22q11.2 deletion
Thymic hypoplasia causes variable T-cell deficiency, with congenital heart disease, hypocalcaemia from parathyroid hypoplasia, characteristic facies and developmental/psychiatric features.
- Assess calcium, ECG, cardiac anatomy, lymphocyte subsets and T-cell function.
- Live vaccine decisions depend on T-cell function; involve immunology.
4.6 Chronic granulomatous disease (CGD)
Defective NADPH oxidase impairs the respiratory burst, so phagocytes cannot kill catalase-positive organisms effectively.
- Organisms: Staphylococcus aureus, Serratia, Burkholderia, Nocardia and Aspergillus.
- Presentation: recurrent pneumonia, lymphadenitis, liver/skin abscesses, osteomyelitis and granulomatous bowel or urinary obstruction.
- Diagnosis: neutrophil oxidative burst (DHR) testing and genetic confirmation.
- Management: prolonged targeted antimicrobial treatment, prophylaxis, interferon-gamma in selected settings and stem-cell transplantation for severe disease.
4.7 Leukocyte adhesion deficiency
Defective integrin-mediated adhesion prevents neutrophils from leaving blood vessels. Typical clues are delayed umbilical-cord separation, omphalitis, recurrent skin/mucosal infection, severe periodontitis, poor wound healing and little or no pus despite high neutrophil counts.
4.8 Complement deficiency
| Defect | Pattern |
|---|---|
| C3 deficiency | Severe recurrent pyogenic infection and immune-complex disease. |
| C5–C9 deficiency | Recurrent Neisseria meningitis or meningococcal sepsis. |
| C1 esterase inhibitor deficiency | Hereditary angioedema: bradykinin-mediated swelling without urticaria. |
| Early classical pathway (C1/C2/C4) defects | Lupus-like autoimmunity and immune-complex disease. |
5. Secondary immunodeficiency
| Cause | Mechanism | Typical clinical consequence |
|---|---|---|
| HIV infection | Progressive CD4 T-cell depletion and immune dysregulation. | Oropharyngeal candidiasis, TB, Pneumocystis, cryptococcosis, toxoplasmosis, CMV, chronic diarrhoea and malignancy. |
| Immunosuppressive drugs | Suppress T cells, B cells, neutrophils or cytokine signalling. | Opportunistic infection, reactivation of latent TB/viral disease, poor vaccine responses. |
| Malignancy | Marrow replacement, dysfunctional lymphocytes, protein loss or treatment effects. | Neutropenia, hypogammaglobulinaemia, recurrent infection and sepsis. |
| Malnutrition | Reduced barrier integrity, complement, phagocyte and lymphocyte function. | Recurrent infection, poor wound healing, diarrhoea and severe wasting. |
| Protein loss | Loss of immunoglobulins and lymphocytes via kidney or gut. | Nephrotic syndrome, intestinal lymphangiectasia and recurrent infection. |
| Asplenia/hyposplenia | Loss of splenic clearance of encapsulated organisms. | Rapid fulminant pneumococcal or meningococcal sepsis. |
| Chronic disease | Diabetes, renal failure, cirrhosis and burns impair innate and adaptive defence. | Skin, urinary, pulmonary and bloodstream infection. |
| Age and critical illness | Immune senescence or post-sepsis immune paralysis. | Subtle infection, prolonged viral/fungal disease and poor vaccine responses. |
6. HIV as an acquired immunodeficiency
HIV infects CD4 T cells, macrophages and dendritic cells, causing gradual loss of cellular immune coordination. The clinical stage depends on viral load, CD4 count, treatment and co-infections.
- Acute infection: fever, rash, pharyngitis, lymphadenopathy, myalgia or aseptic meningitis may occur weeks after exposure.
- Chronic infection: may be asymptomatic while CD4 cells decline; persistent lymphadenopathy or recurrent mucosal infection can occur.
- Advanced disease: Pneumocystis pneumonia, oesophageal candidiasis, TB, cryptococcal meningitis, toxoplasmosis, CMV disease, chronic diarrhoea and Kaposi sarcoma/lymphoma.
- Diagnosis: laboratory antigen/antibody testing with confirmatory algorithm and HIV RNA where indicated; baseline CD4, viral load, resistance and co-infection screening guide care.
- Management: prompt antiretroviral therapy, vaccination, opportunistic-infection prophylaxis when indicated, adherence support and partner/occupational prevention.
7. When to suspect an immunodeficiency
- Repeated serious, unusual, persistent or difficult-to-treat infections.
- Two or more pneumonias in a year, recurrent deep abscesses or need for intravenous antibiotics.
- Persistent thrush, chronic diarrhoea, bronchiectasis or failure to thrive.
- Infections with low-virulence or opportunistic organisms.
- Family history, consanguinity, unexplained infant death or recurrent pregnancy loss.
- Autoimmunity, granulomas, severe allergy or malignancy together with infections.
- Poor response to standard vaccines or loss of previously acquired immune protection.
- Delayed umbilical-cord separation, absent tonsils, asplenia or abnormal blood film.
8. Diagnostic approach
8.1 History and examination
Map age at first infection, organism, site, severity, culture results, antibiotic response, vaccination history, growth, diarrhoea, eczema, autoimmunity, family history, medications, HIV risk and prior splenectomy. Examine growth, skin, nails, mouth, lymph nodes, tonsils, spleen, lungs, teeth/periodontium and scars.
8.2 First-line tests
| Test | Purpose |
|---|---|
| CBC with differential and blood film | Neutropenia, lymphopenia, thrombocytopenia, abnormal cells, Howell–Jolly bodies and smear clues. |
| Quantitative IgG, IgA and IgM | Screen antibody quantity; repeat and interpret by age and clinical context. |
| Specific antibody titres | Assess response to protein and polysaccharide vaccines when appropriate. |
| Lymphocyte subsets/flow cytometry | CD3 T cells, CD4/CD8, CD19/20 B cells and NK cells. |
| HIV antigen/antibody and nucleic-acid testing | Essential in unexplained adult or child immunodeficiency. |
| Complement CH50/AH50 and components | Screen classical and alternative pathway function. |
| Neutrophil oxidative burst | CGD evaluation. |
| Culture, PCR and imaging | Identify current infection and organ damage; obtain before antimicrobials when safe, never at the cost of resuscitation. |
8.3 Specialist tests
Depending on the phenotype: genetic panels, whole-exome sequencing, thymic imaging, mitogen/antigen proliferation, marrow examination, complement component assay, antibody function tests, cytokine assays and tissue biopsy.
Interpretation caution: Low immunoglobulins may be secondary to protein loss or drugs; transient lymphopenia may follow acute illness; a normal CBC does not exclude functional immune defects.
9. Acute infection and emergency management
Immunodeficiency is a sepsis risk multiplier. Start ABCDE assessment, glucose, oxygen and haemodynamic support immediately. Fever may be absent, inflammatory markers may be misleading and deterioration can be rapid.
- Obtain cultures and targeted specimens promptly, but do not delay empiric antimicrobials in shock, neutropenic fever, meningitis or severe pneumonia.
- Use local antimicrobial guidelines and adjust for renal/hepatic function, prior colonisation, prophylaxis and likely opportunistic organisms.
- Search for occult infection: chest imaging, urine, blood, central line, skin, sinuses, gut and CNS according to symptoms.
- Correct hypoglycaemia, electrolyte disturbance, dehydration, hypoxia and shock; consider ICU early.
- Contact immunology/infectious disease specialists for suspected SCID, meningococcal sepsis, invasive fungal disease, Pneumocystis, cryptococcal meningitis or severe HIV-related infection.
| Emergency syndrome | Key clues | Immediate concern |
|---|---|---|
| Neutropenic sepsis | Fever or hypothermia with low neutrophils, mucositis, line or perianal symptoms. | Rapid bacterial/fungal bloodstream infection; urgent cultures, broad antibiotics and source control. |
| Pneumocystis pneumonia | Subacute dry cough, fever, exertional dyspnoea and hypoxia in T-cell deficiency/HIV. | Oxygenation can worsen rapidly; chest imaging, PCR/BAL and specialist treatment. |
| Meningococcal sepsis | Fever, headache, meningism, purpura, shock or recurrent episodes in complement deficiency/asplenia. | Immediate sepsis treatment and public-health contact. |
| Invasive fungal disease | Persistent fever, pulmonary nodules, sinus disease, skin lesions or CNS signs in neutropenia/T-cell dysfunction. | Early CT, fungal diagnostics and specialist antifungal therapy. |
| Severe viral infection | Disseminated HSV/VZV, CMV, EBV or persistent enterovirus. | Isolation/precautions, PCR-directed antiviral or specialist therapy. |
10. Long-term treatment and prevention
| Intervention | Indication/principle | Important safety points |
|---|---|---|
| Immunoglobulin replacement | Antibody deficiency with significant infection or poor vaccine responses; IV or subcutaneous regimens are individualised. | Monitor reactions, renal risk, thrombosis, IgA-related history and clinical response; it does not correct T-cell defects. |
| Antibiotic/antifungal/antiviral prophylaxis | Selected defects, HIV stages, transplant and recurrent infection. | Use local protocols, adjust for resistance and toxicity, and review need regularly. |
| Haematopoietic stem-cell transplant | SCID and selected severe phagocyte/combined defects. | Requires infection control, conditioning risk assessment and transplant expertise. |
| Gene or enzyme therapy | Selected molecular disorders such as ADA-SCID; availability is specialised. | Long-term monitoring for efficacy and adverse events. |
| Vaccination | Protective in many antibody/complement defects and for household contacts. | Live vaccines can cause disease in severe T-cell/combined defects; follow immunology guidance. |
| Asplenia prevention | Vaccination against pneumococcus, meningococcus and Hib plus fever action plan. | Any fever may be overwhelming sepsis; urgent medical assessment and prescribed standby antibiotics may be required. |
| Nutrition and barrier care | Correct malnutrition, dental disease, skin breakdown and bronchiectasis. | Multidisciplinary follow-up improves growth, lung health and adherence. |
| Family counselling | Inheritance testing, carrier assessment and prenatal/newborn screening. | Protect confidentiality and involve genetics specialists. |
11. Clinical cases
Case 1: recurrent pneumonia in a boy
A boy develops recurrent bacterial otitis and pneumonia after 6 months of age and has very small tonsils. Think X-linked agammaglobulinaemia. Measure immunoglobulins and B-cell numbers, obtain cultures during infection and refer for immunoglobulin replacement; do not rely on repeated empiric antibiotics alone.
Case 2: infant with thrush and diarrhoea
An infant has persistent thrush, chronic diarrhoea, pneumonia and poor weight gain. SCID is an emergency. Avoid live vaccines and unirradiated blood products where relevant, isolate from infection, obtain lymphocyte studies and arrange urgent specialist/HSCT evaluation.
Case 3: recurrent abscesses
An adolescent has liver and skin abscesses caused by Serratia and Aspergillus. CGD is likely. Send oxidative-burst testing, treat acute infection aggressively and assess siblings and other family members.
Case 4: fever after splenectomy
An adult without a spleen develops fever, rigors and hypotension. Treat as overwhelming post-splenectomy infection until proven otherwise, especially pneumococcal or meningococcal sepsis. Do not be reassured by a brief symptom duration.
12. Exam-focused comparison
| Finding | Most likely defect |
|---|---|
| Recurrent Giardia and sinopulmonary infection with low IgG | Antibody deficiency such as CVID. |
| Severe infections with viruses, fungi and protozoa in infancy | T-cell or combined immunodeficiency/SCID. |
| Deep abscesses with catalase-positive organisms | CGD/phagocyte oxidative-burst defect. |
| Delayed cord separation and little pus | Leukocyte adhesion deficiency. |
| Recurrent meningococcal disease | Terminal complement deficiency or asplenia. |
| Howell–Jolly bodies and rapid sepsis | Functional/anatomic asplenia. |
13. Quick self-test
- Why do antibody deficiencies often present after maternal IgG wanes?
- Which organisms suggest a T-cell defect rather than an isolated B-cell defect?
- What is the characteristic clue to leukocyte adhesion deficiency?
- Why are live vaccines dangerous in severe combined immunodeficiency?
- List five common secondary causes of immunodeficiency.
- What should happen first when an immunodeficient patient is shocked and febrile?
Answers
- Maternal IgG provides temporary passive protection; infections emerge when it declines and the child must make effective antibodies.
- Opportunistic viruses, fungi, protozoa and intracellular bacteria, such as Pneumocystis, Cryptococcus, CMV and disseminated mycobacteria.
- Delayed umbilical separation, recurrent bacterial/fungal infection, poor wound healing and absent/minimal pus despite leukocytosis.
- The patient may be unable to control replication of the attenuated vaccine organism.
- HIV, immunosuppressive drugs, malignancy/chemotherapy, malnutrition, protein loss, diabetes, renal/liver disease, asplenia and critical illness.
- ABCDE resuscitation, cultures and immediate empiric antimicrobials according to local sepsis/neutropenic protocol, while contacting specialist teams.
Key take-home points
- Identify the defective immune arm from the organism, site, age and severity of infection.
- Primary immunodeficiencies can also cause autoimmunity, allergy, granulomas and cancer, not only infection.
- Secondary immunodeficiency is common and often reversible; always review HIV, medicines, nutrition, malignancy and organ disease.
- SCID, neutropenic sepsis, meningococcal disease, Pneumocystis and invasive fungal infection are time-critical emergencies.
- Normal screening tests do not exclude functional defects; specialist immune testing may be required.
- Prevention includes vaccination planning, prophylaxis, immunoglobulin replacement, nutrition, asplenia education and family counselling.
