Suggest best topic list for md medicine resident to present seminar in neurology posting
| # | Topic | Why It Stands Out |
|---|---|---|
| 1 | Autoimmune Encephalitis | Rapidly evolving field, clinically relevant |
| 2 | Acute Stroke Management | High stakes, protocol-driven |
| 3 | Status Epilepticus | Practical, emergency-focused |
| 4 | GBS vs MG crisis | Neuromuscular emergencies |
| 5 | Tuberculous Meningitis | Tropical relevance, complex management |
Create a PPT presentation on any of these neurology topics
autoimmune encephalitis diagnosis treatment
autoimmune encephalitis NMDA receptor MRI brain

This diagnostic image series presents axial 18F-FDG PET/MRI brain scans demonstrating metabolic patterns in autoimmune encephalitis. The images utilize statistical parametric mapping (SPM) with color-coding: red-to-yellow indicates hypermetabolism and blue-to-green indicates hypometabolism. Row A (Anti-NMDA receptor encephalitis vs. controls) reveals focal temporomesial (hippocampal/parahippocampal) hypermetabolism alongside widespread hypometabolism in the precuneus, parietal, and posterior cingulate cortex. Row B (Anti-LGI1 encephalitis vs. controls) shows hypermetabolism in the basal ganglia, cerebellum, and precentral regions, with hypometabolism limited to the frontomesial/anterior cingulate cortex. Row C (Direct comparison: Anti-NMDA vs. Anti-LGI1) highlights that anti-NMDA patients have relatively higher metabolism in frontotemporal regions but significantly lower metabolism in the precuneus and parietal/occipital cortices compared to anti-LGI1 patients. This comparison illustrates the distinct metabolic signatures used to differentiate between specific autoimmune encephalitides in a clinical neurology and nuclear medicine context.

This diagnostic imaging panel consists of six axial brain MRI scans (a-f) illustrating the progression and resolution of lesions in a patient with anti-NMDA receptor encephalitis. The images are organized into three timepoints, each featuring Fluid-Attenuated Inversion Recovery (FLAIR) and Diffusion-Weighted Imaging (DWI) sequences. (a, b) Initial scans show prominent, focal hyperintense lesions in the bilateral subcortical white matter, most notably in the left hemisphere. (c, d) One month following plasma exchange, there is significant interval reduction in the size and signal intensity of these lesions, representing partial resolution. (e, f) At the two-month follow-up, the final FLAIR and DWI images demonstrate complete resolution of the previous abnormalities, with the subcortical white matter appearing normal. The series highlights the neuroimaging manifestations of autoimmune encephalitis and the typical radiologic response to therapeutic intervention.

Diagnostic axial brain MRI series comprising FLAIR (A), DWI (B), and ADC (C) sequences. The images demonstrate significant pathology in a patient diagnosed with anti-NMDA receptor encephalitis. Image A (FLAIR) reveals an area of hyperintense cortical signal in the right temporo-occipital region (blue arrow) alongside symmetric hyperintensity within the bilateral pulvinar nuclei of the thalamus (yellow arrow), a finding known as the 'pulvinar sign.' Correlation with diffusion-weighted imaging (B) and apparent diffusion coefficient maps (C) shows true restricted diffusion in these areas, characterized by high signal on DWI and corresponding low signal on ADC. These findings illustrate the classic neuroimaging manifestations of autoimmune encephalitis, where inflammatory processes lead to cytotoxic edema and cortical ribboning. The series is used to teach diagnostic imaging patterns for paraneoplastic and autoimmune central nervous system disorders.

This diagnostic imaging panel consists of axial brain MRI slices from a pediatric patient, demonstrating radiological findings associated with anti-NMDA receptor encephalitis. The panel includes three sequences: T2-weighted imaging (A, B), Fluid-Attenuated Inversion Recovery (FLAIR) (C, D), and Diffusion-Weighted Imaging (DWI) (E, F). The images reveal significant hyperintense (high signal) abnormalities localized to the right temporal lobe, insula, and frontal cingulate gyrus. These lesions exhibit a characteristic lamellar morphology along the cortical and subcortical regions. T2WI (A, B) shows increased signal intensity indicative of vasogenic edema or inflammation. FLAIR images (C, D) highlight these same regions by suppressing cerebrospinal fluid signal, emphasizing the cortical involvement. DWI scans (E, F) demonstrate restricted diffusion within the affected areas, suggesting acute inflammatory cytotoxic changes. These multi-sequence findings are key diagnostic indicators for autoimmune encephalitis in clinical settings, particularly when presenting with pediatric convulsions and anti-NMDAR antibody positivity.
mkdir -p /tmp/workspace/autoimmune-encephalitis-ppt && ls /tmp/workspace/
~/autoimmune-encephalitis-ppt/create_ppt.py
"""
Autoimmune Encephalitis - Comprehensive Neurology Seminar PPT
MD Medicine Resident Presentation
"""
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 json, subprocess, base64
from io import BytesIO
# ── Color Palette ────────────────────────────────────────────────
DARK_NAVY = RGBColor(0x0D, 0x1B, 0x2A) # deep navy for title bars
MED_BLUE = RGBColor(0x1A, 0x6F, 0xAA) # medium blue accents
LIGHT_BLUE = RGBColor(0xE8, 0xF4, 0xFD) # soft background
TEAL = RGBColor(0x00, 0x8B, 0x8B) # teal for highlights
ACCENT_RED = RGBColor(0xC0, 0x39, 0x2B) # red for alerts/warnings
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GRAY = RGBColor(0xF5, 0xF5, 0xF5)
DARK_GRAY = RGBColor(0x2C, 0x3E, 0x50)
GOLD = RGBColor(0xF3, 0x9C, 0x12)
GREEN = RGBColor(0x1E, 0x8B, 0x4C)
# ── Helpers ──────────────────────────────────────────────────────
def add_rect(slide, left, top, width, height, fill_color, alpha=None):
shape = slide.shapes.add_shape(
1, # MSO_SHAPE_TYPE.RECTANGLE
Inches(left), Inches(top), Inches(width), Inches(height)
)
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
shape.line.fill.background()
return shape
def add_textbox(slide, left, top, width, height, text, font_size=18,
bold=False, color=DARK_GRAY, align=PP_ALIGN.LEFT,
italic=False, wrap=True, font_name="Calibri"):
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 = font_name
return tb
def add_multiline_textbox(slide, left, top, width, height, lines,
font_size=14, color=DARK_GRAY, bold=False,
line_spacing_pt=None, font_name="Calibri",
bullet_char="•"):
"""lines = list of (text, bold, color, size) tuples or plain strings"""
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, line in enumerate(lines):
if isinstance(line, str):
txt, b, c, sz = line, bold, color, font_size
else:
txt = line[0]
b = line[1] if len(line) > 1 else bold
c = line[2] if len(line) > 2 else color
sz = line[3] if len(line) > 3 else font_size
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.alignment = PP_ALIGN.LEFT
run = p.add_run()
run.text = txt
run.font.size = Pt(sz)
run.font.bold = b
run.font.color.rgb = c
run.font.name = font_name
if line_spacing_pt:
from pptx.oxml.ns import qn
from lxml import etree
pPr = p._pPr if p._pPr is not None else p._p.get_or_add_pPr()
lnSpc = etree.SubElement(pPr, qn('a:lnSpc'))
spcPts = etree.SubElement(lnSpc, qn('a:spcPts'))
spcPts.set('val', str(int(line_spacing_pt * 100)))
return tb
def title_slide_header(slide, title_text, subtitle_text=""):
"""Full-bleed dark navy header for title slide"""
add_rect(slide, 0, 0, 13.333, 7.5, DARK_NAVY)
# decorative accent bar
add_rect(slide, 0, 5.8, 13.333, 0.12, TEAL)
add_rect(slide, 0, 5.92, 13.333, 0.12, GOLD)
def section_header(slide, title, subtitle="", icon=""):
"""Slide with colored top bar"""
add_rect(slide, 0, 0, 13.333, 1.35, DARK_NAVY)
add_rect(slide, 0, 1.35, 13.333, 0.07, TEAL)
add_textbox(slide, 0.35, 0.18, 12.5, 1.0, title,
font_size=28, bold=True, color=WHITE,
align=PP_ALIGN.LEFT, font_name="Calibri")
if subtitle:
add_textbox(slide, 0.35, 0.85, 12.0, 0.5, subtitle,
font_size=14, bold=False, color=RGBColor(0xA8, 0xD8, 0xEA),
align=PP_ALIGN.LEFT)
def footer(slide, text="Autoimmune Encephalitis | MD Medicine Neurology Seminar"):
add_rect(slide, 0, 7.15, 13.333, 0.35, DARK_NAVY)
add_textbox(slide, 0.3, 7.17, 12.5, 0.28, text,
font_size=9, color=RGBColor(0xB0, 0xC4, 0xDE),
align=PP_ALIGN.LEFT)
def colored_box(slide, left, top, width, height, fill, text, text_size=13,
text_color=WHITE, bold=False):
add_rect(slide, left, top, width, height, fill)
add_textbox(slide, left+0.08, top+0.05, width-0.16, height-0.1,
text, font_size=text_size, color=text_color, bold=bold, wrap=True)
# ── Create Presentation ──────────────────────────────────────────
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]
# ═══════════════════════════════════════════════════════════════
# SLIDE 1 – TITLE SLIDE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_NAVY)
add_rect(slide, 0, 5.9, 13.333, 0.15, TEAL)
add_rect(slide, 0, 6.05, 13.333, 0.15, GOLD)
# Brain icon placeholder (decorative circle)
add_rect(slide, 9.8, 0.8, 2.8, 2.8, MED_BLUE)
add_textbox(slide, 9.8, 0.8, 2.8, 2.8, "🧠",
font_size=80, align=PP_ALIGN.CENTER, color=WHITE)
add_textbox(slide, 0.6, 0.5, 8.8, 0.6,
"MD MEDICINE NEUROLOGY SEMINAR",
font_size=14, bold=False, color=TEAL, font_name="Calibri")
add_textbox(slide, 0.6, 1.15, 8.8, 2.0,
"AUTOIMMUNE\nENCEPHALITIS",
font_size=52, bold=True, color=WHITE,
align=PP_ALIGN.LEFT, font_name="Calibri")
add_textbox(slide, 0.6, 3.3, 8.8, 0.55,
"Pathophysiology • Diagnosis • Management",
font_size=20, bold=False,
color=RGBColor(0xA8, 0xD8, 0xEA), font_name="Calibri")
add_textbox(slide, 0.6, 4.0, 8.8, 0.45,
"Based on: Adams & Victor's Neurology 12e | Harrison's 22e | Goldman-Cecil Medicine | Washington Manual",
font_size=11, color=RGBColor(0x7F, 0x9F, 0xBF))
add_textbox(slide, 0.6, 5.3, 8.8, 0.4,
"Presented by: MD Medicine Resident | Department of Neurology",
font_size=13, color=RGBColor(0xCC, 0xDD, 0xEE))
# ═══════════════════════════════════════════════════════════════
# SLIDE 2 – OVERVIEW / TABLE OF CONTENTS
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Overview", "What we will cover today")
topics = [
("1", "Introduction & Historical Perspective"),
("2", "Epidemiology & Incidence"),
("3", "Classification of Autoimmune Encephalitis"),
("4", "Pathophysiology & Mechanisms"),
("5", "Anti-NMDA Receptor Encephalitis (NMDAR-E)"),
("6", "Other Antibody Syndromes: LGI1, CASPR2, AMPAR, GABA"),
("7", "Paraneoplastic vs. Non-Paraneoplastic AE"),
("8", "Clinical Presentation & Phases"),
("9", "APE2 Score – Predicting Antibody Positivity"),
("10", "Investigations – MRI, EEG, CSF"),
("11", "Antibody Testing Strategy"),
("12", "Diagnostic Criteria (Graus 2016)"),
("13", "Differential Diagnosis"),
("14", "Immunotherapy – First Line"),
("15", "Immunotherapy – Second & Third Line"),
("16", "Tumor Search & Oncologic Treatment"),
("17", "Monitoring, Relapse & Long-term Follow-up"),
("18", "Special Populations: Pediatric & Pregnancy"),
("19", "Checkpoint Inhibitor-Related AE"),
("20", "Prognosis & mRS"),
("21", "Case Vignette"),
("22", "Key Takeaways & References"),
]
col_lines_left = topics[:11]
col_lines_right = topics[11:]
def toc_lines(items):
result = []
for num, text in items:
result.append((f" {num}. {text}", False, DARK_GRAY, 12))
return result
add_rect(slide, 0.4, 1.55, 6.1, 5.7, WHITE)
add_rect(slide, 6.85, 1.55, 6.1, 5.7, WHITE)
add_multiline_textbox(slide, 0.5, 1.65, 5.9, 5.5, toc_lines(col_lines_left),
font_size=12, line_spacing_pt=16)
add_multiline_textbox(slide, 6.95, 1.65, 5.9, 5.5, toc_lines(col_lines_right),
font_size=12, line_spacing_pt=16)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 3 – INTRODUCTION & HISTORY
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Introduction", "A Paradigm Shift in Neurology")
add_rect(slide, 0.4, 1.55, 12.5, 5.7, WHITE)
intro_lines = [
("What is Autoimmune Encephalitis?", True, MED_BLUE, 17),
("", False, DARK_GRAY, 8),
(" • Brain inflammation caused by misdirected immune responses against neuronal or glial antigens", False, DARK_GRAY, 13),
(" • Distinct from infectious encephalitis – no pathogen; treatment is immunotherapy not antibiotics", False, DARK_GRAY, 13),
(" • NOW accounts for ~25% of all encephalitis cases – as common as infectious encephalitis", False, DARK_NAVY, 13),
(" • A TREATABLE cause of encephalopathy, psychosis, seizures, and movement disorders", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 8),
("Historical Milestones", True, MED_BLUE, 17),
("", False, DARK_GRAY, 8),
(" 1960s–1990s: Limbic encephalitis first described as a paraneoplastic syndrome", False, DARK_GRAY, 13),
(" 2004: VGKC antibodies identified in limbic encephalitis", False, DARK_GRAY, 13),
(" 2007: Anti-NMDA receptor encephalitis described by Dalmau et al.", False, DARK_GRAY, 13),
(" 2010s: Explosion of new antibody discoveries (LGI1, CASPR2, AMPAR, GABA-B...)", False, DARK_GRAY, 13),
(" 2016: Graus et al. publish consensus diagnostic criteria", False, DARK_GRAY, 13),
(" 2020s: Checkpoint inhibitor-related AE recognized; new biomarkers in development", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 8),
(' "Autoimmune encephalitis is now estimated to have an incidence similar to infectious encephalitis"', True, TEAL, 13),
(" — Adams & Victor's Neurology, 12th Edition", False, TEAL, 11),
]
add_multiline_textbox(slide, 0.55, 1.65, 12.2, 5.5, intro_lines, line_spacing_pt=15)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 4 – EPIDEMIOLOGY
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Epidemiology", "Incidence, Demographics & Risk Factors")
# 4 stat boxes
stats = [
(MED_BLUE, "~25%", "of all encephalitis\ncases are autoimmune"),
(TEAL, "1–2 / 100,000","annual incidence\n(comparable to viral encephalitis)"),
(GREEN, "F > M", "Anti-NMDAR-E predominantly\nyoung women (F:M = 8:1)"),
(ACCENT_RED, "38–56%", "misdiagnosed initially\nas psychiatric illness"),
]
for i, (color, big, small) in enumerate(stats):
x = 0.4 + i * 3.2
add_rect(slide, x, 1.55, 3.0, 2.2, color)
add_textbox(slide, x+0.1, 1.65, 2.8, 1.0, big,
font_size=30, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(slide, x+0.1, 2.65, 2.8, 0.9, small,
font_size=12, color=WHITE, align=PP_ALIGN.CENTER)
add_rect(slide, 0.4, 3.95, 12.5, 3.3, WHITE)
epi_lines = [
("Key Epidemiological Points", True, MED_BLUE, 16),
("", False, DARK_GRAY, 6),
(" • Anti-NMDAR encephalitis: most common autoimmune encephalitis; predominantly young women; associated with ovarian teratoma in 38–56%", False, DARK_GRAY, 13),
(" • Anti-LGI1 encephalitis: more common in older men (median age ~65 years); rarely paraneoplastic (<10%)", False, DARK_GRAY, 13),
(" • Paraneoplastic AE: overall incidence 0.5–1% of cancer patients; higher in SCLC (2–3%) and thymoma (30–50%)", False, DARK_GRAY, 13),
(" • In 60% of paraneoplastic cases, neurologic symptoms PRECEDE cancer diagnosis by months", False, DARK_GRAY, 13),
(" • Checkpoint inhibitor-associated AE: infrequent (~0.1–0.2%) but rising with immunotherapy use", False, DARK_GRAY, 13),
(" • Pediatric AE: often presents as new-onset refractory status epilepticus or acute psychiatric syndrome", False, DARK_GRAY, 13),
]
add_multiline_textbox(slide, 0.55, 4.05, 12.2, 3.1, epi_lines, line_spacing_pt=15)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 5 – CLASSIFICATION
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Classification of Autoimmune Encephalitis")
# Left box
add_rect(slide, 0.35, 1.55, 6.1, 5.7, WHITE)
left_lines = [
("By ANTIGEN LOCATION", True, MED_BLUE, 15),
("", False, DARK_GRAY, 6),
("CELL-SURFACE / SYNAPTIC ANTIGENS", True, TEAL, 13),
(" • Directly pathogenic – antibody binding alters receptor/channel function", False, DARK_GRAY, 12),
(" • Respond well to immunotherapy", False, GREEN, 12),
(" • Examples:", False, DARK_GRAY, 12),
(" – NMDA receptor (NR1 subunit)", False, DARK_GRAY, 12),
(" – LGI1 (VGKC-complex)", False, DARK_GRAY, 12),
(" – CASPR2, AMPA-R, GABA-A, GABA-B", False, DARK_GRAY, 12),
(" – DPPX, IgLON5, mGluR1, GlyR", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 6),
("INTRACELLULAR ANTIGENS (Onconeuronal)", True, ACCENT_RED, 13),
(" • T-cell mediated cytotoxicity – poorly reversible", False, DARK_GRAY, 12),
(" • Strong cancer association (>70%)", False, ACCENT_RED, 12),
(" • Examples:", False, DARK_GRAY, 12),
(" – Anti-Hu (ANNA-1): SCLC", False, DARK_GRAY, 12),
(" – Anti-Yo (PCA-1): Ovary, Breast", False, DARK_GRAY, 12),
(" – Anti-Ma2: Testicular seminoma", False, DARK_GRAY, 12),
(" – Anti-CV2 (CRMP-5): SCLC, Thymoma", False, DARK_GRAY, 12),
]
add_multiline_textbox(slide, 0.45, 1.65, 5.9, 5.5, left_lines, line_spacing_pt=14)
# Right box
add_rect(slide, 6.85, 1.55, 6.1, 5.7, WHITE)
right_lines = [
("By TUMOR ASSOCIATION (Harrison's 22e)", True, MED_BLUE, 15),
("", False, DARK_GRAY, 6),
("HIGH RISK (>70% probability of cancer)", True, ACCENT_RED, 13),
(" Anti-Hu, Anti-Yo, Anti-Ri, Anti-CV2, Anti-Ma2, Anti-Tr", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
("INTERMEDIATE RISK (30–70%)", True, GOLD, 13),
(" Anti-NMDAR, Anti-AMPAR, Anti-GABA-B,", False, DARK_GRAY, 12),
(" Anti-GABA-A, Anti-glycine-R", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
("LOW RISK (<30%)", True, GREEN, 13),
(" Anti-LGI1, Anti-CASPR2, Anti-DPPX,", False, DARK_GRAY, 12),
(" Anti-GAD65, Anti-mGluR1, Anti-IgLON5", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 6),
("By ETIOLOGY", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" ① Paraneoplastic (tumor-triggered)", False, DARK_GRAY, 12),
(" ② Non-paraneoplastic / Primary autoimmune", False, DARK_GRAY, 12),
(" ③ Secondary – Systemic autoimmune disease", False, DARK_GRAY, 12),
(" (Hashimoto, Sjogren, SLE, RA)", False, DARK_GRAY, 12),
(" ④ Immune checkpoint inhibitor-associated", False, DARK_GRAY, 12),
]
add_multiline_textbox(slide, 6.95, 1.65, 5.9, 5.5, right_lines, line_spacing_pt=14)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 6 – PATHOPHYSIOLOGY
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Pathophysiology", "How does the immune system attack the brain?")
add_rect(slide, 0.4, 1.55, 12.5, 5.7, WHITE)
path_lines = [
("CELL-SURFACE ANTIBODY MECHANISM (e.g., Anti-NMDAR)", True, MED_BLUE, 16),
("", False, DARK_GRAY, 5),
(" STEP 1: Immune trigger – Tumor (ovarian teratoma expressing NR1) OR viral prodrome (HSV) OR unknown trigger", False, DARK_GRAY, 13),
(" STEP 2: B-cells produce IgG antibodies against NR1 subunit of NMDA receptor", False, DARK_GRAY, 13),
(" STEP 3: Antibodies cross blood-brain barrier → bind NMDA receptors on neurons", False, DARK_GRAY, 13),
(" STEP 4: Receptor internalization / crosslinking → reduced NMDA-R surface density", False, DARK_GRAY, 13),
(" STEP 5: Loss of NMDA-R function in GABAergic interneurons → DISINHIBITION of glutamate", False, DARK_GRAY, 13),
(" STEP 6: Cortical hyperexcitability → seizures, psychosis, movement disorders", False, DARK_GRAY, 13),
(" STEP 7: Antibody removal (immunotherapy / tumor resection) → clinical RECOVERY", False, GREEN, 13),
("", False, DARK_GRAY, 6),
("INTRACELLULAR ANTIGEN MECHANISM (e.g., Anti-Hu)", True, ACCENT_RED, 16),
("", False, DARK_GRAY, 5),
(" • Tumor expresses ectopic neuronal proteins → activates tumor-reactive T-cells", False, DARK_GRAY, 13),
(" • CD4+ and CD8+ T-cells infiltrate CNS → direct cytotoxic neuronal injury", False, DARK_GRAY, 13),
(" • Microglial activation + gliosis + irreversible neuronal loss", False, DARK_GRAY, 13),
(" • Antibodies are biomarkers; T-cells drive the damage → POOR response to immunotherapy", False, ACCENT_RED, 13),
("", False, DARK_GRAY, 5),
(' ⚡ Key clinical implication: Cell-surface AE is potentially FULLY REVERSIBLE; intracellular AE is not', True, TEAL, 13),
]
add_multiline_textbox(slide, 0.55, 1.65, 12.2, 5.5, path_lines, line_spacing_pt=14)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 7 – ANTI-NMDA RECEPTOR ENCEPHALITIS
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Anti-NMDA Receptor Encephalitis", "The Most Common Autoimmune Encephalitis")
add_rect(slide, 0.4, 1.55, 5.5, 5.7, WHITE)
nmda_left = [
("Who gets it?", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" • Young women: F:M = 8:1", False, DARK_GRAY, 13),
(" • Median age ~21 years (all ages affected)", False, DARK_GRAY, 13),
(" • 38–56% have underlying ovarian teratoma", False, ACCENT_RED, 13),
(" • Men: rare; associated with testicular tumors", False, DARK_GRAY, 13),
(" • 5–10% post-HSV encephalitis relapse", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("Clinical Phases (Classic Progression)", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" ① Prodrome (days): Fever, headache, viral-like illness", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 3),
(" ② Psychiatric Phase (days–2 wks):", False, DARK_GRAY, 13),
(" Psychosis, agitation, hallucinations, delusions", False, DARK_GRAY, 12),
(" → Often FIRST seen by Psychiatry!", False, ACCENT_RED, 12),
("", False, DARK_GRAY, 3),
(" ③ Neurological Phase:", False, DARK_GRAY, 13),
(" Seizures (often refractory), movement disorder", False, DARK_GRAY, 12),
(" Orofacial dyskinesias, choreoathetosis", False, DARK_GRAY, 12),
(" Speech dysfunction → mutism", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" ④ Unresponsive Phase:", False, DARK_GRAY, 13),
(" Decreased consciousness, autonomic instability", False, DARK_GRAY, 12),
(" Hyperthermia, tachycardia, central hypoventilation", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" ⑤ Recovery Phase (weeks–months with treatment)", False, GREEN, 13),
]
add_multiline_textbox(slide, 0.5, 1.65, 5.3, 5.5, nmda_left, line_spacing_pt=13)
add_rect(slide, 6.2, 1.55, 6.7, 5.7, WHITE)
nmda_right = [
("Antibody & Mechanism", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" • Target: NR1 subunit of GluN1 (NMDA receptor)", False, DARK_GRAY, 13),
(" • IgG1/IgG3 antibodies → crosslink & internalize receptors", False, DARK_GRAY, 13),
(" • Results in hypofrontality + dopamine dysregulation", False, DARK_GRAY, 13),
(" • Resembles NMDA antagonist effects (PCP, ketamine)", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("Investigations", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" MRI Brain: Often normal early; may show medial", False, DARK_GRAY, 13),
(" temporal FLAIR hyperintensity (30–50% of cases)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" CSF: Lymphocytic pleocytosis (80%), elevated protein,", False, DARK_GRAY, 13),
(" oligoclonal bands (60%)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" EEG: Delta-brush pattern (pathognomonic – 30%),", False, DARK_GRAY, 13),
(" generalized slowing, focal seizures", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" Antibody: ANTI-NR1 IgG in CSF > serum", False, DARK_GRAY, 13),
(" (CSF more sensitive for diagnosis!)", False, ACCENT_RED, 12),
("", False, DARK_GRAY, 6),
("Treatment", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" 1st Line: IV methylprednisolone + IVIG or PLEX", False, DARK_GRAY, 13),
(" 2nd Line: Rituximab + cyclophosphamide", False, DARK_GRAY, 13),
(" Tumor: Teratoma resection → rapid improvement", False, GREEN, 13),
(" Prognosis: 80% good outcome with early treatment", False, GREEN, 13),
]
add_multiline_textbox(slide, 6.3, 1.65, 6.5, 5.5, nmda_right, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 8 – OTHER ANTIBODY SYNDROMES
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Other Major Antibody Syndromes", "LGI1 | CASPR2 | AMPAR | GABA-B | GABA-A")
rows = [
("ANTIBODY", "DEMOGRAPHY", "HALLMARK FEATURE", "TUMOR ASSOC.", "KEY POINTS"),
("Anti-LGI1", "Older men 60–65y", "Faciobrachial Dystonic Seizures\n(FBDS – pathognomonic)", "< 10%\n(Thymoma)", "FBDS precede LE; hyponatremia common;\nResponds well to steroids"),
("Anti-CASPR2", "Older men", "Morvan syndrome\n(Neuromyotonia + AE + autonomic)", "< 20%\n(Thymoma)", "Peripheral nerve hyperexcitability;\nInsomnia; weight loss"),
("Anti-AMPAR", "Middle-aged women", "Limbic encephalitis\nwith frequent relapses", "65–70%\n(Lung, Thymoma)", "RELAPSES common; aggressive\ntumor search essential"),
("Anti-GABA-B", "Older adults", "Limbic encephalitis +\nSEIZURES dominant", "50%\n(SCLC)", "Seizures are the dominant feature;\nOften initially diagnosed as epilepsy"),
("Anti-GABA-A", "Variable", "Severe limbic encephalitis\nrefractory seizures, MRI lesions", "< 10%\n(Thymoma)", "Widespread MRI lesions; FIRES-like\npresentation in children"),
("Anti-GAD65", "Young women", "Stiff-person syndrome\nCerebellar ataxia", "Rare\n(Type 1 DM)", "Association with Type 1 DM;\nPoorly responsive to immunotherapy"),
]
col_widths = [1.4, 1.8, 2.6, 1.6, 4.0]
col_x = [0.35, 1.77, 3.59, 6.21, 7.83]
row_h = 0.73
row_y = [1.55, 2.28, 3.01, 3.74, 4.47, 5.2, 5.93]
for r_idx, row in enumerate(rows):
y = row_y[r_idx]
bg = DARK_NAVY if r_idx == 0 else (WHITE if r_idx % 2 == 1 else LIGHT_BLUE)
txt_color = WHITE if r_idx == 0 else DARK_GRAY
b = (r_idx == 0)
for c_idx, cell in enumerate(row):
x = col_x[c_idx]
w = col_widths[c_idx]
add_rect(slide, x, y, w-0.04, row_h-0.02, bg)
add_textbox(slide, x+0.05, y+0.03, w-0.12, row_h-0.06,
cell, font_size=10 if r_idx>0 else 11,
bold=b, color=txt_color)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 9 – CLINICAL PRESENTATION
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Clinical Presentation", "The FIRES Mnemonic & Symptom Domains")
# 5 domain boxes
domains = [
(MED_BLUE, "🧠 COGNITIVE", "• Memory loss (amnesia)\n• Confusion / delirium\n• Cognitive decline\n• Disorientation"),
(ACCENT_RED, "⚡ SEIZURES", "• New-onset, refractory\n• Focal or generalized\n• Faciobrachial dystonic\n• Status epilepticus"),
(TEAL, "🎭 PSYCHIATRIC", "• Psychosis, delusions\n• Hallucinations\n• Agitation, aggression\n• Mood disturbance"),
(GOLD, "🔄 MOVEMENT", "• Orofacial dyskinesias\n• Choreoathetosis\n• Myoclonus\n• Catatonia / rigidity"),
(GREEN, "⚙️ AUTONOMIC", "• Tachycardia / Brady\n• Hyperthermia\n• Central hypoventilation\n• Labile BP"),
]
for i, (col, title, text) in enumerate(domains):
x = 0.35 + i * 2.55
add_rect(slide, x, 1.55, 2.4, 1.0, col)
add_textbox(slide, x+0.1, 1.6, 2.2, 0.85, title,
font_size=13, bold=True, color=WHITE)
add_rect(slide, x, 2.55, 2.4, 3.5, WHITE)
add_textbox(slide, x+0.1, 2.6, 2.2, 3.35, text,
font_size=11, color=DARK_GRAY)
add_rect(slide, 0.35, 6.2, 12.6, 1.05, WHITE)
sub_text = ("Subacute onset over DAYS TO WEEKS (< 3 months) is the hallmark. "
"Rapid psychiatric → neurological progression in young women should trigger "
"IMMEDIATE autoimmune encephalitis workup. "
"In 60% of paraneoplastic cases, neurological symptoms PRECEDE cancer diagnosis. "
"AE can also present as New-Onset Refractory Status Epilepticus (NORSE) or FIRES in children.")
add_textbox(slide, 0.45, 6.25, 12.4, 0.9, sub_text,
font_size=11, color=DARK_GRAY, wrap=True)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 10 – APE2 SCORE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "APE2 Score", "Antibody Prevalence in Epilepsy and Encephalopathy – Predicting Antibody Positivity")
add_rect(slide, 0.4, 1.55, 7.5, 5.7, WHITE)
ape2_items = [
("CRITERIA", "POINTS"),
("New-onset rapidly progressive mental status changes (1–6 wks) or ± new-onset seizures", "+1"),
("Neuropsychiatric changes: agitation, aggressiveness, emotional lability", "+1"),
("Autonomic dysfunction (tachycardia, bradycardia, orthostatic hypotension,\n hyperhidrosis, labile BP, ventricular tachycardia, GI dysmotility)", "+1"),
("Viral prodrome (rhinorrhea, sore throat, low-grade fever) – if no cancer hx", "+1"),
("Faciobrachial dystonic seizures (FBDS)", "+3"),
("Facial dyskinesias (if no FBDS)", "+2"),
("Seizure refractory to ≥ 2 anti-seizure medications", "+2"),
("CSF inflammation (protein > 50 mg/dL and/or lymphocytic pleocytosis > 5 cells/μL)", "+2"),
("MRI suggesting encephalitis (FLAIR hyperintensity – medial temporal or multifocal)", "+2"),
("Occurrence of the above 2 consecutive times within 3 months", "+3"),
("Underlying systemic malignancy within 5 years of onset", "+2"),
]
col_w_left = [6.6, 0.6]
col_x_left = [0.5, 7.1]
rh = 0.44
ry_start = 1.65
for r_idx, (crit, pts) in enumerate(ape2_items):
y = ry_start + r_idx * rh
bg = DARK_NAVY if r_idx == 0 else (LIGHT_BLUE if r_idx % 2 == 0 else WHITE)
tc = WHITE if r_idx == 0 else DARK_GRAY
add_rect(slide, col_x_left[0], y, col_w_left[0]-0.04, rh-0.02, bg)
add_rect(slide, col_x_left[1], y, col_w_left[1]-0.04, rh-0.02, bg)
add_textbox(slide, col_x_left[0]+0.06, y+0.02, col_w_left[0]-0.14, rh-0.04,
crit, font_size=10 if r_idx>0 else 11, bold=(r_idx==0), color=tc)
add_textbox(slide, col_x_left[1]+0.05, y+0.02, col_w_left[1]-0.1, rh-0.04,
pts, font_size=11 if r_idx>0 else 11, bold=True,
color=GOLD if r_idx>0 else WHITE, align=PP_ALIGN.CENTER)
# Right panel – score interpretation
add_rect(slide, 8.15, 1.55, 4.8, 5.7, WHITE)
score_interp = [
("Score Interpretation", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" APE2 Score ≥ 4:", True, GREEN, 14),
(" 99% sensitive, 93% specific for", False, DARK_GRAY, 13),
(" neural-specific antibody positivity", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 5),
(" Score < 4:", True, ACCENT_RED, 14),
(" Low probability of AE antibody", False, DARK_GRAY, 13),
(" (but does not exclude AE!)", False, ACCENT_RED, 12),
("", False, DARK_GRAY, 6),
("Clinical Use", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" • Helps decide WHO to test", False, DARK_GRAY, 13),
(" • Guides urgency of workup", False, DARK_GRAY, 13),
(" • FBDS alone scores +3 –", False, DARK_GRAY, 13),
(" always test for LGI1!", False, ACCENT_RED, 13),
("", False, DARK_GRAY, 5),
(" Source: Washington Manual of", False, TEAL, 11),
(" Medical Therapeutics (Table 27-2)", False, TEAL, 11),
("", False, DARK_GRAY, 5),
("MAX SCORE = 19", True, DARK_NAVY, 16),
("Threshold ≥ 4 = INVESTIGATE!", True, ACCENT_RED, 14),
]
add_multiline_textbox(slide, 8.25, 1.65, 4.6, 5.5, score_interp, line_spacing_pt=14)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 11 – INVESTIGATIONS
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Investigations", "A Systematic, Parallel Approach")
inv_sections = [
(MED_BLUE, "🔬 BLOOD TESTS",
"• CBC, CMP, LFT, TFT (exclude metabolic)\n• Autoimmune screen: ANA, ANCA, anti-dsDNA\n• HIV, syphilis, hepatitis serology\n• Serum antibody panel (NMDAR, LGI1, CASPR2, GABA-B, AMPAR)\n• Paraneoplastic panel (Hu, Yo, Ri, Ma2, CV2)\n• ESR, CRP, procalcitonin\n• Thyroid antibodies (Hashimoto encephalopathy)\n• Ammonia, lactate, B12, folate, homocysteine\n• Toxicology screen"),
(TEAL, "🧫 CSF ANALYSIS",
"• Opening pressure, appearance\n• Cell count, differential (lymphocytic pleocytosis in 80%)\n• Protein (> 50 mg/dL, usually mildly elevated)\n• Glucose, culture, VDRL\n• Oligoclonal bands (60% in NMDAR-E)\n• CSF antibody panel – MORE SENSITIVE than serum\n• HSV/EBV/CMV/VZV/enteroviruses PCR\n• Flow cytometry if malignancy suspected\n• ALWAYS send BOTH serum AND CSF antibodies!"),
(ACCENT_RED, "📡 NEUROIMAGING",
"• MRI brain with contrast (FLAIR, DWI, T1+Gad, SWI)\n• FLAIR hyperintensity: medial temporal lobes (hippocampus)\n → often bilateral; may be absent early in 50%\n• Rarely: multifocal cortical/subcortical lesions\n• DWI: restricted diffusion in acute phase\n• 18F-FDG PET: hypermetabolism in medial temporal lobes\n with hypometabolism in parietal/occipital (NMDAR-E)\n• CT chest/abdomen/pelvis: tumor search\n• USS/MRI pelvis: ovarian teratoma in young women"),
(GOLD, "📊 EEG",
"• Interictal slowing (most common finding)\n• Focal temporal discharges\n• DELTA BRUSH pattern: pathognomonic for\n Anti-NMDAR-E (but only seen in 30%)\n• Seizure patterns: focal, multifocal, subclinical SE\n• Continuous EEG monitoring in ICU patients\n• FIRDA (Frontal intermittent rhythmic delta)"),
]
for i, (col, title, text) in enumerate(inv_sections):
x = 0.35 + (i % 2) * 6.5
y = 1.55 + (i // 2) * 2.9
add_rect(slide, x, y, 6.35, 0.55, col)
add_textbox(slide, x+0.1, y+0.05, 6.1, 0.45, title,
font_size=14, bold=True, color=WHITE)
add_rect(slide, x, y+0.55, 6.35, 2.25, WHITE)
add_textbox(slide, x+0.1, y+0.6, 6.15, 2.1, text,
font_size=10.5, color=DARK_GRAY)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 12 – MRI IMAGE SLIDE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_NAVY)
section_header(slide, "Neuroimaging in Autoimmune Encephalitis", "MRI & PET Patterns")
add_rect(slide, 0, 1.42, 13.333, 0.07, GOLD)
# Fetch and embed images
image_urls = [
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d0b713a748fe079f556119be499d1625a1ebf73c60e11cb3089d648fbcc1fd91.jpg",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b3e9aa901a3228d41e246f4376fe3bae8fce5dbd1a4f16aa192ed1aa911090b2.jpg",
]
try:
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py"] + image_urls,
timeout=30
))
img_positions = [(0.3, 1.55, 5.8, 4.5), (6.5, 1.55, 6.5, 4.5)]
for idx, img in enumerate(result):
if img.get("base64") and idx < 2:
raw = base64.b64decode(img["base64"].split(",")[-1])
bio = BytesIO(raw)
l, t, w, h = img_positions[idx]
slide.shapes.add_picture(bio, Inches(l), Inches(t), Inches(w), Inches(h))
except Exception as e:
# Fallback text
add_textbox(slide, 2, 2.5, 9, 1, f"[Images could not be loaded: {e}]",
font_size=14, color=WHITE)
# Captions
add_rect(slide, 0.3, 6.1, 5.8, 0.9, MED_BLUE)
add_textbox(slide, 0.4, 6.12, 5.6, 0.85,
"FLAIR & DWI: Anti-NMDAR-E\nRight temporo-occipital hyperintensity + pulvinar sign",
font_size=10, color=WHITE)
add_rect(slide, 6.5, 6.1, 6.5, 0.9, TEAL)
add_textbox(slide, 6.6, 6.12, 6.3, 0.85,
"18F-FDG PET: Temporal hypermetabolism (red/yellow) in NMDAR-E\nvs Basal ganglia hypermetabolism in LGI1-E",
font_size=10, color=WHITE)
footer(slide, "Autoimmune Encephalitis | Neuroimaging | MD Medicine Neurology Seminar")
# ═══════════════════════════════════════════════════════════════
# SLIDE 13 – DIAGNOSTIC CRITERIA (GRAUS 2016)
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Diagnostic Criteria – Graus 2016", "Consensus approach to diagnosing Autoimmune Encephalitis")
add_rect(slide, 0.4, 1.55, 6.1, 5.7, WHITE)
graus_left = [
("POSSIBLE Autoimmune Encephalitis", True, MED_BLUE, 15),
("All 3 criteria met:", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" 1. Subacute onset (< 3 months):", False, DARK_GRAY, 13),
(" Working memory deficit, altered consciousness,", False, DARK_GRAY, 12),
(" OR psychiatric symptoms", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" 2. At least ONE of:", False, DARK_GRAY, 13),
(" a) New focal CNS findings", False, DARK_GRAY, 12),
(" b) Seizures (unexplained)", False, DARK_GRAY, 12),
(" c) CSF pleocytosis (> 5 WBC/μL)", False, DARK_GRAY, 12),
(" d) MRI suggesting encephalitis", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" 3. Reasonable exclusion of alternative causes", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("DEFINITE Autoimmune Encephalitis", True, GREEN, 15),
("", False, DARK_GRAY, 5),
(" • POSSIBLE AE + specific antibody identified", False, DARK_GRAY, 13),
(" in serum and/or CSF", False, DARK_GRAY, 12),
(" OR", True, DARK_GRAY, 12),
(" • Clinical syndrome fits defined phenotype", False, DARK_GRAY, 13),
(" (e.g., Anti-NMDAR-E criteria met)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" ⚠ ANTIBODY-NEGATIVE AE:", True, ACCENT_RED, 13),
(" Can still be diagnosed clinically if all", False, DARK_GRAY, 12),
(" other criteria met + infection excluded", False, DARK_GRAY, 12),
]
add_multiline_textbox(slide, 0.5, 1.65, 5.9, 5.5, graus_left, line_spacing_pt=13)
add_rect(slide, 6.85, 1.55, 6.1, 5.7, WHITE)
graus_right = [
("Antibody Testing Strategy", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" ALWAYS test BOTH serum AND CSF", True, ACCENT_RED, 13),
(" (antibodies may be present in one but not both)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" CSF is MORE SENSITIVE for:", False, DARK_GRAY, 13),
(" • Anti-NMDAR (false negative serum in 15%)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 3),
(" Serum more useful for:", False, DARK_GRAY, 13),
(" • Anti-LGI1, Anti-CASPR2", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" Send ANTIBODY-NEGATIVE Samples to REFERENCE LAB", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 5),
(" Common AE Antibody Panels:", True, MED_BLUE, 14),
("", False, DARK_GRAY, 4),
(" CELL-SURFACE PANEL:", False, TEAL, 13),
(" NMDAR, LGI1, CASPR2, AMPAR,", False, DARK_GRAY, 12),
(" GABA-A, GABA-B, DPPX, VGKC", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
(" PARANEOPLASTIC PANEL:", False, ACCENT_RED, 13),
(" Hu, Yo, Ri, Ma2, CV2, Amphiphysin,", False, DARK_GRAY, 12),
(" CRMP5, GAD65, SOX1, Tr (DNER)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" Timeline: Results may take 1–2 weeks", False, DARK_GRAY, 13),
(" → START TREATMENT EMPIRICALLY!", True, ACCENT_RED, 14),
]
add_multiline_textbox(slide, 6.95, 1.65, 5.9, 5.5, graus_right, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 14 – DIFFERENTIAL DIAGNOSIS
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Differential Diagnosis", "AE can mimic many conditions – a broad DDx is essential")
dd_categories = [
(ACCENT_RED, "INFECTIONS (MUST EXCLUDE FIRST)",
"• Viral: HSV, EBV, CMV, VZV, VHFV, Japanese encephalitis, Rabies\n• Bacterial: TB meningitis, Listeria, neurosyphilis, Whipple disease\n• Fungal: Cryptococcal meningitis\n• Prion: Creutzfeldt-Jakob disease\n• Parasitic: CNS toxoplasmosis, cerebral malaria\n• ALWAYS start ACICLOVIR empirically until HSV PCR is negative!"),
(MED_BLUE, "METABOLIC & TOXIC",
"• Hepatic encephalopathy\n• Uraemic encephalopathy\n• Wernicke's encephalopathy (thiamine)\n• Hyponatraemia, hypercalcaemia\n• Drug toxicity: lithium, metronidazole, INH\n• Heavy metal poisoning\n• Septic encephalopathy"),
(TEAL, "STRUCTURAL & VASCULAR",
"• PRES (posterior reversible encephalopathy syndrome)\n• Bilateral temporal lobe infarcts\n• CNS vasculitis (primary or secondary)\n• ADEM (acute disseminated encephalomyelitis)\n• MS / NMOSD involving temporal lobes\n• CNS lymphoma or gliomatosis\n• Neurosarcoidosis"),
(GOLD, "PSYCHIATRIC MIMICS",
"• First-break psychosis / schizophrenia\n• Bipolar disorder with psychosis\n• Acute confusional state (delirium)\n• Catatonia (may coexist with AE)\n• Conversion disorder\n• Drug-induced psychosis (cannabis, meth, PCP)\n• NMDAR antagonists mimic NMDAR-E symptoms!"),
]
for i, (col, title, text) in enumerate(dd_categories):
x = 0.35 + (i % 2) * 6.5
y = 1.55 + (i // 2) * 2.9
add_rect(slide, x, y, 6.35, 0.5, col)
add_textbox(slide, x+0.1, y+0.04, 6.1, 0.42, title,
font_size=13, bold=True, color=WHITE)
add_rect(slide, x, y+0.5, 6.35, 2.3, WHITE)
add_textbox(slide, x+0.1, y+0.55, 6.15, 2.15, text,
font_size=10.5, color=DARK_GRAY)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 15 – TREATMENT: FIRST LINE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Treatment: First-Line Immunotherapy", "Initiate EARLY – Do Not Wait for Antibody Results")
add_rect(slide, 0.4, 1.55, 12.5, 0.7, DARK_NAVY)
add_textbox(slide, 0.5, 1.6, 12.3, 0.6,
"⚡ KEY PRINCIPLE: Start treatment empirically as soon as AE is suspected. "
"Delay worsens outcomes. Treat SIMULTANEOUSLY with infection exclusion (Aciclovir + Empirical Antibiotics until cultures/PCR negative).",
font_size=12, bold=True, color=GOLD)
agents = [
(MED_BLUE,
"IV METHYLPREDNISOLONE",
"Dose: 1 g/day IV × 3–5 days\nThen: Oral prednisolone taper\n (1 mg/kg/day → slow wean over months)\n\nMechanism: Anti-inflammatory; suppresses\nB-cell and T-cell activation\n\nMonitor: Blood glucose, BP, GI symptoms\nBone protection: Calcium + Vit D + PPI"),
(TEAL,
"INTRAVENOUS IMMUNOGLOBULIN (IVIG)",
"Dose: 0.4 g/kg/day × 5 days\n (total: 2 g/kg over 5 days)\n\nMechanism: Fc receptor blockade, complement\nneutralization, anti-idiotype antibodies\n\nOften given concurrently with steroids\n\nMonitor: Headache, aseptic meningitis,\nthrombosis (caution in high-risk patients)"),
(ACCENT_RED,
"PLASMA EXCHANGE (PLEX)",
"Regimen: 5–7 exchanges over 10–14 days\n\nMechanism: Direct removal of pathogenic\nautoantibodies from circulation\n\nEquivalent efficacy to IVIG; use if:\n• No response to steroids in 5–7 days\n• Cannot tolerate IVIG\n• High antibody titers\n\nMonitor: Hemodynamics, clotting, lines"),
(GREEN,
"TUMOR TREATMENT",
"Essential for paraneoplastic AE!\n\nOvarian teratoma (Anti-NMDAR-E):\n→ LAPAROSCOPIC RESECTION\n→ Often leads to rapid improvement!\n\nSCLC (Anti-Hu, GABA-B):\n→ Chemotherapy ± RT\n\nSearch: CT chest/abdomen/pelvis\n+ pelvic USS in all young women\n+ whole body FDG-PET if occult"),
]
for i, (col, title, text) in enumerate(agents):
x = 0.35 + i * 3.2
add_rect(slide, x, 2.35, 3.0, 0.55, col)
add_textbox(slide, x+0.1, 2.38, 2.8, 0.5, title,
font_size=12, bold=True, color=WHITE)
add_rect(slide, x, 2.9, 3.0, 4.3, WHITE)
add_textbox(slide, x+0.1, 2.95, 2.8, 4.15, text,
font_size=11, color=DARK_GRAY)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 16 – TREATMENT: SECOND & THIRD LINE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Treatment: Second & Third-Line Immunotherapy", "For Refractory or Severe Autoimmune Encephalitis")
add_rect(slide, 0.4, 1.55, 12.5, 5.7, WHITE)
tx_lines = [
("SECOND-LINE THERAPY (no improvement in 2–4 weeks on first-line)", True, MED_BLUE, 16),
("", False, DARK_GRAY, 5),
("RITUXIMAB (Anti-CD20 B-cell depleting monoclonal antibody)", True, MED_BLUE, 14),
(" Dose: 375 mg/m² IV weekly × 4 doses OR 1000 mg IV × 2 doses (2 weeks apart)", False, DARK_GRAY, 13),
(" Evidence: Most evidence in anti-NMDAR-E; reduces relapse risk significantly", False, DARK_GRAY, 13),
(" Monitor: Infusion reactions, PML risk (JC virus), hepatitis B reactivation", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 5),
("CYCLOPHOSPHAMIDE", True, MED_BLUE, 14),
(" Dose: 750 mg/m² IV monthly × 3–6 cycles (often combined with rituximab)", False, DARK_GRAY, 13),
(" Monitor: Hemorrhagic cystitis (mesna prophylaxis), myelosuppression, alopecia", False, DARK_GRAY, 13),
(" Use: Often in paraneoplastic AE with severe disease or intracellular antibodies", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("THIRD-LINE / REFRACTORY AE", True, ACCENT_RED, 16),
("", False, DARK_GRAY, 5),
("TOCILIZUMAB (Anti-IL-6 receptor monoclonal antibody)", True, ACCENT_RED, 14),
(" Dose: 8 mg/kg IV every 4 weeks", False, DARK_GRAY, 13),
(" Evidence: Promising case series; especially useful in anti-NMDAR-E refractory disease", False, DARK_GRAY, 13),
(" Mechanism: Blocks IL-6 signaling → reduces B-cell activation and antibody production", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 5),
("BORTEZOMIB (Proteasome inhibitor – plasma cell depleting)", True, ACCENT_RED, 14),
(" Depletes long-lived plasma cells producing pathogenic antibodies", False, DARK_GRAY, 13),
(" Case reports of dramatic improvement in otherwise refractory AE", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 5),
("MYCOPHENOLATE MOFETIL / AZATHIOPRINE → Long-term maintenance immunotherapy", True, TEAL, 13),
(" Used for relapse prevention; continue for 1–2 years after remission", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
(" ⚠ Important: Anti-seizure medications alone are often INEFFECTIVE in AE-related seizures!", True, ACCENT_RED, 13),
(" Immunotherapy is the DEFINITIVE treatment for seizure control in AE.", False, DARK_GRAY, 12),
]
add_multiline_textbox(slide, 0.55, 1.65, 12.2, 5.5, tx_lines, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 17 – CHECKPOINT INHIBITOR-ASSOCIATED AE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Checkpoint Inhibitor-Associated AE", "Immune-Related Neurologic Adverse Events (irAE)")
add_rect(slide, 0.4, 1.55, 12.5, 5.7, WHITE)
ci_lines = [
("Background", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" • PD-1 / PD-L1 / CTLA-4 inhibitors (pembrolizumab, nivolumab, ipilimumab) used in many cancers", False, DARK_GRAY, 13),
(" • Neurologic irAEs rare (~0.1–0.2%) but potentially severe and life-threatening", False, DARK_GRAY, 13),
(" • Any neurologic syndrome can occur: encephalitis, meningitis, neuropathy, myasthenia, myositis", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("Clinical Features", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" • Encephalitis: confusion, personality change, seizures, cognitive decline", False, DARK_GRAY, 13),
(" • Limbic encephalitis: medial temporal involvement (as with other AE)", False, DARK_GRAY, 13),
(" • Antibodies: can be positive (NMDAR, LGI1, CASPR2, MOG) – often SERONEGATIVE", False, DARK_GRAY, 13),
(" • Onset: typically weeks to months after starting checkpoint inhibitor", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("Management (CTCAE Grading-Based)", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" Grade 1 (mild): Monitor closely; consider holding checkpoint inhibitor", False, DARK_GRAY, 13),
(" Grade 2 (moderate): Hold checkpoint inhibitor; oral prednisone 1–2 mg/kg/day", False, DARK_GRAY, 13),
(" Grade 3–4 (severe): PERMANENTLY DISCONTINUE checkpoint inhibitor", False, ACCENT_RED, 13),
(" IV methylprednisolone 1–2 mg/kg/day; then oral taper", False, DARK_GRAY, 13),
(" If no response in 48h: Add IVIG or PLEX", False, DARK_GRAY, 13),
(" Consider rituximab for refractory cases", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 5),
(" ⚠ KEY: Multidisciplinary approach – Oncology + Neurology + Immunology", True, TEAL, 13),
(" ⚠ Stopping immunotherapy may compromise cancer treatment – careful risk-benefit analysis", True, ACCENT_RED, 13),
]
add_multiline_textbox(slide, 0.55, 1.65, 12.2, 5.5, ci_lines, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 18 – SPECIAL POPULATIONS
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Special Populations", "Pediatric AE | AE in Pregnancy | Post-HSV AE")
add_rect(slide, 0.35, 1.55, 4.1, 5.7, WHITE)
ped_lines = [
("👶 PEDIATRIC AE", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
("Most common: Anti-NMDAR-E", False, TEAL, 12),
("", False, DARK_GRAY, 4),
("Unique features:", True, DARK_GRAY, 13),
("• FIRES (Febrile Infection-related", False, DARK_GRAY, 12),
(" Epilepsy Syndrome) – test for AE!", False, DARK_GRAY, 12),
("• NORSE (New-Onset Refractory SE)", False, DARK_GRAY, 12),
("• Behavioural regression", False, DARK_GRAY, 12),
("• Hyperkinetic movements > adults", False, DARK_GRAY, 12),
("• Ovarian teratoma less common", False, DARK_GRAY, 12),
(" (consider but lower prevalence)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("Treatment same as adults:", True, DARK_GRAY, 13),
("• IVIG: 2g/kg over 2–5 days", False, DARK_GRAY, 12),
("• Methylprednisolone 30mg/kg/d", False, DARK_GRAY, 12),
(" (max 1g) × 3–5 days", False, DARK_GRAY, 12),
("• Rituximab if refractory", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("Prognosis: Generally BETTER", False, GREEN, 12),
("than adults with early treatment", False, GREEN, 12),
]
add_multiline_textbox(slide, 0.45, 1.65, 3.9, 5.5, ped_lines, line_spacing_pt=13)
add_rect(slide, 4.65, 1.55, 4.1, 5.7, WHITE)
preg_lines = [
("🤰 AE IN PREGNANCY", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
("Challenges:", True, DARK_GRAY, 13),
("• Diagnosis delayed (symptoms", False, DARK_GRAY, 12),
(" confused with eclampsia)", False, DARK_GRAY, 12),
("• Limited imaging (MRI preferred)", False, DARK_GRAY, 12),
("• Teratogenicity concerns", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("Safe in Pregnancy:", True, GREEN, 13),
("• IVIG: Safe in all trimesters", False, DARK_GRAY, 12),
("• PLEX: Safe; monitor hemodynamics", False, DARK_GRAY, 12),
("• Methylprednisolone (3rd trimester", False, DARK_GRAY, 12),
(" preferred; oral taper cautiously)", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("Caution / Avoid:", True, ACCENT_RED, 13),
("• Cyclophosphamide: teratogenic", False, DARK_GRAY, 12),
("• Rituximab: limited data, avoid", False, DARK_GRAY, 12),
(" unless life-threatening", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("Tumor search:", True, DARK_GRAY, 13),
("• USS pelvis (no radiation)", False, DARK_GRAY, 12),
("• MRI pelvis without contrast", False, DARK_GRAY, 12),
("• Teratoma resection postpartum", False, DARK_GRAY, 12),
(" unless severe deterioration", False, DARK_GRAY, 12),
]
add_multiline_textbox(slide, 4.75, 1.65, 3.9, 5.5, preg_lines, line_spacing_pt=13)
add_rect(slide, 8.95, 1.55, 4.0, 5.7, WHITE)
posthsv_lines = [
("🦠 POST-HSV AE", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
("Mechanism:", True, DARK_GRAY, 13),
("• HSV encephalitis triggers", False, DARK_GRAY, 12),
(" autoimmune response against", False, DARK_GRAY, 12),
(" NMDA / GABA-B / AMPA receptors", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("Timing: 2–12 weeks after HSV", False, TEAL, 12),
("encephalitis treatment", False, TEAL, 12),
("", False, DARK_GRAY, 4),
("Features:", True, DARK_GRAY, 13),
("• RELAPSE after initial improvement", False, ACCENT_RED, 12),
("• Choreoathetosis (children)", False, DARK_GRAY, 12),
("• Psychiatric symptoms", False, DARK_GRAY, 12),
("• MRI: new or worsening lesions", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 4),
("TRAP: Often mistaken for", True, ACCENT_RED, 13),
("HSV encephalitis RELAPSE", True, ACCENT_RED, 12),
" → Repeat PCR is negative!",
("", False, DARK_GRAY, 4),
("Management:", True, DARK_GRAY, 13),
("• Continue Aciclovir while testing", False, DARK_GRAY, 12),
("• If PCR negative → Immunotherapy", False, GREEN, 12),
("• Early recognition = good outcome", False, GREEN, 12),
]
add_multiline_textbox(slide, 9.05, 1.65, 3.8, 5.5, posthsv_lines, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 19 – PROGNOSIS & MONITORING
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Prognosis & Follow-up", "Recovery Timeline | Relapse | Monitoring")
# Prognosis boxes
prog_data = [
(GREEN, "~80%", "Good neurological outcome\nwith early, aggressive treatment"),
(MED_BLUE, "20–30%", "Require ICU care\n(ventilation, continuous EEG monitoring)"),
(GOLD, "20–25%", "Relapse rate in anti-NMDAR-E\n(often milder than first episode)"),
(ACCENT_RED, "5–10%", "Mortality rate despite treatment\n(higher in paraneoplastic/intracellular AE)"),
]
for i, (col, big, small) in enumerate(prog_data):
x = 0.35 + i * 3.2
add_rect(slide, x, 1.55, 3.0, 1.85, col)
add_textbox(slide, x+0.1, 1.6, 2.8, 0.85, big,
font_size=32, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(slide, x+0.1, 2.45, 2.8, 0.85, small,
font_size=11, color=WHITE, align=PP_ALIGN.CENTER)
add_rect(slide, 0.35, 3.55, 6.15, 3.7, WHITE)
prog_left = [
("Factors Predicting GOOD Outcome", True, GREEN, 15),
("", False, DARK_GRAY, 5),
(" ✔ Early initiation of immunotherapy", False, DARK_GRAY, 13),
(" ✔ Cell-surface antibody (vs. intracellular)", False, DARK_GRAY, 13),
(" ✔ Tumor removal (teratoma, thymoma)", False, DARK_GRAY, 13),
(" ✔ IVIG response within 1 week", False, DARK_GRAY, 13),
(" ✔ Mild initial clinical severity", False, DARK_GRAY, 13),
(" ✔ Younger age at onset", False, DARK_GRAY, 13),
("", False, DARK_GRAY, 6),
("Factors Predicting POOR Outcome", True, ACCENT_RED, 15),
("", False, DARK_GRAY, 5),
(" ✘ Intracellular onconeuronal antibodies", False, DARK_GRAY, 13),
(" ✘ Delayed diagnosis / treatment", False, DARK_GRAY, 13),
(" ✘ Underlying aggressive malignancy", False, DARK_GRAY, 13),
(" ✘ Prolonged ICU stay, central hypoventilation", False, DARK_GRAY, 13),
(" ✘ Refractory status epilepticus", False, DARK_GRAY, 13),
(" ✘ Older age (paraneoplastic)", False, DARK_GRAY, 13),
]
add_multiline_textbox(slide, 0.45, 3.65, 5.9, 3.5, prog_left, line_spacing_pt=13)
add_rect(slide, 6.85, 3.55, 6.15, 3.7, WHITE)
prog_right = [
("Follow-up & Monitoring Protocol", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" During Treatment:", True, DARK_GRAY, 13),
(" • Antibody titers (CSF/serum) at 3 months", False, DARK_GRAY, 12),
(" • MRI brain at 3–6 months", False, DARK_GRAY, 12),
(" • EEG if seizures", False, DARK_GRAY, 12),
(" • Neuropsychological testing at 6–12 months", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" Tumor Surveillance:", True, DARK_GRAY, 13),
(" • CT C/A/P every 6 months × 2 years", False, DARK_GRAY, 12),
(" (if initial tumor search negative)", False, DARK_GRAY, 12),
(" • Young women: Pelvic USS every 6 months", False, DARK_GRAY, 12),
(" • FDG-PET if occult malignancy suspected", False, DARK_GRAY, 12),
("", False, DARK_GRAY, 5),
(" Maintenance Therapy:", True, DARK_GRAY, 13),
(" • Mycophenolate or azathioprine × 1–2 years", False, DARK_GRAY, 12),
(" • Low-dose steroids taper slowly", False, DARK_GRAY, 12),
(" • Relapse: Repeat first-line immunotherapy", False, ACCENT_RED, 12),
]
add_multiline_textbox(slide, 6.95, 3.65, 5.9, 3.5, prog_right, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 20 – MANAGEMENT ALGORITHM / FLOWCHART
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Clinical Management Algorithm", "Step-by-step approach to suspected Autoimmune Encephalitis")
steps = [
(MED_BLUE, "STEP 1: SUSPECT AE",
"Subacute confusion + seizures + psychiatric Sx + movement disorder\nCalculate APE2 Score ≥ 4 → HIGH suspicion"),
(TEAL, "STEP 2: EXCLUDE INFECTIONS",
"Blood cultures, LP (CSF PCR for HSV, bacteria)\nStart ACICLOVIR + Empirical antibiotics while awaiting results"),
(GOLD, "STEP 3: INVESTIGATIONS",
"MRI Brain (FLAIR/DWI/contrast) | EEG (delta brush?)\nCSF + Serum antibody panels | Paraneoplastic screen\nCT C/A/P + Pelvic USS (young women)"),
(GREEN, "STEP 4: START IMMUNOTHERAPY",
"Do NOT wait for antibody results!\nIV Methylprednisolone 1g/day × 3–5 days + IVIG 2g/kg over 5 days"),
(ACCENT_RED, "STEP 5: REASSESS AT 2–4 WEEKS",
"RESPONSE → Continue oral steroids + maintenance immunotherapy\nNO RESPONSE → 2nd line: Rituximab ± Cyclophosphamide"),
(MED_BLUE, "STEP 6: TUMOR TREATMENT",
"Teratoma → Laparoscopic oophorectomy\nSCLC/Thymoma → Oncology referral for chemotherapy ± RT"),
]
box_w = 3.8
for i, (col, title, text) in enumerate(steps):
row = i // 2
col_idx = i % 2
x = 0.4 + col_idx * 6.5
y = 1.6 + row * 1.9
add_rect(slide, x, y, box_w + 2.5, 0.45, col)
add_textbox(slide, x+0.1, y+0.04, box_w + 2.35, 0.38, title,
font_size=13, bold=True, color=WHITE)
add_rect(slide, x, y+0.45, box_w + 2.5, 1.35, WHITE)
add_textbox(slide, x+0.1, y+0.5, box_w + 2.35, 1.25, text,
font_size=11, color=DARK_GRAY)
# Arrow notation
for i in range(2):
for j in range(2):
if i < 2 and j == 0: # Only between rows in left column
pass
add_textbox(slide, 6.0, 2.3, 0.5, 0.4, "►", font_size=24, color=MED_BLUE)
add_textbox(slide, 6.0, 4.2, 0.5, 0.4, "►", font_size=24, color=MED_BLUE)
add_textbox(slide, 6.0, 6.1, 0.5, 0.4, "►", font_size=24, color=MED_BLUE)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 21 – CASE VIGNETTE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_NAVY)
section_header(slide, "Case Vignette", "Test your approach!")
add_rect(slide, 0, 1.42, 13.333, 0.07, GOLD)
add_rect(slide, 0.4, 1.58, 12.5, 2.55, RGBColor(0x1A, 0x2E, 0x45))
case_text = ("A 24-year-old female medical student presents with a 3-week history of:\n"
"• Progressive confusion, insomnia, and bizarre behavior (seen by psychiatry 1 week ago, diagnosed as 'first-break psychosis')\n"
"• Three generalized tonic-clonic seizures in the past 48 hours, refractory to lorazepam and levetiracetam\n"
"• Orofacial and limb choreiform movements noted by her family\n"
"• No fever, no neck stiffness. Prior viral URTI 4 weeks ago.\n"
"• Pelvic USS: 3.5 cm right ovarian cystic mass (likely teratoma)")
add_textbox(slide, 0.55, 1.65, 12.2, 2.4, case_text,
font_size=12, color=WHITE, wrap=True)
add_rect(slide, 0.4, 4.28, 12.5, 0.5, MED_BLUE)
add_textbox(slide, 0.5, 4.3, 12.3, 0.45,
"INVESTIGATIONS: MRI Brain – subtle medial temporal FLAIR signal. "
"CSF – 22 lymphocytes, protein 68 mg/dL, glucose normal. EEG – delta brush pattern. Serum NMDAR-Ab: NEGATIVE. CSF NMDAR-Ab: POSITIVE.",
font_size=11, color=WHITE)
add_rect(slide, 0.4, 4.95, 12.5, 2.2, WHITE)
qns = [
("❓ Q1:", "What is the most likely diagnosis?", ACCENT_RED),
("✅ A1:", "Anti-NMDA Receptor Encephalitis (Seronegative serum; CSF antibody positive – always test CSF!)", GREEN),
("❓ Q2:", "What is the IMMEDIATE management?", ACCENT_RED),
("✅ A2:", "IV methylprednisolone 1g/day + IVIG 2g/kg; plan laparoscopic oophorectomy for teratoma; ICU monitoring", GREEN),
("❓ Q3:", "Why were seizures refractory to ASMs?", ACCENT_RED),
("✅ A3:", "AE seizures are antibody-mediated – ASMs alone inadequate; definitive treatment is IMMUNOTHERAPY", GREEN),
]
y_off = 5.02
for q_prefix, q_text, col in qns:
add_textbox(slide, 0.55, y_off, 1.0, 0.3, q_prefix,
font_size=11, bold=True, color=col)
add_textbox(slide, 1.55, y_off, 11.2, 0.3, q_text,
font_size=11, color=DARK_GRAY if q_prefix.startswith("✅") else DARK_NAVY,
bold=(q_prefix.startswith("✅")))
y_off += 0.33
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 22 – APPROACH TO THE ANTIBODY TABLE
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "Comprehensive Antibody Reference Table", "Antigen | Syndrome | Tumor | Key Feature")
rows2 = [
("ANTIBODY", "SYNDROME", "TUMOR ASSOCIATION", "PATHOGNOMONIC FEATURE"),
("NMDAR (NR1)", "Anti-NMDAR-E (limbic + movement)","Ovarian teratoma (38–56%)","Delta-brush EEG; orofacial dyskinesias"),
("LGI1", "Limbic encephalitis", "Thymoma (<10%)", "Faciobrachial dystonic seizures (FBDS)"),
("CASPR2", "Morvan syndrome / LE", "Thymoma (<20%)", "Neuromyotonia + insomnia + autonomic"),
("AMPAR", "Limbic encephalitis", "Lung, thymoma (65–70%)", "Frequent relapses after immunotherapy"),
("GABA-B", "Limbic encephalitis", "SCLC (50%)", "Seizures dominant feature"),
("GABA-A", "Severe LE + status epilepticus", "Thymoma (<10%)", "Widespread MRI lesions, FIRES-like"),
("Anti-Hu", "Encephalomyelitis", "SCLC (>95%)", "Sensory neuronopathy; POOR prognosis"),
("Anti-Yo", "Cerebellar degeneration", "Ovary, breast (>95%)", "Rapidly progressive cerebellar ataxia"),
("Anti-Ma2", "Limbic + hypothalamic + BS enc.","Testicular (>70%)", "Hypersomnia; young men"),
("GAD65", "Stiff-person + cerebellar AE", "Rare (Type 1 DM)", "Poor response to immunotherapy"),
("GFAP", "Meningoencephalomyelitis", "Ovarian teratoma", "Linear/radial perivascular FLAIR"),
("MOG", "MOGAD / encephalomyelitis", "Very rare", "Cortical encephalitis; ADEM-like MRI"),
]
c_w = [1.8, 3.2, 2.7, 5.2]
c_x = [0.35, 2.17, 5.39, 8.11]
rh2 = 0.455
ry2_start = 1.55
for r_idx, row in enumerate(rows2):
y = ry2_start + r_idx * rh2
bg = DARK_NAVY if r_idx == 0 else (RGBColor(0xEB, 0xF5, 0xFF) if r_idx % 2 == 1 else WHITE)
tc = WHITE if r_idx == 0 else DARK_GRAY
b = (r_idx == 0)
for c_idx, cell in enumerate(row):
x = c_x[c_idx]
w = c_w[c_idx]
add_rect(slide, x, y, w-0.03, rh2-0.01, bg)
add_textbox(slide, x+0.05, y+0.02, w-0.12, rh2-0.04,
cell, font_size=10 if r_idx>0 else 10, bold=b, color=tc)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 23 – KEY TAKEAWAYS
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_NAVY)
section_header(slide, "Key Takeaways", "5 Things Every Medicine Resident Must Remember")
add_rect(slide, 0, 1.42, 13.333, 0.07, GOLD)
takeaways = [
(GOLD, "1",
"Autoimmune Encephalitis = TREATABLE cause of subacute neuropsychiatric syndrome",
"Responsible for ~25% of all encephalitis. Incidence equals infectious encephalitis. Early diagnosis saves brains."),
(MED_BLUE, "2",
"APE2 Score ≥ 4: Investigate immediately for AE antibodies",
"Always send BOTH CSF AND serum. CSF is more sensitive for NMDAR-E. Do not rely on serum alone."),
(TEAL, "3",
"Start treatment WITHOUT waiting for antibody results",
"IV methylprednisolone + IVIG/PLEX. Empirical immunotherapy is safe. Delay causes irreversible damage."),
(ACCENT_RED, "4",
"Always search for an underlying tumor",
"Ovarian teratoma (young women), SCLC, thymoma, testicular tumors. Tumor removal = key therapeutic step."),
(GREEN, "5",
"ASMs alone WILL NOT CONTROL seizures in AE",
"Seizures are antibody-mediated. Immunotherapy is the definitive seizure treatment. Continue escalating immunotherapy."),
]
for i, (col, num, heading, detail) in enumerate(takeaways):
y = 1.62 + i * 1.1
add_rect(slide, 0.4, y, 0.75, 0.95, col)
add_textbox(slide, 0.4, y, 0.75, 0.95, num,
font_size=32, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_rect(slide, 1.22, y, 11.7, 0.95, RGBColor(0x1A, 0x2E, 0x45))
add_textbox(slide, 1.35, y+0.04, 11.4, 0.42, heading,
font_size=14, bold=True, color=col)
add_textbox(slide, 1.35, y+0.48, 11.4, 0.42, detail,
font_size=11, color=RGBColor(0xCC, 0xDD, 0xEE))
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 24 – REFERENCES
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_BLUE)
section_header(slide, "References", "Key Sources Used in This Presentation")
add_rect(slide, 0.4, 1.55, 12.5, 5.7, WHITE)
refs = [
("Textbooks", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" 1. Adams and Victor's Principles of Neurology, 12th Edition. Ropper AH, et al. McGraw-Hill, 2023.", False, DARK_GRAY, 12),
(" Chapter 35: Autoimmune Encephalitis", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 4),
(" 2. Harrison's Principles of Internal Medicine, 22nd Edition. Loscalzo J, et al. McGraw-Hill, 2025.", False, DARK_GRAY, 12),
(" Chapter 99: Paraneoplastic Neurologic Syndromes and Autoimmune Encephalitis – Dalmau J, Graus F", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 4),
(" 3. Goldman-Cecil Medicine, 27th Edition (International Ed.). Goldman L, et al. Elsevier, 2024.", False, DARK_GRAY, 12),
(" Chapter 383: Autoimmune Encephalitis (Table 383-3: Antigen Targets)", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 4),
(" 4. Washington Manual of Medical Therapeutics, 37th Edition. Becker KJ, et al. Wolters Kluwer, 2022.", False, DARK_GRAY, 12),
(" Chapter 27: Autoimmune Encephalitis, APE2 Score (Table 27-2)", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 6),
("Guidelines & Key Papers", True, MED_BLUE, 15),
("", False, DARK_GRAY, 5),
(" 5. Graus F, et al. (2016). A clinical approach to diagnosis of autoimmune encephalitis.", False, DARK_GRAY, 12),
(" Lancet Neurology, 15(4):391–404. (Consensus Diagnostic Criteria)", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 4),
(" 6. Dalmau J, Graus F. (2018). Antibody-Mediated Encephalitis.", False, DARK_GRAY, 12),
(" NEJM, 378(9):840–851.", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 4),
(" 7. Guasp M, Dalmau J. (2025). Autoimmune Encephalitis.", False, DARK_GRAY, 12),
(" Med Clin North Am, 109(2). PMID: 39893022 [Review]", False, DARK_GRAY, 11),
("", False, DARK_GRAY, 4),
(" 8. Abboud H, et al. Autoimmune Encephalitis: Proposed Best Practice Recommendations.", False, DARK_GRAY, 12),
(" J Neurol Neurosurg Psychiatry, 2021.", False, DARK_GRAY, 11),
]
add_multiline_textbox(slide, 0.55, 1.65, 12.2, 5.5, refs, line_spacing_pt=13)
footer(slide)
# ═══════════════════════════════════════════════════════════════
# SLIDE 25 – THANK YOU
# ═══════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_NAVY)
add_rect(slide, 0, 5.85, 13.333, 0.18, TEAL)
add_rect(slide, 0, 6.03, 13.333, 0.18, GOLD)
add_textbox(slide, 1.5, 1.5, 10.5, 1.2,
"THANK YOU",
font_size=64, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(slide, 1.5, 2.85, 10.5, 0.7,
"Questions & Discussion",
font_size=28, color=TEAL, align=PP_ALIGN.CENTER)
add_textbox(slide, 1.5, 3.65, 10.5, 0.5,
"\"Early diagnosis and prompt immunotherapy remain the cornerstones of care.\"",
font_size=16, italic=True,
color=RGBColor(0xA8, 0xD8, 0xEA), align=PP_ALIGN.CENTER)
add_textbox(slide, 1.5, 4.3, 10.5, 0.5,
"— Adams & Victor's Principles of Neurology, 12th Ed.",
font_size=13, italic=True,
color=RGBColor(0x7F, 0x9F, 0xBF), align=PP_ALIGN.CENTER)
add_textbox(slide, 1.5, 5.1, 10.5, 0.5,
"MD Medicine Neurology Seminar | Department of Medicine",
font_size=14, color=RGBColor(0xCC, 0xDD, 0xEE), align=PP_ALIGN.CENTER)
# ── SAVE ──────────────────────────────────────────────────────
output_path = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar.pptx"
buf = BytesIO()
prs.save(buf)
with open(output_path, "wb") as f:
f.write(buf.getvalue())
print(f"SUCCESS: Saved to {output_path}")
print(f"Total slides: {len(prs.slides)}")
cd /tmp/workspace/autoimmune-encephalitis-ppt && python create_ppt.py 2>&1
Retry
Retry
ls -lh /tmp/workspace/autoimmune-encephalitis-ppt/ && python -c "from pptx import Presentation; prs = Presentation('/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar.pptx'); print(f'Slides: {len(prs.slides)}')"
Autoimmune Encephalitis Seminar
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title Slide | Professional dark navy design with branding |
| 2 | Table of Contents | 22-topic overview |
| 3 | Introduction & History | Historical milestones 1960s - 2020s |
| 4 | Epidemiology | Key stats with infographic boxes |
| 5 | Classification | Cell-surface vs intracellular; tumor risk stratification |
| 6 | Pathophysiology | Step-by-step antibody & T-cell mechanisms |
| 7 | Anti-NMDAR Encephalitis | Full clinical phases, investigations, treatment |
| 8 | Other Antibody Syndromes | LGI1, CASPR2, AMPAR, GABA-B, GABA-A table |
| 9 | Clinical Presentation | 5-domain visual (Cognitive, Seizures, Psychiatric, Movement, Autonomic) |
| 10 | APE2 Score | Full scoring table + interpretation (≥4 = investigate) |
| 11 | Investigations | Blood / CSF / MRI / EEG in 4-box layout |
| 12 | Neuroimaging | MRI & PET scan images with captions |
| 13 | Diagnostic Criteria | Graus 2016 - Possible / Definite AE |
| 14 | Differential Diagnosis | Infections, Metabolic, Structural, Psychiatric |
| 15 | First-Line Treatment | Steroids, IVIG, PLEX, Tumor resection |
| 16 | Second & Third Line | Rituximab, Cyclophosphamide, Tocilizumab, Bortezomib |
| 17 | Checkpoint Inhibitor AE | irAE grading-based management |
| 18 | Special Populations | Pediatric, Pregnancy, Post-HSV AE |
| 19 | Prognosis & Monitoring | Outcome factors + follow-up protocol |
| 20 | Management Algorithm | 6-step clinical flowchart |
| 21 | Case Vignette | Real-world case + Q&A (anti-NMDAR-E) |
| 22 | Antibody Reference Table | 13 antibodies with syndromes + tumor associations |
| 23 | Key Takeaways | 5 must-know points for any resident |
| 24 | References | Harrison's, Adams & Victor, Goldman-Cecil, Washington Manual, Graus 2016 |
| 25 | Thank You | Discussion slide |
Add images
anti-NMDA receptor encephalitis MRI FLAIR temporal lobe hyperintensity

This diagnostic image set consists of axial brain MRI scans using Fluid-Attenuated Inversion Recovery (FLAIR) sequences, illustrating the progression of anti-NMDA receptor encephalitis. Image (a) is a whole-brain FLAIR view showing a prominent area of hyperintense signal and swelling (enlargement) in the left hippocampus, compared to the normal contralateral side. Images (b), (c), and (d) provide a longitudinal comparison of the medial temporal lobe. Frame (b) shows the initial baseline MRI with no discernible abnormalities. Frame (c), taken at day 5, demonstrates the development of distinct hyperintensity and edema within the left hippocampus, characteristic of the acute inflammatory phase of autoimmune encephalitis. Frame (d) illustrates a long-term follow-up after immunotherapy (corticosteroids and plasmapheresis); it shows a reduction in the hyperintense signal but reveals secondary structural changes, specifically left hippocampal atrophy evidenced by volume loss. The images serve as an educational timeline for monitoring inflammatory brain disease, treatment response, and subsequent chronic sequelae like focal atrophy.
![This diagnostic image set displays a longitudinal comparison of [18F]-FDG-PET and matching MRI-T2-FLAIR axial brain scans from three patients with anti-NMDA receptor (NMDAR) encephalitis. The panels are organized by patient (1, 2, and 3) across three time points: T0 (onset), T6 (6 months), and T18 (18 months). The visual content is divided into two columns: the Medial Temporal Lobe (left) and the Temporo-parieto-occipital region (right). Key findings include: (1) Patient 1 shows bilateral hypometabolism in lateral temporal and posterior parietal lobes at T0, peaking at T6 before resolving by T18. (2) Patient 2 exhibits bilateral occipital hypometabolism at T0 (white arrow) and transient basal ganglia hypermetabolism relative to cortical hypometabolism at T6. (3) Patient 3 demonstrates right-sided medial temporal lobe hypometabolism on PET (yellow arrow) corresponding to hyperintensity on MRI-FLAIR (yellow rectangle) at T0, with resolution at subsequent time points. The image illustrates the correlation between functional metabolic changes on PET and structural findings on MRI in autoimmune encephalitis progression and recovery.](/_next/image?url=https%3A%2F%2Fcdn.orris.care%2Fcdss_images%2Fpmc_clinical_VQA_2160573defe2ee7efaccbc70050fcca9a1a01091098ad0ae4ad7ebba38356ebb.jpg&w=3840&q=75)
This diagnostic image set displays a longitudinal comparison of [18F]-FDG-PET and matching MRI-T2-FLAIR axial brain scans from three patients with anti-NMDA receptor (NMDAR) encephalitis. The panels are organized by patient (1, 2, and 3) across three time points: T0 (onset), T6 (6 months), and T18 (18 months). The visual content is divided into two columns: the Medial Temporal Lobe (left) and the Temporo-parieto-occipital region (right). Key findings include: (1) Patient 1 shows bilateral hypometabolism in lateral temporal and posterior parietal lobes at T0, peaking at T6 before resolving by T18. (2) Patient 2 exhibits bilateral occipital hypometabolism at T0 (white arrow) and transient basal ganglia hypermetabolism relative to cortical hypometabolism at T6. (3) Patient 3 demonstrates right-sided medial temporal lobe hypometabolism on PET (yellow arrow) corresponding to hyperintensity on MRI-FLAIR (yellow rectangle) at T0, with resolution at subsequent time points. The image illustrates the correlation between functional metabolic changes on PET and structural findings on MRI in autoimmune encephalitis progression and recovery.

Diagnostic neuroimaging featuring four Magnetic Resonance Imaging (MRI) panels displaying findings characteristic of autoimmune encephalitis. Panel A (axial T2-FLAIR) and Panel B (coronal T1-weighted contrast-enhanced) represent a patient with anti-NMDA receptor encephalitis, showing bilateral hyperintensities and corresponding T1 signal drop within the corpus amygdaloideum and right hippocampus without gadolinium enhancement. Panels C (axial T2-FLAIR) and D (coronal T2-FLAIR) represent a patient with anti-LGI1 encephalitis, demonstrating a marked unilateral (left) hyperintensity involving the medial temporal lobe and hippocampus. White arrows indicate the anatomical regions of interest, specifically highlighting the involvement of limbic structures. These diagnostic images are essential for identifying the inflammatory patterns of the limbic system, supporting the clinical diagnosis of different subtypes of autoimmune encephalitis by localizing signal abnormalities to the medial temporal lobes.
autoimmune encephalitis EEG delta brush pattern

This diagnostic image displays a multi-channel electroencephalogram (EEG) tracing highlighting the 'extreme delta brush' (EDB) pattern, a visual hallmark of anti-NMDAR encephalitis. The recording includes several longitudinal bipolar montage channels (ranging from Fp1-F3 to T6-O2) and a bottom rhythm strip for EKG monitoring. The primary neurophysiological finding consists of rhythmic, high-amplitude slow waves in the delta frequency range (1–3 Hz), which are superimposed with bursts of fast, low-amplitude beta activity (20–30 Hz) riding on the crest or trough of each delta wave. This characteristic morphology is most prominent in the bilateral frontal and temporal leads (e.g., Fp1-F3, Fp2-F4, T3-T5, T4-T6), suggesting a bifrontal and bitemporal predominance. In contrast, the parietal and occipital channels show a relatively more organized but still slowed background activity. This pattern is clinically significant for the diagnosis of autoimmune encephalitis and helps differentiate movement disorders from status epilepticus in acute clinical settings.

Educational medical composite depicting diagnostic features of anti-NMDAR encephalitis across multiple modalities. Panels A-F show longitudinal electroencephalography (EEG) recordings demonstrating the pathognomonic 'extreme delta brush' (EDB) pattern—characterized by rhythmic delta activity with superimposed fast beta frequency bursts. The EDB evolves from unilateral (Day 2) to bilateral involvement (Day 11) before regressing with treatment (Day 30). Annotations highlight EDB modulation during physiological states: weakening with eyes closed (blue arrows) and sleep stage II, and enhancement during eye-opening (red arrows) and slow-wave sleep. Panels G and H show normal axial T2-weighted and FLAIR MRI scans, emphasizing that structural imaging may be unremarkable in early disease. Panel I presents an Arterial Spin Labeling (ASL) perfusion map showing focal hyperperfusion in the right frontal and temporal regions, correlating with the initial EDB localization. This composite illustrates the critical role of functional neuroimaging and EEG in diagnosing autoimmune encephalitis when structural MRI is negative.

This diagnostic image displays a comparison chart of two electroencephalogram (EEG) traces, labeled A and B, demonstrating a characteristic neurologic finding and its subsequent resolution. Panel A illustrates the 'extreme delta brush' (EDB) pattern, a pathognomonic sign often associated with anti-NMDA receptor encephalitis. The waveform in Panel A is characterized by high-amplitude, rhythmic delta activity (1–3 Hz) with superimposed bursts of fast, rhythmic beta activity (20–30 Hz) appearing on the peaks or troughs of the delta waves, highlighted within a black bounding box. Panel B shows a follow-up EEG from the same patient after the initiation of immunotherapy. This trace demonstrates significant normalization, displaying rhythmic alpha frequency activity (8–13 Hz) with a smoother, more sinusoidal morphology and reduced amplitude compared to the delta-heavy waveforms in the initial study. This comparison is used in clinical education to identify specific biomarkers of autoimmune encephalitis and to monitor treatment response.
autoimmune encephalitis PET scan FDG brain metabolism
![This diagnostic image displays three views of an [18F]FDG-PET (Fluorodeoxyglucose-Positron Emission Tomography) scan of the human brain. The visualization includes a coronal posterior view (left) and two transaxial views (center and right) using a pseudocolor scale where red/orange represents high glucose metabolism and blue/purple indicates low metabolism. The images demonstrate marked, bilateral hypermetabolism in the medial temporal lobes, specifically involving the regions of the amygdala and hippocampus. Arrows in the coronal view highlight these symmetric areas of intense FDG uptake. This pattern is characteristic of limbic encephalitis, often a paraneoplastic syndrome, and serves as a critical differential diagnostic tool against other forms of rapid-onset dementia such as Creutzfeldt-Jakob Disease (CJD), which typically exhibits different metabolic distributions. The scan illustrates the functional involvement of the limbic system in inflammatory or autoimmune encephalitides, providing essential clinical information for distinguishing among various neurodegenerative and inflammatory pathologies of the central nervous system.](/_next/image?url=https%3A%2F%2Fcdn.orris.care%2Fcdss_images%2Fpmc_clinical_VQA_02fa20f2ad83231af666d15565f635f64e66643d1fb522748bf8135117133da5.jpg&w=3840&q=75)
This diagnostic image displays three views of an [18F]FDG-PET (Fluorodeoxyglucose-Positron Emission Tomography) scan of the human brain. The visualization includes a coronal posterior view (left) and two transaxial views (center and right) using a pseudocolor scale where red/orange represents high glucose metabolism and blue/purple indicates low metabolism. The images demonstrate marked, bilateral hypermetabolism in the medial temporal lobes, specifically involving the regions of the amygdala and hippocampus. Arrows in the coronal view highlight these symmetric areas of intense FDG uptake. This pattern is characteristic of limbic encephalitis, often a paraneoplastic syndrome, and serves as a critical differential diagnostic tool against other forms of rapid-onset dementia such as Creutzfeldt-Jakob Disease (CJD), which typically exhibits different metabolic distributions. The scan illustrates the functional involvement of the limbic system in inflammatory or autoimmune encephalitides, providing essential clinical information for distinguishing among various neurodegenerative and inflammatory pathologies of the central nervous system.

This diagnostic comparison contains six 18F-FDG PET/CT brain scans from a pediatric patient, organized in two rows to demonstrate disease progression and treatment response in autoimmune encephalitis (AE). The upper row (a, b: axial slices; c: sagittal MIP map) shows baseline metabolic activity with prominent, large-scale cortical hypometabolism (blue/green areas) in the bilateral parietal, temporal, and frontal lobes. In contrast, focal hypermetabolism (red/orange) is visible in the basal ganglia. The bottom row (d, e: axial slices; f: sagittal MIP map) represents a follow-up scan 2.5 months post-immunotherapy. These images reveal a significant metabolic recovery, characterized by the resolution of previous hypometabolism and a more homogeneous, physiological distribution of tracer uptake across the cortex (yellow/orange). The comparison illustrates the utility of FDG-PET in monitoring therapeutic efficacy and clinical improvement in pediatric autoimmune neurological conditions.

This diagnostic image set displays 18F-FDG PET data projected onto 3D brain surface reconstructions, illustrating metabolic patterns in autoimmune encephalitis. The three panels (A, B, C) show group comparisons: Panel A compares anti-NMDA receptor encephalitis to healthy controls, highlighting significant hypermetabolism (red) in frontotemporal areas and extensive hypometabolism (blue) in the parietal lobes. Panel B compares anti-LGI1 encephalitis to controls, showing hypermetabolism in the cerebellum, basal ganglia, and occipital cortex, with minimal hypometabolism in the anterior cingulate. Panel C presents a direct comparison between the two conditions, identifying distinct metabolic signatures used for differential diagnosis. The rows show different views (superior, lateral, and inferior) to provide a comprehensive cortical map. These PET patterns demonstrate that anti-NMDA receptor encephalitis typically presents with a frontotemporal-to-parietooccipital gradient of glucose metabolism, whereas anti-LGI1 is characterized by subcortical and cerebellar hypermetabolism.
limbic encephalitis hippocampus inflammation pathology

Magnetic Resonance Imaging (MRI) of the brain in a patient with GAD-antibody-associated limbic encephalitis. Panel A displays a coronal FLAIR (Fluid-Attenuated Inversion Recovery) sequence showing marked hyperintensity and swelling in the right hippocampus and mesial temporal lobe. Panel B shows a transversal T2-weighted sequence highlighting increased signal intensity in the right amygdala complex, hippocampus, and nucleus accumbens. These findings are consistent with active inflammation and space-occupying effects in the limbic system, characteristic of autoimmune encephalitis. The images illustrate the typical neuroradiological presentation used to diagnose hippocampal pathology, demonstrating asymmetrical signal changes and morphological swelling compared to the healthy contralateral left side.

This diagnostic image set showcases a 1.5-T MRI study of Limbic Encephalitis across four sequences. Panel (a) coronal FLAIR and (b) axial FLAIR demonstrate acute-phase findings including significant hyperintense swelling and edema of the left hippocampus. Panel (c) is a contrast-enhanced T1-weighted axial image revealing discrete patchy enhancement within the left amygdala, indicative of blood-brain barrier disruption. Panel (d) displays a follow-up axial FLAIR image obtained six months later, illustrating the progression of the disease. In the chronic stage, the previous hyperintensity has resolved, but is replaced by marked volume loss (atrophy) of the left hippocampus. Notable morphological changes include the disappearance of the normal hippocampal digitations of the hippocampal head and dilation of the adjacent temporal horn of the lateral ventricle. This comparison serves as a clinical teaching tool for recognizing the evolution from acute mesiotemporal inflammation to chronic secondary gliosis and atrophy in limbic encephalitis.
ovarian teratoma causing autoimmune encephalitis

This diagnostic multi-modal imaging set displays axial brain slices from a patient with autoimmune encephalitis and an associated ovarian teratoma. The figure is organized into five columns: (a) FDG-PET, (b) T2-FLAIR MRI, (c) Diffusion-Weighted Imaging (DWI), (d) T1 contrast-enhanced MRI, and (e) FDG statistical deviation (z-score) maps. The FDG-PET images (column a) demonstrate significant metabolic abnormalities, specifically hypometabolism in the left middle frontal lobe (top row, blue/green regions) and prominent hypermetabolism in the bilateral basal ganglia and left temporal lobe (middle row, red/yellow hot spots). In contrast, the corresponding MRI sequences (columns b, c, d) appear unremarkable, showing no significant signal alterations on T2-FLAIR, no restricted diffusion on DWI, and no pathological gadolinium enhancement. The statistical deviation maps (column e) reinforce the PET findings by highlighting regions of metabolic asymmetry and deviation from the norm. This comparison illustrates a common clinical scenario where functional metabolic changes detected by PET precede visible structural abnormalities on conventional MRI in early-stage encephalitis.

This composite figure presents gynecological ultrasound, pelvic CT, and cranial MRI findings associated with anti-NMDAR encephalitis and ovarian teratoma. (A) Ultrasound shows a 8.3x5.9 cm mixed echogenic left adnexal mass. (B-C) Pelvic CT images reveal a large (10.2x8.4 cm), irregular cystic-solid mass in the posterior bladder and anterior uterine regions, containing fat and calcification components, characteristic of a teratoma. (D) Follow-up ultrasound shows post-surgical resolution. (E-I) Initial axial cranial MRI shows a focal lesion in the splenium of the corpus callosum (SCC) marked by arrows. The lesion is slightly hypointense on T1WI (E), hyperintense on T2WI (F), FLAIR (G), and DWI (H), with corresponding hypointensity on the ADC map (I), suggesting cytotoxic edema. (J-N) Repeated MRI on day 52 demonstrates complete resolution of the SCC lesion across all sequences (T1WI, T2WI, FLAIR, DWI, ADC). This imaging sequence illustrates a Cytotoxic Lesion of the Corpus Callosum (CLOCCs) associated with paraneoplastic autoimmune encephalitis.
faciobrachial dystonic seizures LGI1 encephalitis

This clinical photograph consists of two panels (A and B) showcasing ictal manifestations of Faciobrachial Dystonic Seizures (FBDS) in two different patients, a pathognomonic sign of anti-LGI1 encephalitis. Panel A displays an elderly male patient in a semi-recumbent hospital bed position exhibiting classic ictal features: unilateral facial grimacing with an open-mouthed expression and concurrent dystonic posturing of the right upper extremity, characterized by elbow flexion and a clenched hand. Panel B shows a female patient undergoing video-electroencephalography (VEEG) monitoring, indicated by the EEG electrodes and white adhesive patches visible on her forehead. She is positioned supine and displays a more subtle ictal phase with a neutral facial expression and bilateral upper limbs resting across the lower torso. The clinical context highlights these brief, stereotyped involuntary movements as critical diagnostic markers for autoimmune limbic encephalitis, often associated with hyponatremia and basal ganglia signal abnormalities on neuroimaging.

Educational composite figure illustrating neuroimaging patterns in LGI1 autoimmune encephalitis (AE). Panel A presents a clinical flowchart (n=34) categorizing patients by Faciobrachial Dystonic Seizures (FBDS) status, showing that 18F-FDG-PET has higher sensitivity than MRI, identifying positive findings in most MRI-negative cases. Panel B displays representative axial brain 18F-FDG-PET/MRI fusion images demonstrating metabolic patterns compared to a normal scan. Hypermetabolism is visualized via heat-map overlays in the Medial Temporal Lobe (MTL only), Basal Ganglia (BG only), or both (BG + MTL). Panels C and D are bar graphs quantifying these metabolic patterns. Panel C compares the distribution of BG-only, MTL-only, and BG+MTL hypermetabolism between FBDS and non-FBDS groups, highlighting that FBDS patients more frequently exhibit BG-only involvement (44%). Panel D shows the prevalence of FBDS clinical phenotype within each metabolic subgroup, indicating that 88% of patients with BG-only hypermetabolism present with FBDS (P < 0.05). This content illustrates the high diagnostic sensitivity of PET for LGI1 AE and the clinical correlation between basal ganglia hypermetabolism and dystonic seizures.
# Download all images to local files cd /tmp/workspace/autoimmune-encephalitis-ppt declare -A IMGS=( ["mri_nmdar_flair.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d65f241950502ce6461d43e9fdd04b5ae3ecf13afb55a2494610bfc6bdb5974a.jpg" ["mri_lgi1_vs_nmdar.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b5dd9753103d510cf42e9477183d1b6eba9582dc20642e794a7ab4c8d55ecee3.jpg" ["eeg_delta_brush.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_3913cedb5718ae1e99c3a681b639ae5319a7bd1ecaf765b7638e5729dc230ef7.jpg" ["eeg_delta_brush2.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fa422cea997ac8e454163164ce25614c39855e50e35c3516924cb28f521be9b5.jpg" ["pet_limbic.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_02fa20f2ad83231af666d15565f635f64e66643d1fb522748bf8135117133da5.jpg" ["pet_nmdar_lgi1.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b75d99ac947a6ede850b1240bf2d7e65275f40e4ce566192310b79eb7b5909e8.jpg" ["mri_limbic_gad.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9c6e410584f2af7ab1a3f6fa85b462d93516f4b364b7ec3639499e702d39c2ff.jpg" ["mri_limbic_atrophy.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a20bdfa3d87d66c3084758a78d5d110ec2ebe569ce2193df50db75e3e2dfd07c.jpg" ["ovarian_teratoma.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4ece1a02be594f259e164e259d6fa7e7724a3e3222337c49ae686a859c1ad77c.jpg" ["fbds_lgi1.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a895a8a17ac6c1137cb9016f4dea044279fcc1fda7fd9133da5c4aa72f581894.jpg" ["pet_parietal.jpg"]="https://cdn.orris.care/cdss_images/pmc_clinical_VQA_43715622bf64f3e7ca380cf96a33ce9208f74dfe026b1fceb2324f742fd3f999.jpg" ) for fname in "${!IMGS[@]}"; do url="${IMGS[$fname]}" curl -s -o "images/$fname" "$url" 2>/dev/null || wget -q -O "images/$fname" "$url" echo "$fname: $(wc -c < images/$fname) bytes" done
mkdir -p /tmp/workspace/autoimmune-encephalitis-ppt/images cd /tmp/workspace/autoimmune-encephalitis-ppt/images python3 - <<'EOF' import urllib.request, os imgs = { "mri_nmdar_flair.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d65f241950502ce6461d43e9fdd04b5ae3ecf13afb55a2494610bfc6bdb5974a.jpg", "mri_lgi1_vs_nmdar.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b5dd9753103d510cf42e9477183d1b6eba9582dc20642e794a7ab4c8d55ecee3.jpg", "eeg_delta_brush.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_3913cedb5718ae1e99c3a681b639ae5319a7bd1ecaf765b7638e5729dc230ef7.jpg", "eeg_delta_brush2.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fa422cea997ac8e454163164ce25614c39855e50e35c3516924cb28f521be9b5.jpg", "pet_limbic.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_02fa20f2ad83231af666d15565f635f64e66643d1fb522748bf8135117133da5.jpg", "pet_nmdar_lgi1.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b75d99ac947a6ede850b1240bf2d7e65275f40e4ce566192310b79eb7b5909e8.jpg", "mri_limbic_gad.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9c6e410584f2af7ab1a3f6fa85b462d93516f4b364b7ec3639499e702d39c2ff.jpg", "mri_limbic_atrophy.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a20bdfa3d87d66c3084758a78d5d110ec2ebe569ce2193df50db75e3e2dfd07c.jpg", "ovarian_teratoma.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4ece1a02be594f259e164e259d6fa7e7724a3e3222337c49ae686a859c1ad77c.jpg", "fbds_lgi1.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a895a8a17ac6c1137cb9016f4dea044279fcc1fda7fd9133da5c4aa72f581894.jpg", "pet_parietal.jpg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_43715622bf64f3e7ca380cf96a33ce9208f74dfe026b1fceb2324f742fd3f999.jpg", } for fname, url in imgs.items(): try: req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'}) with urllib.request.urlopen(req, timeout=15) as r: data = r.read() with open(fname, 'wb') as f: f.write(data) print(f"OK {fname}: {len(data)} bytes") except Exception as e: print(f"FAIL {fname}: {e}") EOF
~/autoimmune-encephalitis-ppt/add_images.py
"""
Add medical images to the Autoimmune Encephalitis PPT.
Strategy:
- Insert 4 new dedicated image slides at strategic positions
- Also add inline thumbnail images to some text-heavy slides
"""
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN
from io import BytesIO
import os, copy
from lxml import etree
IMG_DIR = "/tmp/workspace/autoimmune-encephalitis-ppt/images"
SRC = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar.pptx"
OUT = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx"
# ── Colors ────────────────────────────────────────────────────
DARK_NAVY = RGBColor(0x0D, 0x1B, 0x2A)
MED_BLUE = RGBColor(0x1A, 0x6F, 0xAA)
LIGHT_BLUE = RGBColor(0xE8, 0xF4, 0xFD)
TEAL = RGBColor(0x00, 0x8B, 0x8B)
ACCENT_RED = RGBColor(0xC0, 0x39, 0x2B)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GRAY = RGBColor(0x2C, 0x3E, 0x50)
GOLD = RGBColor(0xF3, 0x9C, 0x12)
GREEN = RGBColor(0x1E, 0x8B, 0x4C)
def add_rect(slide, left, top, width, height, fill_color):
shape = slide.shapes.add_shape(1,
Inches(left), Inches(top), Inches(width), Inches(height))
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
shape.line.fill.background()
return shape
def add_text(slide, left, top, width, height, text, size=13,
bold=False, color=DARK_GRAY, align=PP_ALIGN.LEFT,
italic=False, wrap=True):
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(3); tf.margin_right = Pt(3)
tf.margin_top = Pt(2); tf.margin_bottom = Pt(2)
p = tf.paragraphs[0]
p.alignment = align
r = p.add_run()
r.text = text
r.font.size = Pt(size)
r.font.bold = bold
r.font.italic = italic
r.font.color.rgb = color
r.font.name = "Calibri"
return tb
def add_image(slide, path, left, top, width, height):
if not os.path.exists(path):
print(f" WARNING: image not found: {path}")
return None
try:
slide.shapes.add_picture(path, Inches(left), Inches(top),
Inches(width), Inches(height))
return True
except Exception as e:
print(f" ERROR adding image {path}: {e}")
return None
def header(slide, title, subtitle=""):
add_rect(slide, 0, 0, 13.333, 1.35, DARK_NAVY)
add_rect(slide, 0, 1.35, 13.333, 0.07, TEAL)
add_text(slide, 0.35, 0.12, 12.5, 0.95, title,
size=28, bold=True, color=WHITE)
if subtitle:
add_text(slide, 0.35, 0.88, 12.0, 0.45, subtitle,
size=13, color=RGBColor(0xA8, 0xD8, 0xEA))
def footer(slide, text="Autoimmune Encephalitis | MD Medicine Neurology Seminar"):
add_rect(slide, 0, 7.15, 13.333, 0.35, DARK_NAVY)
add_text(slide, 0.3, 7.17, 12.5, 0.28, text,
size=9, color=RGBColor(0xB0, 0xC4, 0xDE))
# ── Load presentation ─────────────────────────────────────────
prs = Presentation(SRC)
blank = prs.slide_layouts[6]
# ─────────────────────────────────────────────────────────────
# NEW SLIDE A: MRI Patterns in Autoimmune Encephalitis
# Insert after slide 7 (NMDA-R slide, 0-indexed = 6) → position 7
# ─────────────────────────────────────────────────────────────
def make_mri_slide(prs, blank):
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY)
header(s, "MRI Patterns in Autoimmune Encephalitis",
"FLAIR hyperintensity – medial temporal lobes | LGI1 vs NMDAR-E")
add_rect(s, 0, 1.42, 13.333, 0.07, GOLD)
# Left image – NMDAR FLAIR progression
add_image(s, f"{IMG_DIR}/mri_nmdar_flair.jpg", 0.3, 1.55, 5.9, 4.3)
add_rect(s, 0.3, 5.85, 5.9, 1.3, MED_BLUE)
add_text(s, 0.4, 5.88, 5.7, 1.24,
"Anti-NMDAR Encephalitis – FLAIR Progression\n"
"Left: Initial MRI – left hippocampal hyperintensity (acute edema)\n"
"Right: Follow-up – hippocampal atrophy after immunotherapy\n"
"⚑ MRI can be NORMAL in up to 50% of early NMDAR-E",
size=10, color=WHITE)
# Right image – LGI1 vs NMDAR comparison
add_image(s, f"{IMG_DIR}/mri_lgi1_vs_nmdar.jpg", 6.9, 1.55, 6.1, 4.3)
add_rect(s, 6.9, 5.85, 6.1, 1.3, TEAL)
add_text(s, 7.0, 5.88, 5.9, 1.24,
"NMDAR-E (top) vs LGI1-E (bottom) – MRI Comparison\n"
"NMDAR-E: Bilateral amygdala/hippocampus – T2 signal without enhancement\n"
"LGI1-E: Unilateral medial temporal hyperintensity (left hippocampus)\n"
"⚑ Contrast enhancement is uncommon in both",
size=10, color=WHITE)
footer(s)
return s
# NEW SLIDE B: EEG Delta Brush Pattern
def make_eeg_slide(prs, blank):
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY)
header(s, "EEG: Extreme Delta Brush Pattern",
"Pathognomonic for Anti-NMDAR Encephalitis | Present in ~30% of cases")
add_rect(s, 0, 1.42, 13.333, 0.07, GOLD)
# Left image – clean delta brush trace
add_image(s, f"{IMG_DIR}/eeg_delta_brush.jpg", 0.3, 1.55, 6.2, 4.0)
add_rect(s, 0.3, 5.55, 6.2, 1.6, MED_BLUE)
add_text(s, 0.4, 5.58, 6.0, 1.55,
"Extreme Delta Brush (EDB) Pattern\n"
"• Rhythmic high-amplitude delta waves (1–3 Hz)\n"
"• Superimposed fast beta bursts (20–30 Hz) on each delta wave\n"
"• Bifrontal and bitemporal predominance\n"
"• Differentiates movement disorder from subclinical status epilepticus",
size=10.5, color=WHITE)
# Right image – longitudinal EDB evolution
add_image(s, f"{IMG_DIR}/eeg_delta_brush2.jpg", 6.8, 1.55, 6.2, 4.0)
add_rect(s, 6.8, 5.55, 6.2, 1.6, TEAL)
add_text(s, 6.9, 5.58, 6.0, 1.55,
"EDB Evolution Under Treatment\n"
"• Day 2: Unilateral EDB (right hemisphere)\n"
"• Day 11: Bilateral EDB – worse before improvement\n"
"• Day 30: Resolution with immunotherapy (normal alpha rhythm)\n"
"• ASL perfusion: Focal hyperperfusion correlates with EDB location",
size=10.5, color=WHITE)
footer(s)
return s
# NEW SLIDE C: PET Scan Patterns
def make_pet_slide(prs, blank):
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY)
header(s, "18F-FDG PET in Autoimmune Encephalitis",
"Metabolic signatures for NMDAR-E vs LGI1-E | More sensitive than MRI early on")
add_rect(s, 0, 1.42, 13.333, 0.07, GOLD)
# Left – limbic hypermetabolism
add_image(s, f"{IMG_DIR}/pet_limbic.jpg", 0.3, 1.55, 4.0, 3.8)
add_rect(s, 0.3, 5.35, 4.0, 1.8, MED_BLUE)
add_text(s, 0.4, 5.38, 3.8, 1.72,
"Limbic Encephalitis – FDG PET\n"
"• Bilateral hypermetabolism in amygdala & hippocampus (red)\n"
"• Characteristic of paraneoplastic limbic encephalitis\n"
"• Differentiates from CJD (which shows parietal/occipital pattern)",
size=10, color=WHITE)
# Middle – NMDAR vs LGI1 comparison PET surface maps
add_image(s, f"{IMG_DIR}/pet_nmdar_lgi1.jpg", 4.65, 1.55, 5.0, 3.8)
add_rect(s, 4.65, 5.35, 5.0, 1.8, TEAL)
add_text(s, 4.75, 5.38, 4.8, 1.72,
"NMDAR-E vs LGI1-E – PET Surface Maps\n"
"A: NMDAR-E – Frontotemporal hypermetabolism + parietal hypometabolism\n"
"B: LGI1-E – Basal ganglia + cerebellar hypermetabolism\n"
"C: Direct comparison – distinct metabolic fingerprints\n"
"⚑ PET can distinguish antibody subtypes when antibodies unavailable",
size=10, color=WHITE)
# Right – parietal lesion (MRI-negative, PET-positive)
add_image(s, f"{IMG_DIR}/pet_parietal.jpg", 9.95, 1.55, 3.05, 3.8)
add_rect(s, 9.95, 5.35, 3.05, 1.8, ACCENT_RED)
add_text(s, 10.05, 5.38, 2.85, 1.72,
"MRI Negative – PET Positive\n"
"• PET shows basal ganglia/temporal hypermetabolism\n"
"• MRI sequences all unremarkable\n"
"• PET detects AE BEFORE MRI changes appear!\n"
"⚑ Order PET when MRI is normal but AE suspected",
size=10, color=WHITE)
footer(s)
return s
# NEW SLIDE D: Clinical Clues Image Slide
def make_clinical_slide(prs, blank):
s = prs.slides.add_slide(blank)
add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY)
header(s, "Clinical & Radiological Clues",
"FBDS in LGI1-E | Ovarian Teratoma | Limbic Atrophy")
add_rect(s, 0, 1.42, 13.333, 0.07, GOLD)
# Left – FBDS clinical photo
add_image(s, f"{IMG_DIR}/fbds_lgi1.jpg", 0.3, 1.55, 4.0, 4.2)
add_rect(s, 0.3, 5.75, 4.0, 1.4, MED_BLUE)
add_text(s, 0.4, 5.78, 3.8, 1.35,
"Faciobrachial Dystonic Seizures (FBDS) – Anti-LGI1\n"
"• Brief (<3s), frequent (>100/day), stereotyped\n"
"• Facial grimacing + ipsilateral arm dystonia\n"
"• PATHOGNOMONIC for LGI1-E (APE2 score +3!)\n"
"• Treat with immunotherapy NOT just anti-seizure drugs",
size=10, color=WHITE)
# Middle – Ovarian teratoma + brain MRI
add_image(s, f"{IMG_DIR}/ovarian_teratoma.jpg", 4.65, 1.55, 5.0, 4.2)
add_rect(s, 4.65, 5.75, 5.0, 1.4, TEAL)
add_text(s, 4.75, 5.78, 4.8, 1.35,
"Ovarian Teratoma + Anti-NMDAR-E\n"
"• USS/CT: mixed cystic-solid pelvic mass with fat & calcification\n"
"• Brain MRI: corpus callosum lesion (cytotoxic edema) – CLOC\n"
"• Day 52 MRI: COMPLETE RESOLUTION after teratoma removal\n"
"⚑ Urgently resect teratoma → dramatic neurological improvement",
size=10, color=WHITE)
# Right – Limbic atrophy on follow-up
add_image(s, f"{IMG_DIR}/mri_limbic_atrophy.jpg", 9.95, 1.55, 3.05, 4.2)
add_rect(s, 9.95, 5.75, 3.05, 1.4, ACCENT_RED)
add_text(s, 10.05, 5.78, 2.85, 1.35,
"Limbic Encephalitis – Late Atrophy\n"
"• Acute: hippocampal swelling + FLAIR signal\n"
"• 6 months: hippocampal volume LOSS\n"
"• Temporal horn dilatation (ex-vacuo)\n"
"⚑ Delayed treatment → irreversible atrophy",
size=10, color=WHITE)
footer(s)
return s
# ── Build the new image slides ────────────────────────────────
mri_slide = make_mri_slide(prs, blank)
eeg_slide = make_eeg_slide(prs, blank)
pet_slide = make_pet_slide(prs, blank)
clin_slide = make_clinical_slide(prs, blank)
# ── Reorder slides ────────────────────────────────────────────
# Current order after appending: original 25 slides + 4 new (indices 25-28)
# Target insertion positions (0-indexed, in final deck):
# MRI slide → after slide 7 (NMDA-R slide) = index 8
# EEG slide → after slide 10 (Investigations slide) = index 12 (shifted)
# PET slide → after EEG slide = index 13
# Clinical → after slide 8 (Other antibodies) = index 10 (shifted)
def move_slide(prs, old_idx, new_idx):
"""Move slide at old_idx to new_idx in the presentation."""
xml_slides = prs.slides._sldIdLst
slides = list(xml_slides)
slide_elem = slides[old_idx]
xml_slides.remove(slide_elem)
xml_slides.insert(new_idx, slide_elem)
total = len(prs.slides)
print(f"Total slides before reorder: {total}")
# Current indices of our 4 new slides (appended at end = 25,26,27,28)
# mri=25, eeg=26, pet=27, clin=28
# Step 1: Move MRI slide (currently at 25) → position 8 (after slide index 7 = NMDA slide)
move_slide(prs, 25, 8)
# Now: mri at 8, eeg at 26 (still last-1... but deck shifted), pet at 27, clin at 28...
# Actually after moving mri, the remaining new slides shift: eeg=25, pet=26, clin=27
# Step 2: Move Clinical/FBDS slide → after slide index 9 (Other Antibodies, now at 9 after MRI insert)
# clin is currently at 27. Move to position 11
move_slide(prs, 27, 11)
# Now: mri@8, clin@11, eeg@25, pet@26 (shifted again)
# Step 3: Move EEG slide → after Investigations slide (originally slide 10, now ~14 after inserts)
# Investigations is 3rd from original position 10, now ~14. Put EEG at 16
move_slide(prs, 25, 16)
# eeg@16, pet@26 (shifted)
# Step 4: Move PET slide right after EEG → position 17
move_slide(prs, 26, 17)
print(f"Total slides after reorder: {len(prs.slides)}")
# ── Save ──────────────────────────────────────────────────────
buf = BytesIO()
prs.save(buf)
with open(OUT, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {OUT}")
# Verify
prs2 = Presentation(OUT)
print(f"Verification – slides in final deck: {len(prs2.slides)}")
cd /tmp/workspace/autoimmune-encephalitis-ppt && python add_images.py 2>&1
python3 - <<'EOF' from pptx import Presentation prs = Presentation("/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx") print(f"Total slides: {len(prs.slides)}") for i, slide in enumerate(prs.slides): imgs = [s for s in slide.shapes if s.shape_type == 13] # 13 = PICTURE title_shapes = [s for s in slide.shapes if s.has_text_frame] title = "" for sh in title_shapes: t = sh.text_frame.text.strip() if len(t) > 5: title = t[:60] break print(f" Slide {i+1:2d}: {len(imgs)} image(s) | {title}") import os size = os.path.getsize("/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx") print(f"\nFile size: {size/1024:.1f} KB") EOF
python3 - <<'EOF' from pptx import Presentation from pptx.oxml.ns import qn from io import BytesIO import copy SRC = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx" OUT = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx" prs = Presentation(SRC) # Print current order for i, slide in enumerate(prs.slides): for sh in slide.shapes: if sh.has_text_frame: t = sh.text_frame.text.strip() if len(t) > 5: print(f" {i}: {t[:55]}") break EOF
python3 - <<'EOF' from pptx import Presentation from io import BytesIO SRC = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx" OUT = "/tmp/workspace/autoimmune-encephalitis-ppt/Autoimmune_Encephalitis_Seminar_v2.pptx" prs = Presentation(SRC) sldIdLst = prs.slides._sldIdLst # Current order (0-indexed): # 0 Title # 1 Overview # 2 Introduction # 3 Epidemiology # 4 Classification # 5 Pathophysiology # 6 Anti-NMDAR-E # 7 Other Antibody Syndromes # 8 MRI Patterns [IMAGE] ← good position # 9 Clinical Presentation # 10 APE2 Score # 11 PET [IMAGE] ← should be after Investigations (12) # 12 Investigations # 13 Old Neuroimaging slide (placeholder from original) # 14 Diagnostic Criteria # 15 Differential Diagnosis # 16 References ← wrong place # 17 THANK YOU ← wrong place # 18 Treatment 1st line # 19 Treatment 2nd/3rd line # 20 Checkpoint inhibitor AE # 21 Special Populations # 22 Prognosis # 23 Management Algorithm # 24 Case Vignette # 25 Antibody Reference Table # 26 Key Takeaways # 27 EEG Delta Brush [IMAGE] ← should be after Investigations # 28 Clinical Clues [IMAGE] ← should be after Other Antibody (8) # Desired final order: desired = [ 0, # Title 1, # Overview 2, # Introduction 3, # Epidemiology 4, # Classification 5, # Pathophysiology 6, # Anti-NMDAR-E 7, # Other Antibody Syndromes 28, # Clinical & Radiological Clues [IMAGE] ← after antibodies 9, # Clinical Presentation 10, # APE2 Score 12, # Investigations 8, # MRI Patterns [IMAGE] ← after Investigations 27, # EEG Delta Brush [IMAGE] ← after MRI 11, # PET FDG [IMAGE] ← after EEG 13, # Old Neuroimaging (keep for MRI image from before) 14, # Diagnostic Criteria 15, # Differential Diagnosis 18, # Treatment 1st line 19, # Treatment 2nd/3rd 20, # Checkpoint inhibitor 21, # Special Populations 22, # Prognosis 23, # Management Algorithm 24, # Case Vignette 25, # Antibody Reference Table 26, # Key Takeaways 16, # References 17, # Thank You ] # Grab all slide elements in current order all_slides = list(sldIdLst) print(f"Total slide elements: {len(all_slides)}") print(f"Desired order length: {len(desired)}") # Remove all from sldIdLst, then re-insert in desired order for elem in all_slides: sldIdLst.remove(elem) for idx in desired: sldIdLst.append(all_slides[idx]) # Verify print("\nNew slide order:") for i, slide in enumerate(prs.slides): for sh in slide.shapes: if sh.has_text_frame: t = sh.text_frame.text.strip() if len(t) > 4: imgs = sum(1 for s in slide.shapes if s.shape_type == 13) print(f" Slide {i+1:2d}: {t[:55]:55s} | {imgs} img(s)") break buf = BytesIO() prs.save(buf) with open(OUT, 'wb') as f: f.write(buf.getvalue()) import os print(f"\nSaved: {OUT} ({os.path.getsize(OUT)/1024:.1f} KB)") EOF
Autoimmune Encephalitis Seminar v2
Presentation · PPTX
| Slide | Title | Images Inside |
|---|---|---|
| 9 | Clinical & Radiological Clues | FBDS clinical photo (LGI1-E) + Ovarian teratoma USS/CT/MRI + Limbic atrophy follow-up |
| 13 | MRI Patterns in AE | Anti-NMDAR FLAIR progression (acute → atrophy) + LGI1 vs NMDAR MRI comparison |
| 14 | EEG: Extreme Delta Brush | Delta brush multichannel tracing + Longitudinal EDB evolution under treatment |
| 15 | 18F-FDG PET Patterns | Limbic hypermetabolism + NMDAR vs LGI1 PET surface maps + MRI-negative/PET-positive case |