10-15 slide presentation on thyroid storm with focus on management for postgraduate students

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

10-15 slide presentation on thyroid storm with focus on management for postgraduate students

Reading File
Reading File
Reading File
Finding Sources
Searching PubMed

"thyroid storm" AND management

Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/thyroid-storm-ppt && ls /tmp/workspace/

Writing File

~/thyroid-storm-ppt/build_pptx.py

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

# ── Colour palette ──────────────────────────────────────────────────────────
NAVY      = RGBColor(0x1A, 0x3A, 0x5C)   # slide header / accent
TEAL      = RGBColor(0x00, 0x86, 0x9B)   # section title bar
RED       = RGBColor(0xC0, 0x39, 0x2B)   # alert / warning
ORANGE    = RGBColor(0xE6, 0x7E, 0x22)   # highlight
GREEN     = RGBColor(0x1A, 0x7A, 0x4A)   # positive / safe
WHITE     = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_BG  = RGBColor(0xF0, 0xF4, 0xF8)  # slide background
DARK_TEXT = RGBColor(0x1C, 0x1C, 0x2E)
MID_GREY  = RGBColor(0x55, 0x65, 0x75)
GOLD      = RGBColor(0xF3, 0x9C, 0x12)

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

# ── Helper utilities ─────────────────────────────────────────────────────────

def add_rect(slide, x, y, w, h, color, transparency=0):
    shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = color
    shape.line.fill.background()
    return shape

def add_textbox(slide, x, y, w, h, text, size, bold=False, color=DARK_TEXT,
                align=PP_ALIGN.LEFT, italic=False, wrap=True, font="Calibri"):
    tb  = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf  = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
    p   = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.name  = font
    run.font.size  = Pt(size)
    run.font.bold  = bold
    run.font.italic = italic
    run.font.color.rgb = color
    return tb, tf

def add_bullet_box(slide, x, y, w, h, items, size=16, color=DARK_TEXT,
                   bullet_color=TEAL, heading=None, heading_size=18,
                   font="Calibri", indent_level=0):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = tf.margin_right = 0
    tf.margin_top  = tf.margin_bottom = 0
    first = True
    if heading:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False
        run = p.add_run()
        run.text = heading
        run.font.name  = font
        run.font.size  = Pt(heading_size)
        run.font.bold  = True
        run.font.color.rgb = bullet_color
    for item in items:
        p = tf.paragraphs[0] if (first and not heading) else tf.add_paragraph()
        first = False
        p.space_before = Pt(2)
        p.space_after  = Pt(2)
        run = p.add_run()
        if isinstance(item, tuple):
            bullet_char, text, clr = item
        else:
            bullet_char, text, clr = "●", item, color
        run.text = f"  {bullet_char}  {text}"
        run.font.name  = font
        run.font.size  = Pt(size)
        run.font.color.rgb = clr
    return tb, tf

def slide_bg(slide, color=LIGHT_BG):
    add_rect(slide, 0, 0, 13.333, 7.5, color)

def header_bar(slide, title, subtitle=None):
    add_rect(slide, 0, 0, 13.333, 1.1, NAVY)
    add_textbox(slide, 0.3, 0.12, 12.5, 0.6, title,
                size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
    if subtitle:
        add_textbox(slide, 0.3, 0.68, 12.5, 0.38, subtitle,
                    size=14, bold=False, color=RGBColor(0xCC, 0xDD, 0xEE),
                    align=PP_ALIGN.LEFT, italic=True)

def footer(slide, text="Thyroid Storm | Postgraduate Education"):
    add_rect(slide, 0, 7.2, 13.333, 0.3, NAVY)
    add_textbox(slide, 0.2, 7.22, 13.0, 0.22, text,
                size=9, color=RGBColor(0xBB, 0xCC, 0xDD), align=PP_ALIGN.LEFT)

def section_card(slide, x, y, w, h, title, body_lines, title_color=TEAL,
                  body_color=DARK_TEXT, bg=WHITE):
    add_rect(slide, x, y, w, 0.38, title_color)
    add_textbox(slide, x+0.1, y+0.04, w-0.2, 0.3, title,
                size=14, bold=True, color=WHITE)
    add_rect(slide, x, y+0.38, w, h-0.38, bg)
    tb = slide.shapes.add_textbox(Inches(x+0.12), Inches(y+0.44),
                                  Inches(w-0.24), Inches(h-0.54))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
    first = True
    for line in body_lines:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False
        p.space_before = Pt(1)
        run = p.add_run()
        if isinstance(line, tuple):
            run.text = line[0]
            run.font.bold = line[1]
            run.font.size = Pt(line[2])
            run.font.color.rgb = line[3]
        else:
            run.text = line
            run.font.size = Pt(13)
            run.font.color.rgb = body_color
        run.font.name = "Calibri"

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 1: Title Slide
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, 13.333, 7.5, NAVY)
add_rect(s, 0, 5.5, 13.333, 2.0, RGBColor(0x0D, 0x23, 0x3A))
add_rect(s, 0.5, 1.6, 0.1, 4.2, TEAL)   # decorative bar

add_textbox(s, 0.8, 1.7, 11.5, 1.2,
            "THYROID STORM",
            size=52, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
add_textbox(s, 0.8, 2.95, 11.5, 0.55,
            "Recognition, Scoring & Emergency Management",
            size=22, bold=False, color=RGBColor(0x7E, 0xC8, 0xE3),
            align=PP_ALIGN.LEFT, italic=True)
add_textbox(s, 0.8, 3.7, 11.5, 0.45,
            "Thyrotoxic Crisis · A Life-Threatening Emergency",
            size=17, color=RGBColor(0xCC, 0xDD, 0xEE), align=PP_ALIGN.LEFT)
add_textbox(s, 0.8, 5.6, 11.5, 0.4,
            "Postgraduate Medical Education  |  Internal Medicine / Emergency Medicine",
            size=13, color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.LEFT, italic=True)
add_textbox(s, 0.8, 6.1, 11.5, 0.4,
            "Sources: Tintinalli's Emergency Medicine 9e · Rosen's Emergency Medicine 10e · Katzung Pharmacology 16e",
            size=10, color=RGBColor(0x66, 0x88, 0xAA), align=PP_ALIGN.LEFT)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 2: Overview / Learning Objectives
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Learning Objectives", "What you will know by the end of this session")
footer(s)

add_rect(s, 0.4, 1.25, 12.5, 5.7, WHITE)

objectives = [
    "Define thyroid storm and distinguish it from uncomplicated thyrotoxicosis",
    "Recall the epidemiology, precipitants, and pathophysiology of thyroid storm",
    "Describe the clinical features across organ systems",
    "Apply the Burch-Wartofsky Point Scale (BWPS) for diagnosis",
    "Outline a structured, step-by-step management approach with drug doses",
    "Identify complications and manage them appropriately",
    "Know special populations: thyroid storm in pregnancy",
    "Determine appropriate disposition and follow-up",
]
for i, obj in enumerate(objectives):
    y = 1.45 + i * 0.65
    add_rect(s, 0.55, y, 0.5, 0.45, TEAL)
    add_textbox(s, 0.6, y+0.04, 0.4, 0.36, str(i+1),
                size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_textbox(s, 1.2, y+0.02, 11.3, 0.44, obj,
                size=16, color=DARK_TEXT)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 3: Definitions & Epidemiology
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Definition & Epidemiology", "Understanding the scope of the problem")
footer(s)

# Definition box
section_card(s, 0.4, 1.2, 8.0, 2.7, "DEFINITION",
    [
        ("Thyroid storm = rare, life-threatening extreme thyrotoxicosis", True, 14, DARK_TEXT),
        ("● Multiorgan dysfunction on background of hyperthyroidism", False, 13, DARK_TEXT),
        ("● NOT just elevated thyroid hormones — it is a clinical diagnosis", False, 13, RED),
        ("● Often triggered by an acute insult (surgery, infection, iodine load)", False, 13, DARK_TEXT),
        ("● Untreated mortality → approaches 100%", False, 13, RED),
        ("● With prompt treatment, mortality 10–30%", False, 13, GREEN),
    ])

# Epidemiology box
section_card(s, 0.4, 4.05, 8.0, 2.8, "EPIDEMIOLOGY",
    [
        ("● Rare: <1% of hospital admissions for thyrotoxicosis", False, 13, DARK_TEXT),
        ("● More common in women (Graves disease predominance)", False, 13, DARK_TEXT),
        ("● Peak incidence 3rd–5th decade", False, 13, DARK_TEXT),
        ("● In up to 25% of cases, no precipitant is identified", False, 13, ORANGE),
    ])

# Key stat callout
add_rect(s, 9.0, 1.2, 4.0, 5.65, RGBColor(0xFF, 0xF3, 0xE0))
add_rect(s, 9.0, 1.2, 4.0, 0.4, ORANGE)
add_textbox(s, 9.05, 1.22, 3.9, 0.34, "KEY NUMBERS", size=13, bold=True, color=WHITE)

stats = [
    ("~100%", "Untreated mortality", RED),
    ("10–30%", "Mortality with treatment", ORANGE),
    ("1%", "Hospital admissions\nfor thyrotoxicosis", TEAL),
    ("25%", "Cases with no\nprecipitant found", MID_GREY),
]
for i, (num, label, clr) in enumerate(stats):
    y = 1.75 + i * 1.28
    add_textbox(s, 9.1, y, 3.8, 0.55, num, size=30, bold=True, color=clr, align=PP_ALIGN.CENTER)
    add_textbox(s, 9.1, y+0.5, 3.8, 0.48, label, size=12, color=MID_GREY, align=PP_ALIGN.CENTER)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 4: Precipitants
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Precipitants of Thyroid Storm", "Always search for the trigger")
footer(s)

cats = [
    ("Infection / Sepsis", ["Pneumonia", "UTI", "Meningitis", "Abscess"], TEAL),
    ("Surgical / Trauma", ["Thyroid surgery", "Any general surgery", "Physical trauma", "Palpation of gland"], NAVY),
    ("Cardiovascular", ["Myocardial infarction", "Pulmonary embolism", "Cerebrovascular accident", "Heart failure"], RED),
    ("Endocrine / Metabolic", ["Diabetic ketoacidosis", "Hyperosmolar coma", "Adrenal insufficiency"], ORANGE),
    ("Drug / Iodine Related", ["Radioactive iodine Rx", "Iodine contrast dye", "Amiodarone", "Withdrawal of ATD"], GREEN),
    ("Obstetric", ["Labor & delivery", "Eclampsia / Pre-eclampsia", "Hyperemesis gravidarum"], RGBColor(0x7D, 0x3C, 0x98)),
]

positions = [(0.35,1.2),(4.6,1.2),(8.85,1.2),(0.35,4.1),(4.6,4.1),(8.85,4.1)]
for (x,y), (title, items, clr) in zip(positions, cats):
    add_rect(s, x, y, 4.1, 0.4, clr)
    add_textbox(s, x+0.1, y+0.06, 3.9, 0.3, title, size=14, bold=True, color=WHITE)
    add_rect(s, x, y+0.4, 4.1, 2.8, WHITE)
    tb = s.shapes.add_textbox(Inches(x+0.15), Inches(y+0.5), Inches(3.8), Inches(2.6))
    tf = tb.text_frame; tf.word_wrap = True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    first=True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first=False
        p.space_before=Pt(3)
        run=p.add_run(); run.text=f"▸  {item}"
        run.font.name="Calibri"; run.font.size=Pt(14); run.font.color.rgb=DARK_TEXT

add_textbox(s, 0.35, 6.9, 12.6, 0.25,
    "★  Unknown cause identified in up to 25% of cases (Tintinalli's 9e)",
    size=11, color=MID_GREY, italic=True)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 5: Pathophysiology
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Pathophysiology", "Why the storm develops")
footer(s)

# Flow diagram using boxes and arrows
steps = [
    ("Underlying\nHyperthyroidism\n(Graves / Toxic MNG)", TEAL, 0.5),
    ("Acute\nPrecipitant\n(infection, surgery…)", ORANGE, 3.2),
    ("↑ Free T3/T4\n+ ↑ Adrenergic\nReceptor Sensitivity", RED, 5.9),
    ("Hyperadrenergic\nState", NAVY, 8.6),
    ("Multiorgan\nDysfunction", RGBColor(0x6C, 0x3A, 0x83), 11.3),
]

for title, clr, x in steps:
    add_rect(s, x, 1.4, 2.5, 1.5, clr)
    tb = s.shapes.add_textbox(Inches(x+0.1), Inches(1.45), Inches(2.3), Inches(1.4))
    tf=tb.text_frame; tf.word_wrap=True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    p=tf.paragraphs[0]; p.alignment=PP_ALIGN.CENTER
    run=p.add_run(); run.text=title
    run.font.name="Calibri"; run.font.size=Pt(13); run.font.bold=True
    run.font.color.rgb=WHITE
    if x < 11.3:
        add_textbox(s, x+2.5, 1.95, 0.7, 0.5, "→", size=24, bold=True,
                    color=MID_GREY, align=PP_ALIGN.CENTER)

# Consequences column
cons = [
    ("Fever / Hyperpyrexia", RED),
    ("Tachycardia / AF / High-output HF", RED),
    ("CNS: Agitation → Coma", NAVY),
    ("GI: Nausea, Vomiting, Diarrhoea, Jaundice", ORANGE),
    ("Thyroid hormones displace from binding proteins → ↑ Free fractions", MID_GREY),
    ("Negative TSH feedback broken — autonomous secretion", MID_GREY),
]
add_rect(s, 0.4, 3.2, 12.5, 0.32, TEAL)
add_textbox(s, 0.5, 3.22, 12.2, 0.28, "DOWNSTREAM CONSEQUENCES", size=13, bold=True, color=WHITE)

for i, (text, clr) in enumerate(cons):
    y = 3.6 + i * 0.57
    add_rect(s, 0.4, y, 0.35, 0.42, clr)
    add_textbox(s, 0.85, y+0.04, 11.9, 0.4, text, size=15, color=DARK_TEXT)

add_textbox(s, 0.4, 6.9, 12.5, 0.28,
    "Note: Total T3/T4 levels may NOT be elevated — free fractions are the key (Tintinalli's 9e)",
    size=11, italic=True, color=MID_GREY)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 6: Clinical Features
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Clinical Features", "Multiorgan presentation — the clinical storm")
footer(s)

systems = [
    ("Thermoregulatory", ["Marked fever 40–41°C (104–106°F)", "Diaphoresis, heat intolerance"], RED),
    ("Cardiovascular", ["Extreme tachycardia (often out of proportion to fever)",
                        "Widened pulse pressure", "AF (10–35% of cases)",
                        "High-output cardiac failure", "Cardiovascular collapse"], RED),
    ("CNS", ["Mild: agitation, anxiety, tremor",
             "Moderate: delirium, psychosis",
             "Severe: seizures, coma", "Lid lag, stare, goiter, exophthalmos"], NAVY),
    ("GI / Hepatic", ["Nausea, vomiting, diarrhoea",
                      "Abdominal pain (common)",
                      "Jaundice / hepatic failure (poor prognosis)"], ORANGE),
    ("Metabolic", ["Hyperglycaemia or relative hypoglycaemia",
                   "Elevated LFTs (up to 30% on ATDs)",
                   "Raised cortisol (expected — stress response)",
                   "Low cortisol → suspect adrenal insufficiency"], GREEN),
]

col_xs = [0.35, 4.7, 9.05]
rows   = [(0, 1.2), (1, 1.2), (2, 1.2), (0, 4.05), (1, 4.05)]

for (ci, y_offset), (title, items, clr) in zip(rows, systems):
    x = col_xs[ci]
    add_rect(s, x, y_offset, 4.2, 0.38, clr)
    add_textbox(s, x+0.1, y_offset+0.04, 4.0, 0.3, title, size=14, bold=True, color=WHITE)
    add_rect(s, x, y_offset+0.38, 4.2, 2.65, WHITE)
    tb = s.shapes.add_textbox(Inches(x+0.15), Inches(y_offset+0.48), Inches(3.9), Inches(2.4))
    tf=tb.text_frame; tf.word_wrap=True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    first=True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first=False; p.space_before=Pt(2)
        run=p.add_run(); run.text=f"▸  {item}"
        run.font.name="Calibri"; run.font.size=Pt(13); run.font.color.rgb=DARK_TEXT

# Pearl box
add_rect(s, 9.05, 4.05, 4.2, 2.65, RGBColor(0xFF, 0xF8, 0xE1))
add_rect(s, 9.05, 4.05, 4.2, 0.38, GOLD)
add_textbox(s, 9.1, 4.07, 4.0, 0.32, "CLINICAL PEARL", size=13, bold=True, color=WHITE)
pearl = ("Tachycardia out of proportion\nto fever is a hallmark clue.\n\n"
         "Absence of goiter does NOT\nrule out thyroid storm —\nconsider factitious or ectopic source.")
add_textbox(s, 9.15, 4.5, 3.9, 2.1, pearl, size=13, color=DARK_TEXT, italic=True)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 7: Burch-Wartofsky Scoring
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Burch-Wartofsky Point Scale (BWPS)", "Diagnostic scoring — 1993, still the gold standard")
footer(s)

# interpretation box top-right
add_rect(s, 9.4, 1.15, 3.6, 3.3, RGBColor(0xE8, 0xF8, 0xEE))
add_rect(s, 9.4, 1.15, 3.6, 0.38, GREEN)
add_textbox(s, 9.5, 1.17, 3.4, 0.3, "INTERPRETATION", size=13, bold=True, color=WHITE)
interp = [
    ("≥ 45", "Thyroid STORM", RED, True),
    ("25 – 44", "Impending Storm", ORANGE, True),
    ("< 25", "Storm unlikely", GREEN, True),
]
for i, (score, label, clr, bold) in enumerate(interp):
    y = 1.65 + i*0.8
    add_rect(s, 9.5, y, 1.1, 0.52, clr)
    add_textbox(s, 9.52, y+0.07, 1.06, 0.38, score, size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_textbox(s, 10.7, y+0.07, 2.2, 0.38, label, size=14, bold=bold, color=clr)

add_textbox(s, 9.5, 4.6, 3.5, 0.9,
    "⚠ No validated sensitivity/specificity published\n→ Clinical judgement remains essential",
    size=12, color=ORANGE, italic=True)

# Scoring table
categories = [
    ("Fever (°C / °F)", [
        ("37.2–37.7 / 99–99.9", "5"),
        ("37.8–38.2 / 100–100.9", "10"),
        ("38.3–38.8 / 101–101.9", "15"),
        ("38.9–39.4 / 102–102.9", "20"),
        ("39.5–39.9 / 103–103.9", "25"),
        ("≥ 40 / ≥ 104", "30"),
    ], TEAL),
    ("Tachycardia (bpm)", [
        ("90–109", "5"),
        ("110–119", "10"),
        ("120–129", "15"),
        ("130–139", "20"),
        ("≥ 140", "25"),
    ], NAVY),
    ("CNS Dysfunction", [
        ("None", "0"),
        ("Mild agitation", "10"),
        ("Delirium / psychosis / lethargy", "20"),
        ("Coma / seizures", "30"),
    ], RED),
    ("Heart Failure", [
        ("Absent", "0"),
        ("Mild (pedal oedema)", "5"),
        ("Moderate (bibasal rales)", "10"),
        ("Pulmonary oedema", "15"),
    ], ORANGE),
    ("AF present", [("Yes", "10"), ("No", "0")], RGBColor(0x7D, 0x3C, 0x98)),
    ("GI-Hepatic Sx", [
        ("None", "0"),
        ("N/V/Diarrhoea", "10"),
        ("Jaundice", "20"),
    ], GREEN),
    ("Precipitant", [("Present", "10"), ("Absent", "0")], GOLD),
]

col_w = 4.55
col_positions = [0.35, 4.95]
row_top = 1.2
col_idx = 0
row_y = row_top

for ci, (cat_title, entries, clr) in enumerate(categories):
    x = col_positions[col_idx]
    add_rect(s, x, row_y, col_w, 0.34, clr)
    add_textbox(s, x+0.08, row_y+0.04, col_w-0.16, 0.28, cat_title, size=13, bold=True, color=WHITE)
    entry_h = 0.3
    for j, (criterion, score) in enumerate(entries):
        ey = row_y + 0.34 + j*entry_h
        bg = WHITE if j % 2 == 0 else RGBColor(0xF5, 0xF8, 0xFC)
        add_rect(s, x, ey, col_w-0.6, entry_h, bg)
        add_rect(s, x+col_w-0.6, ey, 0.6, entry_h, RGBColor(0xE8, 0xF0, 0xFE))
        add_textbox(s, x+0.08, ey+0.02, col_w-0.76, entry_h-0.04, criterion, size=11, color=DARK_TEXT)
        add_textbox(s, x+col_w-0.56, ey+0.02, 0.5, entry_h-0.04, score, size=12, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
    row_y += 0.34 + len(entries)*entry_h + 0.12
    if row_y > 6.5 or ci == 2:
        col_idx += 1
        row_y = row_top

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 8: Investigations
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Investigations", "Do NOT delay treatment waiting for results")
footer(s)

# Warning banner
add_rect(s, 0.35, 1.15, 12.6, 0.5, RED)
add_textbox(s, 0.5, 1.2, 12.3, 0.38,
    "⚠  Thyroid storm is a CLINICAL diagnosis — NEVER delay treatment waiting for labs",
    size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

inv_cols = [
    ("Thyroid Function Tests", [
        "TSH: suppressed / undetectable",
        "Free T4 and Free T3: elevated",
        "Total T3/T4: may or may NOT be elevated",
        "Note: labs may be indistinguishable from uncomplicated thyrotoxicosis",
    ], TEAL),
    ("Haematology / Chemistry", [
        "FBC: leukocytosis (infection), anaemia",
        "Blood glucose: hypo- or hyperglycaemia",
        "Electrolytes: hyponatraemia (GI losses)",
        "Serum calcium: hypercalcaemia may occur",
        "LFTs: elevated in up to 30% on ATDs",
        "Serum cortisol: high expected; low → adrenal insufficiency",
    ], NAVY),
    ("Imaging / Monitoring", [
        "CXR: infection as precipitant, pulmonary oedema",
        "ECG: sinus tachycardia, AF, PVCs, heart block",
        "Bedside echo: high output failure, LV function",
        "CT brain (if needed): exclude CNS precipitant",
        "Blood cultures, urinalysis (search for sepsis)",
        "Continuous cardiac monitoring, pulse oximetry",
    ], ORANGE),
]

for i, (title, items, clr) in enumerate(inv_cols):
    x = 0.35 + i * 4.35
    add_rect(s, x, 1.75, 4.2, 0.38, clr)
    add_textbox(s, x+0.1, 1.77, 4.0, 0.32, title, size=14, bold=True, color=WHITE)
    add_rect(s, x, 2.13, 4.2, 4.8, WHITE)
    tb = s.shapes.add_textbox(Inches(x+0.15), Inches(2.2), Inches(3.9), Inches(4.6))
    tf=tb.text_frame; tf.word_wrap=True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    first=True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first=False; p.space_before=Pt(4)
        run=p.add_run(); run.text=f"●  {item}"
        run.font.name="Calibri"; run.font.size=Pt(13); run.font.color.rgb=DARK_TEXT

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 9: Treatment Overview — The 7-Step Approach
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Management: The 7-Step Approach", "Sequence matters — iodine MUST come after thionamide (≥1 hour)")
footer(s)

steps_data = [
    ("1", "Supportive Care", "O₂, IV access, monitoring, cooling, IVF + dextrose, antipyretics (paracetamol only — avoid aspirin!)", TEAL),
    ("2", "Block Adrenergic Effects", "Propranolol IV/PO  |  Esmolol infusion if needed  |  Avoid β-blockers if severe bronchospasm", NAVY),
    ("3", "Inhibit New Hormone Synthesis", "Thionamide FIRST: PTU 500–1000 mg load then 250 mg q4h  OR  Methimazole 20 mg q6h PO", RED),
    ("4", "Inhibit Hormone Release", "≥1 h AFTER Step 3 → Lugol's iodine 8–10 drops q6–8h  OR  SSKI 5 drops q6h", ORANGE),
    ("5", "Block T4→T3 Conversion", "Hydrocortisone 300 mg IV then 100 mg q8h  OR  Dexamethasone 2–4 mg IV q6h", GREEN),
    ("6", "Treat the Precipitant", "Empirical antibiotics if infection suspected  |  Identify and treat underlying cause", RGBColor(0x7D, 0x3C, 0x98)),
    ("7", "Prevent Reabsorption", "Cholestyramine 1–4 g PO BD for refractory / severe cases (blocks enterohepatic recirculation)", GOLD),
]

for i, (num, title, detail, clr) in enumerate(steps_data):
    y = 1.2 + i * 0.84
    add_rect(s, 0.35, y, 0.6, 0.72, clr)
    add_textbox(s, 0.35, y+0.1, 0.6, 0.52, num, size=24, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(s, 0.95, y, 2.8, 0.72, RGBColor(0xEE, 0xF2, 0xF7))
    add_textbox(s, 1.05, y+0.12, 2.65, 0.52, title, size=15, bold=True, color=clr)
    add_rect(s, 3.75, y, 9.2, 0.72, WHITE)
    add_textbox(s, 3.85, y+0.1, 9.0, 0.58, detail, size=13, color=DARK_TEXT)

add_rect(s, 0.35, 7.08, 12.6, 0.1, ORANGE)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 10: Drug Doses — Quick Reference
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Drug Doses — Quick Reference Card", "Core pharmacotherapy of thyroid storm")
footer(s)

drug_table = [
    ("CLASS",            "DRUG",              "DOSE / ROUTE",                                  "NOTES",                              "HDR"),
    ("β-Blocker",        "Propranolol",        "0.5–1 mg IV over 10 min; repeat 1–2 mg q few h\nOR 60–80 mg PO q4h",
                                               "Drug of choice; blocks T4→T3 peripherally",   False),
    ("",                 "Esmolol",            "250–500 µg/kg IV load then 50–100 µg/kg/min",  "Preferred if bronchospasm concern",   False),
    ("Thionamide",       "PTU",                "500–1000 mg PO load, then 250 mg q4h",         "Also blocks T4→T3; preferred in 1st trimester", False),
    ("",                 "Methimazole",        "20 mg q6h PO",                                 "AVOID in 1st trimester; faster onset", False),
    ("Iodine",           "Lugol's solution",   "8–10 drops PO q6–8h",                          "≥1 h AFTER thionamide",               False),
    ("",                 "SSKI",               "5 drops (250 mg) PO q6h",                      "≥1 h AFTER thionamide",               False),
    ("Steroid",          "Hydrocortisone",     "300 mg IV then 100 mg q8h",                    "Blocks T4→T3; treats relative adrenal insufficiency", False),
    ("",                 "Dexamethasone",      "2–4 mg IV q6h",                                "Alternative to hydrocortisone",        False),
    ("Bile acid resin",  "Cholestyramine",     "1–4 g PO BD",                                  "Blocks enterohepatic recirculation; refractory cases", False),
    ("Antipyretic",      "Paracetamol",        "325–650 mg PO/PR q4–6h",                       "⚠ AVOID aspirin — displaces T4 from binding proteins", False),
]

col_ws = [1.7, 1.9, 4.2, 4.4]
col_xs_t = [0.35, 2.05, 3.95, 8.15]
col_labels = ["CLASS", "DRUG", "DOSE / ROUTE", "NOTES"]

# Header
for j, (cx, cw, label) in enumerate(zip(col_xs_t, col_ws, col_labels)):
    add_rect(s, cx, 1.15, cw, 0.38, NAVY)
    add_textbox(s, cx+0.07, 1.17, cw-0.14, 0.32, label, size=13, bold=True, color=WHITE)

for i, row in enumerate(drug_table[1:]):
    clss, drug, dose, note, _ = row
    y = 1.53 + i * 0.54
    bg = WHITE if i % 2 == 0 else RGBColor(0xF2, 0xF5, 0xFA)
    for j, (cx, cw, val) in enumerate(zip(col_xs_t, col_ws, [clss, drug, dose, note])):
        add_rect(s, cx, y, cw, 0.54, bg)
        clr = TEAL if j == 0 and val else (RED if j == 1 else DARK_TEXT)
        add_textbox(s, cx+0.07, y+0.04, cw-0.12, 0.46, val, size=11, color=clr,
                    bold=(j in [0, 1]))

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 11: Management of Specific Complications
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Managing Specific Complications", "Targeted therapy beyond the 7-step approach")
footer(s)

comps = [
    ("Atrial Fibrillation (10–35%)", [
        "Rate control with IV propranolol (preferred) or esmolol",
        "Avoid digoxin as first-line (needs high doses; risk of toxicity)",
        "Cardioversion often unsuccessful until euthyroid state restored",
        "Anticoagulation: consider if AF persists >48 h",
    ], NAVY),
    ("High-Output Cardiac Failure", [
        "Cautious diuresis (furosemide)",
        "Beta-blockers reduce heart rate and afterload",
        "Avoid vasodilators if hypotensive",
        "ICU-level monitoring required",
    ], RED),
    ("Hyperthermia", [
        "Paracetamol 325–650 mg q4–6h (NOT aspirin — raises free T4)",
        "Active cooling: ice packs, cooling blanket, ice lavage",
        "Target temperature <38.5°C",
    ], ORANGE),
    ("Agitation / Seizures", [
        "Lorazepam 1–2 mg IV or diazepam 5–10 mg IV",
        "Reduces central sympathetic outflow",
        "If seizures: standard AED protocol",
    ], TEAL),
    ("Adrenal Insufficiency (suspected)", [
        "Low cortisol despite expected stress response",
        "Hydrocortisone covers both relative AI and blocks T4→T3",
        "Do not wait for formal testing — treat empirically",
    ], GREEN),
    ("Refractory / Severe Cases", [
        "Plasmapheresis / thyroid hormone plasma exchange",
        "Emergency thyroidectomy (last resort)",
        "ECMO support in cardiovascular collapse",
        "Cholestyramine for enterohepatic recirculation",
    ], RGBColor(0x6C, 0x3A, 0x83)),
]

for i, (title, items, clr) in enumerate(comps):
    col = i % 3
    row = i // 3
    x = 0.35 + col * 4.35
    y = 1.2 + row * 3.05
    add_rect(s, x, y, 4.2, 0.36, clr)
    add_textbox(s, x+0.1, y+0.04, 4.0, 0.28, title, size=13, bold=True, color=WHITE)
    add_rect(s, x, y+0.36, 4.2, 2.55, WHITE)
    tb = s.shapes.add_textbox(Inches(x+0.15), Inches(y+0.44), Inches(3.9), Inches(2.3))
    tf=tb.text_frame; tf.word_wrap=True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    first=True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first=False; p.space_before=Pt(3)
        run=p.add_run(); run.text=f"●  {item}"
        run.font.name="Calibri"; run.font.size=Pt(12.5); run.font.color.rgb=DARK_TEXT

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 12: Thyroid Storm in Pregnancy
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Special Population: Thyroid Storm in Pregnancy", "Drug safety and obstetric considerations")
footer(s)

add_rect(s, 0.35, 1.15, 12.6, 0.5, RGBColor(0x7D, 0x3C, 0x98))
add_textbox(s, 0.5, 1.2, 12.3, 0.38,
    "Thyroid storm in pregnancy carries HIGH maternal and fetal mortality — early obstetric and endocrine consultation is MANDATORY",
    size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

left_items = [
    ("Drug Choices in Pregnancy", [
        "PTU preferred in 1st trimester (methimazole teratogenic)",
        "Methimazole safe from 2nd trimester onwards",
        "Propranolol: safe short-term; prolonged use → IUGR, neonatal bradycardia",
        "Lugol's iodine: use with caution; may cause fetal hypothyroidism",
        "Steroids: hydrocortisone / betamethasone preferred",
        "⚠ PTU: rare severe maternal hepatotoxicity — monitor LFTs",
    ], TEAL),
]
right_items = [
    ("Precipitants Unique to Pregnancy", [
        "Hyperemesis gravidarum (hCG-driven hyperthyroidism)",
        "Hydatidiform mole (hCG-secreting tumor)",
        "Gestational thyrotoxicosis",
        "Labor, delivery, eclampsia",
    ], RGBColor(0x7D, 0x3C, 0x98)),
    ("Monitoring / Disposition", [
        "Continuous fetal monitoring in viable gestations",
        "MFM + Endocrinology + ICU team involvement",
        "ICU admission for mother",
        "Neonatal team on standby if delivery likely",
        "Radioactive iodine: CONTRAINDICATED in pregnancy",
    ], ORANGE),
]

for j, (title, items, clr) in enumerate(left_items):
    add_rect(s, 0.35, 1.75, 6.3, 0.36, clr)
    add_textbox(s, 0.45, 1.77, 6.1, 0.3, title, size=14, bold=True, color=WHITE)
    add_rect(s, 0.35, 2.11, 6.3, 4.95, WHITE)
    tb = s.shapes.add_textbox(Inches(0.5), Inches(2.18), Inches(6.0), Inches(4.7))
    tf=tb.text_frame; tf.word_wrap=True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    first=True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first=False; p.space_before=Pt(5)
        run=p.add_run(); run.text=f"●  {item}"
        run.font.name="Calibri"; run.font.size=Pt(14); run.font.color.rgb=DARK_TEXT

for j, (title, items, clr) in enumerate(right_items):
    y = 1.75 + j * 3.15
    add_rect(s, 6.85, y, 6.2, 0.36, clr)
    add_textbox(s, 6.95, y+0.04, 6.0, 0.3, title, size=14, bold=True, color=WHITE)
    add_rect(s, 6.85, y+0.36, 6.2, 2.62, WHITE)
    tb = s.shapes.add_textbox(Inches(7.0), Inches(y+0.44), Inches(5.9), Inches(2.4))
    tf=tb.text_frame; tf.word_wrap=True
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
    first=True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first=False; p.space_before=Pt(4)
        run=p.add_run(); run.text=f"●  {item}"
        run.font.name="Calibri"; run.font.size=Pt(13); run.font.color.rgb=DARK_TEXT

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 13: Differential Diagnosis
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Differential Diagnosis", "Conditions that mimic thyroid storm")
footer(s)

diffs = [
    ("Sympathomimetic Toxicity", "Cocaine, amphetamines, MDMA — tachycardia, hyperthermia, agitation. No goiter, no elevated TFTs.", TEAL),
    ("Anticholinergic Crisis", "Dry skin, urinary retention, mydriasis. Hot but dry. No sweating.", NAVY),
    ("Serotonin Syndrome", "Clonus (pathognomonic), hyperreflexia, rigidity. Drug history — SSRIs, MAOIs.", RED),
    ("Neuroleptic Malignant Syndrome", "Muscle rigidity, bradykinesia, lead-pipe rigidity. Antipsychotic use history.", ORANGE),
    ("Malignant Hyperthermia", "Triggering anaesthetic agents, masseter spasm, dramatically elevated CK.", GREEN),
    ("Heat Stroke", "Environmental exposure, no thyroid history, TFTs normal.", RGBColor(0x7D, 0x3C, 0x98)),
    ("Sepsis / Meningitis", "Can coexist as precipitant! CXR, blood cultures, LP if suspected.", RGBColor(0x0D, 0x6E, 0xFD)),
    ("Phaeochromocytoma", "Episodic hypertension, sweating. Elevated catecholamines, normal TFTs.", GOLD),
    ("Apathetic Hyperthyroidism (elderly)", "No classic adrenergic signs; weight loss, AF, weakness predominate. Easy to miss.", MID_GREY),
]

for i, (diag, desc, clr) in enumerate(diffs):
    col = i % 3
    row = i // 3
    x = 0.35 + col * 4.35
    y = 1.2 + row * 1.92
    add_rect(s, x, y, 4.2, 0.34, clr)
    add_textbox(s, x+0.1, y+0.04, 4.0, 0.28, diag, size=13, bold=True, color=WHITE)
    add_rect(s, x, y+0.34, 4.2, 1.44, WHITE)
    add_textbox(s, x+0.15, y+0.42, 3.9, 1.28, desc, size=12, color=DARK_TEXT)

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 14: Disposition & Prognosis
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
slide_bg(s)
header_bar(s, "Disposition, Prognosis & Definitive Treatment", "ICU admission is mandatory")
footer(s)

# Left column
add_rect(s, 0.35, 1.2, 6.15, 0.36, NAVY)
add_textbox(s, 0.45, 1.22, 5.95, 0.3, "IMMEDIATE DISPOSITION", size=14, bold=True, color=WHITE)
add_rect(s, 0.35, 1.56, 6.15, 2.6, WHITE)
disp_items = [
    "All thyroid storm patients → ICU admission",
    "Endocrinology consultation (emergency)",
    "If pregnant: Obstetrics + MFM + Neonatology",
    "Continuous cardiac monitoring + pulse oximetry",
    "Reassess BWPS score after 24–48 h of treatment",
    "Avoid premature discharge — storm can recur",
]
tb = s.shapes.add_textbox(Inches(0.5), Inches(1.62), Inches(5.8), Inches(2.4))
tf=tb.text_frame; tf.word_wrap=True; tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
first=True
for item in disp_items:
    p = tf.paragraphs[0] if first else tf.add_paragraph()
    first=False; p.space_before=Pt(4)
    run=p.add_run(); run.text=f"✔  {item}"
    run.font.name="Calibri"; run.font.size=Pt(13); run.font.color.rgb=DARK_TEXT

# Prognosis
add_rect(s, 0.35, 4.3, 6.15, 0.36, RED)
add_textbox(s, 0.45, 4.32, 5.95, 0.3, "PROGNOSIS & PREDICTORS OF DEATH", size=14, bold=True, color=WHITE)
add_rect(s, 0.35, 4.66, 6.15, 2.4, WHITE)
prog_items = [
    "Overall mortality with treatment: 10–30%",
    "Death: multiorgan failure, cardiac arrhythmia, HF, DIC, hypoxic brain injury",
    "Poor prognosis: jaundice, severe CNS depression, refractory HF",
    "Delayed recognition is the main preventable cause of death",
]
tb = s.shapes.add_textbox(Inches(0.5), Inches(4.72), Inches(5.8), Inches(2.2))
tf=tb.text_frame; tf.word_wrap=True; tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
first=True
for item in prog_items:
    p = tf.paragraphs[0] if first else tf.add_paragraph()
    first=False; p.space_before=Pt(4)
    run=p.add_run(); run.text=f"⚠  {item}"
    run.font.name="Calibri"; run.font.size=Pt(13); run.font.color.rgb=DARK_TEXT

# Right column
add_rect(s, 6.8, 1.2, 6.2, 0.36, GREEN)
add_textbox(s, 6.9, 1.22, 6.0, 0.3, "DEFINITIVE / LONG-TERM TREATMENT", size=14, bold=True, color=WHITE)
add_rect(s, 6.8, 1.56, 6.2, 5.5, WHITE)
def_items = [
    ("Radioactive Iodine (¹³¹I)", "First-line ablative therapy post-storm (after euthyroid). Contraindicated in pregnancy / breastfeeding.", GREEN),
    ("Thyroidectomy", "If RAI contraindicated, large goiter, or patient preference. Requires pre-op preparation to euthyroid state.", ORANGE),
    ("Long-term ATDs", "Thionamides for 12–18 months; remission in ~50% of Graves disease. Monitor CBC and LFTs.", TEAL),
    ("Treat underlying cause", "Address Graves disease with immunosuppression; toxic nodule with ablation or surgery.", NAVY),
]
cur_y = 1.65
for title, desc, clr in def_items:
    add_rect(s, 6.9, cur_y, 0.12, 1.12, clr)
    add_textbox(s, 7.1, cur_y+0.02, 5.8, 0.34, title, size=14, bold=True, color=clr)
    add_textbox(s, 7.1, cur_y+0.34, 5.7, 0.78, desc, size=12, color=DARK_TEXT)
    cur_y += 1.2

# ════════════════════════════════════════════════════════════════════════════
# SLIDE 15: Summary & Key Takeaways
# ════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, 13.333, 7.5, NAVY)
add_rect(s, 0, 0, 13.333, 1.1, RGBColor(0x0D, 0x23, 0x3A))
add_textbox(s, 0.4, 0.12, 12.5, 0.8, "KEY TAKEAWAYS", size=32, bold=True,
            color=WHITE, align=PP_ALIGN.LEFT)
add_rect(s, 0.4, 1.05, 0.08, 6.1, TEAL)

takeaways = [
    ("Thyroid storm = clinical diagnosis", "Do NOT wait for labs. If it looks like thyroid storm, treat it.", TEAL, WHITE),
    ("Burch-Wartofsky ≥ 45 → storm", "Score 25–44 = impending storm. Apply at bedside immediately.", GOLD, WHITE),
    ("7-Step treatment in order", "Steps 3 then 4 sequence is critical — iodine MUST follow thionamide by ≥1 hour.", RED, WHITE),
    ("Block, Block, Block — then Release", "β-Blocker → Thionamide → Iodine → Steroid → Treat precipitant", ORANGE, WHITE),
    ("Aspirin is CONTRAINDICATED", "Displaces thyroid hormone from binding proteins — raises free T4/T3 levels.", RED, WHITE),
    ("Mortality 10–30% even with treatment", "ICU admission, multidisciplinary team, and early endocrinology consultation save lives.", RGBColor(0x7D, 0x3C, 0x98), WHITE),
    ("Pregnancy: PTU in 1st trimester", "Methimazole teratogenic in 1st trimester. Obstetric + ICU + Endo team together.", RGBColor(0x0D, 0x6E, 0xFD), WHITE),
]

for i, (heading, detail, clr, txt_clr) in enumerate(takeaways):
    y = 1.15 + i * 0.84
    add_rect(s, 0.6, y, 4.5, 0.72, RGBColor(0x22, 0x44, 0x66))
    add_rect(s, 0.6, y, 0.22, 0.72, clr)
    add_textbox(s, 0.9, y+0.08, 4.1, 0.32, heading, size=14, bold=True, color=clr)
    add_textbox(s, 0.9, y+0.38, 4.1, 0.3, detail, size=11, color=RGBColor(0xCC, 0xDD, 0xEE))
    if i < len(takeaways) - 1:
        pass

# Two column summary on right
add_rect(s, 5.5, 1.15, 7.5, 5.88, RGBColor(0x0F, 0x2D, 0x4A))
add_rect(s, 5.5, 1.15, 7.5, 0.38, TEAL)
add_textbox(s, 5.6, 1.17, 7.3, 0.3, "MANAGEMENT AT A GLANCE", size=14, bold=True, color=WHITE)

mgt_summary = [
    ("STEP 1", "O₂ + IV access + Cardiac monitor + Cooling + IVF-D5W",   TEAL),
    ("STEP 2", "Propranolol IV (0.5–1 mg) or PO (60–80 mg q4h)",           NAVY),
    ("STEP 3", "PTU 500–1000 mg LOAD then 250 mg q4h  [or MMI 20 mg q6h]", RED),
    ("STEP 4", "≥1 h later: Lugol's 8–10 drops q6–8h  OR  SSKI 5 drops q6h", ORANGE),
    ("STEP 5", "Hydrocortisone 300 mg IV then 100 mg q8h",                 GREEN),
    ("STEP 6", "Treat precipitant — antibiotics if infection suspected",    RGBColor(0x7D, 0x3C, 0x98)),
    ("STEP 7", "Cholestyramine 1–4 g BD if refractory",                    GOLD),
    ("ADMIT", "ICU + Endocrinology + consider Plasmapheresis if refractory",RGBColor(0xC0, 0x39, 0x2B)),
]
for i, (step, detail, clr) in enumerate(mgt_summary):
    y = 1.63 + i * 0.67
    add_rect(s, 5.6, y, 1.1, 0.56, clr)
    add_textbox(s, 5.62, y+0.08, 1.06, 0.38, step, size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_textbox(s, 6.8, y+0.06, 6.1, 0.48, detail, size=12, color=RGBColor(0xEE, 0xF4, 0xFF))

add_rect(s, 0, 7.2, 13.333, 0.3, RGBColor(0x0D, 0x23, 0x3A))
add_textbox(s, 0.3, 7.22, 13.0, 0.22,
    "Sources: Tintinalli's Emergency Medicine 9e · Rosen's Emergency Medicine 10e · Katzung Pharmacology 16e · Goodman & Gilman 14e",
    size=9, color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.LEFT)

# ── Save ────────────────────────────────────────────────────────────────────
out_path = "/tmp/workspace/thyroid-storm-ppt/Thyroid_Storm_Management.pptx"
prs.save(out_path)
print(f"Saved: {out_path}")
Running Command

cd /tmp/workspace/thyroid-storm-ppt && python build_pptx.py 2>&1

Running Command

python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/thyroid-storm-ppt/Thyroid_Storm_Management.pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [] for shape in slide.shapes: if shape.has_text_frame: t = shape.text_frame.text.strip() if t: texts.append(t[:60]) print(f'Slide {i}: {texts[0] if texts else \"(empty)\"}') "

Your presentation is ready. Here is the download link:

Thyroid Storm Management

Presentation · PPTX


What's inside - all 15 slides

#SlideKey Content
1Title SlideStyled cover with subtitle
2Learning Objectives8 numbered objectives for PG students
3Definition & EpidemiologyDefinition, 10-30% treated mortality, key statistics
4Precipitants6 colour-coded categories (infection, surgical, CV, metabolic, drugs/iodine, obstetric)
5PathophysiologyFlow diagram: hyperthyroidism → precipitant → free T3/T4 surge → hyperadrenergic state → MOF
6Clinical Features5 system cards: thermoregulatory, cardiovascular, CNS, GI-hepatic, metabolic + clinical pearl
7Burch-Wartofsky ScoreFull scoring table with all domains + interpretation (≥45 storm / 25-44 impending / <25 unlikely)
8InvestigationsLabs, imaging, ECG with warning banner: "never delay treatment for labs"
97-Step ManagementColour-coded sequential steps with doses inline
10Drug Dose Quick ReferenceFull table: drug, dose/route, notes for every agent
11Specific ComplicationsAF, high-output HF, hyperthermia, seizures, adrenal insufficiency, refractory storm
12Thyroid Storm in PregnancyDrug safety by trimester, pregnancy-specific precipitants, multidisciplinary team
13Differential Diagnosis9 mimics: serotonin syndrome, NMS, MH, phaeochromocytoma, etc.
14Disposition & PrognosisICU admission, definitive therapy (RAI / thyroidectomy / ATDs)
15Key Takeaways + SummaryPearls + full management-at-a-glance quick card

Sources used: Tintinalli's Emergency Medicine 9e, Rosen's Emergency Medicine 10e, Katzung Pharmacology 16e, Goodman & Gilman 14e, and recent PubMed systematic reviews (2021-2025).
Important teaching points embedded in the deck:
  • Aspirin is contraindicated (displaces T4 from binding proteins) - paracetamol only
  • Iodine must come ≥1 hour after thionamide - giving iodine first can worsen the storm
  • PTU is preferred over methimazole in the first trimester of pregnancy
  • The BWPS has not been formally validated for sensitivity/specificity - clinical judgement remains essential
This is a shared conversation. Sign in to Orris to start your own chat.