i have a general medicine presentation. help me make ppt on indication for vaccination in adults
Age-based indications • Chronic medical conditions • Immunocompromised states • Pregnancy • Occupational risk • Lifestyle and behavioral risk factors
adult vaccination indications schedule 2025 CDC ACIP recommendations
mkdir -p /tmp/workspace/adult-vaccination-ppt
~/adult-vaccination-ppt/build_ppt.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
import copy
from lxml import etree
# ── Colour palette ──────────────────────────────────────────────
DARK_BLUE = RGBColor(0x0D, 0x3B, 0x6E) # deep navy
MID_BLUE = RGBColor(0x15, 0x6E, 0xAA) # accent blue
LIGHT_BLUE = RGBColor(0xD6, 0xEA, 0xF8) # very light blue bg
TEAL = RGBColor(0x00, 0x8B, 0x8B) # teal accent
ORANGE = RGBColor(0xE8, 0x7A, 0x22) # warm highlight
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GREY = RGBColor(0xF2, 0xF6, 0xFB)
TEXT_DARK = RGBColor(0x1A, 0x1A, 0x2E)
YELLOW_HL = RGBColor(0xFF, 0xF0, 0xB2)
GREEN = RGBColor(0x1A, 0x73, 0x48)
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
BLANK = prs.slide_layouts[6]
# ────────────────────────────────────────────────────────────────
# Helpers
# ────────────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_rgb, alpha=None):
from pptx.oxml.ns import qn
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.line.fill.background()
if fill_rgb:
shape.fill.solid()
shape.fill.fore_color.rgb = fill_rgb
else:
shape.fill.background()
return shape
def add_textbox(slide, x, y, w, h, text, size=18, bold=False, color=TEXT_DARK,
align=PP_ALIGN.LEFT, wrap=True, italic=False, anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = anchor
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(2)
tf.margin_bottom= Pt(2)
p = tf.paragraphs[0]
p.alignment = align
r = p.add_run()
r.text = text
r.font.name = "Calibri"
r.font.size = Pt(size)
r.font.bold = bold
r.font.italic= italic
r.font.color.rgb = color
return tb, tf
def add_bullet_box(slide, x, y, w, h, title, bullets, title_size=17,
bullet_size=14, title_color=DARK_BLUE, bullet_color=TEXT_DARK,
bg_color=None, bullet_char="●"):
"""Draw an optional filled rectangle and add a title + bulleted list inside."""
if bg_color:
add_rect(slide, x, y, w, h, bg_color)
tb = slide.shapes.add_textbox(Inches(x+0.12), Inches(y+0.08),
Inches(w-0.2), Inches(h-0.15))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4)
tf.margin_right = Pt(2)
tf.margin_top = Pt(2)
tf.margin_bottom= Pt(2)
# Title paragraph
p = tf.paragraphs[0]
p.alignment = PP_ALIGN.LEFT
r = p.add_run()
r.text = title
r.font.name = "Calibri"
r.font.size = Pt(title_size)
r.font.bold = True
r.font.color.rgb = title_color
# Bullet paragraphs
for b in bullets:
p = tf.add_paragraph()
p.alignment = PP_ALIGN.LEFT
r = p.add_run()
r.text = f"{bullet_char} {b}"
r.font.name = "Calibri"
r.font.size = Pt(bullet_size)
r.font.bold = False
r.font.color.rgb = bullet_color
return tb
def header_bar(slide, title, subtitle=None):
"""Top navy header bar."""
add_rect(slide, 0, 0, 13.333, 1.15, DARK_BLUE)
add_textbox(slide, 0.3, 0.1, 12.5, 0.65, title,
size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
if subtitle:
add_textbox(slide, 0.3, 0.72, 12.5, 0.38, subtitle,
size=14, italic=True, color=LIGHT_BLUE, align=PP_ALIGN.LEFT)
def footer_bar(slide, text="Indications for Vaccination in Adults | General Medicine Presentation"):
add_rect(slide, 0, 7.18, 13.333, 0.32, DARK_BLUE)
add_textbox(slide, 0.3, 7.18, 12.8, 0.32, text,
size=9, color=LIGHT_BLUE, align=PP_ALIGN.LEFT)
# ============================================================
# SLIDE 1 – Title Slide
# ============================================================
slide = prs.slides.add_slide(BLANK)
# Background gradient simulation: two rects
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(slide, 0, 4.5, 13.333, 3.0, MID_BLUE)
# Decorative accent bar
add_rect(slide, 0, 4.35, 13.333, 0.15, ORANGE)
# Title
tb, tf = add_textbox(slide, 1.0, 1.2, 11.0, 1.5,
"Indications for Vaccination in Adults",
size=40, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
# Subtitle
add_textbox(slide, 1.5, 2.8, 10.0, 0.6,
"A Clinical Overview for General Medicine",
size=20, italic=True, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
# Six category pills
cats = ["Age-Based", "Chronic Medical\nConditions",
"Immunocompromised\nStates", "Pregnancy",
"Occupational Risk", "Lifestyle &\nBehavioral Risk"]
pill_w = 1.9; pill_h = 0.75; gap = 0.15
start_x = (13.333 - (6*pill_w + 5*gap)) / 2
for i, c in enumerate(cats):
px = start_x + i*(pill_w+gap)
add_rect(slide, px, 4.9, pill_w, pill_h, WHITE)
add_textbox(slide, px+0.05, 4.88, pill_w-0.1, pill_h,
c, size=10, bold=True, color=DARK_BLUE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# Source line
add_textbox(slide, 1.0, 6.85, 11.0, 0.4,
"Source: ACIP Adult Immunization Schedule 2025 | CDC",
size=9, italic=True, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 2 – Agenda / Overview
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Presentation Outline")
footer_bar(slide)
topics = [
("1", "Age-Based Indications",
"Routine vaccines recommended by age group (19–49, 50–64, 65+)"),
("2", "Chronic Medical Conditions",
"Diabetes, CKD, CVD, liver disease, asplenia, pulmonary disease"),
("3", "Immunocompromised States",
"HIV, malignancy, transplant, immunosuppressive therapy"),
("4", "Pregnancy",
"Tdap, influenza, COVID-19, RSV – timing and safety"),
("5", "Occupational Risk",
"Healthcare workers, lab personnel, travellers"),
("6", "Lifestyle & Behavioral Risk Factors",
"MSM, IDU, unhoused, incarcerated populations"),
]
for i, (num, title, desc) in enumerate(topics):
row = i % 3; col = i // 3
bx = 0.5 + col*6.5; by = 1.35 + row*1.85
add_rect(slide, bx, by, 6.1, 1.65, WHITE)
add_rect(slide, bx, by, 0.5, 1.65, MID_BLUE)
add_textbox(slide, bx+0.02, by+0.4, 0.5, 0.8, num,
size=20, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(slide, bx+0.58, by+0.1, 5.3, 0.55, title,
size=15, bold=True, color=DARK_BLUE)
add_textbox(slide, bx+0.58, by+0.62, 5.3, 0.85, desc,
size=11, color=TEXT_DARK, wrap=True)
# ============================================================
# SLIDE 3 – Age-Based Indications (table style)
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Age-Based Indications",
"Routine vaccines recommended for all adults by age group")
footer_bar(slide)
age_data = [
("All Adults\n(19+ yrs)",
["Influenza – 1 dose annually",
"COVID-19 – updated annually (2024-25 formulation)",
"Tdap/Td – if not received; Td booster every 10 years",
"Hepatitis B (HepB) – 2–3 dose series if not vaccinated",
"MMR – 1–2 doses if no prior evidence of immunity",
"Varicella – 2 doses if no evidence of immunity"],
MID_BLUE),
("Ages 19–49",
["HPV – up to 26 yrs routinely; shared decision-making 27–45 yrs",
"Meningococcal ACWY (MenACWY) – if risk factor present",
"Pneumococcal – PCV21 if high-risk condition",
"Hepatitis A – 2–3 dose series if indicated"],
TEAL),
("Ages 50–64",
["Recombinant Zoster (RZV / Shingrix) – 2-dose series",
"Pneumococcal PCV21 – 1 dose (shared decision 50–64 yrs)",
"RSV vaccine – if risk factors (e.g., chronic disease)",
"Enhanced influenza (HD or adjuvanted) – consider"],
MID_BLUE),
("Ages 65+",
["RZV (Shingrix) – 2-dose series if not yet vaccinated",
"Pneumococcal PCV21 or PCV20 – 1 dose universally recommended",
"RSV vaccine – universally recommended (75+ yrs); risk-based 60-74",
"High-dose or adjuvanted influenza preferred",
"COVID-19 booster – annually, especially with comorbidities"],
TEAL),
]
positions = [(0.3, 1.25), (6.85, 1.25), (0.3, 4.1), (6.85, 4.1)]
for (bx, by), (age, bullets, col) in zip(positions, age_data):
bw = 6.2; bh = 2.7
add_rect(slide, bx, by, bw, bh, WHITE)
add_rect(slide, bx, by, bw, 0.42, col)
add_textbox(slide, bx+0.12, by+0.04, bw-0.2, 0.36,
age, size=13, bold=True, color=WHITE)
tb = slide.shapes.add_textbox(Inches(bx+0.12), Inches(by+0.48),
Inches(bw-0.2), Inches(bh-0.58))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(bullets):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(11)
r.font.color.rgb = TEXT_DARK
# ============================================================
# SLIDE 4 – Chronic Medical Conditions
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Chronic Medical Conditions",
"Specific vaccines indicated beyond routine recommendations")
footer_bar(slide)
conditions = [
("Diabetes Mellitus",
["Pneumococcal (PCV21)", "Hepatitis B", "Influenza (annual)",
"COVID-19 (annual)", "RZV (≥50 yrs)"],
RGBColor(0xE8, 0xF4, 0xFD)),
("CKD / ESRD /\nDialysis",
["Hepatitis B (higher dose if on dialysis)", "Pneumococcal",
"Influenza", "COVID-19", "Varicella (if seroneg.)"],
RGBColor(0xE8, 0xF8, 0xF1)),
("Chronic Liver\nDisease / Cirrhosis",
["Hepatitis A (2–3 doses)", "Hepatitis B",
"Pneumococcal", "Influenza", "COVID-19"],
RGBColor(0xFD, 0xF2, 0xE8)),
("Asplenia /\nHyposplenia",
["MenACWY (+ MenB if ≤21 yrs)", "Pneumococcal",
"Hib (1 dose if not vaccinated)", "Influenza", "COVID-19"],
RGBColor(0xF9, 0xEB, 0xEA)),
("CVD / Chronic\nLung Disease",
["Pneumococcal (PCV21/PCV20 → PPSV23)",
"Influenza", "COVID-19", "RSV (if ≥60 or risk factors)"],
RGBColor(0xEA, 0xEC, 0xF8)),
("Functional\nAsplenia / SCD",
["Pneumococcal (full series)",
"MenACWY every 5 years", "MenB series",
"Hib", "Influenza", "COVID-19"],
RGBColor(0xF0, 0xF0, 0xE8)),
]
cols = 3; rows = 2
bw = 4.0; bh = 2.6; gap_x = 0.22; gap_y = 0.25
sx = (13.333 - (cols*bw + (cols-1)*gap_x)) / 2
sy = 1.3
for i, (cond, vax, bg) in enumerate(conditions):
col_i = i % cols; row_i = i // cols
bx = sx + col_i*(bw+gap_x); by = sy + row_i*(bh+gap_y)
add_rect(slide, bx, by, bw, bh, bg)
add_rect(slide, bx, by, bw, 0.45, DARK_BLUE)
add_textbox(slide, bx+0.1, by+0.04, bw-0.15, 0.38,
cond, size=12, bold=True, color=WHITE)
tb = slide.shapes.add_textbox(Inches(bx+0.1), Inches(by+0.5),
Inches(bw-0.15), Inches(bh-0.6))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(vax):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(10.5)
r.font.color.rgb = TEXT_DARK
# ============================================================
# SLIDE 5 – Immunocompromised States
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Immunocompromised States",
"Live vaccines generally contraindicated; enhanced schedules required")
footer_bar(slide)
# Key principle box
add_rect(slide, 0.3, 1.2, 12.7, 0.6, RGBColor(0xFF, 0xE0, 0x82))
add_textbox(slide, 0.5, 1.22, 12.3, 0.56,
"⚠ PRINCIPLE: Live-attenuated vaccines (MMR, Varicella, LAIV) are CONTRAINDICATED in severely immunocompromised patients. "
"Inactivated vaccines are generally safe but may have reduced immunogenicity.",
size=11, bold=True, color=RGBColor(0x7D, 0x33, 0x00))
states = [
("HIV Infection",
"CD4 ≥200/µL",
["Inactivated Influenza (annual)", "COVID-19 (3-dose primary + boosters)",
"Pneumococcal PCV21 → PPSV23", "Hepatitis A & B",
"MMR & Varicella if CD4 ≥200 (LIVE – only if stable)",
"RZV (Shingrix) – 2 doses", "MenACWY if indicated"],
RGBColor(0xEA, 0xF2, 0xFF)),
("Malignancy /\nChemotherapy",
"Timing critical",
["Influenza (inactivated only, not LAIV)",
"COVID-19 – 3-dose mRNA primary + boosters",
"Pneumococcal", "Hepatitis B",
"Live vaccines: only when off chemo ≥3 months",
"Avoid live vaccines if actively on immunosuppression"],
RGBColor(0xEA, 0xF8, 0xF1)),
("Solid Organ\nTransplant",
"Pre- vs post-transplant",
["Give all indicated vaccines ideally ≥2 wks BEFORE transplant",
"Post-transplant: inactivated vaccines ≥3–6 months post-op",
"Influenza, COVID-19, Pneumococcal, HepB, HepA",
"Live vaccines contraindicated post-transplant",
"RZV can be given (non-live)"],
RGBColor(0xF9, 0xF0, 0xFF)),
("Immunosuppressive\nTherapy",
"Steroids, biologics, DMARDs",
["High-dose steroids (≥20mg/day >14 days): contraindication for live Vx",
"Biologics (anti-TNF, rituximab): avoid live; give inactivated",
"Rituximab: vaccinate ideally 4 weeks BEFORE therapy",
"Annual influenza + COVID-19 for all",
"Pneumococcal for all on long-term immunosuppression"],
RGBColor(0xFD, 0xF6, 0xE8)),
]
bw = 5.95; bh = 2.5; gap = 0.22
for i, (name, note, bullets, bg) in enumerate(states):
col_i = i % 2; row_i = i // 2
bx = 0.3 + col_i*(bw+gap); by = 1.9 + row_i*(bh+0.2)
add_rect(slide, bx, by, bw, bh, bg)
add_rect(slide, bx, by, bw, 0.44, DARK_BLUE)
add_textbox(slide, bx+0.1, by+0.04, bw*0.6, 0.36,
name, size=12, bold=True, color=WHITE)
add_textbox(slide, bx+bw*0.6+0.05, by+0.08, bw*0.35, 0.3,
note, size=9, italic=True, color=LIGHT_BLUE)
tb = slide.shapes.add_textbox(Inches(bx+0.1), Inches(by+0.5),
Inches(bw-0.15), Inches(bh-0.6))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(bullets):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(10)
r.font.color.rgb = TEXT_DARK
# ============================================================
# SLIDE 6 – Pregnancy
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Vaccination in Pregnancy",
"Goal: protect mother AND newborn via placental antibody transfer")
footer_bar(slide)
# Principle
add_rect(slide, 0.3, 1.2, 12.7, 0.55, RGBColor(0xD5, 0xF5, 0xE3))
add_textbox(slide, 0.5, 1.22, 12.3, 0.5,
"✔ Inactivated, recombinant, and toxoid vaccines are generally SAFE in pregnancy. Live vaccines are deferred to postpartum.",
size=11, bold=True, color=GREEN)
preg_cols = [
{
"title": "Recommended EVERY Pregnancy",
"color": DARK_BLUE,
"items": [
"INFLUENZA (inactivated)\n→ Any trimester; annual; protects mother & infant",
"Tdap\n→ 27–36 weeks gestation (each pregnancy)\n→ Protects newborn against pertussis",
"COVID-19\n→ Updated annual vaccine; any trimester\n→ mRNA vaccines preferred",
"RSV (Abrysvo – protein-based)\n→ 32–36 weeks gestation\n→ Protects infant in first 6 months",
]
},
{
"title": "Based on Medical Indication",
"color": TEAL,
"items": [
"Hepatitis B\n→ If not immune; safe in all trimesters",
"Hepatitis A\n→ If at risk; inactivated; safe",
"Meningococcal (MenACWY)\n→ If high-risk condition",
"Pneumococcal\n→ If underlying lung/cardiac/renal disease",
]
},
{
"title": "CONTRAINDICATED in Pregnancy",
"color": RGBColor(0xC0, 0x39, 0x2B),
"items": [
"MMR (Measles-Mumps-Rubella)\n→ Live-attenuated; defer to postpartum",
"Varicella\n→ Live-attenuated; avoid; give postpartum",
"LAIV (Live Intranasal Influenza)\n→ Use inactivated IIV instead",
"HPV\n→ Data insufficient; defer until after delivery",
]
},
]
bw = 4.0; bh = 5.1; gap = 0.27
sx = (13.333 - (3*bw + 2*gap)) / 2
for i, col in enumerate(preg_cols):
bx = sx + i*(bw+gap); by = 1.85
add_rect(slide, bx, by, bw, bh, WHITE)
add_rect(slide, bx, by, bw, 0.44, col["color"])
add_textbox(slide, bx+0.1, by+0.05, bw-0.15, 0.36,
col["title"], size=12, bold=True, color=WHITE)
tb = slide.shapes.add_textbox(Inches(bx+0.1), Inches(by+0.52),
Inches(bw-0.15), Inches(bh-0.6))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(col["items"]):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(10)
r.font.color.rgb = TEXT_DARK
p2 = tf.add_paragraph() # blank spacer
r2 = p2.add_run(); r2.text = ""; r2.font.size = Pt(4)
# ============================================================
# SLIDE 7 – Occupational Risk
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Occupational Risk",
"Workers with exposure risk require targeted vaccination")
footer_bar(slide)
occ_data = [
("Healthcare\nWorkers (HCW)",
MID_BLUE,
["Influenza – annual (mandatory in many settings)",
"Hepatitis B – 3-dose series; check serology post-vaccination",
"MMR – 2 doses or serologic evidence of immunity",
"Varicella – 2 doses or serologic immunity",
"Tdap – 1 dose (Td booster every 10 yrs)",
"COVID-19 – annual updated vaccine",
"Mpox – consider for HCW with potential exposure (2 doses JYNNEOS)",
"Meningococcal – microbiologists handling N. meningitidis"]),
("Laboratory\nPersonnel",
TEAL,
["Hepatitis B – if handling blood/body fluids",
"Meningococcal (MenACWY) – work with N. meningitidis",
"Typhoid – work with S. typhi in research labs",
"Rabies pre-exposure – if handling animals",
"Polio (IPV) – if working with poliovirus",
"Yellow Fever – if handling flavivirus"]),
("Veterinarians /\nAnimal Workers",
RGBColor(0x27, 0x6E, 0x2B),
["Rabies – pre-exposure prophylaxis (3 doses)",
"Influenza – annual",
"Q fever – not routinely available; risk assessment",
"Tetanus/Tdap booster"]),
("International\nTravellers",
ORANGE,
["Yellow Fever – required for entry to some countries",
"Typhoid – oral or injectable",
"Meningococcal – Hajj, sub-Saharan Africa",
"Japanese Encephalitis – travel to endemic Asia",
"Hepatitis A & B",
"Rabies – pre-exposure (high-risk destinations)",
"Cholera – oral vaccine (Vaxchora) if indicated"]),
]
bw = 5.9; bh = 2.7; gap = 0.3
for i, (name, col, bullets) in enumerate(occ_data):
col_i = i % 2; row_i = i // 2
bx = 0.3 + col_i*(bw+gap); by = 1.3 + row_i*(bh+0.2)
add_rect(slide, bx, by, bw, bh, WHITE)
add_rect(slide, bx, by, bw, 0.44, col)
add_textbox(slide, bx+0.1, by+0.04, bw-0.15, 0.36,
name, size=12, bold=True, color=WHITE)
tb = slide.shapes.add_textbox(Inches(bx+0.1), Inches(by+0.5),
Inches(bw-0.15), Inches(bh-0.56))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(bullets):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(10)
r.font.color.rgb = TEXT_DARK
# ============================================================
# SLIDE 8 – Lifestyle & Behavioral Risk Factors
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Lifestyle & Behavioral Risk Factors",
"Social determinants and behaviors that increase vaccine-preventable disease risk")
footer_bar(slide)
lbr_data = [
("Men who have Sex\nwith Men (MSM)",
MID_BLUE,
["HPV vaccine – up to age 26 routinely; 27–45 if not prev. vaccinated",
"Hepatitis A – 2-dose series",
"Hepatitis B – 3-dose series",
"Meningococcal (MenACWY + MenB) – if at risk",
"Mpox (JYNNEOS) – 2 doses; high priority group",
"HIV pre-exposure prophylaxis (PrEP) considerations"]),
("Injection Drug\nUsers (IDU)",
TEAL,
["Hepatitis A – 2–3 dose series",
"Hepatitis B – 3-dose series",
"Influenza – annual",
"COVID-19 – annual updated vaccine",
"Pneumococcal if additional risk factors"],),
("Persons with\nMultiple Partners\n/ STI Risk",
RGBColor(0x7D, 0x33, 0x9A),
["HPV vaccine – up to 26 routinely; 27–45 shared decision",
"Hepatitis B – if susceptible",
"Hepatitis A – if at risk",
"Meningococcal – if group living/close contact risk"]),
("Unhoused /\nIncarcerated\nPersons",
RGBColor(0x92, 0x58, 0x1E),
["Hepatitis A (outbreaks common in this population)",
"Influenza",
"COVID-19",
"Tuberculosis – not a vaccine indication but screen",
"Meningococcal – dormitory/congregate living"]),
("Smokers /\nChronics\nAlcohol Use",
RGBColor(0x2C, 0x71, 0x3A),
["Pneumococcal – PCV21; smoking is a risk factor",
"Influenza – annual",
"COVID-19",
"Hepatitis B – alcohol-related liver disease risk",
"Tdap/Td – maintain current"]),
("Recent Travel /\nMigrants",
ORANGE,
["Review immunization history for gaps",
"Hepatitis A & B if unvaccinated",
"MMR if born before 1957 or unknown status",
"Varicella if no prior immunity",
"Region-specific vaccines as indicated"]),
]
bw = 3.85; bh = 2.55; gap_x = 0.22; gap_y = 0.22
sx = (13.333 - (3*bw + 2*gap_x)) / 2
sy = 1.3
for i, item in enumerate(lbr_data):
name = item[0]; col_c = item[1]; bullets = item[2]
col_i = i % 3; row_i = i // 3
bx = sx + col_i*(bw+gap_x); by = sy + row_i*(bh+gap_y)
add_rect(slide, bx, by, bw, bh, WHITE)
add_rect(slide, bx, by, bw, 0.44, col_c)
add_textbox(slide, bx+0.1, by+0.02, bw-0.15, 0.4,
name, size=10.5, bold=True, color=WHITE)
tb = slide.shapes.add_textbox(Inches(bx+0.1), Inches(by+0.5),
Inches(bw-0.15), Inches(bh-0.57))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(bullets):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(9.5)
r.font.color.rgb = TEXT_DARK
# ============================================================
# SLIDE 9 – Quick Reference Summary Table
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Quick Reference: Vaccine – Indication Matrix",
"Key vaccines and their primary adult indications at a glance")
footer_bar(slide)
table_data = [
# Vaccine, Age, Chronic Dz, Immunocomp, Pregnancy, Occupational, Lifestyle
("Influenza (IIV)", "All ≥19", "✔", "✔ (IIV only)", "✔ (each)", "✔ HCW", "✔ IDU"),
("COVID-19", "All ≥19", "✔", "✔ 3-dose+", "✔", "✔ HCW", "✔"),
("Tdap / Td", "All; q10y","✔", "✔", "✔ 27–36wk", "✔ HCW", "–"),
("Pneumococcal PCV21","≥50; risk","✔ DM,CKD,CVD","✔", "If indicated","–", "✔ Smokers"),
("Hepatitis B", "All ≥19", "✔ CKD", "✔", "✔ if suscep.", "✔ HCW/Lab","✔ IDU/MSM"),
("Hepatitis A", "If risk", "✔ Liver","–", "✔ if risk", "✔ Lab", "✔ IDU/MSM"),
("RZV (Shingrix)", "≥50", "–", "✔ (non-live)","–", "–", "–"),
("HPV", "≤26; 27–45","–", "✔", "Defer", "–", "✔ MSM"),
("MMR", "If suscept","–", "✗ AVOID", "✗ Defer", "✔ HCW", "–"),
("MenACWY", "If risk", "✔ Asplenia","✔", "If risk", "✔ Lab", "✔ MSM/travel"),
("RSV", "≥75; ≥60+risk","✔ CVD/Lung","–","✔ 32-36wk","–", "–"),
("Mpox (JYNNEOS)", "If risk", "–", "✔ 2-dose", "–", "✔ HCW", "✔ MSM"),
]
col_widths = [2.2, 1.3, 1.6, 1.65, 1.3, 1.65, 1.5]
headers = ["Vaccine", "Age-Based", "Chronic Dz", "Immunocomp", "Pregnancy", "Occupational", "Lifestyle"]
col_colors = [DARK_BLUE, MID_BLUE, TEAL, RGBColor(0x7D,0x33,0x9A),
RGBColor(0xC0,0x39,0x2B), ORANGE, RGBColor(0x27,0x6E,0x2B)]
row_h = 0.415
sy = 1.22
sx = 0.18
# Header row
x = sx
for j, (hdr, cw, cc) in enumerate(zip(headers, col_widths, col_colors)):
add_rect(slide, x, sy, cw-0.03, row_h, cc)
add_textbox(slide, x+0.05, sy+0.03, cw-0.1, row_h-0.06,
hdr, size=10, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
x += cw
# Data rows
for ri, row in enumerate(table_data):
ry = sy + row_h + ri*row_h
bg = WHITE if ri%2==0 else LIGHT_GREY
x = sx
for j, (val, cw) in enumerate(zip(row, col_widths)):
add_rect(slide, x, ry, cw-0.03, row_h, bg)
fc = DARK_BLUE if j==0 else TEXT_DARK
fs = 10 if j==0 else 9
fb = True if j==0 else False
add_textbox(slide, x+0.04, ry+0.02, cw-0.1, row_h-0.04,
val, size=fs, bold=fb, color=fc,
align=PP_ALIGN.LEFT if j==0 else PP_ALIGN.CENTER,
anchor=MSO_ANCHOR.MIDDLE)
x += cw
# ============================================================
# SLIDE 10 – Contraindications & Precautions
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Contraindications & Precautions",
"General principles before administering any vaccine")
footer_bar(slide)
# Two columns
# Left – Absolute Contraindications
add_rect(slide, 0.3, 1.25, 5.9, 5.85, WHITE)
add_rect(slide, 0.3, 1.25, 5.9, 0.44, RGBColor(0xC0, 0x39, 0x2B))
add_textbox(slide, 0.4, 1.27, 5.6, 0.38,
"Absolute Contraindications", size=13, bold=True, color=WHITE)
contra = [
"Severe allergic reaction (anaphylaxis) to a previous dose or vaccine component",
"Allergy to any vaccine component (check excipients – gelatin, neomycin, egg protein, latex, yeast)",
"Live vaccines in severely immunocompromised patients",
"MMR / Varicella – in pregnancy",
"Yellow Fever – in infants <6 months, severely immunocomp., thymus disease",
"BCG – not generally used in adults; contraindicated if immunosuppressed",
]
tb = slide.shapes.add_textbox(Inches(0.42), Inches(1.76),
Inches(5.65), Inches(5.2))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(4); tf.margin_top = Pt(4)
for j, b in enumerate(contra):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"✖ {b}"
r.font.name = "Calibri"; r.font.size = Pt(11.5)
r.font.color.rgb = RGBColor(0x7B, 0x24, 0x1C)
sp = tf.add_paragraph(); sp.add_run().text = ""
sp.runs[0].font.size = Pt(4)
# Right – Precautions
add_rect(slide, 6.55, 1.25, 6.5, 5.85, WHITE)
add_rect(slide, 6.55, 1.25, 6.5, 0.44, ORANGE)
add_textbox(slide, 6.65, 1.27, 6.3, 0.38,
"Precautions & Situations Requiring Assessment", size=13, bold=True, color=WHITE)
precautions = [
"Moderate or severe acute illness with or without fever – defer until recovered",
"History of Guillain-Barré Syndrome within 6 weeks of prior influenza vaccine",
"Syncope risk – observe for 15 minutes after vaccination",
"Immunosuppression – assess timing and type of vaccine (live vs inactivated)",
"Recent blood products / IVIG – may affect response to live vaccines; defer MMR/Varicella ≥3–11 months",
"Anticoagulation / bleeding disorders – use smallest gauge needle; apply firm pressure",
"Latex allergy – check vial stopper / syringe composition",
"Egg allergy – no contraindication for influenza or yellow fever (use standard precautions); RIV preferred if severe allergy",
]
tb = slide.shapes.add_textbox(Inches(6.65), Inches(1.76),
Inches(6.25), Inches(5.2))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(4); tf.margin_top = Pt(4)
for j, b in enumerate(precautions):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"⚠ {b}"
r.font.name = "Calibri"; r.font.size = Pt(11)
r.font.color.rgb = RGBColor(0x6E, 0x2F, 0x00)
sp = tf.add_paragraph(); sp.add_run().text = ""
sp.runs[0].font.size = Pt(2)
# ============================================================
# SLIDE 11 – Special Considerations & Catch-Up
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GREY)
header_bar(slide, "Special Considerations & Catch-Up Vaccination",
"Addressing delayed, incomplete, or missed immunizations in adults")
footer_bar(slide)
special = [
{
"title": "Catch-Up Vaccination",
"color": DARK_BLUE,
"bullets": [
"Adults with unknown or incomplete vaccination history should be evaluated",
"No need to restart a series – pick up where left off (regardless of time gap)",
"Serologic testing can confirm immunity for Hep B, varicella, measles",
"Review vaccination records at every clinical encounter",
]
},
{
"title": "Simultaneous Vaccines",
"color": MID_BLUE,
"bullets": [
"Most vaccines can be administered on the same day at different sites",
"Live vaccines given on the same day OR ≥28 days apart (if not same day, separate by 4 weeks)",
"Pneumococcal and influenza can be co-administered",
"COVID-19 can be given with other vaccines (without waiting period)",
]
},
{
"title": "Record Keeping",
"color": TEAL,
"bullets": [
"Document: vaccine name, manufacturer, lot number, site, date",
"Provide Vaccine Information Statement (VIS) before each dose",
"Enter in Immunization Information System (IIS) / registry",
"Report adverse events to VAERS (Vaccine Adverse Event Reporting System)",
]
},
{
"title": "Shared Decision Making",
"color": ORANGE,
"bullets": [
"Some vaccines are recommended based on shared decision (HPV 27–45 yrs, MenB for some groups)",
"Discuss benefits vs. risks in light of patient's values and exposure risk",
"Respect patient autonomy; address vaccine hesitancy constructively",
"Use motivational interviewing techniques for hesitant patients",
]
},
]
bw = 5.9; bh = 2.55; gap = 0.28
for i, s in enumerate(special):
col_i = i % 2; row_i = i // 2
bx = 0.3 + col_i*(bw+gap); by = 1.3 + row_i*(bh+0.22)
add_rect(slide, bx, by, bw, bh, WHITE)
add_rect(slide, bx, by, bw, 0.44, s["color"])
add_textbox(slide, bx+0.1, by+0.05, bw-0.15, 0.36,
s["title"], size=13, bold=True, color=WHITE)
tb = slide.shapes.add_textbox(Inches(bx+0.1), Inches(by+0.5),
Inches(bw-0.15), Inches(bh-0.58))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_top = Pt(2)
for j, b in enumerate(s["bullets"]):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"▸ {b}"
r.font.name = "Calibri"; r.font.size = Pt(11)
r.font.color.rgb = TEXT_DARK
# ============================================================
# SLIDE 12 – Key Takeaways & References
# ============================================================
slide = prs.slides.add_slide(BLANK)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(slide, 0, 5.5, 13.333, 2.0, MID_BLUE)
add_rect(slide, 0, 5.42, 13.333, 0.12, ORANGE)
add_textbox(slide, 0.5, 0.2, 12.0, 0.65,
"Key Takeaways", size=30, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
takeaways = [
"Vaccination in adults is indication-driven: age, medical conditions, immune status, pregnancy, occupation, and lifestyle all guide decisions.",
"Live vaccines are contraindicated in immunocompromised patients and during pregnancy.",
"Some vaccines (Tdap in pregnancy, Shingrix at ≥50, Pneumococcal at ≥65) are universally recommended regardless of other risk factors.",
"Catch-up vaccination is always appropriate - it is never too late to vaccinate an adult with incomplete history.",
"Co-administration of most vaccines on the same day is safe and recommended to improve coverage rates.",
"Always screen for contraindications, document doses, and provide VIS to patients.",
]
tb = slide.shapes.add_textbox(Inches(0.4), Inches(0.95),
Inches(12.5), Inches(4.3))
tf = tb.text_frame; tf.word_wrap = True
tf.margin_left = Pt(4); tf.margin_top = Pt(4)
for j, t in enumerate(takeaways):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
r = p.add_run()
r.text = f"{'0'+str(j+1) if j<9 else j+1}. {t}"
r.font.name = "Calibri"; r.font.size = Pt(13.5)
r.font.color.rgb = WHITE
sp = tf.add_paragraph(); sp.add_run().text = ""; sp.runs[0].font.size = Pt(5)
add_textbox(slide, 0.4, 5.6, 12.5, 0.38,
"References", size=13, bold=True, color=LIGHT_BLUE)
refs = ("ACIP. Recommended Immunization Schedule for Adults Aged 19 Years or Older, United States, 2025. MMWR 2025;74(2). "
"CDC Vaccine Recommendations and Guidelines. cdc.gov/vaccines. "
"WHO Adult Immunization Position Papers. who.int/immunization.")
add_textbox(slide, 0.4, 6.0, 12.5, 1.1, refs,
size=9.5, italic=True, color=LIGHT_BLUE, wrap=True)
# ── Save ────────────────────────────────────────────────────────
out = "/tmp/workspace/adult-vaccination-ppt/Indications_for_Vaccination_in_Adults.pptx"
prs.save(out)
print(f"Saved: {out}")
cd /tmp/workspace/adult-vaccination-ppt && python build_ppt.py 2>&1
ls -lh /tmp/workspace/adult-vaccination-ppt/
Indications for Vaccination in Adults
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - Six category pills displayed visually |
| 2 | Presentation Outline - All 6 sections with brief descriptions |
| 3 | Age-Based Indications - 4 panels: All ≥19, 19–49, 50–64, 65+ with specific vaccines |
| 4 | Chronic Medical Conditions - 6 cards: DM, CKD, Liver disease, Asplenia, CVD/Lung, SCD |
| 5 | Immunocompromised States - HIV, Malignancy, Solid organ transplant, Immunosuppressive therapy |
| 6 | Vaccination in Pregnancy - Recommended every pregnancy / Indication-based / Contraindicated |
| 7 | Occupational Risk - HCW, Lab personnel, Veterinarians, International travellers |
| 8 | Lifestyle & Behavioral Risk Factors - MSM, IDU, Multiple partners, Unhoused, Smokers, Migrants |
| 9 | Quick Reference Matrix - 12 vaccines × 6 indication categories at a glance |
| 10 | Contraindications & Precautions - Absolute contraindications vs. precautions side-by-side |
| 11 | Special Considerations - Catch-up vaccination, simultaneous vaccines, record keeping, shared decision making |
| 12 | Key Takeaways & References - ACIP 2025, CDC, WHO sourced |