Help me prepare slides for pediatric radiology meet i
mkdir -p /tmp/workspace/peds-radiology-meet && ls /tmp/workspace/peds-radiology-meet/
~/peds-radiology-meet/build_slides.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from pptx.oxml.ns import qn
from lxml import etree
from io import BytesIO
# ─── Color palette ───────────────────────────────────────────────
C_NAVY = RGBColor(0x1A, 0x3A, 0x5C) # dark navy – header bg
C_TEAL = RGBColor(0x00, 0x7A, 0x87) # teal accent
C_GOLD = RGBColor(0xD4, 0x9A, 0x00) # gold highlight
C_WHITE = RGBColor(0xFF, 0xFF, 0xFF)
C_LGRAY = RGBColor(0xF2, 0xF4, 0xF7) # slide background
C_DGRAY = RGBColor(0x33, 0x33, 0x33) # body text
C_RED = RGBColor(0xCC, 0x00, 0x00) # highlight
C_LIGHT_TEAL = RGBColor(0xE0, 0xF4, 0xF6)
W = Inches(13.333)
H = Inches(7.5)
prs = Presentation()
prs.slide_width = W
prs.slide_height = H
blank = prs.slide_layouts[6]
# ─── Helpers ─────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_color):
shape = slide.shapes.add_shape(1, x, y, w, h)
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
shape.line.fill.background()
return shape
def add_tb(slide, x, y, w, h, text, size, bold=False,
color=C_DGRAY, align=PP_ALIGN.LEFT, italic=False, wrap=True):
tb = slide.shapes.add_textbox(x, y, w, h)
tf = tb.text_frame
tf.word_wrap = wrap
tf.margin_left = Inches(0.05)
tf.margin_right = Inches(0.05)
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.name = "Calibri"
run.font.size = Pt(size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
return tb
def add_bullet_tb(slide, x, y, w, h, items, size=14, color=C_DGRAY,
bullet_char="▸ ", title=None, title_size=16):
tb = slide.shapes.add_textbox(x, y, w, h)
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Inches(0.08)
tf.margin_right = Inches(0.05)
tf.margin_top = Pt(4)
tf.margin_bottom= Pt(2)
first = True
if title:
p = tf.paragraphs[0]
p.alignment = PP_ALIGN.LEFT
r = p.add_run()
r.text = title
r.font.name = "Calibri"
r.font.size = Pt(title_size)
r.font.bold = True
r.font.color.rgb = C_TEAL
first = False
for item in items:
if first:
p = tf.paragraphs[0]
first = False
else:
p = tf.add_paragraph()
p.alignment = PP_ALIGN.LEFT
r = p.add_run()
# support (text, highlight_color) tuples
if isinstance(item, tuple):
r.text = bullet_char + item[0]
r.font.color.rgb = item[1]
else:
r.text = bullet_char + item
r.font.color.rgb = color
r.font.name = "Calibri"
r.font.size = Pt(size)
p.space_before = Pt(3)
return tb
def slide_bg(slide, color=C_LGRAY):
add_rect(slide, 0, 0, W, H, color)
def header_bar(slide, title, subtitle=None):
add_rect(slide, 0, 0, W, Inches(1.1), C_NAVY)
add_tb(slide, Inches(0.35), Inches(0.08), Inches(12.5), Inches(0.6),
title, 26, bold=True, color=C_WHITE)
if subtitle:
add_tb(slide, Inches(0.35), Inches(0.65), Inches(12.5), Inches(0.4),
subtitle, 14, color=RGBColor(0xB0, 0xD4, 0xE8), italic=True)
# gold accent line
add_rect(slide, 0, Inches(1.1), W, Pt(4), C_GOLD)
def img_placeholder(slide, x, y, w, h, label="[Insert Radiology Image Here]"):
add_rect(slide, x, y, w, h, RGBColor(0xCC, 0xDD, 0xEE))
# dashed border simulation using thin outline
shape = slide.shapes.add_shape(1, x, y, w, h)
shape.fill.background()
shape.line.color.rgb = C_TEAL
shape.line.width = Pt(1.5)
# label
add_tb(slide, x + Inches(0.1), y + h//2 - Pt(20),
w - Inches(0.2), Inches(0.5), label,
11, color=C_TEAL, align=PP_ALIGN.CENTER, italic=True)
def section_divider(slide, text):
slide_bg(slide, C_NAVY)
add_rect(slide, Inches(1.5), Inches(3.1), Inches(10.3), Pt(4), C_GOLD)
add_tb(slide, Inches(1.5), Inches(2.5), Inches(10.3), Inches(0.9),
text, 36, bold=True, color=C_WHITE, align=PP_ALIGN.CENTER)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 1: TITLE
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, W, H, C_NAVY)
add_rect(slide, 0, Inches(2.8), W, Inches(2.2), RGBColor(0x00, 0x55, 0x70))
# Gold strip
add_rect(slide, 0, Inches(2.75), W, Pt(6), C_GOLD)
add_rect(slide, 0, Inches(5.0), W, Pt(6), C_GOLD)
add_tb(slide, Inches(1), Inches(1.0), Inches(11.3), Inches(0.9),
"PEDIATRIC RADIOLOGY MEET", 18, color=RGBColor(0xB0, 0xD4, 0xE8),
align=PP_ALIGN.CENTER, bold=True)
add_tb(slide, Inches(0.5), Inches(1.8), Inches(12.3), Inches(1.1),
"DISSEMINATED TUBERCULOSIS", 40, bold=True, color=C_WHITE,
align=PP_ALIGN.CENTER)
add_tb(slide, Inches(0.5), Inches(2.85), Inches(12.3), Inches(0.8),
"TB Meningitis Stage 2 | Multiple Tuberculomas | Middle Ear TB | Pulmonary TB",
16, color=C_GOLD, align=PP_ALIGN.CENTER, italic=True)
# Presenting team
add_tb(slide, Inches(0.5), Inches(5.15), Inches(12.3), Inches(0.4),
"Presented by:", 13, color=RGBColor(0xAA, 0xCC, 0xDD), align=PP_ALIGN.CENTER)
add_tb(slide, Inches(0.5), Inches(5.5), Inches(12.3), Inches(1.5),
"Dr. Shinola (Senior Resident) | Dr. Dheeraj Kanekanti (Pediatric Surgeon)\n"
"Dr. Arathi (Pediatric Neurologist) | Dr. Shankar Kanumakala (Pediatric Endocrinologist)\n"
"Dr. Krithika (Geneticist)",
12, color=C_WHITE, align=PP_ALIGN.CENTER)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 2: CASE OVERVIEW
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Case Overview", "Pediatric Radiology Meet")
add_rect(slide, Inches(0.3), Inches(1.3), Inches(6.0), Inches(5.7), C_WHITE)
add_rect(slide, Inches(6.7), Inches(1.3), Inches(6.3), Inches(5.7), C_WHITE)
add_bullet_tb(slide, Inches(0.4), Inches(1.35), Inches(5.8), Inches(5.5),
items=[
"Age: Pediatric patient (school age)",
"Sex: Female",
"Referring team: Pediatric Surgery, Neurology, Endocrinology, Genetics",
"Setting: Tertiary care (NIMHANS referral)",
],
size=13, title="Patient Profile", title_size=15)
add_bullet_tb(slide, Inches(6.8), Inches(1.35), Inches(6.0), Inches(5.5),
items=[
("Disseminated TB", C_RED),
"TB Meningitis - Stage 2",
"Multiple Intracranial Tuberculomas",
"? Middle Ear TB",
"? Pulmonary TB (Miliary pattern)",
],
size=13, title="Final Diagnosis", title_size=15)
# divider line
add_rect(slide, Inches(6.55), Inches(1.3), Pt(2), Inches(5.7), C_TEAL)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 3: CHIEF COMPLAINTS & TIMELINE
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Chief Complaints & Presenting Timeline")
# Timeline arrow background
add_rect(slide, Inches(0.3), Inches(2.1), Inches(12.7), Inches(0.5), C_LIGHT_TEAL)
# Timeline markers
for i, (label, desc) in enumerate([
("3 months ago", "Ear pain + tinnitus\nRight-sided discharge"),
("2 months ago", "Imbalance while\nwalking"),
("1 month ago", "Headache, photophobia\nDiplopia (right lateral gaze)\nOutside hosp. admission\nDx: Disseminated TB\nATT started"),
("Present", "Vomiting (1 day)\nFever (1 day)\nReferral to NIMHANS"),
]):
x = Inches(0.5 + i * 3.1)
add_rect(slide, x, Inches(2.0), Inches(0.15), Inches(0.7), C_TEAL)
add_tb(slide, x - Inches(0.6), Inches(1.5), Inches(1.5), Inches(0.5),
label, 11, bold=True, color=C_TEAL, align=PP_ALIGN.CENTER)
add_rect(slide, x - Inches(0.6), Inches(2.75), Inches(1.5), Inches(2.8),
RGBColor(0xE8, 0xF4, 0xF8))
add_tb(slide, x - Inches(0.58), Inches(2.8), Inches(1.46), Inches(2.7),
desc, 12, color=C_DGRAY)
# Complaints table below
add_tb(slide, Inches(0.3), Inches(5.7), Inches(12.5), Inches(0.3),
"Key Associated Features:", 13, bold=True, color=C_NAVY)
add_bullet_tb(slide, Inches(0.3), Inches(6.0), Inches(12.5), Inches(1.0),
items=["Neck stiffness | Diurnal headache variation (worse AM) | Holocranial progression | Non-projectile vomiting"],
size=12, bullet_char="• ")
# ═══════════════════════════════════════════════════════════════════
# SLIDE 4: SECTION DIVIDER - INVESTIGATIONS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
section_divider(slide, "Investigations & Radiology Findings")
# ═══════════════════════════════════════════════════════════════════
# SLIDE 5: CSF ANALYSIS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "CSF Analysis (Lumbar Puncture – NIMHANS)", "Microbiology & Biochemistry")
# CSF table
headers = ["Parameter", "Result", "Reference / Comment"]
rows = [
["Total Cells", "101 cells/mm³", "Elevated – lymphocytic pleocytosis"],
["Neutrophils", "11%", ""],
["Lymphocytes", "82%", "Consistent with TBM"],
["Protein", "85.6 mg/dL", "Elevated (Normal <45 mg/dL)"],
["Glucose (CSF)", "40 mg/dL", "Low – ratio 40/140 = 0.28 (N: >0.6)"],
["Blood Sugar", "140 mg/dL", "Concurrent value"],
["CSF Culture/Sensitivity", "No Growth", ""],
["CSF CBNAAT", "NEGATIVE", "MTB not detected by molecular assay"],
]
col_w = [Inches(3.2), Inches(2.8), Inches(6.0)]
col_x = [Inches(0.3), Inches(3.6), Inches(6.5)]
row_h = Inches(0.48)
start_y = Inches(1.25)
# Header row
for ci, (cx, cw, hdr) in enumerate(zip(col_x, col_w, headers)):
add_rect(slide, cx, start_y, cw, row_h, C_NAVY)
add_tb(slide, cx + Inches(0.05), start_y + Pt(5), cw - Inches(0.1), row_h - Pt(5),
hdr, 13, bold=True, color=C_WHITE, align=PP_ALIGN.CENTER)
for ri, row in enumerate(rows):
y = start_y + row_h * (ri + 1)
bg = C_LIGHT_TEAL if ri % 2 == 0 else C_WHITE
for ci, (cx, cw, cell) in enumerate(zip(col_x, col_w, row)):
add_rect(slide, cx, y, cw, row_h, bg)
fc = C_RED if "NEGATIVE" in cell else C_DGRAY
if cell == "82%":
fc = C_RED
add_tb(slide, cx + Inches(0.05), y + Pt(4), cw - Inches(0.1), row_h - Pt(4),
cell, 12, color=fc)
# Key interpretation
add_rect(slide, Inches(0.3), Inches(5.55), Inches(12.5), Inches(0.65), RGBColor(0xFF, 0xF3, 0xCD))
add_tb(slide, Inches(0.4), Inches(5.6), Inches(12.3), Inches(0.6),
"Interpretation: Lymphocytic pleocytosis + elevated protein + low glucose ratio — classical TBM CSF profile. "
"Negative CBNAAT does not exclude TB (sensitivity ~60-70% in TBM).",
12, italic=True, color=RGBColor(0x66, 0x44, 0x00))
# ═══════════════════════════════════════════════════════════════════
# SLIDE 6: MRI BRAIN – FINDINGS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "MRI Brain – Findings (Outside / NIMHANS)", "Multiple Ring-Enhancing Lesions")
# Left: findings text
add_rect(slide, Inches(0.3), Inches(1.25), Inches(5.3), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(0.35), Inches(1.3), Inches(5.2), Inches(5.7),
title="Imaging Characteristics",
items=[
"Multiple ring-enhancing lesions",
"T1: Isointense",
"T2/FLAIR: Hypointense (target sign)",
"Surrounding vasogenic edema",
"No diffusion restriction typical of abscess",
],
size=13, bullet_char="• ", color=C_DGRAY)
# Right: locations
add_rect(slide, Inches(5.9), Inches(1.25), Inches(7.1), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(5.95), Inches(1.3), Inches(7.0), Inches(2.5),
title="Lesion Locations",
items=[
"Right frontal lobe",
"Right parietal lobe",
"Right occipital lobe",
"Left periventricular region",
"Bilateral basal ganglia",
"Thalamus (bilateral)",
"Left temporal lobe",
"Left cerebellum",
],
size=13, bullet_char="• ", color=C_DGRAY)
add_rect(slide, Inches(5.9), Inches(3.95), Inches(7.1), Inches(0.35), C_NAVY)
add_tb(slide, Inches(6.0), Inches(3.98), Inches(6.9), Inches(0.3),
"Radiology Impression", 13, bold=True, color=C_WHITE)
add_rect(slide, Inches(5.9), Inches(4.3), Inches(7.1), Inches(0.75), RGBColor(0xFF, 0xF3, 0xCD))
add_tb(slide, Inches(6.0), Inches(4.35), Inches(6.9), Inches(0.7),
"Granulomatous etiology — consistent with TUBERCULOMA",
13, bold=True, color=RGBColor(0x88, 0x33, 0x00))
# Divider
add_rect(slide, Inches(5.75), Inches(1.25), Pt(2), Inches(5.8), C_TEAL)
# Image placeholder
img_placeholder(slide, Inches(5.9), Inches(5.1), Inches(3.4), Inches(1.9),
"[Insert MRI T1 post-contrast image]")
img_placeholder(slide, Inches(9.4), Inches(5.1), Inches(3.6), Inches(1.9),
"[Insert MRI T2/FLAIR image]")
# ═══════════════════════════════════════════════════════════════════
# SLIDE 7: MRI BRAIN – IMAGES (Full image slide)
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide, C_DGRAY)
header_bar(slide, "MRI Brain – Image Gallery", "Ring-Enhancing Lesions | Tuberculomas")
for i, (lbl, loc) in enumerate([
("T1 Post-Contrast\n(Right frontal lobe)", "Right frontal"),
("T2/FLAIR\n(Basal ganglia / Thalamus)", "Basal ganglia"),
("T1 Post-Contrast\n(Posterior fossa / Cerebellum)", "Cerebellum"),
("T2/FLAIR\n(Periventricular region)", "Periventricular"),
]):
col = i % 2
row = i // 2
x = Inches(0.4 + col * 6.55)
y = Inches(1.3 + row * 3.0)
img_placeholder(slide, x, y, Inches(6.2), Inches(2.7), f"[{lbl}]")
# ═══════════════════════════════════════════════════════════════════
# SLIDE 8: HRCT CHEST
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "HRCT Chest – Findings", "Disseminated Pulmonary Tuberculosis")
add_rect(slide, Inches(0.3), Inches(1.25), Inches(5.3), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(0.35), Inches(1.3), Inches(5.2), Inches(3.0),
title="Radiological Findings",
items=[
"Consolidation – left lower lobe",
"Miliary infiltrates (diffuse bilateral small nodules)",
"Distribution: Random (miliary pattern)",
"Size: 1-2 mm nodules throughout both lungs",
],
size=13, bullet_char="• ", color=C_DGRAY)
add_bullet_tb(slide, Inches(0.35), Inches(4.1), Inches(5.2), Inches(2.5),
title="Clinical Significance",
items=[
"Miliary TB = hematogenous spread",
"Confirms disseminated disease",
"Links pulmonary + CNS + ear involvement",
"High index of suspicion required in children",
],
size=13, bullet_char="• ", color=C_DGRAY)
img_placeholder(slide, Inches(5.9), Inches(1.3), Inches(7.1), Inches(3.2),
"[Insert HRCT Chest – Miliary Pattern Image]")
img_placeholder(slide, Inches(5.9), Inches(4.6), Inches(7.1), Inches(2.5),
"[Insert HRCT Chest – LLL Consolidation Image]")
add_rect(slide, Inches(5.75), Inches(1.25), Pt(2), Inches(5.8), C_TEAL)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 9: RADIOLOGY DISCUSSION – KEY TEACHING POINTS
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Radiology Discussion – Teaching Points", "Pediatric CNS Tuberculosis")
# 3-column layout
col_data = [
("Tuberculoma on MRI", [
"Ring-enhancing on post-contrast T1",
"T2 hypointense center = solid granuloma",
"'Target sign': central T2 hypointense + ring + edema",
"Typically no restricted diffusion (unlike abscess)",
"May be at any stage: non-caseating → caseating → calcified",
"Multiple lesions in disseminated disease",
]),
("TBM Imaging Features", [
"Basal meningeal enhancement",
"Communicating hydrocephalus",
"Infarcts: lenticulostriate territory",
"Cranial nerve involvement",
"Choroid plexus enhancement",
"Stage 2 (MRC): GCS normal + cranial nerve palsy",
]),
("Differentials for Ring-Enhancing Lesions", [
"Pyogenic abscess (DWI +ve)",
"Neurocysticercosis (scolex visible)",
"Toxoplasmosis (immunocompromised)",
"Primary CNS lymphoma",
"Metastasis (rare in children)",
"Demyelinating disease (tumefactive MS)",
]),
]
for ci, (title, bullets) in enumerate(col_data):
x = Inches(0.3 + ci * 4.35)
add_rect(slide, x, Inches(1.25), Inches(4.1), Inches(5.8), C_WHITE)
add_rect(slide, x, Inches(1.25), Inches(4.1), Inches(0.5), C_TEAL)
add_tb(slide, x + Inches(0.07), Inches(1.28), Inches(3.96), Inches(0.45),
title, 13, bold=True, color=C_WHITE)
add_bullet_tb(slide, x + Inches(0.07), Inches(1.8), Inches(3.96), Inches(5.1),
bullets, size=12, bullet_char="• ", color=C_DGRAY)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 10: EAR DISCHARGE / MIDDLE EAR TB
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Middle Ear Involvement – ? Middle Ear TB", "Otological Tuberculosis")
add_rect(slide, Inches(0.3), Inches(1.25), Inches(6.0), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(0.35), Inches(1.3), Inches(5.9), Inches(5.5),
title="Clinical Features in This Case",
items=[
"Right-sided ear pain + tinnitus (3 months duration)",
"Ear discharge with spontaneous TM perforation",
"Imbalance – resolved with treatment",
"Culture: Staphylococcus aureus (superinfection)",
"Linezolid given for 2 weeks (Staph coverage)",
"Diagnosed as Middle Ear TB at outside hospital",
],
size=13, bullet_char="• ")
add_rect(slide, Inches(6.5), Inches(1.25), Inches(6.5), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(6.55), Inches(1.3), Inches(6.4), Inches(2.8),
title="Middle Ear TB – Radiology",
items=[
"CT temporal bone: soft tissue in middle ear cavity",
"Ossicular erosion / destruction",
"Mastoid opacification",
"Absence of bony sclerosis (unlike chronic suppurative OM)",
"MRI: may show meningeal enhancement near petrous bone",
],
size=13, bullet_char="• ")
add_rect(slide, Inches(6.5), Inches(4.3), Inches(6.5), Inches(2.75), C_LIGHT_TEAL)
add_bullet_tb(slide, Inches(6.55), Inches(4.35), Inches(6.4), Inches(2.6),
title="Key Teaching",
items=[
"TB can affect any part of the ear",
"Painless otorrhoea classic but not always present",
"Multiple TM perforations (pathognomonic if present)",
"Always consider TB in chronic ear disease unresponsive to antibiotics",
],
size=12, bullet_char="• ")
add_rect(slide, Inches(6.35), Inches(1.25), Pt(2), Inches(5.8), C_TEAL)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 11: TREATMENT & RADIOLOGY FOLLOW-UP
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Treatment & Radiology Follow-up Protocol", "Anti-Tubercular Therapy + Imaging Monitoring")
add_rect(slide, Inches(0.3), Inches(1.25), Inches(6.0), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(0.35), Inches(1.3), Inches(5.9), Inches(5.5),
title="Treatment Initiated",
items=[
"ATT (Anti-Tubercular Therapy) – started 1 month prior",
"Intensive phase: HRZE (Isoniazid, Rifampicin, Pyrazinamide, Ethambutol)",
"Oral Steroids (following IV Dexamethasone) – for TBM",
"Pyridoxine (Vitamin B6) – INH prophylaxis",
"Antiepileptic drugs (AEDs) – for seizure prophylaxis",
"Linezolid – 2 weeks (Staph aureus ear superinfection)",
],
size=13, bullet_char="• ")
add_rect(slide, Inches(6.5), Inches(1.25), Inches(6.5), Inches(5.8), C_WHITE)
add_bullet_tb(slide, Inches(6.55), Inches(1.3), Inches(6.4), Inches(5.5),
title="Imaging Follow-up (Recommended)",
items=[
"MRI Brain at 3 months: assess response (paradoxical enlargement possible early)",
"MRI Brain at 6 months: interval change in tuberculoma size",
"MRI Brain at 12 months: resolution vs calcification",
"Paradoxical reaction: TB lesions may enlarge on ATT — do NOT stop treatment",
"HRCT Chest: repeat at 2-3 months to assess miliary resolution",
"CT Temporal bone: before/after treatment for ossicular status",
],
size=13, bullet_char="• ")
add_rect(slide, Inches(6.35), Inches(1.25), Pt(2), Inches(5.8), C_TEAL)
# ═══════════════════════════════════════════════════════════════════
# SLIDE 12: SUMMARY
# ═══════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide, C_NAVY)
add_rect(slide, 0, Inches(1.1), W, Pt(4), C_GOLD)
add_rect(slide, 0, 0, W, Inches(1.1), RGBColor(0x10, 0x28, 0x40))
add_tb(slide, Inches(0.5), Inches(0.15), Inches(12.3), Inches(0.85),
"Summary & Teaching Points", 28, bold=True, color=C_WHITE, align=PP_ALIGN.CENTER)
summary_items = [
("MRI hallmark of tuberculoma: T1 iso, T2 hypo ring-enhancing lesion with vasogenic edema — 'target sign'",),
("CNS TB can present without positive CSF CBNAAT — clinical + imaging diagnosis is key",),
("Multiple ring-enhancing lesions in a child from endemic region = TB until proven otherwise",),
("Miliary TB on HRCT confirms hematogenous dissemination — links pulmonary + CNS + ear disease",),
("Paradoxical reaction: lesions may transiently enlarge on ATT — continue treatment",),
("Steroids are standard of care in TBM to reduce meningeal inflammation and vasculitis",),
("Middle Ear TB: rare, typically painless, may co-exist with CNS TB",),
]
for i, (item,) in enumerate(summary_items):
y = Inches(1.3 + i * 0.84)
add_rect(slide, Inches(0.3), y, Inches(12.7), Inches(0.72),
RGBColor(0x00, 0x40, 0x60) if i % 2 == 0 else RGBColor(0x00, 0x50, 0x70))
add_tb(slide, Inches(0.65), y + Pt(6), Inches(12.2), Inches(0.62),
f"{i+1}. {item}", 13, color=C_WHITE)
# ═══════════════════════════════════════════════════════════════════
# SAVE
# ═══════════════════════════════════════════════════════════════════
out_path = "/tmp/workspace/peds-radiology-meet/Peds_Radiology_Meet_DisseminatedTB.pptx"
buf = BytesIO()
prs.save(buf)
with open(out_path, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out_path}")
cd /tmp/workspace/peds-radiology-meet && python build_slides.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/peds-radiology-meet/Peds_Radiology_Meet_DisseminatedTB.pptx') print(f'Slides: {len(prs.slides)}') for i, s in enumerate(prs.slides, 1): texts = [sh.text_frame.text[:60].replace(chr(10),' ') for sh in s.shapes if sh.has_text_frame and sh.text_frame.text.strip()] print(f' Slide {i}: {texts[:2]}') "
Peds Radiology Meet DisseminatedTB
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title slide | Case title, diagnosis, presenting team names |
| 2 | Case Overview | Patient profile + diagnosis panel (side by side) |
| 3 | Chief Complaints & Timeline | Visual 4-point timeline (3 months ago → present) |
| 4 | Section divider | "Investigations & Radiology Findings" |
| 5 | CSF Analysis | Full table: cells/protein/glucose/CBNAAT + interpretation box |
| 6 | MRI Brain – Findings | T1/T2 characteristics, lesion locations, radiology impression + 2 image placeholders |
| 7 | MRI Brain – Image Gallery | 4 labeled image placeholders for your actual MRI screenshots |
| 8 | HRCT Chest | Miliary pattern + LLL consolidation + 2 image placeholders |
| 9 | Radiology Discussion | 3-column teaching: Tuberculoma on MRI / TBM features / Differentials for RELs |
| 10 | Middle Ear TB | Clinical features, CT/MRI findings, key teaching points |
| 11 | Treatment + Follow-up | ATT regimen + imaging surveillance schedule |
| 12 | Summary | 7 key take-home radiology teaching points |