Make a presentation oto be presented at a hepatology seminar max 30 slides

Reading File
Reading File
Reading File
Running Command

python3 -c " import pdfplumber text = [] with pdfplumber.open('/tmp/workspace/attachments/07988e43-2765-49c5-a378-763590f6789f/PIIS1542356524011364.pdf') as pdf: print(f'Pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): t = page.extract_text() if t: text.append(f'=== PAGE {i+1} ===\n{t}') full = '\n'.join(text) with open('/tmp/workspace/paper_text.txt', 'w') as f: f.write(full) print('Done. Characters:', len(full)) "

Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/hemochromatosis-pptx && python3 << 'PYEOF' 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 prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) blank = prs.slide_layouts[6] # ─── Color palette ─── DARK_BLUE = RGBColor(0x0D, 0x2B, 0x55) # deep navy MID_BLUE = RGBColor(0x14, 0x5A, 0x8A) # header accent ACCENT_GOLD = RGBColor(0xC8, 0x96, 0x20) # gold accent LIGHT_BG = RGBColor(0xF0, 0xF5, 0xFA) # slide background WHITE = RGBColor(0xFF, 0xFF, 0xFF) BODY_GRAY = RGBColor(0x33, 0x33, 0x33) LIGHT_LINE = RGBColor(0xCC, 0xDD, 0xEE) LIGHT_GOLD = RGBColor(0xFF, 0xF3, 0xCC) SECTION_TEAL= RGBColor(0x0A, 0x7A, 0x7A) def set_bg(slide, color): bg = slide.background fill = bg.fill fill.solid() fill.fore_color.rgb = color def add_rect(slide, left, top, width, height, fill_color, border_color=None): shape = slide.shapes.add_shape(1, Inches(left), Inches(top), Inches(width), Inches(height)) shape.fill.solid() shape.fill.fore_color.rgb = fill_color if border_color: shape.line.color.rgb = border_color shape.line.width = Pt(1) else: shape.line.fill.background() return shape def add_text(slide, text, left, top, width, height, font_size, bold=False, color=None, align=PP_ALIGN.LEFT, italic=False, wrap=True): if color is None: color = BODY_GRAY tb = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height)) tf = tb.text_frame tf.word_wrap = wrap 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 = "Calibri" return tb def add_multiline(slide, items, left, top, width, height, font_size, color=None, bold=False, bullet=True, line_spacing=1.15): if color is None: color = BODY_GRAY tb = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height)) tf = tb.text_frame tf.word_wrap = True tf.margin_left = Pt(4) tf.margin_right = Pt(4) tf.margin_top = Pt(2) tf.margin_bottom = Pt(2) from pptx.util import Pt as PPt from pptx.oxml.ns import qn from lxml import etree for i, item in enumerate(items): p = tf.paragraphs[0] if i == 0 else tf.add_paragraph() if bullet: p.level = 0 run = p.add_run() prefix = "• " if bullet else "" run.text = prefix + item run.font.size = Pt(font_size) run.font.bold = bold run.font.color.rgb = color run.font.name = "Calibri" return tb def header_bar(slide, title, subtitle=None): add_rect(slide, 0, 0, 13.333, 1.2, DARK_BLUE) add_rect(slide, 0, 1.2, 13.333, 0.08, ACCENT_GOLD) add_text(slide, title, 0.3, 0.1, 12.7, 0.85, font_size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT) if subtitle: add_text(slide, subtitle, 0.3, 0.82, 12.7, 0.42, font_size=14, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.LEFT) def section_divider(slide, section_title): set_bg(slide, DARK_BLUE) add_rect(slide, 0, 2.8, 13.333, 0.1, ACCENT_GOLD) add_text(slide, section_title, 0.5, 2.2, 12.3, 1.5, font_size=40, bold=True, color=WHITE, align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 1 — Title slide # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, DARK_BLUE) add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE) add_rect(slide, 0, 2.5, 13.333, 0.12, ACCENT_GOLD) add_rect(slide, 0, 4.8, 13.333, 0.08, RGBColor(0x14, 0x5A, 0x8A)) add_text(slide, "Diagnosis and Treatment of", 0.5, 0.8, 12.3, 0.9, font_size=28, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) add_text(slide, "HEMOCHROMATOSIS", 0.5, 1.5, 12.3, 1.1, font_size=52, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_text(slide, "A Narrative Review — Adams PC & Ryan JD", 0.5, 2.7, 12.3, 0.6, font_size=18, color=ACCENT_GOLD, align=PP_ALIGN.CENTER) add_text(slide, "Clinical Gastroenterology and Hepatology 2025; 23:1477–1485", 0.5, 3.3, 12.3, 0.5, font_size=14, color=RGBColor(0x99, 0xBB, 0xCC), align=PP_ALIGN.CENTER, italic=True) add_text(slide, "Hepatology Seminar Presentation", 0.5, 5.1, 12.3, 0.5, font_size=16, color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.CENTER) add_text(slide, "Western University, Canada | Beaumont Hospital, Dublin, Ireland", 0.5, 5.6, 12.3, 0.5, font_size=13, color=RGBColor(0x77, 0x99, 0xBB), align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 2 — Overview / Outline # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Presentation Outline") sections = [ "1. Background & Epidemiology", "2. Pathophysiology — Hepcidin & Iron Regulation", "3. Diagnosis: Biochemical & Genetic Testing", "4. Diagnosis: Liver Fibrosis Assessment", "5. Diagnosis: Extra-hepatic Manifestations", "6. Population Screening & Family Cascade Testing", "7. Treatment — Phlebotomy", "8. Emerging Therapies (Mini-hepcidin, CRISPR)", "9. Summary & Key Messages", ] for i, s in enumerate(sections): col = 0 if i < 5 else 6.8 row = 1.5 + (i % 5) * 0.95 add_rect(slide, col + 0.2, row, 5.9, 0.75, WHITE, MID_BLUE) add_text(slide, s, col + 0.35, row + 0.1, 5.6, 0.55, font_size=14, color=DARK_BLUE, bold=(i == 0)) # ═══════════════════════════════════════════════════════════════ # SLIDE 3 — Section divider: Background & Epidemiology # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) section_divider(slide, "Background & Epidemiology") add_text(slide, "The most common genetic disease in persons of European ancestry", 0.5, 3.2, 12.3, 0.8, font_size=20, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 4 — Background # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Background", "Ancient disease — HFE variants found in 4,000-year-old human fossils (NW Europe)") add_multiline(slide, [ "Originally proposed as a survival advantage: enhanced iron absorption in iron-deficient environments", "C282Y variant (845G→A) in the HFE gene is the predominant pathogenic variant", "Excess iron absorption leads to progressive organ damage:", ], 0.4, 1.45, 12.5, 1.5, font_size=17, color=DARK_BLUE) # sub-items add_multiline(slide, [ "Liver fibrosis → Cirrhosis → Hepatocellular carcinoma (HCC)", "Arthritis (metacarpophalangeal joints)", "Cardiomyopathy / arrhythmia", "Diabetes mellitus", "Hypogonadism", ], 0.8, 2.85, 12.0, 2.2, font_size=15.5, color=MID_BLUE) add_rect(slide, 0.4, 5.25, 12.5, 0.85, LIGHT_GOLD, ACCENT_GOLD) add_text(slide, "Key Point: Early identification and treatment prevents virtually all serious complications", 0.55, 5.3, 12.1, 0.75, font_size=15.5, bold=True, color=RGBColor(0x7A, 0x50, 0x00)) # ═══════════════════════════════════════════════════════════════ # SLIDE 5 — Epidemiology # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Epidemiology of HFE Hemochromatosis") stats = [ ("1 in 227", "North American patients\nof European ancestry\n(HEIRS Study)"), ("1 in 156", "Northern England\n(UK Biobank)"), ("1 in 100", "Ireland — highest\nprevalence worldwide"), ("1 in 5\nmales", "Develop morbidity\nassociated with HC\n(UK Biobank)"), ("1 in 10\nmales", "Develop severe liver\ndisease if untreated"), ] for i, (num, label) in enumerate(stats): x = 0.4 + i * 2.55 add_rect(slide, x, 1.45, 2.3, 2.4, DARK_BLUE) add_rect(slide, x, 3.85, 2.3, 1.5, WHITE, MID_BLUE) add_text(slide, num, x + 0.05, 1.65, 2.2, 1.5, font_size=24, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER) add_text(slide, label, x + 0.05, 3.9, 2.2, 1.35, font_size=12.5, color=DARK_BLUE, align=PP_ALIGN.CENTER) add_text(slide, "Clinical penetrance is NOT absolute — 1 in 10 females also develop morbidity", 0.4, 5.55, 12.5, 0.7, font_size=15, italic=True, color=MID_BLUE) # ═══════════════════════════════════════════════════════════════ # SLIDE 6 — Pathophysiology # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Pathophysiology — Hepcidin & Iron Regulation") add_text(slide, "Central Mechanism: Hepcidin Deficiency", 0.4, 1.4, 12.5, 0.6, font_size=20, bold=True, color=DARK_BLUE) steps = [ ("Normal", "Hepcidin (liver hormone) regulates intestinal iron absorption\nby degrading ferroportin on enterocytes"), ("In HFE-HC", "Mutant HFE protein → Impaired hepcidin upregulation\n→ Constitutively low hepcidin"), ("Result", "Unregulated iron absorption via ferroportin\n→ Progressive systemic iron accumulation"), ("Outcome", "Iron deposits in liver, heart, pancreas, joints, gonads\n→ Oxidative stress & fibrosis"), ] for i, (label, text) in enumerate(steps): y = 2.1 + i * 1.1 add_rect(slide, 0.4, y, 2.0, 0.85, MID_BLUE) add_text(slide, label, 0.45, y + 0.12, 1.9, 0.6, font_size=15, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, 2.4, y, 10.5, 0.85, WHITE, LIGHT_LINE) add_text(slide, text, 2.55, y + 0.06, 10.2, 0.75, font_size=14.5, color=BODY_GRAY) if i < 3: add_text(slide, "↓", 1.25, y + 0.85, 0.5, 0.3, font_size=14, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 7 — Section: Diagnosis # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) section_divider(slide, "Diagnosis") add_text(slide, "Biochemical testing • Genetic testing • Liver fibrosis assessment • Extra-hepatic manifestations", 0.5, 3.3, 12.3, 0.8, font_size=18, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 8 — Biochemical Diagnosis # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Biochemical Diagnosis — Serum Iron Studies") # Table header cols = ["Test", "Description / Threshold", "Clinical Use"] widths = [2.8, 6.2, 3.8] xs = [0.3, 3.1, 9.3] y0 = 1.5 add_rect(slide, 0.3, y0, 12.7, 0.55, DARK_BLUE) for j, (c, w, x) in enumerate(zip(cols, widths, xs)): add_text(slide, c, x + 0.08, y0 + 0.07, w - 0.16, 0.42, font_size=13.5, bold=True, color=WHITE) rows = [ ("Transferrin Saturation (TS)", "Fasting TS ≥45% used as screening threshold; poor reproducibility", "Initial screen — not diagnostic alone"), ("Serum Ferritin", ">300 µg/L (men) / >200 µg/L (women) → elevated\nKey: >1000 µg/L predicts advanced fibrosis", "Best non-invasive marker of iron burden; guides # phlebotomies"), ("HFE Genetic Test\n(C282Y)", "C282Y homozygosity is the diagnostic genetic test of choice;\nH63D compound heterozygote rarely causes disease", "Confirms diagnosis; drives family cascade testing"), ("MRI Liver (R2/R2*)", "Quantifies liver iron concentration (LIC) non-invasively;\nIron appears dark on T2-weighted sequences", "Avoids liver biopsy in most cases; tracks treatment response"), ("Liver Biopsy", "Gold standard for fibrosis staging; now reserved for\nferritin >1000 or transaminase elevation", "Reserved for uncertain diagnosis or cirrhosis staging"), ] for i, row in enumerate(rows): bg = WHITE if i % 2 == 0 else RGBColor(0xE8, 0xF2, 0xFA) y = y0 + 0.55 + i * 0.95 add_rect(slide, 0.3, y, 12.7, 0.93, bg, LIGHT_LINE) for j, (cell, w, x) in enumerate(zip(row, widths, xs)): add_text(slide, cell, x + 0.08, y + 0.04, w - 0.16, 0.86, font_size=12, color=DARK_BLUE if j == 0 else BODY_GRAY, bold=(j == 0)) # ═══════════════════════════════════════════════════════════════ # SLIDE 9 — Diagnostic Algorithm # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Diagnostic Algorithm for HFE Hemochromatosis") boxes = [ (4.5, 1.4, 4.3, 0.75, "Elevated Transferrin Saturation (≥45%)\nor Elevated Serum Ferritin", DARK_BLUE, WHITE), (4.5, 2.5, 4.3, 0.75, "HFE Genetic Testing\n(C282Y + H63D)", MID_BLUE, WHITE), (0.5, 3.9, 3.5, 0.75, "C282Y Homozygote\n→ Confirmed HC", SECTION_TEAL, WHITE), (4.5, 3.9, 4.3, 0.75, "C282Y / H63D Compound\nHet → low iron burden", RGBColor(0x8B, 0x4F, 0x00), WHITE), (9.0, 3.9, 3.8, 0.75, "Other variants or\nnegative → reconsider", RGBColor(0x66, 0x33, 0x00), WHITE), (0.5, 5.2, 3.5, 0.75, "Assess serum ferritin,\nliver fibrosis, organs", DARK_BLUE, WHITE), ] for (x, y, w, h, txt, bg, fg) in boxes: add_rect(slide, x, y, w, h, bg) add_text(slide, txt, x + 0.1, y + 0.06, w - 0.2, h - 0.12, 12.5, color=fg, align=PP_ALIGN.CENTER) # arrows arrows = [ (6.65, 2.15, 6.65, 2.5), (4.5, 2.87, 2.25, 3.9), (6.65, 3.25, 6.65, 3.9), (8.8, 2.87, 10.9, 3.9), (2.25, 4.65, 2.25, 5.2), ] for (x1, y1, x2, y2) in arrows: from pptx.util import Inches as I line = slide.shapes.add_connector(1, I(x1), I(y1), I(x2), I(y2)) line.line.color.rgb = ACCENT_GOLD line.line.width = Pt(2) add_text(slide, "↑ Note: Diagnosis has shifted from phenotyping (low reproducibility) → genotyping (simple, reliable)", 0.3, 6.5, 12.7, 0.7, font_size=13.5, italic=True, color=MID_BLUE) # ═══════════════════════════════════════════════════════════════ # SLIDE 10 — Serum Ferritin: Key Thresholds # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Serum Ferritin — The Most Important Clinical Marker") thresholds = [ ("<300 µg/L (men)\n<200 µg/L (women)", "Normal range", WHITE, DARK_BLUE), ("300–1000 µg/L", "Elevated — confirm genotype;\ncheck for secondary causes;\nmonitor and consider phlebotomy", RGBColor(0xFFF3CC), RGBColor(0x7A, 0x50, 0x00)), (">1000 µg/L", "High risk — 1 in 5 have\nadvanced liver fibrosis (F3/F4);\nurgent phlebotomy indicated", RGBColor(0xFF, 0xE0, 0xE0), RGBColor(0x8B, 0x00, 0x00)), ] for i, (val, meaning, bg, fg) in enumerate(thresholds): x = 0.5 + i * 4.2 add_rect(slide, x, 1.5, 3.9, 1.2, DARK_BLUE) add_text(slide, val, x + 0.1, 1.55, 3.7, 1.1, font_size=20, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER) add_rect(slide, x, 2.7, 3.9, 1.8, bg, MID_BLUE) add_text(slide, meaning, x + 0.15, 2.75, 3.6, 1.7, font_size=14, color=fg, align=PP_ALIGN.CENTER) add_text(slide, "Additional uses of serum ferritin:", 0.5, 4.7, 12.5, 0.5, font_size=16, bold=True, color=DARK_BLUE) add_multiline(slide, [ "Best non-invasive estimate of total body iron stores", "Guides expected number of phlebotomies required for de-ironing", "Indicator of liver disease risk", "Target for maintenance therapy: ferritin <50 µg/L (complete de-ironing) or <300 µg/L (ongoing maintenance)", ], 0.5, 5.25, 12.5, 2.0, font_size=14, color=DARK_BLUE) # ═══════════════════════════════════════════════════════════════ # SLIDE 11 — Liver Fibrosis Assessment # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Liver Fibrosis Assessment in Hemochromatosis") add_text(slide, "All C282Y homozygotes should be screened for liver fibrosis — approx. 20% of adult males will be affected", 0.4, 1.35, 12.5, 0.55, font_size=14.5, italic=True, color=MID_BLUE) tools = [ ("Abdominal Ultrasound", "Baseline for all; assess steatosis, cirrhosis, portal hypertension, HCC screening"), ("APRI Score", ">0.44 → good detection of advanced fibrosis (AUROC 0.86–0.88)\n<0.37 → NPV 88.6% for advanced fibrosis"), ("FIB-4 Score", ">1.1 → good detection of advanced fibrosis\n<0.73 → NPV 92% for advanced fibrosis"), ("Transient Elastography\n(FibroScan)", "Liver stiffness <6.4 kPa → high NPV for ruling out advanced fibrosis\nCaution: poor correlation with APRI/FIB-4 in some HC studies"), ("MRI R2/R2* (LiverMultiScan)", "Non-invasive; simultaneous iron quantification (LIC) and fibrosis staging\nCorrelates with liver biopsy; emerging preferred modality"), ("Liver Biopsy", "Gold standard for staging; reserved for ferritin >1000 µg/L AND elevated transaminases\nOr when non-invasive tests are discordant"), ] for i, (tool, desc) in enumerate(tools): col = 0 if i < 3 else 6.7 row = 2.1 + (i % 3) * 1.55 add_rect(slide, col + 0.2, row, 2.5, 1.35, MID_BLUE) add_text(slide, tool, col + 0.3, row + 0.2, 2.3, 0.95, font_size=12.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, col + 2.7, row, 3.8, 1.35, WHITE, LIGHT_LINE) add_text(slide, desc, col + 2.85, row + 0.08, 3.6, 1.2, font_size=12, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 12 — Extra-hepatic Manifestations # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Extra-hepatic Manifestations of Hemochromatosis") organs = [ ("Musculoskeletal", [ "Arthritis most common extra-hepatic complaint", "27.9% males require joint replacement vs. 17.1% controls (UK Biobank)", "Metacarpophalangeal (MCP) joints — classic 2nd/3rd MCP arthropathy", "Baseline DEXA scan for osteoporosis in C282Y homozygotes >40 yrs", ]), ("Cardiovascular", [ "<3% C282Y homozygotes develop clinically significant cardiac iron overload", "Dilated cardiomyopathy, restrictive cardiomyopathy, arrhythmias", "Young patients (<30 yrs) or juvenile hemochromatosis at higher risk", "Baseline ECG + echocardiogram if symptoms present", ]), ("Endocrine", [ "Diabetes: iron deposits in pancreatic beta cells (bronze diabetes)", "Baseline HbA1c + fasting glucose in all C282Y homozygotes", "Hypogonadism: iron deposits in pituitary — low testosterone in men", "Osteoporosis: excess liver disease, hypogonadism, or direct iron effect", ]), ] for i, (organ, points) in enumerate(organs): x = 0.3 + i * 4.35 add_rect(slide, x, 1.5, 4.15, 0.6, DARK_BLUE) add_text(slide, organ, x + 0.1, 1.55, 3.95, 0.5, font_size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, x, 2.1, 4.15, 4.1, WHITE, MID_BLUE) for j, pt in enumerate(points): add_text(slide, "• " + pt, x + 0.2, 2.18 + j * 0.95, 3.8, 0.88, font_size=12.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 13 — When to suspect in clinical practice # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "When to Suspect Hemochromatosis — Clinical Red Flags") add_text(slide, "Consider hemochromatosis in any patient of Northern European descent with:", 0.4, 1.42, 12.5, 0.55, font_size=16, bold=True, color=DARK_BLUE) flags = [ ("Liver", "Unexplained elevated liver enzymes\nNAFLD with disproportionate fibrosis\nCirrhosis with no clear aetiology\nHCC (especially non-cirrhotic)"), ("Metabolic", "Type 2 diabetes with no obvious risk factors\nHypogonadism in young/middle-aged men\nFatigue, lethargy — unexplained"), ("Musculoskeletal", "Early-onset arthritis especially MCP joints\nProgressive joint replacement needs\nOsteoporosis in young individuals"), ("Family History", "First-degree relative with confirmed HFE HC\nFamily history of early cirrhosis or HCC\nIrish, Celtic, or Northern European ancestry"), ] for i, (category, text) in enumerate(flags): col = 0.4 if i < 2 else 6.8 row = 2.15 + (i % 2) * 2.25 add_rect(slide, col, row, 6.0, 0.5, MID_BLUE) add_text(slide, category, col + 0.2, row + 0.06, 5.7, 0.4, font_size=14, bold=True, color=WHITE) add_rect(slide, col, row + 0.5, 6.0, 1.6, WHITE, LIGHT_LINE) add_text(slide, text, col + 0.2, row + 0.55, 5.7, 1.48, font_size=13, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 14 — Genetic Testing & Variants # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "HFE Genetic Variants — What Clinicians Need to Know") variants = [ ("C282Y Homozygote\n(C282Y/C282Y)", "845G→A substitution in exon 4\nMost significant variant — accounts for\n~85–90% of HFE-HC in Northern Europeans\nGold standard for diagnosis", "HIGH", "Confirmed hereditary hemochromatosis"), ("Compound Heterozygote\n(C282Y/H63D)", "One copy each of C282Y + H63D variants\nMinor increase in serum iron; rarely\ncauses significant iron overload without\nother risk factors (alcohol, NAFLD)", "LOW–MODERATE", "Mild biochemical elevation; rarely causes end-organ disease"), ("H63D Homozygote\n(H63D/H63D)", "Two copies of H63D variant\nVery mild effect on iron studies;\nnot considered pathogenic alone\nin most clinical guidelines", "VERY LOW", "Not considered clinically significant HFE-HC"), ] for i, (name, genetics, risk, clinical) in enumerate(variants): y = 1.55 + i * 1.75 add_rect(slide, 0.3, y, 3.8, 1.55, DARK_BLUE) add_text(slide, name, 0.4, y + 0.15, 3.6, 1.3, font_size=13.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER) risk_color = RGBColor(0xC8, 0x20, 0x20) if risk == "HIGH" else (RGBColor(0xC8, 0x96, 0x20) if "MODERATE" in risk else RGBColor(0x11, 0x77, 0x33)) add_rect(slide, 4.1, y, 2.5, 1.55, WHITE, risk_color) add_text(slide, "Risk Level", 4.2, y + 0.08, 2.3, 0.45, 11, bold=True, color=risk_color) add_text(slide, risk, 4.2, y + 0.5, 2.3, 0.8, 14, bold=True, color=risk_color, align=PP_ALIGN.CENTER) add_rect(slide, 6.6, y, 6.4, 1.55, RGBColor(0xF5, 0xF8, 0xFF), LIGHT_LINE) add_text(slide, genetics + "\n\n→ " + clinical, 6.75, y + 0.08, 6.1, 1.38, 12, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 15 — Section: Screening # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) section_divider(slide, "Population Screening &\nFamily Cascade Testing") add_text(slide, "Who to screen • When to screen • How to screen", 0.5, 3.55, 12.3, 0.8, font_size=18, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 16 — Population Screening # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Population Screening for Hemochromatosis") add_text(slide, "Current evidence supports targeted, not universal, population screening", 0.4, 1.42, 12.5, 0.55, font_size=15, italic=True, color=MID_BLUE) col1 = [ "Large blood donor screening studies (Europe, North America) consistently find ~1 in 200 donors to be C282Y homozygotes", "Irish neonatal screening study: C282Y prevalence 1 in 100 (highest globally)", "UK Biobank: 1 in 5 male C282Y homozygotes develop morbidity — changing perception from 'benign' to clinically significant", "HEIRS Study (100,000 participants): largest prospective screening study; defined prevalence across racial/ethnic groups", "Genetic testing is simple, cheap, and reliable — one-time lifelong test", ] col2 = [ "Arguments FOR population screening: High prevalence in at-risk groups; treatable with low-cost intervention; prevention of end-organ damage possible", "Arguments AGAINST: Incomplete penetrance; limited evidence from RCTs; risk of discrimination/insurance issues", "Current recommendation: Targeted screening of persons of Northern European ancestry with elevated iron indices", "Cost-effectiveness analyses favour genotype-based screening over phenotype-based in high-prevalence populations", ] add_text(slide, "Evidence Base", 0.4, 2.1, 6.2, 0.48, font_size=15, bold=True, color=DARK_BLUE) add_multiline(slide, col1, 0.4, 2.58, 6.2, 3.8, font_size=12.5, color=BODY_GRAY) add_text(slide, "Screening Debate", 6.8, 2.1, 6.1, 0.48, font_size=15, bold=True, color=DARK_BLUE) add_multiline(slide, col2, 6.8, 2.58, 6.1, 3.8, font_size=12.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 17 — Family Cascade Testing # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Family Cascade Testing — Recommended Approach") add_text(slide, "All first-degree relatives of a confirmed C282Y homozygote should be offered testing", 0.4, 1.42, 12.5, 0.55, font_size=16, bold=True, color=DARK_BLUE) steps2 = [ ("Step 1", "Proband confirmed as C282Y homozygote"), ("Step 2", "Test the proband's partner/spouse for C282Y carrier status"), ("Step 3", "If partner is C282Y negative → children cannot be C282Y homozygotes → testing NOT needed"), ("Step 4", "If partner is C282Y positive → test children for C282Y homozygosity"), ("Step 5", "Siblings of proband: autosomal recessive → 25% risk; test all adult siblings"), ("Step 6", "Cascade to extended family as appropriate; target adults only (testing not recommended in children)"), ] for i, (step, desc) in enumerate(steps2): y = 2.1 + i * 0.82 add_rect(slide, 0.4, y, 1.6, 0.72, MID_BLUE) add_text(slide, step, 0.45, y + 0.12, 1.5, 0.5, font_size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, 2.0, y, 11.0, 0.72, WHITE if i % 2 == 0 else RGBColor(0xE8, 0xF2, 0xFA), LIGHT_LINE) add_text(slide, desc, 2.15, y + 0.1, 10.7, 0.54, font_size=13.5, color=BODY_GRAY) add_rect(slide, 0.4, 7.0, 12.5, 0.3, LIGHT_GOLD, ACCENT_GOLD) add_text(slide, "Non-adult children: screening NOT recommended — defer to adulthood", 0.55, 7.02, 12.1, 0.26, font_size=12, bold=True, color=RGBColor(0x7A, 0x50, 0x00)) # ═══════════════════════════════════════════════════════════════ # SLIDE 18 — Section: Treatment # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) section_divider(slide, "Treatment of Hemochromatosis") add_text(slide, "Phlebotomy • Emerging therapies • Lifestyle", 0.5, 3.5, 12.3, 0.8, font_size=18, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 19 — Phlebotomy: Overview # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Phlebotomy — The Cornerstone of Treatment") add_text(slide, '"Treatment of hemochromatosis by phlebotomy has stood the test of time and is a very safe and cost-effective treatment"', 0.5, 1.42, 12.3, 0.75, font_size=15, italic=True, color=MID_BLUE, align=PP_ALIGN.CENTER) cards = [ ("Mechanism", "Each 500 mL phlebotomy removes ~200–250 mg of iron\nElicits compensatory erythropoiesis mobilising iron from storage"), ("Induction Phase", "Weekly phlebotomy until iron depleted\nTarget: ferritin <50 µg/L\nNumber of sessions guided by initial ferritin level"), ("Maintenance Phase", "Phlebotomy every 3–4 months (lifelong)\nTarget: ferritin <300 µg/L (some guidelines: <50 µg/L)\nMinimum 3× per year — one per season"), ("Benefits", "Reduces liver stiffness and fibrosis progression\nReduces risk: diabetes, cirrhosis, liver cancer, death\nSurvival equivalent to general population if treated early"), ("Side Effects", "Well tolerated; fatigue in some patients\nContraindicated in severe anaemia\nErythrocytapheresis available for intolerant patients"), ("Urgency", "Urgent phlebotomy: ferritin >1000 µg/L, symptomatic,\nor evidence of end-organ damage"), ] for i, (title, body) in enumerate(cards): col = 0.3 + (i % 3) * 4.35 row = 2.3 + (i // 3) * 2.15 add_rect(slide, col, row, 4.05, 0.5, DARK_BLUE) add_text(slide, title, col + 0.1, row + 0.07, 3.85, 0.38, 13, bold=True, color=WHITE) add_rect(slide, col, row + 0.5, 4.05, 1.5, WHITE, MID_BLUE) add_text(slide, body, col + 0.12, row + 0.58, 3.82, 1.35, 12.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 20 — Phlebotomy: Practical Guide # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Practical Management Guide for Phlebotomy") add_text(slide, "Monitoring during treatment", 0.4, 1.42, 12.5, 0.5, font_size=17, bold=True, color=DARK_BLUE) monitor = [ "FBC before each phlebotomy — withhold if Hb <12 g/dL (women) or <13 g/dL (men)", "Serum ferritin every 3 months during induction; annually during maintenance", "Liver function tests (ALT/AST) every 6–12 months", "HbA1c annually in those with diabetes or insulin resistance", "Abdominal ultrasound every 6 months in confirmed cirrhosis (HCC surveillance)", "AFP: serial measurement in cirrhotic patients as part of HCC surveillance", ] add_multiline(slide, monitor, 0.4, 1.95, 12.5, 3.0, font_size=14, color=DARK_BLUE) add_text(slide, "Expected outcomes with adequate treatment", 0.4, 5.05, 12.5, 0.5, font_size=17, bold=True, color=DARK_BLUE) outcomes = [ "Non-cirrhotic patients treated early: normal life expectancy", "Liver fibrosis: regression possible; liver biopsy improvement documented", "Diabetes: may partially improve; established cirrhosis or severe neuropathy may not reverse", "Arthropathy: usually does not improve with treatment — symptomatic management required", ] add_multiline(slide, outcomes, 0.4, 5.6, 12.5, 1.75, font_size=14, color=MID_BLUE) # ═══════════════════════════════════════════════════════════════ # SLIDE 21 — Evidence for Treatment Benefits # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Evidence for Treatment Benefits of Phlebotomy") add_text(slide, "Key clinical evidence supporting phlebotomy in HFE-HC:", 0.4, 1.42, 12.5, 0.55, font_size=16, bold=True, color=DARK_BLUE) evidence = [ ("Liver Fibrosis", "Phlebotomy associated with reduced liver fibrosis scores and reversal in pre-cirrhotic patients (multiple cohort studies; Adams et al)"), ("Liver Cancer Risk", "Untreated C282Y homozygotes: significantly elevated HCC risk; treated early — risk approaches general population"), ("Cirrhosis Prevention", "Diagnosis and treatment before cirrhosis develops: survival equivalent to age-matched population"), ("Diabetes", "HbA1c improvement documented in newly diagnosed DM patients undergoing phlebotomy; established beta-cell failure may not recover"), ("Quality of Life", "Reduction in fatigue, lethargy, and mood disturbance after iron depletion (observational studies)"), ("Cost-effectiveness", "Phlebotomy is among the most cost-effective interventions in chronic disease management — avoids expensive sequelae"), ("Mortality", "Cirrhotic HC patients: increased mortality, particularly HCC and liver failure; emphasises need for early diagnosis"), ] for i, (cat, text) in enumerate(evidence): y = 2.05 + i * 0.72 bg = WHITE if i % 2 == 0 else RGBColor(0xE8, 0xF2, 0xFA) add_rect(slide, 0.4, y, 12.5, 0.68, bg, LIGHT_LINE) add_text(slide, cat + ":", 0.55, y + 0.1, 2.3, 0.5, 13, bold=True, color=DARK_BLUE) add_text(slide, text, 2.85, y + 0.1, 9.9, 0.5, 12.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 22 — Lifestyle & Dietary Advice # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Lifestyle Modifications in Hemochromatosis") add_multiline(slide, [ "Alcohol: avoid or minimise — synergistic hepatotoxicity; potentiates liver fibrosis progression", "Vitamin C: avoid high-dose supplements (>500 mg/day) — enhances non-haem iron absorption; promotes free radical generation from iron", "Raw shellfish: avoid — Vibrio vulnificus infection is disproportionately lethal in iron-overloaded patients", "Red meat: moderate reduction may marginally reduce haem iron load, but not a substitute for phlebotomy", "Tea (especially English tea): polyphenols inhibit non-haem iron absorption — can be beneficial", "Iron-fortified foods: iron supplementation in food was common in 1950s; some evidence reduction of iron fortification in Scandinavia had minor population health effects", "Coffee: emerging data on hepatoprotective effects in iron overload; moderate consumption is safe", "Proton pump inhibitors (PPIs): reduce gastric acid → modestly reduce iron absorption; not sufficient alone to manage HC", ], 0.4, 1.45, 12.5, 5.5, font_size=14, color=DARK_BLUE) # ═══════════════════════════════════════════════════════════════ # SLIDE 23 — Section: Emerging Therapies # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) section_divider(slide, "Emerging Therapies") add_text(slide, "Mini-hepcidin • Gene editing (CRISPR) • Erythrocytapheresis", 0.5, 3.5, 12.3, 0.8, font_size=18, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════ # SLIDE 24 — Emerging Therapies: Mini-Hepcidin & CRISPR # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Emerging Therapies — On the Horizon") therapies = [ ("Synthetic Mini-Hepcidin\n(Parenteral)", [ "Rationale: directly replace deficient hepcidin → block ferroportin → reduce intestinal iron absorption", "Animal model data: effective at reducing intestinal absorption but does NOT mobilise hepatic iron stores", "Proposed strategy: initial de-ironing with phlebotomy, then maintenance with periodic hepcidin injections", "Potential benefit: reduce frequency of maintenance phlebotomy sessions", "Challenges: must demonstrate superiority or non-inferiority to phlebotomy; cost; injection burden", "Status: Phase I/II trials underway — not yet approved for clinical use", ], MID_BLUE), ("CRISPR Gene Editing", [ "Concept: correct the C282Y mutation in HFE gene → restore normal hepcidin regulation", "Early animal model data: proof-of-concept correction achieved in mice", "Challenge: liver-targeted somatic gene editing required; off-target effects; long-term safety unknown", "Liver is amenable to AAV-based delivery — relevant advantage over other tissues", "Timeline: still in pre-clinical / early clinical research phase", "Must ultimately be compared against phlebotomy — the benchmark treatment", ], SECTION_TEAL), ("Erythrocytapheresis", [ "Selective removal of red blood cells via apheresis — removes more iron per session than standard phlebotomy", "Advantage: fewer sessions needed; better tolerated in some patients (less haemodynamic change)", "Indicated when phlebotomy is poorly tolerated (e.g., cardiovascular disease, difficulty with venous access)", "Not routinely available in all centres; higher cost", "May be combined with phlebotomy in severe juvenile hemochromatosis with cardiac dysfunction", ], DARK_BLUE), ] for i, (name, points, color) in enumerate(therapies): x = 0.3 + i * 4.35 add_rect(slide, x, 1.5, 4.1, 0.7, color) add_text(slide, name, x + 0.1, 1.55, 3.9, 0.6, font_size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, x, 2.2, 4.1, 4.8, WHITE, LIGHT_LINE) for j, pt in enumerate(points): add_text(slide, "• " + pt, x + 0.15, 2.28 + j * 0.75, 3.8, 0.68, font_size=11.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 25 — Management Summary Table # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Diagnosis & Treatment Summary — Key Tables") add_text(slide, "Table 2: Evolution of Diagnostic Tests", 0.4, 1.42, 6.2, 0.5, font_size=15, bold=True, color=DARK_BLUE) add_text(slide, "Table 3: Treatments Compared to Phlebotomy", 6.8, 1.42, 6.1, 0.5, font_size=15, bold=True, color=DARK_BLUE) diag_rows = [ ("Serum Ferritin", "Non-specific; elevated by inflammation", "→ Still best clinical iron marker"), ("Transferrin Sat", "Unreliable reproducibility", "→ Useful initial screen only"), ("Liver Biopsy", "Invasive; gold standard for fibrosis", "→ Now reserved for selected cases"), ("HFE Genetic Test", "Simple, reliable, once-only test", "→ Now diagnostic test of choice"), ("MRI Liver", "Advanced non-invasive LIC + fibrosis", "→ Replaces biopsy in most cases"), ("Elastography", "Non-invasive fibrosis assessment", "→ Good NPV for ruling out F3/F4"), ] for i, (test, limitation, update) in enumerate(diag_rows): y = 2.0 + i * 0.78 bg = WHITE if i % 2 == 0 else RGBColor(0xE8, 0xF2, 0xFA) add_rect(slide, 0.4, y, 6.1, 0.72, bg, LIGHT_LINE) add_text(slide, test, 0.55, y + 0.1, 1.8, 0.54, 12, bold=True, color=DARK_BLUE) add_text(slide, limitation, 2.35, y + 0.1, 2.2, 0.54, 11, color=RGBColor(0x88, 0x22, 0x22)) add_text(slide, update, 4.55, y + 0.1, 1.8, 0.54, 11, color=SECTION_TEAL) tx_rows = [ ("Phlebotomy", "Established", "Excellent", "Low", "✓ Standard of care"), ("Mini-Hepcidin", "Phase I/II", "TBD", "Medium", "Promising — maintenance only"), ("CRISPR", "Pre-clinical", "TBD", "TBD", "Potential cure — decades away"), ("Erythrocytapheresis", "Established", "High", "High", "Specialised centres; intolerant patients"), ("Dietary modification", "Established", "Low", "Low", "Adjunct only — never monotherapy"), ("Liver Transplant", "Established (cirrhosis)", "Variable", "High", "End-stage disease; corrects defect"), ] tx_heads = ["Treatment", "Status", "Efficacy", "Cost", "Role"] tx_widths = [2.5, 1.5, 1.2, 1.1, 2.5] tx_xs = [6.8, 9.3, 10.8, 12.0, 13.1] # last col goes off — adjust tx_xs2 = [6.8, 9.05, 10.35, 11.4, 12.25] tw2 = [2.1, 1.15, 0.9, 0.75, 1.0] add_rect(slide, 6.8, 2.0, 6.1, 0.5, DARK_BLUE) for j, (h, w, x) in enumerate(zip(tx_heads, tw2, tx_xs2)): add_text(slide, h, x + 0.05, 2.05, w - 0.1, 0.4, 11, bold=True, color=WHITE) for i, row in enumerate(tx_rows): y = 2.5 + i * 0.72 bg = WHITE if i % 2 == 0 else RGBColor(0xE8, 0xF2, 0xFA) add_rect(slide, 6.8, y, 6.1, 0.68, bg, LIGHT_LINE) for j, (cell, w, x) in enumerate(zip(row, tw2, tx_xs2)): add_text(slide, cell, x + 0.05, y + 0.1, w - 0.1, 0.5, 10.5, color=DARK_BLUE if j == 0 else BODY_GRAY, bold=(j == 0)) # ═══════════════════════════════════════════════════════════════ # SLIDE 26 — Special Populations # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Special Populations & Clinical Scenarios") pops = [ ("Juvenile Hemochromatosis\n(Non-HFE)", [ "Caused by HJV or HAMP gene mutations", "Presents in 2nd–3rd decade — severe cardiac and endocrine involvement", "Cardiac dysfunction may require urgent erythrocytapheresis + phlebotomy", "Rapid diagnosis and treatment essential — fatal without treatment", ]), ("Pregnancy", [ "Physiological iron demand often masks diagnosis during pregnancy", "Ferritin can be transiently low — may delay diagnosis", "Phlebotomy safe in pregnancy if clinically necessary", "Counsel re: autosomal recessive inheritance to partner", ]), ("Cirrhotic Hemochromatosis", [ "Significantly elevated HCC risk — 6-month ultrasound + AFP surveillance mandatory", "Phlebotomy still beneficial: improves portal pressure, reduces inflammation", "Liver transplantation corrects the underlying metabolic defect", "Transplant outcomes similar to other aetiologies if iron overload not the only organ affected", ]), ("Blood Donation", [ "Phlebotomy blood from HC patients: used for therapeutic transfusion in some countries", "Varies by national blood service policy — check local guidelines", "Allows patients to participate actively in managing their condition", "Reduces logistical burden and cost where acceptable", ]), ] for i, (title, pts) in enumerate(pops): col = 0.3 if i % 2 == 0 else 6.85 row = 1.5 if i < 2 else 4.05 add_rect(slide, col, row, 6.2, 0.55, DARK_BLUE) add_text(slide, title, col + 0.1, row + 0.06, 6.0, 0.44, 13, bold=True, color=WHITE) add_rect(slide, col, row + 0.55, 6.2, 2.3, WHITE, MID_BLUE) for j, pt in enumerate(pts): add_text(slide, "• " + pt, col + 0.2, row + 0.62 + j * 0.54, 5.85, 0.5, 12.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 27 — Unresolved Questions / Future Directions # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Unresolved Questions & Future Directions") qs = [ ("Population Screening", "Should universal genetic screening be implemented for C282Y in Northern European populations? Cost-effectiveness data are favourable but RCT evidence lacking."), ("Optimal Ferritin Target", "Ferritin <50 µg/L (full de-ironing) vs. <300 µg/L for maintenance — which target maximises outcomes with minimum therapy burden?"), ("Penetrance Prediction", "Can we predict which C282Y homozygotes will develop clinical disease? Polygenic risk scores, modifier genes, and environmental factors are under study."), ("Hepcidin Therapy", "Can hepcidin injections replace or reduce maintenance phlebotomy? Combination trials (phlebotomy induction + hepcidin maintenance) are ongoing."), ("CRISPR Gene Editing", "Will somatic gene editing achieve durable correction of HFE mutation? Long-term safety and delivery challenges remain significant."), ("Non-HFE HC", "Optimal management algorithms for HJV, TFR2, SLC40A1, and HAMP mutations — rare but clinically severe; more data needed."), ] for i, (q, a) in enumerate(qs): y = 1.5 + i * 0.98 add_rect(slide, 0.4, y, 3.8, 0.88, MID_BLUE) add_text(slide, q, 0.5, y + 0.12, 3.6, 0.65, 13, bold=True, color=WHITE) add_rect(slide, 4.2, y, 9.0, 0.88, WHITE, LIGHT_LINE) add_text(slide, a, 4.35, y + 0.08, 8.75, 0.74, 12.5, color=BODY_GRAY) # ═══════════════════════════════════════════════════════════════ # SLIDE 28 — Key Messages # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, DARK_BLUE) add_rect(slide, 0, 0, 13.333, 0.08, ACCENT_GOLD) add_rect(slide, 0, 1.1, 13.333, 0.08, ACCENT_GOLD) add_text(slide, "Key Take-Home Messages", 0.5, 0.12, 12.3, 0.88, font_size=30, bold=True, color=WHITE, align=PP_ALIGN.CENTER) messages = [ ("1", "Hemochromatosis is common — 1 in 227 North Americans and 1 in 100 Irish individuals carry the C282Y homozygous genotype."), ("2", "Clinical penetrance is significant: 1 in 5 males will develop morbidity; 1 in 10 will develop severe liver disease without treatment."), ("3", "C282Y genetic testing is the diagnostic test of choice — replacing unreliable phenotypic tests."), ("4", "Serum ferritin >1000 µg/L is the threshold demanding urgent action — 1 in 5 will have advanced fibrosis."), ("5", "Phlebotomy is safe, cheap, and effective — it has stood the test of time and prevents virtually all complications if initiated early."), ("6", "Family cascade testing is essential — all first-degree relatives should be offered C282Y testing."), ("7", "Emerging therapies (hepcidin, CRISPR) are promising but must ultimately be tested against phlebotomy."), ] for i, (num, msg) in enumerate(messages): y = 1.25 + i * 0.87 add_rect(slide, 0.3, y, 0.75, 0.72, ACCENT_GOLD) add_text(slide, num, 0.32, y + 0.1, 0.71, 0.52, 22, bold=True, color=DARK_BLUE, align=PP_ALIGN.CENTER) add_text(slide, msg, 1.15, y + 0.1, 12.0, 0.62, 14, color=WHITE) # ═══════════════════════════════════════════════════════════════ # SLIDE 29 — References # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, LIGHT_BG) header_bar(slide, "Key References") refs = [ "1. Adams PC, Jeffrey G, Ryan J. Haemochromatosis. Lancet 2023; 401:1811–1821.", "2. Adams PC, Reboussin DM, Barton JC, et al (HEIRS). Hemochromatosis and iron-overload screening in a racially diverse population. N Engl J Med 2005; 352:1769–1778.", "3. Pilling LC, Tamosauskaite J, Jones G, et al. Common conditions associated with hereditary haemochromatosis genetic variants: cohort study in UK Biobank. BMJ 2019; 364:k5222.", "4. Lucas MR, Atkins JL, Pilling LC, et al. HFE genotypes, haemochromatosis diagnosis and clinical outcomes at age 80 years: a prospective cohort study in the UK Biobank. BMJ Open 2024.", "5. Allen KJ, Gurrin LC, Constantine CC, et al. Iron-overload–related disease in HFE hereditary hemochromatosis. N Engl J Med 2008; 358:221–230.", "6. Legros L, et al. Noninvasive assessment of liver fibrosis in C282Y homozygous hemochromatosis. Hepatology 2022.", "7. Zoller H, et al. European Association for the Study of the Liver: EASL Clinical Practice Guidelines for HFE Haemochromatosis. J Hepatol 2022; 77:479–502.", "8. Adams PC, Ryan JD. Diagnosis and Treatment of Hemochromatosis. Clin Gastroenterol Hepatol 2025; 23:1477–1485. [Source paper for this presentation]", ] for i, ref in enumerate(refs): y = 1.5 + i * 0.68 bg = WHITE if i % 2 == 0 else RGBColor(0xE8, 0xF2, 0xFA) add_rect(slide, 0.4, y, 12.5, 0.62, bg, LIGHT_LINE) bold = (i == 7) add_text(slide, ref, 0.55, y + 0.07, 12.1, 0.5, 12, color=DARK_BLUE if bold else BODY_GRAY, bold=bold) # ═══════════════════════════════════════════════════════════════ # SLIDE 30 — Closing / Thank You # ═══════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) set_bg(slide, DARK_BLUE) add_rect(slide, 0, 2.8, 13.333, 0.1, ACCENT_GOLD) add_text(slide, "Thank You", 0.5, 0.6, 12.3, 1.5, font_size=52, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_text(slide, "Diagnosis and Treatment of Hemochromatosis", 0.5, 2.1, 12.3, 0.7, font_size=22, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.CENTER) add_text(slide, "Adams PC & Ryan JD — Clinical Gastroenterology and Hepatology 2025; 23:1477–1485", 0.5, 2.95, 12.3, 0.65, font_size=15, italic=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER) add_text(slide, "Questions & Discussion", 0.5, 3.8, 12.3, 0.65, font_size=24, color=WHITE, align=PP_ALIGN.CENTER) add_text(slide, "Western University, London, Canada | Beaumont Hospital, Dublin, Ireland", 0.5, 4.7, 12.3, 0.5, font_size=14, color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.CENTER) add_text(slide, "Open access article — CC BY 4.0 — https://doi.org/10.1016/j.cgh.2024.10.041", 0.5, 5.35, 12.3, 0.5, font_size=12, color=RGBColor(0x77, 0x99, 0xBB), align=PP_ALIGN.CENTER, italic=True) # Save out_path = "/tmp/workspace/hemochromatosis-pptx/Hemochromatosis_Hepatology_Seminar.pptx" buf = BytesIO() prs.save(buf) with open(out_path, "wb") as f: f.write(buf.getvalue()) print(f"Saved: {out_path}") print(f"Slides: {len(prs.slides)}") PYEOF

Running Command

python3 -c " # Find the problematic lines import re code = open('/dev/stdin').read() " << 'EOF' # Let me check - the issue is RGBColor(0x7A, 0x50, 0x00) usage in slide 10 text add # Looking at 'color=RGBColor(0x7A, 0x50, 0x00)' -- that should be fine # Actually checking line 310 -- could be in the section where LIGHT_GOLD is passed # The issue: RGBColor(0xCC, 0xDD, 0xEE) -- that's 3 args, should be fine # Let me check the actual error more carefully -- line 310 in the script echo "Checking line numbers" EOF python3 -c " with open('/dev/stdin') as f: pass print('done') "

Writing File

~/hemochromatosis-pptx/build_pptx.py

from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN
from io import BytesIO

prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)

blank = prs.slide_layouts[6]

# ─── Color palette ───
DARK_BLUE    = RGBColor(0x0D, 0x2B, 0x55)
MID_BLUE     = RGBColor(0x14, 0x5A, 0x8A)
ACCENT_GOLD  = RGBColor(0xC8, 0x96, 0x20)
LIGHT_BG     = RGBColor(0xF0, 0xF5, 0xFA)
WHITE        = RGBColor(0xFF, 0xFF, 0xFF)
BODY_GRAY    = RGBColor(0x33, 0x33, 0x33)
LIGHT_LINE   = RGBColor(0xCC, 0xDD, 0xEE)
LIGHT_GOLD   = RGBColor(0xFF, 0xF3, 0xCC)
SECTION_TEAL = RGBColor(0x0A, 0x7A, 0x7A)
BLUE_LIGHT   = RGBColor(0xE8, 0xF2, 0xFA)
GOLD_DARK    = RGBColor(0x7A, 0x50, 0x00)
SUBHEAD      = RGBColor(0xBB, 0xCC, 0xDD)
RED_DARK     = RGBColor(0x8B, 0x00, 0x00)
BROWN        = RGBColor(0x66, 0x33, 0x00)
ORANGE_BROWN = RGBColor(0x8B, 0x4F, 0x00)

def set_bg(slide, color):
    bg = slide.background
    fill = bg.fill
    fill.solid()
    fill.fore_color.rgb = color

def add_rect(slide, left, top, width, height, fill_color, border_color=None):
    shape = slide.shapes.add_shape(1, Inches(left), Inches(top), Inches(width), Inches(height))
    shape.fill.solid()
    shape.fill.fore_color.rgb = fill_color
    if border_color:
        shape.line.color.rgb = border_color
        shape.line.width = Pt(1)
    else:
        shape.line.fill.background()
    return shape

def add_text(slide, text, left, top, width, height, font_size,
             bold=False, color=None, align=PP_ALIGN.LEFT, italic=False):
    if color is None:
        color = BODY_GRAY
    tb = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
    tf = tb.text_frame
    tf.word_wrap = True
    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 = "Calibri"
    return tb

def add_bullets(slide, items, left, top, width, height, font_size, color=None, bullet=True):
    if color is None:
        color = BODY_GRAY
    tb = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    for i, item in enumerate(items):
        p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
        run = p.add_run()
        run.text = ("• " if bullet else "") + item
        run.font.size = Pt(font_size)
        run.font.color.rgb = color
        run.font.name = "Calibri"
    return tb

def header_bar(slide, title, subtitle=None):
    add_rect(slide, 0, 0, 13.333, 1.2, DARK_BLUE)
    add_rect(slide, 0, 1.2, 13.333, 0.07, ACCENT_GOLD)
    add_text(slide, title, 0.3, 0.1, 12.7, 0.85, 28, bold=True, color=WHITE)
    if subtitle:
        add_text(slide, subtitle, 0.3, 0.82, 12.7, 0.4, 13, color=SUBHEAD, italic=True)

def section_divider(slide, title, sub=""):
    set_bg(slide, DARK_BLUE)
    add_rect(slide, 0, 2.9, 13.333, 0.1, ACCENT_GOLD)
    add_text(slide, title, 0.5, 1.8, 12.3, 1.2, 40, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    if sub:
        add_text(slide, sub, 0.5, 3.2, 12.3, 0.8, 18, color=SUBHEAD, align=PP_ALIGN.CENTER)

# ══════════════════════════════════════
# SLIDE 1 — Title
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, DARK_BLUE)
add_rect(s, 0, 2.5, 13.333, 0.12, ACCENT_GOLD)
add_text(s, "Diagnosis and Treatment of", 0.5, 0.7, 12.3, 0.8, 28, color=SUBHEAD, align=PP_ALIGN.CENTER)
add_text(s, "HEMOCHROMATOSIS", 0.5, 1.45, 12.3, 1.1, 52, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text(s, "Adams PC & Ryan JD — A Narrative Review", 0.5, 2.7, 12.3, 0.6, 18, color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
add_text(s, "Clinical Gastroenterology and Hepatology 2025; 23:1477-1485", 0.5, 3.35, 12.3, 0.5, 14, color=SUBHEAD, align=PP_ALIGN.CENTER, italic=True)
add_text(s, "Hepatology Seminar Presentation", 0.5, 5.0, 12.3, 0.5, 16, color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.CENTER)
add_text(s, "Western University, Canada  |  Beaumont Hospital, Dublin, Ireland", 0.5, 5.55, 12.3, 0.5, 13, color=RGBColor(0x77, 0x99, 0xBB), align=PP_ALIGN.CENTER)

# ══════════════════════════════════════
# SLIDE 2 — Outline
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Presentation Outline")
sections = [
    "1.  Background & Epidemiology",
    "2.  Pathophysiology — Hepcidin & Iron Regulation",
    "3.  Diagnosis: Biochemical & Genetic Testing",
    "4.  Diagnosis: Liver Fibrosis Assessment",
    "5.  Diagnosis: Extra-hepatic Manifestations",
    "6.  Population Screening & Family Cascade Testing",
    "7.  Treatment — Phlebotomy",
    "8.  Emerging Therapies (Mini-hepcidin, CRISPR)",
    "9.  Key Messages & Conclusions",
]
for i, sec in enumerate(sections):
    col = 0.4 if i < 5 else 7.0
    row = 1.5 + (i % 5) * 0.95
    add_rect(s, col, row, 5.8, 0.78, WHITE, MID_BLUE)
    add_text(s, sec, col + 0.2, row + 0.12, 5.4, 0.55, 14, color=DARK_BLUE)

# ══════════════════════════════════════
# SLIDE 3 — Section divider: Epidemiology
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
section_divider(s, "Background & Epidemiology", "The most common genetic disease in persons of European ancestry")

# ══════════════════════════════════════
# SLIDE 4 — Background
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Background", "HFE variants found in 4,000-year-old human fossils — NW Europe")
add_bullets(s, [
    "C282Y variant (845G to A) in the HFE gene is the predominant pathogenic variant",
    "Originally postulated to enhance iron absorption as a survival advantage in iron-deficient environments",
    "Excess iron absorption leads to progressive organ damage:",
], 0.4, 1.42, 12.5, 1.5, 17, color=DARK_BLUE)
add_bullets(s, [
    "Liver fibrosis  ->  Cirrhosis  ->  Hepatocellular carcinoma (HCC)",
    "Metacarpophalangeal joint arthritis",
    "Dilated / restrictive cardiomyopathy",
    "Diabetes mellitus (bronze diabetes)",
    "Hypogonadism (pituitary iron deposition)",
], 0.85, 2.95, 12.0, 2.2, 15, color=MID_BLUE)
add_rect(s, 0.4, 5.3, 12.5, 0.88, LIGHT_GOLD, ACCENT_GOLD)
add_text(s, "Key Point: Early identification and treatment prevents virtually all serious complications",
         0.6, 5.37, 12.1, 0.75, 15, bold=True, color=GOLD_DARK)

# ══════════════════════════════════════
# SLIDE 5 — Epidemiology
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Epidemiology of HFE Hemochromatosis")
stats = [
    ("1 in 227", "North American\nEuropean ancestry\n(HEIRS Study)"),
    ("1 in 156", "Northern England\n(UK Biobank)"),
    ("1 in 100", "Ireland\nHighest worldwide"),
    ("1 in 5\nmales", "Develop morbidity\n(UK Biobank)"),
    ("1 in 10\nmales", "Severe liver disease\nif untreated"),
]
for i, (num, label) in enumerate(stats):
    x = 0.35 + i * 2.55
    add_rect(s, x, 1.45, 2.35, 2.4, DARK_BLUE)
    add_text(s, num, x + 0.05, 1.65, 2.25, 1.5, 24, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
    add_rect(s, x, 3.85, 2.35, 1.55, WHITE, MID_BLUE)
    add_text(s, label, x + 0.1, 3.92, 2.15, 1.4, 13, color=DARK_BLUE, align=PP_ALIGN.CENTER)
add_text(s, "Clinical penetrance is NOT absolute — 1 in 10 females also develop morbidity (UK Biobank 2019)",
         0.4, 5.6, 12.5, 0.7, 15, italic=True, color=MID_BLUE)

# ══════════════════════════════════════
# SLIDE 6 — Pathophysiology
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Pathophysiology — Hepcidin & Iron Regulation")
add_text(s, "Central Mechanism: Hepcidin Deficiency", 0.4, 1.4, 12.5, 0.6, 20, bold=True, color=DARK_BLUE)
steps = [
    ("Normal",   "Hepcidin (liver-derived hormone) regulates iron absorption by binding ferroportin on duodenal enterocytes, causing its internalisation and degradation"),
    ("In HFE-HC","Mutant HFE protein impairs BMP/SMAD signalling  ->  Hepcidin production chronically suppressed"),
    ("Result",   "Low hepcidin  ->  Ferroportin remains active  ->  Unregulated iron absorption from gut  ->  Systemic iron accumulation"),
    ("Outcome",  "Iron deposits in liver, heart, pancreas, gonads, joints  ->  Oxidative stress, inflammation, fibrosis, end-organ damage"),
]
for i, (label, text) in enumerate(steps):
    y = 2.1 + i * 1.1
    add_rect(s, 0.4, y, 2.0, 0.88, MID_BLUE)
    add_text(s, label, 0.45, y + 0.14, 1.9, 0.62, 15, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, 2.4, y, 10.6, 0.88, WHITE, LIGHT_LINE)
    add_text(s, text, 2.55, y + 0.08, 10.35, 0.75, 14, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 7 — Section divider: Diagnosis
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
section_divider(s, "Diagnosis", "Biochemical testing  |  Genetic testing  |  Liver fibrosis  |  Extra-hepatic manifestations")

# ══════════════════════════════════════
# SLIDE 8 — Biochemical Diagnosis
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Biochemical Diagnosis — Serum Iron Studies")
cols = ["Test", "Description / Threshold", "Clinical Use"]
widths = [2.8, 6.2, 3.8]
xs = [0.3, 3.1, 9.3]
y0 = 1.5
add_rect(s, 0.3, y0, 12.7, 0.55, DARK_BLUE)
for j, (c, w, x) in enumerate(zip(cols, widths, xs)):
    add_text(s, c, x + 0.08, y0 + 0.07, w - 0.16, 0.42, 13, bold=True, color=WHITE)
rows = [
    ("Transferrin Saturation", "Fasting TS >= 45% used as screen; poor reproducibility (diurnal variation)", "Initial screen — not diagnostic alone"),
    ("Serum Ferritin", ">300 ug/L (men) / >200 ug/L (women) = elevated\nKey: >1000 ug/L predicts advanced fibrosis", "Best non-invasive marker of iron burden; guides number of phlebotomies"),
    ("HFE Genetic Test (C282Y)", "C282Y homozygosity is the diagnostic test of choice\nH63D compound heterozygote rarely causes significant disease", "Confirms diagnosis; drives family cascade testing"),
    ("MRI Liver (R2/R2*)", "Quantifies liver iron concentration (LIC) non-invasively\nIron = dark on T2 sequences; standardised protocols", "Avoids liver biopsy in most cases; tracks treatment response"),
    ("Liver Biopsy", "Gold standard for fibrosis staging; invasive\nNow reserved for ferritin >1000 ug/L or elevated transaminases", "Selective use: uncertain diagnosis or cirrhosis staging"),
]
for i, row in enumerate(rows):
    bg = WHITE if i % 2 == 0 else BLUE_LIGHT
    y = y0 + 0.55 + i * 0.95
    add_rect(s, 0.3, y, 12.7, 0.93, bg, LIGHT_LINE)
    for j, (cell, w, x) in enumerate(zip(row, widths, xs)):
        add_text(s, cell, x + 0.08, y + 0.04, w - 0.16, 0.86, 12, color=DARK_BLUE if j == 0 else BODY_GRAY, bold=(j == 0))

# ══════════════════════════════════════
# SLIDE 9 — Diagnostic Algorithm
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Diagnostic Algorithm for HFE Hemochromatosis")

def box(slide, x, y, w, h, text, bg, fg, fs=13):
    add_rect(slide, x, y, w, h, bg)
    add_text(slide, text, x + 0.1, y + 0.08, w - 0.2, h - 0.16, fs, color=fg, align=PP_ALIGN.CENTER)

box(s, 4.5, 1.42, 4.3, 0.75, "Elevated Transferrin Saturation (>=45%)\nor Elevated Serum Ferritin", DARK_BLUE, WHITE)
box(s, 4.5, 2.55, 4.3, 0.75, "HFE Genetic Testing\n(C282Y + H63D)", MID_BLUE, WHITE)
box(s, 0.5, 3.9, 3.6, 0.75, "C282Y Homozygote\nConfirmed HC", SECTION_TEAL, WHITE)
box(s, 4.5, 3.9, 4.3, 0.75, "C282Y / H63D Compound Het\nLow iron burden; monitor", ORANGE_BROWN, WHITE)
box(s, 9.0, 3.9, 3.8, 0.75, "Other / negative\nReconsider diagnosis", BROWN, WHITE)
box(s, 0.5, 5.2, 3.6, 0.75, "Assess serum ferritin,\nliver fibrosis, organ damage", DARK_BLUE, WHITE)

# simple arrow lines
from pptx.util import Inches as I
for (x1, y1, x2, y2) in [
    (6.65, 2.17, 6.65, 2.55),
    (4.5,  2.9,  2.3,  3.9),
    (6.65, 3.3,  6.65, 3.9),
    (8.8,  2.9,  10.9, 3.9),
    (2.3,  4.65, 2.3,  5.2),
]:
    c = s.shapes.add_connector(1, I(x1), I(y1), I(x2), I(y2))
    c.line.color.rgb = ACCENT_GOLD
    c.line.width = Pt(2)

add_text(s, "Note: Diagnosis has shifted from phenotyping (low reproducibility) to genotyping (simple, reliable, once-only test)",
         0.3, 6.55, 12.7, 0.65, 13, italic=True, color=MID_BLUE)

# ══════════════════════════════════════
# SLIDE 10 — Serum Ferritin Thresholds
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Serum Ferritin — The Most Important Clinical Marker")
thresholds = [
    ("<300 ug/L (men)\n<200 ug/L (women)", "Normal range\n\nCheck for secondary causes\nif other iron indices raised", WHITE, DARK_BLUE),
    ("300-1000 ug/L", "Elevated\nConfirm genotype\nCheck secondary causes\nConsider phlebotomy", LIGHT_GOLD, GOLD_DARK),
    (">1000 ug/L", "HIGH RISK\n1 in 5 have advanced fibrosis\nUrgent phlebotomy indicated\nLiver biopsy if transaminases elevated", RGBColor(0xFF, 0xE0, 0xE0), RED_DARK),
]
for i, (val, meaning, bg, fg) in enumerate(thresholds):
    x = 0.5 + i * 4.2
    add_rect(s, x, 1.5, 3.9, 1.2, DARK_BLUE)
    add_text(s, val, x + 0.1, 1.55, 3.7, 1.1, 20, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
    add_rect(s, x, 2.7, 3.9, 1.8, bg, MID_BLUE)
    add_text(s, meaning, x + 0.15, 2.75, 3.6, 1.7, 14, color=fg, align=PP_ALIGN.CENTER)
add_text(s, "Additional clinical uses of serum ferritin:", 0.5, 4.7, 12.5, 0.5, 16, bold=True, color=DARK_BLUE)
add_bullets(s, [
    "Best non-invasive estimate of total body iron stores",
    "Guides expected number of phlebotomies required to achieve de-ironing",
    "Indicator of liver disease risk",
    "Maintenance target: ferritin <50 ug/L (de-ironing complete) or <300 ug/L (ongoing maintenance phase)",
], 0.5, 5.25, 12.5, 2.0, 14, color=DARK_BLUE)

# ══════════════════════════════════════
# SLIDE 11 — Liver Fibrosis Assessment
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Liver Fibrosis Assessment in Hemochromatosis")
add_text(s, "All C282Y homozygotes should be screened for liver fibrosis — approx. 20% of adult males will be affected",
         0.4, 1.35, 12.5, 0.55, 14, italic=True, color=MID_BLUE)
tools = [
    ("Abdominal Ultrasound", "Baseline for all; assesses steatosis, cirrhosis, portal hypertension; HCC surveillance"),
    ("APRI Score", ">0.44 = good detection advanced fibrosis (AUROC 0.86-0.88)\n<0.37 = NPV 88.6% for advanced fibrosis"),
    ("FIB-4 Score", ">1.1 = good detection advanced fibrosis\n<0.73 = NPV 92% for advanced fibrosis"),
    ("Transient Elastography", "Liver stiffness <6.4 kPa = high NPV for ruling out advanced fibrosis\nCaution: poor correlation with APRI/FIB-4 in some HC cohorts"),
    ("MRI R2/R2* (LiverMultiScan)", "Non-invasive LIC + fibrosis staging; correlates with liver biopsy\nEmerging preferred modality"),
    ("Liver Biopsy", "Gold standard for staging\nReserved for ferritin >1000 ug/L AND elevated transaminases, or discordant non-invasive results"),
]
for i, (tool, desc) in enumerate(tools):
    col = 0.2 if i < 3 else 6.85
    row = 2.1 + (i % 3) * 1.55
    add_rect(s, col, row, 2.6, 1.35, MID_BLUE)
    add_text(s, tool, col + 0.1, row + 0.2, 2.4, 0.95, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, col + 2.6, row, 3.85, 1.35, WHITE, LIGHT_LINE)
    add_text(s, desc, col + 2.75, row + 0.1, 3.6, 1.18, 12, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 12 — Extra-hepatic Manifestations
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Extra-hepatic Manifestations of Hemochromatosis")
organs = [
    ("Musculoskeletal", [
        "Arthritis: most common extra-hepatic complaint",
        "27.9% males require joint replacement (vs. 17.1% controls — UK Biobank)",
        "Classic: 2nd and 3rd MCP joint arthropathy",
        "Baseline DEXA in C282Y homozygotes >40 years (osteoporosis risk OR 2.30 vs. controls)",
        "X-ray hands if symptomatic arthropathy; consider rheumatology/orthopaedic referral",
    ]),
    ("Cardiovascular", [
        "Clinically significant cardiac iron overload in <3% of C282Y homozygotes",
        "Dilated or restrictive cardiomyopathy; arrhythmias",
        "Higher risk: young patients <30 yrs, juvenile hemochromatosis",
        "Baseline ECG and echocardiogram if symptoms are present",
        "Cardiac MRI T2* for iron quantification in suspected cardiac involvement",
    ]),
    ("Endocrine", [
        "Diabetes: iron deposition in pancreatic beta cells ('bronze diabetes')",
        "Baseline HbA1c + fasting glucose in all C282Y homozygotes",
        "Hypogonadism: pituitary iron -> low testosterone/LH/FSH in men",
        "Osteoporosis: multifactorial (hypogonadism, cirrhosis, direct iron effect)",
        "Consider specialist endocrine review if DM or hypogonadism present",
    ]),
]
for i, (organ, pts) in enumerate(organs):
    x = 0.25 + i * 4.35
    add_rect(s, x, 1.48, 4.1, 0.58, DARK_BLUE)
    add_text(s, organ, x + 0.1, 1.55, 3.9, 0.46, 16, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, x, 2.06, 4.1, 4.85, WHITE, MID_BLUE)
    for j, pt in enumerate(pts):
        add_text(s, "- " + pt, x + 0.18, 2.14 + j * 0.92, 3.75, 0.86, 12.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 13 — When to suspect
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "When to Suspect Hemochromatosis — Clinical Red Flags")
add_text(s, "Consider in any patient of Northern European (particularly Irish/Celtic) descent with:", 0.4, 1.42, 12.5, 0.55, 16, bold=True, color=DARK_BLUE)
flags = [
    ("Liver", "Unexplained elevated liver enzymes\nNAFLD with disproportionate fibrosis\nCirrhosis of unknown aetiology\nHCC (especially non-cirrhotic)"),
    ("Metabolic", "Type 2 diabetes without obvious risk factors\nHypogonadism in young/middle-aged men\nUnexplained fatigue / lethargy"),
    ("Musculoskeletal", "Early-onset arthritis especially MCP joints\nHigh lifetime joint replacement burden\nOsteoporosis in young individuals"),
    ("Family History", "First-degree relative with confirmed HFE-HC\nFamily history of early cirrhosis or HCC\nIrish, Celtic, or Northern European ancestry"),
]
for i, (cat, text) in enumerate(flags):
    col = 0.4 if i < 2 else 6.85
    row = 2.15 + (i % 2) * 2.25
    add_rect(s, col, row, 6.0, 0.5, MID_BLUE)
    add_text(s, cat, col + 0.2, row + 0.06, 5.7, 0.4, 14, bold=True, color=WHITE)
    add_rect(s, col, row + 0.5, 6.0, 1.62, WHITE, LIGHT_LINE)
    add_text(s, text, col + 0.2, row + 0.58, 5.7, 1.5, 13, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 14 — HFE Genetic Variants
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "HFE Genetic Variants — What Clinicians Need to Know")
variants = [
    ("C282Y Homozygote\n(C282Y/C282Y)", "845G to A; exon 4\n~85-90% of HFE-HC in Northern Europeans\nGold-standard diagnostic variant", "HIGH", "Confirmed hereditary hemochromatosis", RGBColor(0xC8, 0x20, 0x20)),
    ("Compound Heterozygote\n(C282Y/H63D)", "One each of C282Y + H63D\nMinor iron elevation; rarely causes\nsignificant iron overload alone", "LOW-MODERATE", "Mild biochemical elevation; rarely end-organ disease unless other co-factors present (alcohol, NAFLD)", RGBColor(0xC8, 0x96, 0x20)),
    ("H63D Homozygote\n(H63D/H63D)", "Two copies of H63D\nVery mild effect; not pathogenic\nalone in most clinical guidelines", "VERY LOW", "Not clinically significant HFE-HC; no treatment required", RGBColor(0x11, 0x77, 0x33)),
]
for i, (name, genetics, risk, clinical, rc) in enumerate(variants):
    y = 1.55 + i * 1.75
    add_rect(s, 0.3, y, 3.8, 1.6, DARK_BLUE)
    add_text(s, name, 0.4, y + 0.15, 3.6, 1.32, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, 4.1, y, 2.5, 1.6, WHITE, rc)
    add_text(s, "Risk Level", 4.2, y + 0.08, 2.3, 0.42, 11, bold=True, color=rc)
    add_text(s, risk, 4.2, y + 0.52, 2.3, 0.8, 14, bold=True, color=rc, align=PP_ALIGN.CENTER)
    add_rect(s, 6.6, y, 6.4, 1.6, RGBColor(0xF5, 0xF8, 0xFF), LIGHT_LINE)
    add_text(s, genetics + "\n\n-> " + clinical, 6.75, y + 0.08, 6.1, 1.44, 12, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 15 — Section: Screening
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
section_divider(s, "Population Screening &\nFamily Cascade Testing", "Who to screen  |  When to screen  |  How to screen")

# ══════════════════════════════════════
# SLIDE 16 — Population Screening
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Population Screening for Hemochromatosis")
add_text(s, "Current evidence supports targeted, not universal, population screening",
         0.4, 1.42, 12.5, 0.55, 15, italic=True, color=MID_BLUE)
add_text(s, "Evidence Base", 0.4, 2.1, 6.2, 0.48, 15, bold=True, color=DARK_BLUE)
add_bullets(s, [
    "Blood donor studies: ~1 in 200 donors are C282Y homozygotes in Europe",
    "Ireland neonatal screening: C282Y prevalence 1 in 100 (highest globally)",
    "UK Biobank: 1 in 5 male C282Y homozygotes develop morbidity — not 'benign'",
    "HEIRS Study (100,000 participants): largest prospective screening study",
    "Genetic testing: simple, cheap, reliable, once-only test",
], 0.4, 2.62, 6.2, 3.8, 12.5, color=BODY_GRAY)
add_text(s, "Screening Debate", 6.8, 2.1, 6.1, 0.48, 15, bold=True, color=DARK_BLUE)
add_bullets(s, [
    "FOR: High prevalence; treatable; low-cost intervention; prevents end-organ damage",
    "AGAINST: Incomplete penetrance; no RCT evidence; risk of insurance/discrimination issues",
    "Current recommendation: Targeted screening of persons of Northern European ancestry with elevated iron indices",
    "Cost-effectiveness analyses favour genotype-based over phenotype-based screening in high-prevalence populations",
], 6.8, 2.62, 6.1, 3.8, 12.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 17 — Family Cascade Testing
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Family Cascade Testing — Recommended Approach")
add_text(s, "All first-degree relatives of a confirmed C282Y homozygote should be offered testing",
         0.4, 1.42, 12.5, 0.55, 16, bold=True, color=DARK_BLUE)
steps = [
    ("Step 1", "Proband confirmed as C282Y homozygote by genetic testing"),
    ("Step 2", "Test the proband's partner/spouse for C282Y carrier status"),
    ("Step 3", "If partner is C282Y NEGATIVE -> children cannot be homozygotes -> testing NOT required"),
    ("Step 4", "If partner is C282Y POSITIVE -> test children for C282Y homozygosity in adulthood"),
    ("Step 5", "Siblings of proband: autosomal recessive inheritance -> 25% risk -> test ALL adult siblings"),
    ("Step 6", "Cascade to extended family as appropriate; target adults only"),
]
for i, (step, desc) in enumerate(steps):
    y = 2.1 + i * 0.82
    add_rect(s, 0.4, y, 1.6, 0.73, MID_BLUE)
    add_text(s, step, 0.45, y + 0.12, 1.5, 0.5, 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, 2.0, y, 11.0, 0.73, WHITE if i % 2 == 0 else BLUE_LIGHT, LIGHT_LINE)
    add_text(s, desc, 2.15, y + 0.1, 10.7, 0.55, 13, color=BODY_GRAY)
add_rect(s, 0.4, 7.05, 12.5, 0.32, LIGHT_GOLD, ACCENT_GOLD)
add_text(s, "Non-adult children: screening NOT recommended — defer to adulthood",
         0.55, 7.07, 12.1, 0.28, 12, bold=True, color=GOLD_DARK)

# ══════════════════════════════════════
# SLIDE 18 — Section: Treatment
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
section_divider(s, "Treatment of Hemochromatosis", "Phlebotomy  |  Emerging therapies  |  Lifestyle")

# ══════════════════════════════════════
# SLIDE 19 — Phlebotomy Overview
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Phlebotomy — The Cornerstone of Treatment")
add_text(s, '"Treatment of hemochromatosis by phlebotomy has stood the test of time and is a very safe and cost-effective treatment" — Adams & Ryan 2025',
         0.5, 1.42, 12.3, 0.7, 14, italic=True, color=MID_BLUE, align=PP_ALIGN.CENTER)
cards = [
    ("Mechanism", "Each 500 mL phlebotomy removes ~200-250 mg of iron\nCompensatory erythropoiesis mobilises iron from storage"),
    ("Induction Phase", "Weekly phlebotomy until iron depleted\nTarget: serum ferritin <50 ug/L\nNumber of sessions guided by initial ferritin"),
    ("Maintenance Phase", "Every 3-4 months (lifelong) — minimum 3x/year\nTarget: ferritin <300 ug/L (or <50 ug/L in some guidelines)"),
    ("Clinical Benefits", "Reduces liver stiffness and fibrosis progression\nReduces risk: diabetes, cirrhosis, liver cancer, death\nSurvival = general population if treated before cirrhosis"),
    ("Side Effects", "Generally well tolerated\nFatigue in some patients; withhold if Hb low\nErythrocytapheresis for phlebotomy-intolerant patients"),
    ("Urgency Criteria", "URGENT: ferritin >1000 ug/L, symptomatic, or evidence of end-organ damage\nTreatment should also not be withheld for mild iron overload"),
]
for i, (title, body) in enumerate(cards):
    col = 0.3 + (i % 3) * 4.35
    row = 2.28 + (i // 3) * 2.18
    add_rect(s, col, row, 4.1, 0.5, DARK_BLUE)
    add_text(s, title, col + 0.1, row + 0.07, 3.9, 0.38, 13, bold=True, color=WHITE)
    add_rect(s, col, row + 0.5, 4.1, 1.55, WHITE, MID_BLUE)
    add_text(s, body, col + 0.12, row + 0.58, 3.88, 1.38, 12.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 20 — Monitoring During Treatment
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Practical Treatment Monitoring Guide")
add_text(s, "Monitoring during phlebotomy treatment:", 0.4, 1.42, 12.5, 0.5, 17, bold=True, color=DARK_BLUE)
add_bullets(s, [
    "FBC before each phlebotomy — withhold if Hb <12 g/dL (women) or <13 g/dL (men)",
    "Serum ferritin every 3 months during induction; annually during maintenance",
    "Liver function tests (ALT/AST) every 6-12 months",
    "HbA1c annually in those with diabetes or insulin resistance",
    "Abdominal ultrasound every 6 months in confirmed cirrhosis (HCC surveillance with AFP)",
    "AFP: serial measurement in cirrhotic patients as part of HCC surveillance programme",
], 0.4, 1.98, 12.5, 3.0, 14, color=DARK_BLUE)
add_text(s, "Expected outcomes with adequate phlebotomy treatment:", 0.4, 5.1, 12.5, 0.5, 17, bold=True, color=DARK_BLUE)
add_bullets(s, [
    "Non-cirrhotic patients treated early: normal life expectancy",
    "Liver fibrosis: regression possible; liver biopsy improvement documented in studies",
    "Diabetes: may partially improve; established beta-cell failure or severe neuropathy may not reverse",
    "Arthropathy: usually does NOT improve with iron depletion — requires symptomatic management",
], 0.4, 5.65, 12.5, 1.75, 14, color=MID_BLUE)

# ══════════════════════════════════════
# SLIDE 21 — Evidence for Treatment
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Evidence for Treatment Benefits of Phlebotomy")
add_text(s, "Key clinical evidence supporting phlebotomy in HFE-HC:", 0.4, 1.42, 12.5, 0.55, 16, bold=True, color=DARK_BLUE)
evidence = [
    ("Liver Fibrosis", "Associated with reduced fibrosis scores; regression documented in pre-cirrhotic patients"),
    ("HCC Prevention", "Untreated: significantly elevated HCC risk; early treatment approaches general population risk"),
    ("Cirrhosis", "Diagnosis before cirrhosis develops: survival equivalent to age-matched general population"),
    ("Diabetes", "HbA1c improvement documented in newly diagnosed DM; established beta-cell failure may not recover"),
    ("Quality of Life", "Reduction in fatigue, lethargy, mood disturbance after iron depletion (observational data)"),
    ("Cost-effectiveness", "Among most cost-effective interventions in chronic disease — avoids expensive sequelae"),
    ("Mortality", "Cirrhotic HC patients: increased mortality (HCC, liver failure); emphasises need for early diagnosis"),
]
for i, (cat, text) in enumerate(evidence):
    y = 2.05 + i * 0.72
    bg = WHITE if i % 2 == 0 else BLUE_LIGHT
    add_rect(s, 0.4, y, 12.5, 0.68, bg, LIGHT_LINE)
    add_text(s, cat + ":", 0.55, y + 0.1, 2.4, 0.5, 13, bold=True, color=DARK_BLUE)
    add_text(s, text, 2.95, y + 0.1, 9.8, 0.5, 12.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 22 — Lifestyle Advice
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Lifestyle Modifications in Hemochromatosis")
add_bullets(s, [
    "Alcohol: avoid or minimise — synergistic hepatotoxicity; potentiates liver fibrosis",
    "Vitamin C supplements: avoid high doses (>500 mg/day) — enhances non-haem iron absorption; promotes free radical generation from iron",
    "Raw shellfish: avoid — Vibrio vulnificus infection is disproportionately lethal in iron-overloaded individuals",
    "Red meat: moderate reduction may marginally lower haem iron load; NOT a substitute for phlebotomy",
    "Tea (especially English tea with meals): polyphenols inhibit non-haem iron absorption — beneficial adjunct",
    "Iron-fortified foods: iron supplementation in food was common 1950s marketing; minor public health effect seen when removed in Scandinavia",
    "Coffee: emerging hepatoprotective data in iron overload; moderate consumption safe",
    "Proton pump inhibitors: reduce gastric acid and modestly decrease iron absorption; insufficient alone to manage HC without phlebotomy",
], 0.4, 1.45, 12.5, 5.8, 14, color=DARK_BLUE)

# ══════════════════════════════════════
# SLIDE 23 — Section: Emerging Therapies
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
section_divider(s, "Emerging Therapies", "Mini-hepcidin  |  Gene editing (CRISPR)  |  Erythrocytapheresis")

# ══════════════════════════════════════
# SLIDE 24 — Emerging Therapies
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Emerging Therapies — On the Horizon")
therapies = [
    ("Synthetic Mini-Hepcidin\n(Parenteral)", [
        "Directly replaces deficient hepcidin -> blocks ferroportin -> reduces intestinal iron absorption",
        "Animal models: effective at reducing absorption but does NOT mobilise hepatic iron stores",
        "Proposed: phlebotomy induction (de-ironing) then hepcidin maintenance injections",
        "Potential to reduce frequency of maintenance phlebotomy sessions",
        "Must demonstrate superiority or non-inferiority vs. phlebotomy in clinical trials",
        "Status: Phase I/II trials underway; NOT yet approved for clinical use",
    ], MID_BLUE),
    ("CRISPR Gene Editing", [
        "Concept: correct the C282Y mutation in HFE gene to restore normal hepcidin regulation",
        "Early animal model data: proof-of-concept correction achieved",
        "Challenge: liver-targeted somatic gene editing; AAV-based delivery systems",
        "Long-term safety and off-target effects remain unknown",
        "Still in pre-clinical / early clinical research phase",
        "Must ultimately be compared against phlebotomy — the benchmark",
    ], SECTION_TEAL),
    ("Erythrocytapheresis", [
        "Selective removal of RBCs by apheresis — removes more iron per session than standard phlebotomy",
        "Advantage: fewer sessions; better tolerated (less haemodynamic change)",
        "Used when phlebotomy poorly tolerated (cardiac disease, difficult venous access)",
        "Higher cost; not available in all centres",
        "May be combined with phlebotomy in life-threatening juvenile hemochromatosis with cardiac dysfunction",
        "Blood bank utility varies by national blood service policy",
    ], DARK_BLUE),
]
for i, (name, points, color) in enumerate(therapies):
    x = 0.3 + i * 4.35
    add_rect(s, x, 1.5, 4.1, 0.7, color)
    add_text(s, name, x + 0.1, 1.55, 3.9, 0.6, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, x, 2.2, 4.1, 4.85, WHITE, LIGHT_LINE)
    for j, pt in enumerate(points):
        add_text(s, "- " + pt, x + 0.15, 2.28 + j * 0.77, 3.85, 0.7, 11.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 25 — Summary Tables
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Diagnosis & Treatment Summary — Key Tables")
add_text(s, "Table 2: Evolution of Diagnostic Tests in HFE-HC", 0.4, 1.42, 6.2, 0.5, 14, bold=True, color=DARK_BLUE)
add_text(s, "Table 3: Treatments Compared to Phlebotomy", 6.85, 1.42, 6.1, 0.5, 14, bold=True, color=DARK_BLUE)
diag_rows = [
    ("Serum Ferritin", "Non-specific (elevated by inflammation)", "Still best clinical iron marker"),
    ("Transferrin Sat", "Unreliable reproducibility (diurnal variation)", "Useful initial screen only"),
    ("Liver Biopsy", "Invasive; gold standard for fibrosis", "Now reserved for selected cases"),
    ("HFE Genetic Test", "Simple, reliable, once-only test", "Now diagnostic test of CHOICE"),
    ("MRI Liver", "Non-invasive LIC quantification + fibrosis", "Replaces biopsy in most cases"),
    ("Elastography", "Non-invasive fibrosis assessment", "Good NPV for ruling out F3/F4"),
]
for i, (test, limitation, update) in enumerate(diag_rows):
    y = 2.0 + i * 0.78
    bg = WHITE if i % 2 == 0 else BLUE_LIGHT
    add_rect(s, 0.4, y, 6.1, 0.72, bg, LIGHT_LINE)
    add_text(s, test, 0.55, y + 0.1, 1.8, 0.54, 12, bold=True, color=DARK_BLUE)
    add_text(s, limitation, 2.35, y + 0.1, 2.1, 0.54, 11, color=RGBColor(0x88, 0x22, 0x22))
    add_text(s, update, 4.45, y + 0.1, 1.9, 0.54, 11, color=SECTION_TEAL)
tx_rows = [
    ("Phlebotomy", "Standard of care", "Excellent", "Low"),
    ("Mini-Hepcidin", "Phase I/II trials", "TBD", "High"),
    ("CRISPR", "Pre-clinical", "TBD", "TBD"),
    ("Erythrocytapheresis", "Established (selected)", "High", "High"),
    ("Dietary change", "Adjunct only", "Low", "Low"),
    ("Liver transplant", "End-stage cirrhosis", "Variable", "Very High"),
]
add_rect(s, 6.85, 2.0, 6.1, 0.5, DARK_BLUE)
tx_heads = ["Treatment", "Status", "Efficacy", "Cost"]
tw = [2.3, 1.35, 1.1, 0.95]
tx0 = [6.9, 9.2, 10.55, 11.65]
for j, (h, w, x) in enumerate(zip(tx_heads, tw, tx0)):
    add_text(s, h, x + 0.05, 2.05, w - 0.1, 0.4, 11, bold=True, color=WHITE)
for i, row in enumerate(tx_rows):
    y = 2.5 + i * 0.74
    bg = WHITE if i % 2 == 0 else BLUE_LIGHT
    add_rect(s, 6.85, y, 6.1, 0.7, bg, LIGHT_LINE)
    for j, (cell, w, x) in enumerate(zip(row, tw, tx0)):
        add_text(s, cell, x + 0.05, y + 0.1, w - 0.1, 0.5, 10.5, color=DARK_BLUE if j == 0 else BODY_GRAY, bold=(j == 0))

# ══════════════════════════════════════
# SLIDE 26 — Special Populations
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Special Populations & Clinical Scenarios")
pops = [
    ("Juvenile Hemochromatosis\n(Non-HFE)", [
        "Caused by HJV or HAMP gene mutations",
        "Presents in 2nd-3rd decade — severe cardiac and endocrine involvement",
        "Cardiac dysfunction: urgent erythrocytapheresis + phlebotomy",
        "Fatal without rapid treatment — early diagnosis essential",
    ]),
    ("Pregnancy", [
        "Physiological iron demand can mask or delay diagnosis",
        "Ferritin may be transiently low in pregnancy",
        "Phlebotomy safe if clinically necessary",
        "Counsel re: autosomal recessive inheritance to partner",
    ]),
    ("Cirrhotic Hemochromatosis", [
        "HCC risk significantly elevated — 6-monthly US + AFP mandatory",
        "Phlebotomy still beneficial: reduces portal pressure and inflammation",
        "Liver transplantation corrects the underlying metabolic defect",
        "Transplant outcomes similar to other aetiologies",
    ]),
    ("Blood Donation", [
        "HC phlebotomy blood used for therapeutic transfusion in some countries",
        "Varies by national blood service policy — check local guidelines",
        "Allows patients to contribute and reduces logistical burden",
        "Psychological benefit: turning therapy into altruistic donation",
    ]),
]
for i, (title, pts) in enumerate(pops):
    col = 0.3 if i % 2 == 0 else 6.85
    row = 1.5 if i < 2 else 4.1
    add_rect(s, col, row, 6.15, 0.55, DARK_BLUE)
    add_text(s, title, col + 0.1, row + 0.06, 5.95, 0.44, 13, bold=True, color=WHITE)
    add_rect(s, col, row + 0.55, 6.15, 2.3, WHITE, MID_BLUE)
    for j, pt in enumerate(pts):
        add_text(s, "- " + pt, col + 0.2, row + 0.62 + j * 0.54, 5.82, 0.5, 12.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 27 — Unresolved Questions
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Unresolved Questions & Future Directions")
qs = [
    ("Population Screening", "Should universal genetic screening for C282Y be implemented in Northern European populations? Cost-effectiveness data are favourable but RCT evidence lacking."),
    ("Optimal Ferritin Target", "Ferritin <50 ug/L (full de-ironing) vs. <300 ug/L for maintenance — which target maximises outcomes with minimum therapy burden?"),
    ("Penetrance Prediction", "Can we identify which C282Y homozygotes will develop clinical disease? Polygenic risk scores and modifier genes are under study."),
    ("Hepcidin Therapy", "Can hepcidin injections replace or reduce maintenance phlebotomy? Combination trials (induction phlebotomy + hepcidin maintenance) are ongoing."),
    ("CRISPR Gene Editing", "Will somatic gene editing achieve durable correction of HFE mutation? Long-term safety and delivery challenges remain significant."),
    ("Non-HFE Hemochromatosis", "Optimal management for HJV, TFR2, SLC40A1, HAMP mutations — rare but clinically severe; more data needed."),
]
for i, (q, a) in enumerate(qs):
    y = 1.5 + i * 0.97
    add_rect(s, 0.4, y, 3.8, 0.87, MID_BLUE)
    add_text(s, q, 0.5, y + 0.12, 3.6, 0.65, 13, bold=True, color=WHITE)
    add_rect(s, 4.2, y, 9.0, 0.87, WHITE, LIGHT_LINE)
    add_text(s, a, 4.35, y + 0.08, 8.75, 0.73, 12.5, color=BODY_GRAY)

# ══════════════════════════════════════
# SLIDE 28 — Key Messages
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, DARK_BLUE)
add_rect(s, 0, 0, 13.333, 0.08, ACCENT_GOLD)
add_rect(s, 0, 1.05, 13.333, 0.08, ACCENT_GOLD)
add_text(s, "Key Take-Home Messages", 0.5, 0.12, 12.3, 0.88, 30, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
messages = [
    ("1", "Hemochromatosis is common — 1 in 227 North Americans and 1 in 100 Irish individuals carry C282Y homozygous genotype"),
    ("2", "1 in 5 males will develop morbidity; 1 in 10 will develop severe liver disease without treatment (UK Biobank data)"),
    ("3", "C282Y genetic testing is the diagnostic test of CHOICE — replacing unreliable phenotypic tests"),
    ("4", "Serum ferritin >1000 ug/L is the action threshold — 1 in 5 will have advanced liver fibrosis"),
    ("5", "Phlebotomy is safe, cheap, and effective — prevents virtually all complications when initiated early"),
    ("6", "Family cascade testing is essential — all first-degree relatives should be offered C282Y testing"),
    ("7", "Emerging therapies (hepcidin, CRISPR) are promising but must be tested against phlebotomy"),
]
for i, (num, msg) in enumerate(messages):
    y = 1.22 + i * 0.87
    add_rect(s, 0.3, y, 0.75, 0.74, ACCENT_GOLD)
    add_text(s, num, 0.32, y + 0.1, 0.71, 0.54, 22, bold=True, color=DARK_BLUE, align=PP_ALIGN.CENTER)
    add_text(s, msg, 1.15, y + 0.1, 12.0, 0.62, 14, color=WHITE)

# ══════════════════════════════════════
# SLIDE 29 — References
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, LIGHT_BG)
header_bar(s, "Key References")
refs = [
    "1. Adams PC, Jeffrey G, Ryan J. Haemochromatosis. Lancet 2023; 401:1811-1821.",
    "2. Adams PC, Reboussin DM, Barton JC, et al (HEIRS Study). Hemochromatosis and iron-overload screening. N Engl J Med 2005; 352:1769-1778.",
    "3. Pilling LC, Tamosauskaite J, Jones G, et al. Common conditions associated with hereditary haemochromatosis variants: UK Biobank cohort. BMJ 2019; 364:k5222.",
    "4. Lucas MR, Atkins JL, Pilling LC, et al. HFE genotypes, haemochromatosis and clinical outcomes at age 80 years. BMJ Open 2024.",
    "5. Allen KJ, Gurrin LC, Constantine CC, et al. Iron-overload-related disease in HFE hereditary hemochromatosis. N Engl J Med 2008; 358:221-230.",
    "6. Legros L, et al. Noninvasive assessment of liver fibrosis in C282Y homozygous hemochromatosis. Hepatology 2022.",
    "7. EASL Clinical Practice Guidelines for HFE Haemochromatosis. J Hepatol 2022; 77:479-502.",
    "8. [SOURCE] Adams PC, Ryan JD. Diagnosis and Treatment of Hemochromatosis. Clin Gastroenterol Hepatol 2025; 23:1477-1485. DOI: 10.1016/j.cgh.2024.10.041",
]
for i, ref in enumerate(refs):
    y = 1.5 + i * 0.68
    bg = WHITE if i % 2 == 0 else BLUE_LIGHT
    add_rect(s, 0.4, y, 12.5, 0.62, bg, LIGHT_LINE)
    bold = (i == 7)
    add_text(s, ref, 0.55, y + 0.07, 12.1, 0.5, 12, color=DARK_BLUE if bold else BODY_GRAY, bold=bold)

# ══════════════════════════════════════
# SLIDE 30 — Thank You
# ══════════════════════════════════════
s = prs.slides.add_slide(blank)
set_bg(s, DARK_BLUE)
add_rect(s, 0, 2.8, 13.333, 0.1, ACCENT_GOLD)
add_text(s, "Thank You", 0.5, 0.5, 12.3, 1.5, 52, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text(s, "Diagnosis and Treatment of Hemochromatosis", 0.5, 2.1, 12.3, 0.7, 22, color=SUBHEAD, align=PP_ALIGN.CENTER)
add_text(s, "Adams PC & Ryan JD — Clin Gastroenterol Hepatol 2025; 23:1477-1485",
         0.5, 2.95, 12.3, 0.65, 15, italic=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
add_text(s, "Questions & Discussion", 0.5, 3.8, 12.3, 0.65, 24, color=WHITE, align=PP_ALIGN.CENTER)
add_text(s, "Western University, London, Canada  |  Beaumont Hospital, Dublin, Ireland",
         0.5, 4.7, 12.3, 0.5, 14, color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.CENTER)
add_text(s, "Open access article — CC BY 4.0 — doi.org/10.1016/j.cgh.2024.10.041",
         0.5, 5.35, 12.3, 0.5, 12, color=RGBColor(0x77, 0x99, 0xBB), align=PP_ALIGN.CENTER, italic=True)

# Save
out = "/tmp/workspace/hemochromatosis-pptx/Hemochromatosis_Hepatology_Seminar.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Total slides: {len(prs.slides)}")
Running Command

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

Your presentation is ready. Here is the download link:

Hemochromatosis Hepatology Seminar

Presentation · PPTX


Presentation overview — 30 slides, 16:9 widescreen, navy/gold hepatology theme:
#Slide
1Title slide
2Presentation outline
3Section divider — Epidemiology
4Background (pathogenesis, complications)
5Epidemiology (5 stat cards: HEIRS, UK Biobank, Ireland)
6Pathophysiology — hepcidin/iron regulation (step diagram)
7Section divider — Diagnosis
8Biochemical diagnosis table (TS, ferritin, genetic test, MRI, biopsy)
9Diagnostic algorithm flowchart
10Serum ferritin thresholds (<300 / 300-1000 / >1000 µg/L)
11Liver fibrosis assessment (APRI, FIB-4, elastography, MRI, biopsy)
12Extra-hepatic manifestations (MSK, cardiac, endocrine — 3-column layout)
13Clinical red flags — when to suspect
14HFE genetic variants table (C282Y hom, compound het, H63D hom)
15Section divider — Screening
16Population screening debate (evidence FOR and AGAINST)
17Family cascade testing step-by-step guide
18Section divider — Treatment
19Phlebotomy overview (6 cards: mechanism, induction, maintenance, benefits, side effects, urgency)
20Practical monitoring guide + expected outcomes
21Evidence for phlebotomy benefits (7 domains)
22Lifestyle modifications
23Section divider — Emerging Therapies
24Emerging therapies — mini-hepcidin, CRISPR, erythrocytapheresis
25Summary tables (diagnostic evolution + treatments vs. phlebotomy)
26Special populations (juvenile HC, pregnancy, cirrhosis, blood donation)
27Unresolved questions & future directions
287 key take-home messages (dark navy slide)
29Key references (8 citations incl. source paper)
30Thank you / discussion slide
This is a shared conversation. Sign in to Orris to start your own chat.