MED-114 · Lesson 11 of 12 · 22 min

Immunodeficiency and vaccines

▶ Video coming soon A video version of this lesson is on the way.

Ferdinand Oyelaran-Holt, 29, has had pneumonia three times in four years, sinus infections every winter, and a recent episode of prolonged diarrhea that turned out to be giardiasis. A CT scan of his chest shows early bronchiectasis. His family physician orders quantitative immunoglobulins: IgG is markedly low, IgA is undetectable and IgM is low. His antibody responses to tetanus and pneumococcal vaccines are poor. An immunologist diagnoses common variable immunodeficiency, and he begins regular immunoglobulin replacement. Over the next year he has one minor sinus infection and no pneumonia.

Ferdinand's diagnosis came years after his first serious infection, a delay that is typical for primary immunodeficiency in adults. The pattern of infections was the clue: recurrent sinopulmonary infections with encapsulated bacteria and Giardia point to a defect in antibody production. This lesson teaches how to recognize immunodeficiency from the pattern of infections, outlines the main primary and secondary immunodeficiencies including HIV, and then turns to the most successful intervention in the history of infectious disease: vaccination. It closes with how immunization recommendations are made and how they currently differ between Canada and the United States.

When to suspect immunodeficiency

Most people with frequent colds are immunologically normal. Warning signs that should prompt evaluation include:

  • Infections that are recurrent (for example, two or more pneumonias within a few years), unusually severe, slow to clear, or that need intravenous antibiotics. - Infections with unusual or opportunistic organisms, such as Pneumocystis, atypical mycobacteria or invasive fungi. - Infections in unusual sites, such as deep abscesses of the liver or brain. - Complications of live vaccines. - A family history of immunodeficiency or of early unexplained deaths from infection. - Associated autoimmunity, granulomatous disease or lymphoma.

The type of infection points to the component of immunity that is failing, building directly on lesson 1.

Table 1. Matching patterns of infection to the defective component of immunity.
DefectTypical infectionsExamples
Antibody (B cell)Recurrent sinopulmonary infection with encapsulated bacteria; Giardia; enteroviral meningoencephalitisCommon variable immunodeficiency, X-linked agammaglobulinemia, selective IgA deficiency; rituximab; chronic lymphocytic leukemia
T cell or combinedViruses, fungi, Pneumocystis, intracellular bacteria; failure to thrive in infantsSevere combined immunodeficiency, DiGeorge syndrome; HIV; transplant drugs
PhagocyteS. aureus abscesses, Gram-negative and fungal (Aspergillus) infections, poor wound healingChronic granulomatous disease, leukocyte adhesion deficiency; neutropenia from chemotherapy
ComplementNeisseria (terminal); encapsulated bacteria and lupus-like disease (early)C5 to C9 deficiency; complement inhibitor drugs
SpleenOverwhelming sepsis with encapsulated bacteria; severe babesiosis and malariaSplenectomy, sickle cell disease

Primary immunodeficiencies

Primary (inborn) immunodeficiencies are caused by genetic defects; hundreds are now known. Most present in childhood, but several, including common variable immunodeficiency, are usually diagnosed in adults.

  • Selective IgA deficiency is the most common, affecting roughly 1 in several hundred people of European ancestry. Most people have no symptoms; some have recurrent sinopulmonary or gastrointestinal infections, celiac disease or autoimmunity. Because IgA-based celiac tests are falsely negative (lesson 2), total IgA is checked alongside. - Common variable immunodeficiency (CVID) causes low IgG with low IgA and/or IgM and poor vaccine responses, often presenting between the second and fourth decades. Complications include bronchiectasis, autoimmune cytopenias, granulomatous disease, enteropathy and lymphoma. Treatment is lifelong immunoglobulin replacement, given intravenously every few weeks or subcutaneously at home, plus prompt treatment of infections. - X-linked agammaglobulinemia, caused by mutations in Bruton tyrosine kinase, blocks B-cell development; affected boys have almost no B cells or immunoglobulin and present after maternal antibody wanes at about six months of age. - Severe combined immunodeficiency (SCID) affects both T and B cells and is fatal in infancy without hematopoietic stem cell transplantation or gene therapy. Newborn screening for SCID using T-cell receptor excision circles is now performed in all US states and in most Canadian provinces and territories, allowing transplantation before serious infection. Live vaccines, including rotavirus and BCG, are dangerous for these infants. - DiGeorge syndrome (22q11.2 deletion) combines variable T-cell deficiency from thymic underdevelopment with heart defects, low calcium from absent parathyroids and characteristic facial features. - Chronic granulomatous disease results from defective NADPH oxidase, so neutrophils cannot generate the respiratory burst (lesson 1). Patients have recurrent abscesses with S. aureus, Serratia, Burkholderia, Nocardia and Aspergillus. Diagnosis uses a flow cytometric test of neutrophil oxidative burst; management includes antibacterial and antifungal prophylaxis and, for some, transplantation.

Initial testing in primary care, when the pattern suggests it, includes a complete blood count with differential, quantitative immunoglobulins, vaccine antibody responses, and HIV testing, with referral to clinical immunology for further evaluation.

Secondary immunodeficiencies

Secondary immunodeficiency is far more common than primary. Causes include:

  • Drugs: corticosteroids, chemotherapy, transplant immunosuppressants and biologics (lesson 2). - Cancers: chronic lymphocytic leukemia and multiple myeloma lower functional antibody; leukemias and lymphomas disrupt cellular immunity. - Metabolic and organ disease: diabetes (impaired neutrophil function, foot and urinary infections, mucormycosis), chronic kidney disease, cirrhosis, malnutrition. - Loss of the spleen, by surgery or sickle cell disease. - Extremes of age: newborns, whose adaptive immunity is immature, and older adults, whose immune responses weaken (immunosenescence), the reason for higher-dose or adjuvanted vaccines in older age groups. - HIV infection.

HIV and opportunistic infections

As HIV depletes CD4 T cells (lesson 5), opportunistic infections appear in a predictable order by CD4 count, though antiretroviral therapy has made them uncommon in people diagnosed and treated early.

Table 2. HIV-associated opportunistic infections by CD4 count.
CD4 count (cells per cubic millimetre)Characteristic infections and conditionsPrevention principle
Any levelTuberculosis, bacterial pneumonia, shingles, oral candidiasis (more common as CD4 falls)ART for all; latent tuberculosis screening and treatment
Below 200Pneumocystis pneumonia, esophageal candidiasisTrimethoprim-sulfamethoxazole prophylaxis
Below 100Toxoplasma encephalitis, cryptococcal meningitisProphylaxis for Toxoplasma-seropositive patients; cryptococcal antigen screening in some settings
Below 50Disseminated Mycobacterium avium complex, cytomegalovirus retinitisPrompt ART; routine MAC prophylaxis no longer needed when ART starts promptly

AIDS-defining illnesses also include Kaposi sarcoma, certain lymphomas, invasive cervical cancer and HIV wasting. When ART starts in a person with a low CD4 count, the recovering immune system can produce inflammatory reactions against existing infections, called immune reconstitution inflammatory syndrome; with tuberculosis and cryptococcal meningitis, the timing of ART is adjusted by specialists for this reason. Prophylaxis is stopped once ART restores the CD4 count above the relevant threshold for several months.

Asplenia

People without a functioning spleen are at lifelong risk of overwhelming post-splenectomy infection, which can progress from fever to death within hours, mostly from pneumococcus. Prevention includes pneumococcal, meningococcal (both conjugate ACWY and serogroup B vaccines) and Haemophilus influenzae type b vaccines, ideally at least two weeks before elective splenectomy, annual influenza vaccination, education to seek care immediately for fever, a standby supply of antibiotics for some patients, and medical alert identification.

How vaccines work

Vaccines expose the immune system to antigens from a pathogen in a safe form so that the adaptive immune system generates memory B and T cells and, for many vaccines, protective antibody (lesson 1). Adjuvants such as aluminum salts or newer lipid and saponin-based adjuvants enhance the innate signals that drive a strong adaptive response, which is why adjuvanted vaccines are used in older adults. Protection may come from neutralizing antibody (most vaccines), from T cells, or both; for some diseases a measurable antibody level (a correlate of protection) indicates immunity, such as anti-HBs of at least 10 IU/L after hepatitis B vaccination.

Table 3. Types of vaccines.
Vaccine typeExamplesNotes
Live attenuatedMeasles-mumps-rubella, varicella, yellow fever, oral typhoidStrong, durable immunity; avoid in pregnancy and significant immunosuppression
Inactivated whole organismInactivated polio, hepatitis A, rabiesCannot cause infection; boosters often needed
Protein subunit or recombinantHepatitis B, HPV, recombinant zoster, protein RSV vaccines, pertussis (acellular)Often adjuvanted; safe in immunocompromise
ToxoidTetanus, diphtheriaInduce antibody against toxin, not the organism
PolysaccharidePneumococcal polysaccharide 23-valent, typhoid ViT-cell-independent; weak in young children and no memory
ConjugatePneumococcal conjugate, meningococcal ACWY, HibPolysaccharide linked to protein; memory and reduced carriage
Messenger RNACOVID-19, one RSV vaccineEncodes antigen; rapidly adaptable
Viral vectorSome Ebola and COVID-19 vaccinesHarmless virus delivers antigen gene

Live vaccines are generally contraindicated in pregnancy and in people with significant immunosuppression, including high-dose corticosteroids, chemotherapy, biologics and advanced HIV. Inactivated vaccines are safe in these groups, though responses may be weaker, so they are best given before immunosuppression begins.

Community protection

Vaccination protects not only the person vaccinated but also others, by reducing transmission. When enough of a population is immune, each case infects fewer than one other person on average and outbreaks die out; this is community (herd) immunity. The threshold depends on the basic reproduction number (R0), the average number of people one case infects in a fully susceptible population: the proportion that must be immune is approximately 1 minus 1 divided by R0. For measles, with an R0 of roughly 12 to 18, about 92 to 95 percent of the population must be immune, which is why small declines in measles vaccine coverage produce outbreaks, as Canada and the United States have experienced (lesson 5). Community protection matters most for people who cannot be vaccinated or respond poorly: infants, pregnant people (for live vaccines) and immunocompromised patients.

A curve showing the proportion of the population that must be immune, on the vertical axis, against the basic reproduction number R0, on the horizontal axis from 1 to 20. The curve rises steeply at first, then levels off. Points are marked for seasonal influenza near R0 of 1.5 (about 33 percent), for a pathogen with R0 of 5 (80 percent), and for measles at R0 of 15 (about 93 percent).
Figure 1. Community immunity threshold, approximately 1 minus 1 divided by R0. Highly transmissible infections such as measles require very high coverage. Values are approximate and real thresholds also depend on vaccine effectiveness and population mixing.

Vaccine safety

Vaccines are among the most closely monitored medical products. Common reactions are local pain, redness and swelling, and short-lived fever, fatigue or aches. Serious adverse events are rare: anaphylaxis occurs at roughly one per million doses for most vaccines, which is why vaccinees are observed for about 15 minutes. Specific rare risks are monitored and disclosed, such as myocarditis after mRNA COVID-19 vaccines, mainly in young males after the second dose, and Guillain-Barre syndrome after some influenza and RSV vaccines. Adverse events following immunization are reported through provincial and territorial public health to the Canadian Adverse Events Following Immunization Surveillance System (CAEFISS), with active surveillance by the Canadian National Vaccine Safety network (CANVAS). Health care providers report events that are serious or unexpected.

Myths about vaccines persist. The claim that the MMR vaccine causes autism originated in a 1998 paper that was later found to be fraudulent and was retracted in 2010; large studies involving millions of children have found no association. Vaccine hesitancy is best addressed with respect: a clear, presumptive recommendation, listening to concerns, using motivational interviewing techniques, sharing accurate information about risks and benefits, and leaving the door open. Clinicians' recommendations are consistently among the strongest predictors of whether patients get vaccinated.

Who makes immunization recommendations

In Canada, the National Advisory Committee on Immunization (NACI) provides independent expert advice to the Public Health Agency of Canada, published in the Canadian Immunization Guide and in NACI statements. Each province and territory decides which vaccines it funds and its own schedule, so publicly funded programs differ across the country. Clinicians check NACI guidance and their provincial or territorial schedule.

In the United States, the Advisory Committee on Immunization Practices (ACIP) has traditionally advised the CDC, and its recommendations, once adopted by the CDC director, determine insurance coverage requirements and the Vaccines for Children program. Federal immunization policy changed substantially in 2025 and 2026. In June 2025 the Secretary of Health and Human Services removed all sitting ACIP members and appointed new ones. In September 2025 the committee moved COVID-19 vaccination to individual-based decision-making, and in December 2025 it voted to end the universal recommendation of a hepatitis B vaccine dose at birth for infants of mothers who test negative. In January 2026 the department issued a revised childhood schedule without ACIP review, moving several vaccines to shared clinical decision-making or high-risk groups only. In March 2026 a federal court stayed that schedule and the appointments of 13 ACIP members, restoring the earlier schedule while the government appealed; litigation was ongoing through late 2026. During this period the American Academy of Pediatrics and other professional organizations published their own schedules, and many states announced they would follow them. Clinicians in the United States should check the current status of federal recommendations alongside professional society schedules and state requirements; vaccine schedules for infants and children are covered in pediatrics.

Adult immunization in practice

Adult vaccine recommendations are broadly similar in the two countries, with differences in age thresholds and funding. In general terms:

  • Tetanus and diphtheria boosters every 10 years, with one adult dose including acellular pertussis, and pertussis-containing vaccine in every pregnancy to protect the newborn. - Influenza vaccination every year, with high-dose or adjuvanted vaccines preferred for older adults. - COVID-19 vaccination according to current national guidance; NACI has emphasized older adults, residents of long-term care and people at increased risk, while US recommendations have moved to individual-based decision-making. - Pneumococcal conjugate vaccine (a higher-valency conjugate such as PCV20 or PCV21) for older adults (from age 65 in NACI guidance; from age 50 in US recommendations since late 2024) and for younger adults with risk conditions. - Recombinant zoster vaccine in two doses for adults 50 and older and for immunocompromised adults. - RSV vaccine as a single dose for older adults. NACI's April 2026 guidance strongly recommends it for all adults 75 and older, adults 65 to 74 at increased risk, and adults 18 and older in nursing homes or chronic care, after lung or stem cell transplant, or receiving home oxygen or dialysis. US recommendations cover adults 75 and older and adults 50 to 74 at increased risk. - Hepatitis B vaccination for adults at risk, and in the United States for all adults up to age 59; HPV vaccination for young adults who missed it; MMR for adults without evidence of immunity; and mpox, travel and occupational vaccines as indicated.

The authoritative, current sources are the Canadian Immunization Guide and NACI statements, together with provincial and territorial schedules.

Worked problem

Preparing a patient for splenectomy and immunosuppression

Rosalind Achterberg-Moyo, 46, will have an elective splenectomy for refractory immune thrombocytopenia in four weeks and may later need rituximab. Her childhood vaccines are documented, and she received an influenza vaccine last autumn. Which immunization and safety steps are needed?

Show solution
  1. Plan vaccines at least two weeks before surgery, and before rituximab, because responses are poor during B-cell depletion.
  2. Give pneumococcal conjugate vaccine, meningococcal conjugate ACWY and serogroup B vaccines, and Haemophilus influenzae type b vaccine, according to current national guidance for asplenia.
  3. Continue annual influenza vaccination; review tetanus and other routine vaccines, and check hepatitis B serology before rituximab.
  4. Avoid live vaccines once significant immunosuppression begins.
  5. Educate her about urgent assessment for any fever, consider a standby antibiotic supply and recommend medical alert identification.

Answer: Complete pneumococcal, meningococcal (ACWY and B) and Hib vaccination at least two weeks before splenectomy and before rituximab, continue influenza vaccination, check hepatitis B status, and provide fever education and a standby plan.

Common mistakes

  • MistakeFrequent colds in an adult indicate immunodeficiency.

    InsteadLook for warning signs: recurrent serious bacterial infections, opportunistic organisms, unusual sites, family history.

  • MistakeLive vaccines are fine for patients on high-dose steroids if they feel well.

    InsteadLive vaccines are generally contraindicated with significant immunosuppression.

  • MistakeA 10 percent drop in measles coverage is unimportant if most people are still vaccinated.

    InsteadMeasles needs about 92 to 95 percent immunity; small drops allow outbreaks.

  • MistakeNACI recommendations automatically determine what every province funds.

    InsteadProvinces and territories set their own funded programs informed by NACI advice.

  • MistakeUS federal vaccine schedules were stable through 2026.

    InsteadThey changed substantially and were under litigation; check current status and professional society schedules.

Summary and key terms

  • Suspect immunodeficiency from recurrent, severe, unusual or opportunistic infections; the organism pattern identifies the defective component.
  • CVID presents in adults with low immunoglobulins and poor vaccine responses and is treated with immunoglobulin replacement.
  • Secondary immunodeficiency from drugs, cancer, organ disease, asplenia, age and HIV is far more common than primary.
  • HIV opportunistic infections follow CD4 thresholds: Pneumocystis below 200, Toxoplasma and Cryptococcus below 100, MAC and CMV below 50.
  • Vaccine types include live, inactivated, subunit, toxoid, polysaccharide, conjugate, mRNA and vector; live vaccines are avoided in pregnancy and immunosuppression.
  • Community immunity threshold is about 1 minus 1 divided by R0; measles needs 92 to 95 percent.
  • NACI advises in Canada with provincial funding decisions; US recommendations changed in 2025 to 2026 and were litigated.
Primary immunodeficiency
An inherited defect of the immune system.
Secondary immunodeficiency
Immune impairment caused by drugs, disease, age or environment.
Common variable immunodeficiency
A primary antibody deficiency with low immunoglobulins and poor vaccine responses.
Severe combined immunodeficiency
A primary immunodeficiency affecting both T and B cells, fatal in infancy without treatment.
Chronic granulomatous disease
A phagocyte disorder with defective NADPH oxidase.
Opportunistic infection
An infection that causes disease mainly in people with impaired immunity.
Immune reconstitution inflammatory syndrome
Inflammatory worsening of an infection as immunity recovers on ART.
Adjuvant
A vaccine component that enhances the immune response.
Conjugate vaccine
A polysaccharide antigen linked to a protein carrier to engage T-cell help.
Basic reproduction number
The average number of secondary cases from one case in a fully susceptible population.
Community immunity
Indirect protection that occurs when enough of a population is immune to interrupt transmission.
NACI
National Advisory Committee on Immunization, which advises the Public Health Agency of Canada.
ACIP
Advisory Committee on Immunization Practices, which advises the CDC.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A man has recurrent S. aureus liver abscesses and Aspergillus pneumonia. Which defect is likely?

    Show answer

    A phagocyte defect such as chronic granulomatous disease.

  2. At what CD4 count is Pneumocystis prophylaxis started in HIV?

    Show answer

    Below 200 cells per cubic millimetre.

  3. Calculate the approximate community immunity threshold for an infection with R0 of 4.

    Show answer

    1 minus 1/4 equals 0.75, so about 75 percent.

  4. Why are inactivated vaccines given before immunosuppressive therapy when possible?

    Show answer

    Immune responses are weaker during immunosuppression, especially B-cell depletion.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz