Make a presentation for hepatology seminar max 30 slides

Reading File
Reading File
Reading File
Running Command

python3 -c " import pdfplumber text_by_page = [] with pdfplumber.open('/tmp/workspace/attachments/5cdae856-923a-4d73-b68d-d8c42b6bc867/PIIS1542356524011364.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): t = page.extract_text() if t: text_by_page.append(f'--- PAGE {i+1} ---\n{t}') full_text = '\n\n'.join(text_by_page) print(full_text[:8000]) "

Running Command

python3 -c " import pdfplumber text_by_page = [] with pdfplumber.open('/tmp/workspace/attachments/5cdae856-923a-4d73-b68d-d8c42b6bc867/PIIS1542356524011364.pdf') as pdf: for i, page in enumerate(pdf.pages): t = page.extract_text() if t: text_by_page.append(f'--- PAGE {i+1} ---\n{t}') full_text = '\n\n'.join(text_by_page) # Print pages 2 onwards (already got page 1 and start of 2) print(full_text[6000:]) "

Running Command

mkdir -p /tmp/workspace/hemochromatosis-seminar && ls /tmp/workspace/

Writing File

~/hemochromatosis-seminar/build_pptx.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.oxml.ns import qn
from lxml import etree
from io import BytesIO

# ── Colour palette ─────────────────────────────────────────────────────────
DARK_BLUE   = RGBColor(0x1A, 0x3C, 0x6E)   # navy (header bg, accents)
MID_BLUE    = RGBColor(0x2E, 0x6D, 0xA4)   # section dividers
TEAL        = RGBColor(0x00, 0x7A, 0x87)   # highlight / icon
LIGHT_BLUE  = RGBColor(0xD6, 0xE8, 0xF5)   # content bg strip
GOLD        = RGBColor(0xF0, 0xA5, 0x00)   # accent / callout
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
OFF_WHITE   = RGBColor(0xF5, 0xF7, 0xFA)
DARK_TEXT   = RGBColor(0x1A, 0x1A, 0x2E)
LIGHT_GREY  = RGBColor(0xE8, 0xEC, 0xF0)
RED_ACCENT  = RGBColor(0xC0, 0x39, 0x2B)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]

W = 13.333  # slide width inches
H = 7.5     # slide height inches

# ── Helpers ────────────────────────────────────────────────────────────────

def add_rect(slide, x, y, w, h, fill_rgb, alpha=None):
    shape = slide.shapes.add_shape(
        1,  # MSO_SHAPE_TYPE.RECTANGLE
        Inches(x), Inches(y), Inches(w), Inches(h)
    )
    shape.line.fill.background()
    fill = shape.fill
    fill.solid()
    fill.fore_color.rgb = fill_rgb
    return shape


def add_text(slide, text, x, y, w, h, font_size=18, bold=False, italic=False,
             color=DARK_TEXT, align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.TOP,
             word_wrap=True, font_name="Calibri"):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = word_wrap
    tf.vertical_anchor = v_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
    run = p.add_run()
    run.text = text
    run.font.size  = Pt(font_size)
    run.font.bold  = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name  = font_name
    return tb


def add_multiline_text(slide, lines, x, y, w, h,
                       font_size=15, bold=False, color=DARK_TEXT,
                       align=PP_ALIGN.LEFT, line_spacing_pt=None,
                       font_name="Calibri", v_anchor=MSO_ANCHOR.TOP):
    """lines: list of (text, bold_override, color_override) or plain strings"""
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.vertical_anchor = v_anchor
    tf.margin_left   = Pt(4)
    tf.margin_right  = Pt(4)
    tf.margin_top    = Pt(2)
    tf.margin_bottom = Pt(2)
    for i, line in enumerate(lines):
        if isinstance(line, tuple):
            txt, b, c = line[0], line[1] if len(line)>1 else bold, line[2] if len(line)>2 else color
        else:
            txt, b, c = line, bold, color
        if i == 0:
            p = tf.paragraphs[0]
        else:
            p = tf.add_paragraph()
        p.alignment = align
        if line_spacing_pt:
            p.line_spacing = Pt(line_spacing_pt)
        run = p.add_run()
        run.text = txt
        run.font.size  = Pt(font_size)
        run.font.bold  = b
        run.font.color.rgb = c
        run.font.name  = font_name
    return tb


def header_bar(slide, title, subtitle=None):
    """Dark blue top bar with title."""
    add_rect(slide, 0, 0, W, 1.05, DARK_BLUE)
    add_rect(slide, 0, 1.05, W, 0.06, GOLD)  # gold divider
    add_text(slide, title, 0.35, 0.08, W-0.7, 0.85,
             font_size=28, bold=True, color=WHITE,
             align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
    if subtitle:
        add_text(slide, subtitle, 0.35, 0.65, W-0.7, 0.38,
                 font_size=14, bold=False, color=LIGHT_BLUE,
                 align=PP_ALIGN.LEFT)


def slide_bg(slide):
    """Light off-white background."""
    add_rect(slide, 0, 0, W, H, OFF_WHITE)


def footer(slide, text="Adams & Ryan, Clin Gastroenterol Hepatol 2025"):
    add_rect(slide, 0, H-0.32, W, 0.32, DARK_BLUE)
    add_text(slide, text, 0.3, H-0.30, W-0.6, 0.28,
             font_size=9, color=LIGHT_BLUE,
             align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)


def section_tag(slide, label, x=0, y=1.11, w=3.2, h=0.38):
    """Teal section label pill below header."""
    add_rect(slide, x, y, w, h, TEAL)
    add_text(slide, label.upper(), x+0.1, y+0.02, w-0.2, h-0.04,
             font_size=11, bold=True, color=WHITE,
             align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)


def bullet_box(slide, items, x, y, w, h, font_size=15,
               bullet="•", color=DARK_TEXT, bold_first=False):
    """Render bulleted list."""
    lines = []
    for i, item in enumerate(items):
        b = bold_first and i == 0
        lines.append((f"{bullet}  {item}", b, color))
    add_multiline_text(slide, lines, x, y, w, h,
                       font_size=font_size, line_spacing_pt=font_size+5,
                       v_anchor=MSO_ANCHOR.TOP)


# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 1 – TITLE SLIDE
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, W, H, DARK_BLUE)
# diagonal accent
add_rect(s, 0, H-2.5, W*0.55, 2.5, MID_BLUE)
add_rect(s, 0, H-0.6, W, 0.6, RGBColor(0x0F, 0x25, 0x4A))
# gold accent bar
add_rect(s, 0, 2.8, 0.12, 2.3, GOLD)

add_text(s, "HEPATOLOGY SEMINAR", 0.5, 0.5, W-1, 0.55,
         font_size=14, bold=True, color=GOLD,
         align=PP_ALIGN.LEFT, font_name="Calibri")
add_text(s, "Diagnosis and Treatment of", 0.5, 1.15, W-1, 0.8,
         font_size=30, bold=False, color=LIGHT_BLUE,
         align=PP_ALIGN.LEFT, font_name="Calibri")
add_text(s, "Hemochromatosis", 0.5, 1.9, W-1, 1.3,
         font_size=56, bold=True, color=WHITE,
         align=PP_ALIGN.LEFT, font_name="Calibri")
add_text(s, "HFE Gene Variants · Iron Overload · Phlebotomy Therapy",
         0.5, 3.35, W-1, 0.55,
         font_size=16, bold=False, color=LIGHT_BLUE,
         align=PP_ALIGN.LEFT, font_name="Calibri")
add_text(s, "Based on: Adams PC & Ryan JD  |  Clin Gastroenterol Hepatol 2025;23:1477–1485",
         0.5, H-0.52, W-1, 0.44,
         font_size=11, bold=False, color=RGBColor(0xAA, 0xBB, 0xCC),
         align=PP_ALIGN.LEFT, font_name="Calibri")

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 2 – OVERVIEW / AGENDA
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Seminar Overview")
section_tag(s, "Agenda")
footer(s)

topics = [
    "1.  Background & Epidemiology",
    "2.  Pathophysiology & Genetics (HFE / C282Y)",
    "3.  Clinical Presentation",
    "4.  Diagnostic Work-up: Iron Studies",
    "5.  Genetic Testing & Screening",
    "6.  Assessment of Liver Fibrosis",
    "7.  Extra-hepatic Manifestations",
    "8.  Treatment: Phlebotomy",
    "9.  Advanced Therapies & Future Directions",
    "10. Key Clinical Pearls & Take-home Messages",
]
bullet_box(s, topics, 0.6, 1.6, W-1.2, 5.4, font_size=16)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 3 – BACKGROUND
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Background", "The most common genetic disease in European ancestry populations")
section_tag(s, "Background")
footer(s)

pts = [
    "Hemochromatosis is NOT a new disease – C282Y variants found in human fossils >4,000 years old in NW Europe",
    "Variants likely conferred a survival advantage by promoting iron absorption",
    "Excess iron accumulation, however, leads to serious organ damage",
    "Complications: arthritis, liver fibrosis, cirrhosis, hepatocellular carcinoma (HCC), diabetes",
    "Focus today: HFE C282Y homozygote – the clinically dominant form",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=17)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 4 – EPIDEMIOLOGY
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Epidemiology")
section_tag(s, "Epidemiology")
footer(s)

# two-column layout
add_rect(s, 0.4, 1.6, 5.9, 5.4, LIGHT_BLUE)
add_rect(s, 6.7, 1.6, 6.2, 5.4, LIGHT_BLUE)

add_text(s, "Prevalence", 0.55, 1.65, 5.6, 0.45,
         font_size=14, bold=True, color=DARK_BLUE)
left_pts = [
    "C282Y homozygotes: 1 in 227 (N. America, HEIRS study)",
    "1 in 156 in northern England (UK Biobank)",
    "Ireland (neonatal screen): ~1% prevalence – highest globally",
    "1 in 5 males & 1 in 10 females develop HFE-related morbidity",
    "1 in 10 males → severe liver disease if untreated",
    "Prior diagnosis made in only 12% men, 3.4% women (UK Biobank)",
    "Mean age at diagnosis: 61 yrs (men), 58.5 yrs (women)",
]
bullet_box(s, left_pts, 0.55, 2.15, 5.6, 4.7, font_size=14)

add_text(s, "Why So Under-diagnosed?", 6.85, 1.65, 5.8, 0.45,
         font_size=14, bold=True, color=DARK_BLUE)
right_pts = [
    "Non-specific symptoms (fatigue, arthralgia) mimic common conditions",
    "Women relatively protected by menstrual / pregnancy blood loss",
    "Most diagnoses are incidental (ferritin ordered for other reasons)",
    "Clinicians often attribute elevated ferritin to metabolic syndrome or alcohol",
    "\"Black liver\" on MRI may be first clue",
    "Strong evidence of diagnostic failure in clinical practice",
]
bullet_box(s, right_pts, 6.85, 2.15, 5.8, 4.7, font_size=14)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 5 – GENETICS & PATHOPHYSIOLOGY
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Genetics & Pathophysiology", "HFE Gene · Hepcidin Dysregulation · Iron Overload")
section_tag(s, "Pathophysiology")
footer(s)

pts = [
    "HFE gene – located on chromosome 6p; autosomal recessive inheritance",
    "C282Y variant (845G→A): the dominant pathogenic mutation",
    "H63D variant: minor contributor; compound heterozygotes (C282Y/H63D) rarely develop iron overload",
    "Normal HFE → adequate hepcidin → inhibits ferroportin → regulates intestinal Fe absorption",
    "C282Y homozygosity → hepcidin deficiency → unchecked Fe absorption → iron accumulates in liver, heart, joints, endocrine organs",
    "Severity is greater in men; women relatively protected by physiological blood loss",
    "Clinical penetrance is NOT absolute – many C282Y homozygotes remain asymptomatic",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=16)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 6 – CLINICAL PRESENTATION
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Clinical Presentation", "Symptoms are non-specific and often late")
section_tag(s, "Clinical")
footer(s)

# 3 boxes
for col, (title, items, fill) in enumerate([
    ("Symptoms (>50% of patients)", [
        "Fatigue – most common complaint",
        "Arthralgias – knuckles (MCP joints)",
        "Abdominal discomfort",
        "Loss of libido / amenorrhoea",
        "Skin bronzing (\"bronze diabetes\")",
    ], LIGHT_BLUE),
    ("Signs & Incidental Findings", [
        "Hepatomegaly / abnormal LFTs",
        "\"Black liver\" on MRI for other indication",
        "Elevated ferritin on routine iron studies",
        "Elevated transferrin saturation",
        "Cirrhosis / portal hypertension",
    ], LIGHT_BLUE),
    ("Triggers for Testing", [
        "Fatigue / arthritis work-up",
        "Family history of hemochromatosis",
        "Elevated ferritin ± raised Tsat",
        "Liver disease or diabetes work-up",
        "Iron deficiency investigation",
    ], LIGHT_BLUE),
]):
    bx = 0.4 + col * 4.3
    add_rect(s, bx, 1.6, 4.0, 5.45, fill)
    add_text(s, title, bx+0.1, 1.65, 3.8, 0.45,
             font_size=13, bold=True, color=DARK_BLUE)
    bullet_box(s, items, bx+0.1, 2.15, 3.8, 4.7, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 7 – DIAGNOSTIC APPROACH OVERVIEW
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Diagnostic Approach – Overview")
section_tag(s, "Diagnosis")
footer(s)

# Flow diagram using coloured boxes + arrows
steps = [
    ("Elevated Ferritin &/or\nRaised Transferrin Saturation", MID_BLUE),
    ("Rule out secondary causes\n(metabolic syndrome, alcohol,\nobesity, inflammation)", TEAL),
    ("HFE Genetic Testing\n(C282Y ± H63D)", DARK_BLUE),
    ("C282Y Homozygote\nConfirmed", RGBColor(0x1A, 0x7A, 0x46)),
    ("Assess iron burden,\nliver fibrosis, end-organ damage", DARK_BLUE),
]
x_start = 0.45
box_w = 2.25
box_h = 1.1
y = 1.7
for i, (txt, col) in enumerate(steps):
    bx = x_start + i * (box_w + 0.22)
    add_rect(s, bx, y, box_w, box_h, col)
    add_text(s, txt, bx+0.08, y+0.05, box_w-0.16, box_h-0.1,
             font_size=13, bold=True, color=WHITE,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    if i < len(steps)-1:
        add_text(s, "→", bx+box_w, y+0.35, 0.22, 0.45,
                 font_size=22, bold=True, color=DARK_BLUE,
                 align=PP_ALIGN.CENTER)

# notes below
notes = [
    "Ferritin thresholds for HFE testing: >300 µg/L (men) and >200 µg/L (women) + Tsat >45%",
    "A normal ferritin + Tsat <45% gives NPV of 97% for ruling out hemochromatosis",
    "Metabolic hyperferritinemia (metabolic syndrome, obesity, alcohol) is the MOST COMMON cause of elevated ferritin",
    "Do NOT label patients as 'having hemochromatosis' until C282Y homozygosity is genetically confirmed",
]
bullet_box(s, notes, 0.55, 3.0, W-1.1, 4.0, font_size=14)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 8 – SERUM FERRITIN
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Serum Ferritin: Key Points")
section_tag(s, "Iron Studies")
footer(s)

add_rect(s, 0.4, 1.6, 5.9, 5.4, LIGHT_BLUE)
add_rect(s, 6.7, 1.6, 6.1, 5.4, RGBColor(0xFF, 0xF3, 0xD6))

add_text(s, "Ferritin – Diagnostic Role", 0.55, 1.65, 5.6, 0.45,
         font_size=14, bold=True, color=DARK_BLUE)
left = [
    "Best noninvasive marker of iron burden at diagnosis",
    "Predicts likelihood of iron-related complications",
    "Correlates with expected number of phlebotomies needed",
    "Most useful indicator of liver disease risk",
    "Ferritin >1,000 µg/L → high risk of advanced (F3/F4) fibrosis",
    "1 in 5 C282Y homozygotes with ferritin >1,000 µg/L had advanced fibrosis on biopsy",
]
bullet_box(s, left, 0.55, 2.15, 5.6, 4.7, font_size=14)

add_text(s, "⚠ Limitations / Pitfalls", 6.85, 1.65, 5.8, 0.45,
         font_size=14, bold=True, color=RED_ACCENT)
right = [
    "Highly NON-SPECIFIC test – elevated in >13% of general population",
    "Most common causes: metabolic syndrome, fatty liver, alcohol, obesity, inflammation",
    "HEIRS study: elevated ferritin in 13% of 99,711 participants",
    "Probability of C282Y homozygosity increases with ferritin level, but remains low",
    "Never diagnose hemochromatosis on ferritin alone",
    "Avoid genetic testing without first confirming biochemical iron excess (Tsat >45%)",
]
bullet_box(s, right, 6.85, 2.15, 5.8, 4.7, font_size=14)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 9 – TRANSFERRIN SATURATION
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Transferrin Saturation (Tsat)")
section_tag(s, "Iron Studies")
footer(s)

pts = [
    "Reflects day-to-day intestinal iron absorption – theoretically ideal screening test",
    "Tsat threshold for HFE testing: >45% women, >50% men (alongside elevated ferritin)",
    "PROBLEM: High biological variability – Tsat can vary considerably even within C282Y homozygotes and with circadian rhythm",
    "HEIRS study: no single Tsat threshold captures most C282Y homozygotes; test NOT reproducible",
    "Best measured FASTING and on more than one occasion",
    "Scottish primary care study: Ferritin ≥300 + Tsat >50% (men) detected only 18.8% of C282Y homozygotes",
    "Best use: RULING OUT hemochromatosis – normal ferritin + Tsat <45% gives NPV of 97%",
    "Tsat alone is insufficient to confirm or exclude hemochromatosis",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 10 – HFE GENETIC TESTING
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "HFE Genetic Testing – C282Y Variant")
section_tag(s, "Genetics")
footer(s)

add_rect(s, 0.4, 1.6, 5.9, 5.4, LIGHT_BLUE)
add_rect(s, 6.7, 1.6, 6.1, 5.4, LIGHT_BLUE)

add_text(s, "Test Characteristics", 0.55, 1.65, 5.6, 0.45,
         font_size=14, bold=True, color=DARK_BLUE)
left = [
    "Became widely available in 1997",
    "Highly reproducible – no circadian variation",
    "Can be performed on a saliva sample",
    "Cost as low as USD $5 per test (Invader assay – no PCR required)",
    "Hemochromatosis is a Tier 1 ACMG genetic result since 2021 – notification of result recommended",
    "Whole genome sequencing increasingly likely to identify C282Y homozygotes",
    "Acceptance rate for testing in motivated populations: up to 97%",
]
bullet_box(s, left, 0.55, 2.15, 5.6, 4.7, font_size=14)

add_text(s, "Screening Considerations", 6.85, 1.65, 5.8, 0.45,
         font_size=14, bold=True, color=DARK_BLUE)
right = [
    "At least 7 population screening studies completed",
    "Economic analyses generally show cost-effectiveness",
    "UK Biobank: only 12% of newly identified men and 3.4% of women had prior diagnosis",
    "12% of newly identified male C282Y homozygotes had normal ferritin → no immediate treatment needed",
    "43% of newly identified female C282Y homozygotes had normal ferritin",
    "Screening non-adult children: NOT recommended",
    "Adults: siblings and parents should request HFE testing after family member diagnosed",
]
bullet_box(s, right, 6.85, 2.15, 5.8, 4.7, font_size=14)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 11 – DIAGNOSTIC PATHWAY
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Diagnostic Pathway – Step by Step")
section_tag(s, "Diagnosis")
footer(s)

steps2 = [
    ("STEP 1", "History & Exam", [
        "Fatigue, arthralgia, family history",
        "BMI, alcohol use, ancestry",
        "Physical findings (hepatomegaly, bronze skin)",
    ]),
    ("STEP 2", "Initial Blood Tests", [
        "Serum ferritin + Transferrin saturation",
        "If ↑ferritin + ↑Tsat (>45%) → proceed to HFE test",
        "Full blood count, LFTs, fasting glucose, HbA1c",
    ]),
    ("STEP 3", "HFE Genetic Test", [
        "C282Y homozygote → confirmed diagnosis",
        "Other genotypes → reassess for secondary causes",
        "Normal HFE + ↑Fe → consider MRI liver",
    ]),
    ("STEP 4", "Staging & Referral", [
        "Abdominal ultrasound",
        "Fibrosis markers: FIB-4, APRI, elastography",
        "AFP (if cirrhosis); bone density >40 yrs",
    ]),
]
for i, (step_num, step_title, items) in enumerate(steps2):
    bx = 0.35 + i * 3.25
    add_rect(s, bx, 1.6, 3.0, 0.52, DARK_BLUE)
    add_text(s, f"{step_num}: {step_title}", bx+0.08, 1.63, 2.85, 0.46,
             font_size=13, bold=True, color=GOLD,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, bx, 2.16, 3.0, 4.85, LIGHT_BLUE)
    bullet_box(s, items, bx+0.1, 2.22, 2.8, 4.7, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 12 – NEWLY DIAGNOSED CASE WORK-UP
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Work-up for a Newly Diagnosed C282Y Homozygote")
section_tag(s, "Diagnosis")
footer(s)

pts = [
    "Full blood count (rule out anaemia before phlebotomy)",
    "LFTs: AST, ALT, bilirubin",
    "Renal function: creatinine",
    "Fasting blood glucose + HbA1c (screen for diabetes)",
    "Alpha-fetoprotein (AFP) – baseline HCC marker",
    "Abdominal ultrasound: steatosis, cirrhosis, portal hypertension",
    "Non-invasive fibrosis markers: FIB-4 or APRI",
    "Transient elastography (FibroScan): liver stiffness <6.4 kPa → NPV for advanced fibrosis",
    "Bone density DEXA scan if age >40 years",
    "Cardiac echo / imaging: only if ferritin >2,000 µg/L or symptoms of dyspnoea",
    "Family screening: notify siblings and adult children",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 13 – LIVER FIBROSIS ASSESSMENT
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Liver Fibrosis Assessment", "~20% of adult male C282Y homozygotes develop liver disease")
section_tag(s, "Liver Fibrosis")
footer(s)

add_rect(s, 0.4, 1.6, 3.9, 5.4, LIGHT_BLUE)
add_rect(s, 4.6, 1.6, 3.9, 5.4, LIGHT_BLUE)
add_rect(s, 8.8, 1.6, 4.1, 5.4, RGBColor(0xFF, 0xF3, 0xD6))

add_text(s, "Blood-based Markers", 0.55, 1.65, 3.7, 0.45,
         font_size=13, bold=True, color=DARK_BLUE)
add_text(s, "Elastography", 4.75, 1.65, 3.7, 0.45,
         font_size=13, bold=True, color=DARK_BLUE)
add_text(s, "MRI Liver", 8.95, 1.65, 3.9, 0.45,
         font_size=13, bold=True, color=DARK_BLUE)

bullet_box(s, [
    "APRI: AUC 0.86–0.88 for advanced fibrosis (threshold >0.44)",
    "FIB-4 >1.1: similar performance",
    "APRI <0.37 or FIB-4 <0.73: NPV ~88–92% for advanced fibrosis",
    "Widely available, low cost",
    "Limitations: studied retrospectively in hemochromatosis",
], 0.55, 2.15, 3.7, 4.7, font_size=13)

bullet_box(s, [
    "Transient elastography (FibroScan)",
    "Liver stiffness <6.4 kPa: high NPV for advanced fibrosis (Legros et al)",
    "More recent data shows poor correlation with APRI/FIB-4 in some patients",
    "Preferred noninvasive tool when blood markers are borderline",
    "No liver biopsies used as comparator in some studies – caveat",
], 4.75, 2.15, 3.7, 4.7, font_size=13)

bullet_box(s, [
    "R2* MRI: quantifies liver iron concentration",
    "Accurate and sensitive for iron burden",
    "Not required for diagnosis in confirmed C282Y homozygotes with biochemical excess",
    "Reserve for: non-HFE iron overload, elevated ferritin with negative HFE genetic test",
    "Increasing use of inline R2* analysis for rapid reporting",
], 8.95, 2.15, 3.9, 4.7, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 14 – EXTRA-HEPATIC MANIFESTATIONS
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Extra-hepatic Manifestations of Hemochromatosis")
section_tag(s, "Extra-hepatic")
footer(s)

organs = [
    ("Musculoskeletal", [
        "Arthropathy: 27.9% males require joint replacement vs 17.1% controls",
        "Osteoporosis: OR 2.30 (95% CI 1.49–3.57) in males (UK Biobank)",
        "MCP joint arthropathy pathognomonic (though non-specific)",
        "Baseline DEXA scan >40 yrs; hand X-rays if symptomatic",
    ]),
    ("Endocrine", [
        "Diabetes mellitus (\"bronze diabetes\")",
        "Hypogonadism: loss of libido, amenorrhoea",
        "Hypothyroidism (less common)",
        "HbA1c + fasting glucose at baseline",
    ]),
    ("Cardiac", [
        "<3% develop cardiomyopathy (mostly ferritin >1,000 µg/L)",
        "Arrhythmias, restrictive cardiomyopathy",
        "Juvenile hemochromatosis (HJV): cardiac iron overload presenting in early adulthood",
        "Echo / axial imaging if ferritin >2,000 µg/L or dyspnoea",
    ]),
    ("Neurological (emerging)", [
        "UK Biobank: excess delirium, dementia, Parkinson's disease in male C282Y homozygotes",
        "Brain iron detected on MRI R2* / susceptibility mapping",
        "No depression excess reported",
        "Implications for early detection and prevention under study",
    ]),
]
for i, (organ, items) in enumerate(organs):
    bx = 0.35 + (i % 2) * 6.5
    by = 1.6 + (i // 2) * 2.75
    add_rect(s, bx, by, 6.2, 2.65, LIGHT_BLUE)
    add_text(s, organ, bx+0.12, by+0.05, 6.0, 0.4,
             font_size=14, bold=True, color=DARK_BLUE)
    bullet_box(s, items, bx+0.12, by+0.5, 6.0, 2.05, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 15 – HCC RISK
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Hepatocellular Carcinoma (HCC) in Hemochromatosis",
           "The most devastating and life-threatening complication")
section_tag(s, "HCC Risk")
footer(s)

add_rect(s, 0.4, 1.6, W-0.8, 1.1, RGBColor(0xFB, 0xE8, 0xE8))
add_text(s, "Hazard Ratio for hepatic malignancy in C282Y homozygous MALES: 10.5 (95% CI 6.6–16.7)  [UK Biobank, Atkins et al JAMA 2020]",
         0.55, 1.65, W-1.1, 1.0,
         font_size=16, bold=True, color=RED_ACCENT,
         align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)

pts = [
    "HCC predominantly affects men with hemochromatosis",
    "Typically more poorly differentiated tumours with worse outcomes",
    "Hemochromatosis is a recognised cause of NON-CIRRHOTIC HCC",
    "HCC screening (6-monthly USS + AFP) is MANDATORY in established cirrhosis",
    "Consider screening in non-cirrhotic patients with: liver fibrosis, family history, or additional liver disease risk factors",
    "Regression of fibrosis with phlebotomy reduces long-term HCC risk",
    "Treatment should not be delayed – early iron depletion is protective",
]
bullet_box(s, pts, 0.55, 2.85, W-1.1, 4.1, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 16 – OTHER HFE GENOTYPES
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Other HFE Genotypes – What to Tell Patients")
section_tag(s, "Genetics")
footer(s)

genotypes = [
    ("C282Y / H63D\n(Compound Heterozygote)", [
        "Large population studies: no increase in mortality or morbidity",
        "Mild ferritin elevation in ~10% – almost always linked to metabolic risk factors",
        "Rarely requires venesection therapy",
        "Reassure and address metabolic risk factors (obesity, alcohol, fatty liver)",
        "Voluntary blood donation appropriate if ferritin mildly elevated",
    ], MID_BLUE),
    ("H63D / H63D\n(H63D Homozygote)", [
        "Mild biochemical iron overload in ~1% only",
        "No significant clinical iron overload expected",
        "Reassure patient – NOT hemochromatosis in the clinical sense",
        "Investigate other causes of elevated ferritin",
    ], TEAL),
    ("C282Y Heterozygote\n(Single Copy)", [
        "10% may show mild ↑ ferritin or Tsat – not clinically significant",
        "No treatment required",
        "Reassure; manage metabolic co-morbidities",
    ], MID_BLUE),
]
for i, (gtype, items, col) in enumerate(genotypes):
    bx = 0.35 + i * 4.3
    add_rect(s, bx, 1.6, 4.0, 0.7, col)
    add_text(s, gtype, bx+0.1, 1.62, 3.8, 0.66,
             font_size=13, bold=True, color=WHITE,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, bx, 2.34, 4.0, 4.65, LIGHT_BLUE)
    bullet_box(s, items, bx+0.1, 2.4, 3.8, 4.55, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 17 – ELEVATED FERRITIN WITH NEGATIVE HFE
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Elevated Ferritin with Negative HFE Testing")
section_tag(s, "Diagnosis")
footer(s)

pts = [
    "Very common clinical scenario – most patients with elevated ferritin do NOT have hemochromatosis",
    "Metabolic hyperferritinemia (metabolic syndrome, NAFLD/MASLD, obesity, alcohol) accounts for the significant majority",
    "HEIRS study: no significant non-HFE iron overload detected; rare iron overload genes found only in specific groups",
    "If metabolic hyperferritinemia and alcohol excluded AND ferritin persistently elevated:",
    "  → Consider MRI liver to assess for parenchymal iron overload",
    "  → MRI liver preferred over empirical phlebotomy (to preserve IV therapy capacity for higher-priority patients)",
    "If MRI liver confirms iron overload → refer to centre experienced in advanced genetic testing:",
    "  → Ferroportin, hemojuvelin, hepcidin, transferrin receptor 2, BMP6 mutations, hypoceruloplasminemia",
    "Do NOT order advanced genetic testing without first establishing iron overload (e.g., by MRI)",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 18 – TREATMENT OVERVIEW
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Treatment of Hemochromatosis – Overview")
section_tag(s, "Treatment")
footer(s)

add_rect(s, 0.4, 1.6, W-0.8, 0.9, LIGHT_BLUE)
add_text(s, "\"The management of hemochromatosis utilises the medieval treatment of blood removal to decrease body iron stores.\"",
         0.55, 1.65, W-1.1, 0.8,
         font_size=14, bold=False, italic=True, color=DARK_BLUE,
         align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)

add_text(s, "Prerequisites for Treatment", 0.55, 2.6, 5.9, 0.42,
         font_size=14, bold=True, color=DARK_BLUE)
add_rect(s, 0.4, 2.6, 5.9, 4.38, LIGHT_BLUE)
bullet_box(s, [
    "CORRECT diagnosis first: C282Y homozygosity confirmed",
    "French multicentre study: most patients receiving venesections for 'presumed' iron overload were NOT C282Y homozygotes",
    "Non-C282Y patients: require proof of iron overload (MRI liver) before venesection",
    "Commonest diagnosis in venesection-treated non-C282Y patients: metabolic syndrome WITHOUT iron overload",
], 0.55, 3.1, 5.7, 3.8, font_size=13)

add_text(s, "Goals of Treatment", 6.7, 2.6, 6.1, 0.42,
         font_size=14, bold=True, color=DARK_BLUE)
add_rect(s, 6.7, 2.6, 6.1, 4.38, LIGHT_BLUE)
bullet_box(s, [
    "Normalise iron stores (serum ferritin target ~50 µg/L)",
    "Improve fatigue",
    "Reverse liver fibrosis (if pre-cirrhotic)",
    "Reduce risk of: diabetes, cirrhosis, liver cancer, cardiovascular disease",
    "Reduce all-cause mortality",
    "Urgency: treat immediately if ferritin >1,000 µg/L or symptomatic",
], 6.7, 3.1, 5.9, 3.8, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 19 – PHLEBOTOMY (DE-IRONING PHASE)
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Therapeutic Phlebotomy – De-ironing Phase")
section_tag(s, "Phlebotomy")
footer(s)

pts = [
    "Weekly 500 mL phlebotomy until ferritin reaches low-normal range",
    "Target serum ferritin: ~50 µg/L (historically chosen to allow for patients who do not return for follow-up)",
    "Some centres target 20–50 µg/L, aiming to also normalise transferrin saturation → may improve symptoms (French survey)",
    "Aggressive de-ironing strategy approaches iron deficiency – requires intensive follow-up; difficult in routine practice",
    "Initiate urgently for: symptomatic patients OR ferritin >1,000 µg/L",
    "Patients with ferritin 300–500 µg/L also benefit: reduced cardiovascular disease and extra-hepatic cancer mortality",
    "Side effects (experienced centres): generally very low",
    "  → Local effects (pain, redness, access failure), syncope, fatigue",
    "  → Volume depletion minimised with salt-containing sports drink",
    "Patients with established cirrhosis: commence 6-monthly USS + AFP for HCC surveillance",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 20 – MAINTENANCE PHLEBOTOMY
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Maintenance Phlebotomy & Voluntary Blood Donation")
section_tag(s, "Phlebotomy")
footer(s)

add_rect(s, 0.4, 1.6, 6.0, 5.4, LIGHT_BLUE)
add_rect(s, 6.75, 1.6, 6.15, 5.4, RGBColor(0xE6, 0xF4, 0xEA))

add_text(s, "Maintenance Therapy", 0.55, 1.65, 5.8, 0.42,
         font_size=14, bold=True, color=DARK_BLUE)
bullet_box(s, [
    "Personalised: frequency varies by age, sex, initial ferritin",
    "Younger women presenting with ferritin <1,000 µg/L often do NOT require maintenance",
    "1991 study (Adams et al): 52% had no significant iron re-accumulation at 4 years without maintenance",
    "Interval monitoring: periodic ferritin checks to guide re-treatment",
    "Non-expressing C282Y homozygotes (normal ferritin): observe; check ferritin every few years",
    "Patients should be encouraged to attend for blood donation once de-ironed",
], 0.55, 2.15, 5.8, 4.7, font_size=14)

add_text(s, "Voluntary Blood Donation – Ideal Solution", 6.9, 1.65, 5.9, 0.42,
         font_size=14, bold=True, color=RGBColor(0x1A, 0x7A, 0x46))
bullet_box(s, [
    "Many countries now accept blood from treated hemochromatosis patients",
    "Positive impact on blood donor pool",
    "Cost-effective – blood donation offset against phlebotomy costs",
    "Psychosocial benefits: community aspect, meeting other affected patients",
    "\"Ideal solution\" in maintenance phase of therapy (Adams & Ryan 2025)",
], 6.9, 2.15, 5.9, 4.7, font_size=14)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 21 – OUTCOMES OF TREATMENT
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Clinical Outcomes of Iron Reduction Therapy")
section_tag(s, "Treatment Outcomes")
footer(s)

outcomes = [
    ("Liver", [
        "Regression of fibrosis stage with phlebotomy",
        "Reduced long-term risk of HCC after fibrosis regression",
        "Reversal of liver disease in pre-cirrhotic patients",
    ], RGBColor(0x1A, 0x7A, 0x46)),
    ("Fatigue & QoL", [
        "Improvement in fatigue reported",
        "Some patients enjoy the psychosocial aspects of treatment",
        "Small erythrocytapheresis RCT showed modest fatigue benefit",
    ], MID_BLUE),
    ("Cardiovascular", [
        "Decreased cardiovascular mortality in treated mild HFE hemochromatosis",
        "Benefit seen even at moderate ferritin (300–500 µg/L)",
    ], TEAL),
    ("Cancer", [
        "Reduced extra-hepatic cancer-related mortality with treatment",
        "Systematic review (Prabhu et al Hepatology 2020) confirmed broad benefit",
    ], DARK_BLUE),
    ("Metabolic", [
        "Reduction in diabetes incidence (if treated before end-organ damage)",
        "Endocrine dysfunction less reversible once established",
    ], MID_BLUE),
    ("Mortality", [
        "Overall reduction in cirrhosis, liver cancer, death",
        "Early treatment before complications is key",
    ], RED_ACCENT),
]
for i, (cat, items, col) in enumerate(outcomes):
    bx = 0.35 + (i % 3) * 4.32
    by = 1.6 + (i // 3) * 2.77
    add_rect(s, bx, by, 4.1, 0.45, col)
    add_text(s, cat, bx+0.1, by+0.03, 3.9, 0.4,
             font_size=13, bold=True, color=WHITE,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, bx, by+0.45, 4.1, 2.25, LIGHT_BLUE)
    bullet_box(s, items, bx+0.1, by+0.5, 3.9, 2.1, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 22 – ERYTHROCYTAPHERESIS
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Erythrocytapheresis – An Alternative to Phlebotomy")
section_tag(s, "Erythrocytapheresis")
footer(s)

pts = [
    "Automated red blood cell exchange (pump-driven, similar to plasmapheresis)",
    "Maintains blood volume during iron removal – unlike standard phlebotomy",
    "Efficiency: removes up to 800 mL per procedure = 2.3× the iron of a 500 mL phlebotomy",
    "Fewer treatment sessions required (higher cost per session)",
    "Used in several European centres; acceptable safety in experienced hands",
    "The ONLY treatment modality studied in a randomised participant-blinded trial (Ong et al Lancet Haematol 2017 – Mi-Iron trial)",
    "Mi-Iron findings: most measures unchanged vs placebo; SMALL improvement in fatigue only",
    "Rombout-Sestrienkova et al (Transfusion 2016): randomised crossover vs phlebotomy – similar iron removal with fewer sessions",
    "Currently no standard indication over phlebotomy; reserved for selected patients or clinical trials",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 23 – DIETARY THERAPIES
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Dietary Therapies – What the Evidence Says")
section_tag(s, "Diet")
footer(s)

pts = [
    "Patients highly interested in dietary modification (strongly driven by internet support groups)",
    "An iron-FREE diet is NOT possible – reassure patients accordingly",
    "Iron-REDUCED diet: only MINOR reduction in serum ferritin demonstrated",
    "Iron food fortification removal (Scandinavia): small population-level effects",
    "English tea with every meal can modestly reduce iron absorption (polyphenols)",
    "Oral iron-binding compounds (polyphenol supplements): studies show some effect on reducing absorption",
    "Proton pump inhibitors (PPIs): reduce iron absorption but NOT sufficient to manage hemochromatosis without phlebotomy",
    "  → RCT (Vanclooster et al Gastroenterology 2017): PPIs decrease phlebotomy need – possible adjunct role",
    "KEY MESSAGE: Diet is an ADJUNCT only – phlebotomy remains the cornerstone of treatment",
]
bullet_box(s, pts, 0.55, 1.6, W-1.1, 5.4, font_size=15)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 24 – HEPCIDIN & BIOLOGICS
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Hepcidin-Based Therapies – Emerging Treatments")
section_tag(s, "Novel Therapies")
footer(s)

add_rect(s, 0.4, 1.6, 6.0, 5.4, LIGHT_BLUE)
add_rect(s, 6.75, 1.6, 6.15, 5.4, LIGHT_BLUE)

add_text(s, "Mini-Hepcidin (Rusfertide)", 0.55, 1.65, 5.8, 0.42,
         font_size=14, bold=True, color=DARK_BLUE)
bullet_box(s, [
    "Hepcidin deficiency is central to iron overload pathogenesis in HFE hemochromatosis",
    "Synthetic mini-hepcidin developed as parenteral therapy",
    "Mechanism: reduces intestinal iron absorption (does NOT mobilise storage iron)",
    "Rusfertide phase 2 trial (Kowdley et al Lancet GH 2023): proof-of-concept; open-label, multicentre",
    "Concept: initial phlebotomy to de-iron, then hepcidin injections to reduce maintenance phlebotomy need",
    "Must be compared to phlebotomy in any future RCT – cost analysis will always favour phlebotomy",
], 0.55, 2.15, 5.8, 4.7, font_size=13)

add_text(s, "Chelation & Gene Therapy", 6.9, 1.65, 5.9, 0.42,
         font_size=14, bold=True, color=DARK_BLUE)
bullet_box(s, [
    "Deferasirox (oral iron chelator): only chelator studied in hemochromatosis",
    "Approved for secondary iron overload (thalassaemia-related), NOT hemochromatosis",
    "Phase 1/2 trial (Phatak et al Hepatology 2010): less efficient than phlebotomy, frequent adverse effects",
    "Rarely used – combined with phlebotomy only in life-threatening hemojuvelin disease",
    "CRISPR/gene editing: potential future approach, but early stage",
    "More likely tried first in diseases without adequate existing treatments",
    "Must be proven superior to safe, low-cost phlebotomy before adoption",
], 6.9, 2.15, 5.9, 4.7, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 25 – FAMILY SCREENING
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Family Screening")
section_tag(s, "Family Screening")
footer(s)

# flow boxes
add_rect(s, 0.4, 1.6, W-0.8, 0.65, MID_BLUE)
add_text(s, "New Diagnosis of Hemochromatosis (C282Y Homozygote)",
         0.55, 1.63, W-1.1, 0.6,
         font_size=16, bold=True, color=WHITE,
         align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)

cols = [
    ("Siblings\n(Highest risk – autosomal recessive)",
     ["Immediate HFE (C282Y) genetic test",
      "Risk: 1 in 4 of being homozygous if parents are carriers",
      "Do NOT wait for symptoms"]),
    ("Parents",
     ["Request HFE C282Y genetic test",
      "Likely obligate carriers",
      "Iron studies if over 40 yrs + elevated ferritin"]),
    ("Adult Children",
     ["Option 1: test the child directly for C282Y",
      "Option 2: test child's OTHER parent first",
      "If other parent negative for C282Y → child need NOT be tested",
      "Screening of non-adult children NOT recommended"]),
]
for i, (title, items) in enumerate(cols):
    bx = 0.35 + i * 4.3
    add_rect(s, bx, 2.38, 4.0, 0.58, TEAL)
    add_text(s, title, bx+0.1, 2.4, 3.8, 0.54,
             font_size=12, bold=True, color=WHITE,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, bx, 2.98, 4.0, 4.0, LIGHT_BLUE)
    bullet_box(s, items, bx+0.1, 3.04, 3.8, 3.9, font_size=13)

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 26 – HEMOCHROMATOSIS 2025 UPDATE (TABLE 2)
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Hemochromatosis 2025 Update – Key Messages")
section_tag(s, "2025 Update")
footer(s)

updates = [
    ("Serum ferritin", "Non-specific test – elevated in 13% of general population; most do NOT have hemochromatosis"),
    ("Transferrin saturation", "Wide biological variability – limits its value as a screening test; test fasting & on ≥2 occasions"),
    ("Metabolic hyperferritinemia", "Most common cause of raised ferritin in practice – metabolic syndrome, NAFLD, alcohol, obesity"),
    ("Diagnosis labelling", "Do NOT tell patients they have hemochromatosis until C282Y homozygosity is genetically confirmed"),
    ("Compound heterozygotes", "C282Y/H63D or H63D/H63D rarely develop iron overload or clinical symptoms – reassure"),
    ("Negative HFE + ↑ferritin", "Do NOT order venesections or advanced genetic tests (HJV, TFR2, hepcidin, ferroportin) until iron overload is established (e.g. by MRI liver)"),
    ("Cirrhotic patients", "Require intensive follow-up – abdominal USS every 6 months for HCC screening"),
    ("Family notification", "Patients should actively notify siblings and adult children to be tested"),
]
y_start = 1.6
for (topic, msg) in updates:
    add_rect(s, 0.4, y_start, 2.8, 0.54, DARK_BLUE)
    add_text(s, topic, 0.5, y_start+0.02, 2.65, 0.5,
             font_size=12, bold=True, color=WHITE,
             v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, 3.25, y_start, 9.65, 0.54, LIGHT_BLUE)
    add_text(s, msg, 3.35, y_start+0.02, 9.5, 0.5,
             font_size=12, bold=False, color=DARK_TEXT,
             v_anchor=MSO_ANCHOR.MIDDLE)
    y_start += 0.60

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 27 – CLINICAL GUIDE (TABLE 1)
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Clinical Management Guide – Summary Table")
section_tag(s, "Clinical Guide")
footer(s)

guide = [
    "Offer phlebotomy to ALL C282Y homozygotes with elevated ferritin (>200 µg/L women; >300 µg/L men)",
    "Non-expressing C282Y homozygotes (normal ferritin): observation, NOT treatment; encourage voluntary blood donation",
    "Maintenance therapy can be personalised – interval varies by age, sex, and initial ferritin at presentation",
    "Voluntary blood donation is the ideal solution for patients in the maintenance phase",
    "Non-C282Y homozygotes with significantly elevated ferritin + Tsat: consider MRI liver before initiating venesection",
    "Cirrhotic patients: intensive follow-up including USS every 6 months for HCC surveillance",
    "All patients should be advised to notify siblings and adult children for HFE testing",
]
bullet_box(s, guide, 0.55, 1.65, W-1.1, 5.35, font_size=16, bullet="✓")

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 28 – FUTURE DIRECTIONS
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Future Directions & Controversial Areas")
section_tag(s, "Future Directions")
footer(s)

items = [
    ("Population Screening", "C282Y genetic screening – cost-effective in models, but hesitancy remains; neonatal screening studied in France & Australia"),
    ("Whole Genome Sequencing", "If WGS becomes common, large numbers of C282Y homozygotes will be identified; ACMG: Tier 1 result requires patient notification"),
    ("Non-invasive Fibrosis Markers", "Optimal cutoffs for APRI, FIB-4, elastography in hemochromatosis need further validation"),
    ("HCC Prediction", "Better predictive models for HCC risk in hemochromatosis patients needed"),
    ("Mini-Hepcidin (Rusfertide)", "Parenteral – reduces intestinal iron absorption; can be used post de-ironing to reduce maintenance phlebotomy; RCT vs phlebotomy needed"),
    ("Gene Editing (CRISPR)", "Potential future cure; more likely first trialled in conditions without effective existing treatments"),
    ("Maintenance-Free Strategy", "Study of 'no phlebotomy if ferritin stays within reference range' would define real need for maintenance therapy"),
]
y_s = 1.6
for (topic, desc) in items:
    add_rect(s, 0.4, y_s, 2.5, 0.6, MID_BLUE)
    add_text(s, topic, 0.5, y_s+0.02, 2.35, 0.56,
             font_size=12, bold=True, color=WHITE,
             v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(s, 2.95, y_s, 10.0, 0.6, LIGHT_BLUE)
    add_text(s, desc, 3.05, y_s+0.02, 9.8, 0.56,
             font_size=12, bold=False, color=DARK_TEXT,
             v_anchor=MSO_ANCHOR.MIDDLE)
    y_s += 0.68

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 29 – TAKE-HOME MESSAGES
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Take-Home Messages")
section_tag(s, "Summary")
footer(s)

msgs = [
    "Hemochromatosis is massively under-diagnosed – only 12% of C282Y homozygous men had a prior diagnosis in the UK Biobank",
    "Most elevated ferritin levels are due to metabolic hyperferritinemia, NOT hemochromatosis",
    "Never label a patient as having hemochromatosis without C282Y genetic confirmation",
    "Transferrin saturation has wide variability – always measure fasting and on >1 occasion",
    "Serum ferritin >1,000 µg/L is a red flag for advanced liver fibrosis and must prompt urgent treatment",
    "Phlebotomy is safe, cheap, effective and has stood the test of time – remains the gold standard",
    "Early treatment prevents: cirrhosis, HCC, diabetes, cardiomyopathy – do NOT delay",
    "HCC risk is 10.5-fold higher in C282Y homozygous men – mandatory surveillance in cirrhosis",
    "Compound heterozygotes (C282Y/H63D) rarely need treatment – reassure and address metabolic risk factors",
    "Screen siblings first after any new diagnosis – they have the highest family risk",
]
bullet_box(s, msgs, 0.55, 1.6, W-1.1, 5.4, font_size=14, bullet="★")

# ════════════════════════════════════════════════════════════════════════════
#  SLIDE 30 – REFERENCES & CLOSE
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, W, H, DARK_BLUE)
add_rect(s, 0, H-1.2, W, 1.2, RGBColor(0x0F, 0x25, 0x4A))
add_rect(s, 0, 0, 0.12, H, GOLD)

add_text(s, "Key References", 0.5, 0.2, W-1, 0.6,
         font_size=22, bold=True, color=GOLD, font_name="Calibri")

refs = [
    "1. Adams PC & Ryan JD. Diagnosis and Treatment of Hemochromatosis. Clin Gastroenterol Hepatol 2025;23:1477–1485.",
    "2. Adams PC et al (HEIRS). Hemochromatosis and iron-overload screening in a racially diverse population. NEJM 2005;352:1769.",
    "3. Pilling LC et al. Common conditions associated with HFE genetic variants: UK Biobank cohort study. BMJ 2019;364:k5222.",
    "4. Lucas MR et al. HFE genotypes and clinical outcomes at age 80 years: UK Biobank prospective cohort. BMJ Open 2024;14:e081926.",
    "5. EASL Clinical Practice Guidelines on haemochromatosis. J Hepatol 2022;77:479–502.",
    "6. Bardou-Jacquet E et al. Regression of fibrosis with treatment reduces long-term HCC risk. Clin Gastroenterol Hepatol 2020;18:1851.",
    "7. Atkins JL et al. Association of hemochromatosis HFE p.C282Y homozygosity with hepatic malignancy. JAMA 2020;324:2048.",
    "8. Kowdley KV et al. Rusfertide for iron overload in HFE haemochromatosis: phase 2 trial. Lancet GH 2023;8:1118.",
    "9. Prabhu A et al. Systematic review of clinical outcomes of iron reduction in hereditary hemochromatosis. Hepatology 2020;72:1469.",
    "10. Ong SY et al. Reduction of body iron in HFE-related haemochromatosis (Mi-Iron): RCT. Lancet Haematol 2017;4:e607.",
]
y_r = 0.9
for ref in refs:
    add_text(s, ref, 0.5, y_r, W-1, 0.52,
             font_size=11, bold=False, color=LIGHT_BLUE,
             v_anchor=MSO_ANCHOR.TOP, font_name="Calibri")
    y_r += 0.56

add_text(s, "Presented at Hepatology Seminar  |  Based on Adams & Ryan, Clin Gastroenterol Hepatol 2025",
         0.5, H-1.1, W-1, 0.5,
         font_size=11, bold=False,
         color=RGBColor(0xAA, 0xBB, 0xCC),
         align=PP_ALIGN.CENTER, font_name="Calibri")

# ════════════════════════════════════════════════════════════════════════════
buf = BytesIO()
prs.save(buf)
with open("/tmp/workspace/hemochromatosis-seminar/Hemochromatosis_Hepatology_Seminar.pptx", "wb") as f:
    f.write(buf.getvalue())
print(f"Done! Slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/hemochromatosis-seminar && python3 build_pptx.py

Running Command

ls -lh /tmp/workspace/hemochromatosis-seminar/

Your 30-slide presentation is ready:

Hemochromatosis Hepatology Seminar

Presentation · PPTX


Slide deck overview (exactly 30 slides, 16:9 widescreen, dark navy/teal/gold theme):
#Slide Title
1Title slide – Diagnosis & Treatment of Hemochromatosis
2Seminar Overview / Agenda
3Background
4Epidemiology (two-column layout)
5Genetics & Pathophysiology (HFE / hepcidin)
6Clinical Presentation (3 category boxes)
7Diagnostic Approach – Overview (flow diagram)
8Serum Ferritin: Role & Limitations
9Transferrin Saturation
10HFE Genetic Testing – C282Y
11Diagnostic Pathway Step-by-Step (4-column steps)
12Work-up for a Newly Diagnosed C282Y Homozygote
13Liver Fibrosis Assessment (APRI / FIB-4 / elastography / MRI)
14Extra-hepatic Manifestations (4 organ boxes)
15HCC Risk – highlighted hazard ratio callout
16Other HFE Genotypes (compound heterozygotes, H63D)
17Elevated Ferritin with Negative HFE Testing
18Treatment Overview
19Therapeutic Phlebotomy – De-ironing Phase
20Maintenance Phlebotomy & Voluntary Blood Donation
21Clinical Outcomes of Iron Reduction (6 category boxes)
22Erythrocytapheresis
23Dietary Therapies
24Hepcidin-Based & Novel Therapies (Rusfertide, CRISPR, chelation)
25Family Screening (flow + 3 family-member columns)
26Hemochromatosis 2025 Update (Table 2 from paper)
27Clinical Management Guide (Table 1 from paper)
28Future Directions & Controversial Areas
29Take-home Messages
30Key References & Close
All content is drawn directly from Adams & Ryan, Clin Gastroenterol Hepatol 2025;23:1477–1485, with key data points (UK Biobank statistics, ferritin thresholds, HCC hazard ratios, trial results) faithfully reproduced.
This is a shared conversation. Sign in to Orris to start your own chat.