Prepare a presentation on Traumatic Head injury in following headings
1)Introduction and classification 2)Increased Intracranial pressure 3)Surgical indications , based on bailey and love textbook and give atleast 25 total slidss
mkdir -p /tmp/workspace/traumatic-head-injury && ls /tmp/workspace/traumatic-head-injury/
~/traumatic-head-injury/build_pptx.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO
# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE = RGBColor(0x0D, 0x3B, 0x6E) # deep navy
MID_BLUE = RGBColor(0x14, 0x5D, 0xA8) # accent
LIGHT_BLUE = RGBColor(0xDE, 0xEA, 0xF6) # background panels
ORANGE = RGBColor(0xF0, 0x7D, 0x00) # highlight / dividers
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GREY = RGBColor(0x33, 0x33, 0x33)
MID_GREY = RGBColor(0x66, 0x66, 0x66)
RED = RGBColor(0xC0, 0x00, 0x00)
GREEN = RGBColor(0x1F, 0x7A, 0x1F)
YELLOW_BG = RGBColor(0xFF, 0xF3, 0xCD)
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank_layout = prs.slide_layouts[6] # fully blank
# ── Helpers ──────────────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_color, line_color=None, line_width=0):
from pptx.util import Pt as Pt2
shape = slide.shapes.add_shape(
1, # MSO_SHAPE_TYPE.RECTANGLE
Inches(x), Inches(y), Inches(w), Inches(h)
)
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
if line_color:
shape.line.color.rgb = line_color
shape.line.width = Pt2(line_width)
else:
shape.line.fill.background()
return shape
def add_textbox(slide, text, x, y, w, h,
font_name="Calibri", font_size=18, bold=False, italic=False,
color=DARK_GREY, align=PP_ALIGN.LEFT,
v_anchor=MSO_ANCHOR.TOP, wrap=True,
margin_l=0.05, margin_r=0.05, margin_t=0.05, margin_b=0.05):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = v_anchor
tf.margin_left = Inches(margin_l)
tf.margin_right = Inches(margin_r)
tf.margin_top = Inches(margin_t)
tf.margin_bottom = Inches(margin_b)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = font_name
run.font.size = Pt(font_size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
return tf
def add_bullets(slide, lines, x, y, w, h,
font_name="Calibri", font_size=16, color=DARK_GREY,
level_indent=0.25, spacing_after=6, bold_first=False):
"""lines = list of (level, text) tuples, level 0=normal, 1=sub-bullet"""
from pptx.util import Pt as Pt2
from pptx.oxml.ns import qn
from lxml import etree
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Inches(0.05)
tf.margin_right = Inches(0.05)
tf.margin_top = Inches(0.05)
tf.margin_bottom = Inches(0.05)
first = True
for (level, text) in lines:
if first:
p = tf.paragraphs[0]
first = False
else:
p = tf.add_paragraph()
p.level = level
p.space_after = Pt2(spacing_after)
indent = Inches(level * level_indent)
p.paragraph_format.left_indent = indent
run = p.add_run()
# bullet char
bullet_char = "•" if level == 0 else "–"
run.text = f"{bullet_char} {text}"
run.font.name = font_name
run.font.size = Pt2(font_size)
run.font.color.rgb = color
if bold_first and first:
run.font.bold = True
return tf
def slide_header(slide, title, section_tag):
"""Standard slide header: navy bar + title text + section tag"""
add_rect(slide, 0, 0, 13.333, 1.15, DARK_BLUE)
add_rect(slide, 0, 1.15, 13.333, 0.06, ORANGE)
add_textbox(slide, title, 0.3, 0.1, 11.5, 0.95,
font_size=28, bold=True, color=WHITE,
v_anchor=MSO_ANCHOR.MIDDLE, align=PP_ALIGN.LEFT)
add_textbox(slide, section_tag, 10.5, 0.1, 2.7, 0.9,
font_size=11, color=RGBColor(0xCC, 0xDD, 0xFF),
align=PP_ALIGN.RIGHT, v_anchor=MSO_ANCHOR.MIDDLE)
def footer(slide, source="Bailey & Love's Short Practice of Surgery, 28th Ed."):
add_rect(slide, 0, 7.2, 13.333, 0.3, DARK_BLUE)
add_textbox(slide, source, 0.3, 7.21, 12, 0.28,
font_size=10, color=RGBColor(0xAA, 0xCC, 0xFF),
v_anchor=MSO_ANCHOR.MIDDLE)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 1 – TITLE SLIDE
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
add_rect(s, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(s, 0, 5.2, 13.333, 0.08, ORANGE)
add_textbox(s, "TRAUMATIC HEAD INJURY", 1, 1.6, 11.333, 1.5,
font_size=42, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, "Classification | Intracranial Pressure | Surgical Indications",
1, 3.1, 11.333, 0.8, font_size=20, color=RGBColor(0xAA, 0xCC, 0xFF),
align=PP_ALIGN.CENTER)
add_textbox(s, "Based on Bailey & Love's Short Practice of Surgery, 28th Edition",
1, 4.0, 11.333, 0.5, font_size=14, color=RGBColor(0xAA, 0xCC, 0xFF),
align=PP_ALIGN.CENTER, italic=True)
add_textbox(s, "Chapter 28 – Head Injury", 1, 4.6, 11.333, 0.5,
font_size=13, color=ORANGE, align=PP_ALIGN.CENTER)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 2 – CONTENTS
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Contents", "Overview")
add_rect(s, 0.3, 1.3, 5.8, 5.6, LIGHT_BLUE)
add_rect(s, 6.5, 1.3, 6.5, 5.6, LIGHT_BLUE)
add_textbox(s, "Section 1: Introduction & Classification", 0.5, 1.4, 5.5, 0.5,
font_size=15, bold=True, color=DARK_BLUE)
items1 = [
"Epidemiology & burden",
"Primary vs secondary injury",
"Classification by GCS (minor/mild/moderate/severe)",
"Skull fractures",
"Specific injury types: concussion, contusion, DAI",
"Extradural haematoma",
"Subdural haematoma",
"Intracerebral haematoma",
]
for i, it in enumerate(items1):
add_textbox(s, f"• {it}", 0.55, 1.9 + i*0.55, 5.4, 0.5, font_size=13, color=DARK_GREY)
add_textbox(s, "Section 2: Increased Intracranial Pressure", 6.7, 1.4, 6.1, 0.5,
font_size=15, bold=True, color=DARK_BLUE)
items2 = [
"ICP & cerebral blood flow",
"Monro–Kellie doctrine",
"Herniation syndromes",
"Monitoring & targets",
"Medical management of raised ICP",
]
for i, it in enumerate(items2):
add_textbox(s, f"• {it}", 6.75, 1.9 + i*0.55, 6.1, 0.5, font_size=13, color=DARK_GREY)
add_textbox(s, "Section 3: Surgical Indications", 6.7, 4.5, 6.1, 0.4,
font_size=15, bold=True, color=DARK_BLUE)
items3 = ["Extradural haematoma", "Acute subdural haematoma",
"Chronic subdural haematoma", "Depressed skull fractures",
"ICP-guided decompression"]
for i, it in enumerate(items3):
add_textbox(s, f"• {it}", 6.75, 4.95 + i*0.44, 6.1, 0.42, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SECTION DIVIDER – SECTION 1
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
add_rect(s, 0, 0, 13.333, 7.5, MID_BLUE)
add_rect(s, 0, 3.5, 13.333, 0.12, ORANGE)
add_textbox(s, "SECTION 1", 1, 1.5, 11.333, 1, font_size=22, bold=False,
color=RGBColor(0xAA, 0xCC, 0xFF), align=PP_ALIGN.CENTER)
add_textbox(s, "Introduction & Classification", 1, 2.5, 11.333, 1.2,
font_size=36, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(s, "of Traumatic Head Injury", 1, 3.7, 11.333, 0.9,
font_size=24, color=RGBColor(0xAA, 0xCC, 0xFF), align=PP_ALIGN.CENTER)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 4 – INTRODUCTION & EPIDEMIOLOGY
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Introduction & Epidemiology", "Section 1 | Introduction")
add_rect(s, 0.3, 1.3, 8.2, 5.6, LIGHT_BLUE)
add_rect(s, 8.85, 1.3, 4.2, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
bullets = [
(0, "Head injury = 3–4% of emergency department attendances"),
(0, "~1500 cases per 100,000 population/year (UK)"),
(0, "Mortality: ~9 per 100,000 annually"),
(0, "Leading cause of death & disability: childhood to middle age"),
(0, "2% of US population have long-term disability from TBI"),
(0, "Road traffic accidents: up to 50% of all cases"),
(0, "Other causes: falls, assault, firearms (especially USA)"),
]
add_bullets(s, bullets, 0.4, 1.4, 8.0, 5.4, font_size=15)
add_textbox(s, "Key Concepts", 8.9, 1.35, 4.0, 0.4, font_size=14, bold=True, color=DARK_BLUE)
key_points = [
"TBI = PRIMARY injury\n(impact, non-modifiable)\n+ SECONDARY injury\n(hours-days after)\n\nManagement targets\nreducing secondary injury",
]
add_textbox(s, key_points[0], 8.9, 1.8, 4.0, 4.8, font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 5 – PRIMARY vs SECONDARY INJURY
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Primary vs Secondary Brain Injury", "Section 1 | Pathophysiology")
add_rect(s, 0.3, 1.3, 6.0, 5.6, RGBColor(0xFF, 0xE6, 0xE6))
add_rect(s, 7.0, 1.3, 6.0, 5.6, RGBColor(0xE6, 0xFF, 0xE6))
add_textbox(s, "PRIMARY INJURY", 0.5, 1.35, 5.6, 0.45, font_size=16, bold=True, color=RED)
p_items = [
"Occurs at the moment of impact",
"Includes: neuronal shearing, contusion, laceration, haemorrhage",
"NOT medically modifiable",
"Determined by force, velocity and direction of impact",
"Diffuse axonal injury (DAI) from acceleration-deceleration",
"Coup-contrecoup contusions",
]
add_bullets(s, [(0, t) for t in p_items], 0.4, 1.85, 5.9, 5.0, font_size=14, color=DARK_GREY)
add_textbox(s, "SECONDARY INJURY", 7.2, 1.35, 5.6, 0.45, font_size=16, bold=True, color=GREEN)
s_items = [
"Develops in hours to days after trauma",
"Medically MODIFIABLE – target of treatment",
"Causes: hypoxia, hypotension, raised ICP, oedema",
"Impaired cerebral autoregulation",
"Haematoma expansion",
"Infection, metabolic derangements",
"Goal: prevent further neuronal loss",
]
add_bullets(s, [(0, t) for t in s_items], 7.1, 1.85, 5.9, 5.0, font_size=14, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 6 – GLASGOW COMA SCALE
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Glasgow Coma Scale (GCS)", "Section 1 | Assessment")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
# Table headers
cols = [("Eyes (E)", 0.3), ("Verbal (V)", 3.8), ("Motor (M)", 7.3)]
rows = [
("4 – Spontaneously", "5 – Orientated", "6 – Obeys commands"),
("3 – To verbal command", "4 – Confused", "5 – Localises pain"),
("2 – To pain", "3 – Inappropriate words", "4 – Withdraws"),
("1 – No response", "2 – Sounds only", "3 – Abnormal flexion"),
("", "1 – No sounds", "2 – Extension"),
("", "", "1 – No response"),
]
for i, (hdr, xpos) in enumerate(cols):
add_rect(s, xpos, 1.35, 3.3, 0.5, DARK_BLUE)
add_textbox(s, hdr, xpos+0.05, 1.38, 3.2, 0.44,
font_size=15, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
for ri, row in enumerate(rows):
bg = LIGHT_BLUE if ri % 2 == 0 else WHITE
for ci, (cell, (_, xpos)) in enumerate(zip(row, cols)):
add_rect(s, xpos, 1.88 + ri*0.54, 3.3, 0.52, bg)
if cell:
add_textbox(s, cell, xpos+0.05, 1.9 + ri*0.54, 3.2, 0.48, font_size=13, color=DARK_GREY)
add_textbox(s, "Best response always recorded | Sternal/supraorbital rub or trapezius squeeze for pain stimulus",
0.3, 7.0, 12.7, 0.22, font_size=11, color=MID_GREY, italic=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 7 – CLASSIFICATION BY GCS
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Classification of Head Injury by GCS", "Section 1 | Classification")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
class_data = [
("MINOR", "GCS 15 – No loss of consciousness",
"Normal CT; safe discharge if meets NICE criteria", RGBColor(0x1F, 0x7A, 0x1F)),
("MILD", "GCS 14–15 with loss of consciousness (LOC)",
"Risk of expanding haematoma; observe; CT if indicated", RGBColor(0x99, 0x6B, 0x00)),
("MODERATE", "GCS 9–13",
"Admit; CT mandatory; neurosurgical consultation; watch for deterioration", ORANGE),
("SEVERE", "GCS 3–8 (comatose)",
"ITU; intubation; ICP monitoring; immediate CT; neurosurgical management", RED),
]
for i, (label, gcs, notes, col) in enumerate(class_data):
y = 1.4 + i * 1.25
add_rect(s, 0.4, y, 2.2, 1.1, col)
add_textbox(s, label, 0.42, y+0.02, 2.16, 1.06,
font_size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(s, 2.65, y, 4.8, 1.1, WHITE)
add_textbox(s, gcs, 2.7, y+0.05, 4.7, 1.0, font_size=13, color=DARK_GREY, wrap=True)
add_rect(s, 7.5, y, 5.5, 1.1, LIGHT_BLUE)
add_textbox(s, notes, 7.55, y+0.05, 5.4, 1.0, font_size=12, color=DARK_GREY, wrap=True)
add_textbox(s, "GCS column: Severity", 2.7, 1.3, 4.8, 0.35,
font_size=12, bold=True, color=MID_BLUE)
add_textbox(s, "Notes / Management", 7.5, 1.3, 5.5, 0.35,
font_size=12, bold=True, color=MID_BLUE)
add_textbox(s, "Post-resuscitation GCS is the primary determinant – alcohol/drugs may confound scoring",
0.4, 6.85, 12.5, 0.25, font_size=11, color=MID_GREY, italic=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 8 – SKULL FRACTURES
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Skull Fractures", "Section 1 | Classification")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
types = [
("Linear / Simple", "Most common; may overlie extradural haematoma;\nmay cross dural venous sinuses"),
("Depressed", "Fragment driven below inner table;\nopen (compound) if scalp lacerated;\nrisk of brain compression and infection"),
("Basal Skull", "Through skull base; signs: Battle's sign (mastoid bruising),\nPanda/raccoon eyes, CSF rhinorrhoea or otorrhoea, haemotympanum"),
("Compound / Open", "Communicates with external environment;\nhigh infection risk including meningitis"),
]
for i, (t, desc) in enumerate(types):
add_rect(s, 0.4, 1.4 + i*1.2, 3.5, 1.1, DARK_BLUE)
add_textbox(s, t, 0.45, 1.42 + i*1.2, 3.4, 1.06,
font_size=14, bold=True, color=WHITE,
v_anchor=MSO_ANCHOR.MIDDLE, align=PP_ALIGN.CENTER)
add_rect(s, 3.95, 1.4 + i*1.2, 9.0, 1.1, WHITE)
add_textbox(s, desc, 4.05, 1.44 + i*1.2, 8.8, 1.0,
font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 9 – CONCUSSION & DIFFUSE AXONAL INJURY
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Concussion, DAI & Postconcussive Syndrome", "Section 1 | Injury Types")
add_rect(s, 0.3, 1.3, 6.0, 5.6, LIGHT_BLUE)
add_rect(s, 7.0, 1.3, 6.0, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
add_textbox(s, "Concussion", 0.4, 1.35, 5.8, 0.4, font_size=15, bold=True, color=DARK_BLUE)
c_items = [
"Alteration of consciousness following closed head injury",
"LOC is NOT a prerequisite",
"Key features: confusion, amnesia",
"Symptoms: lethargy, forgetfulness, gait disturbance, emotional lability",
"Disordered autoregulation while symptomatic",
"SECOND IMPACT SYNDROME: repeat injury while symptomatic → malignant brain swelling → coma/death (rare but serious)",
"Symptomatic athletes must NOT return to play",
]
add_bullets(s, [(0, t) for t in c_items], 0.35, 1.8, 5.9, 4.9, font_size=13, color=DARK_GREY)
add_textbox(s, "Diffuse Axonal Injury (DAI)", 7.1, 1.35, 5.8, 0.4, font_size=15, bold=True, color=DARK_BLUE)
d_items = [
"Results from rotational acceleration-deceleration",
"Shearing of axons throughout white matter",
"No focal haematoma on CT (may appear normal)",
"MRI (DWI/SWI) more sensitive",
"Severity correlates with depth: cortex → deep white matter → brainstem",
"Associated with prolonged coma",
"Poor prognosis in severe cases",
]
add_bullets(s, [(0, t) for t in d_items], 7.05, 1.8, 5.9, 4.9, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 10 – EXTRADURAL HAEMATOMA
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Extradural Haematoma (EDH)", "Section 1 | Injury Types")
add_rect(s, 0.3, 1.3, 8.5, 5.6, LIGHT_BLUE)
add_rect(s, 9.1, 1.3, 3.9, 5.6, RGBColor(0xFF, 0xE6, 0xE6))
edh = [
"Blood accumulates between skull and dura",
"Typically from rupture of the MIDDLE MENINGEAL ARTERY following temporal bone fracture",
"Classic presentation: brief LOC → LUCID INTERVAL → sudden deterioration",
"Only 30% show classic lucid interval; high index of suspicion needed",
"CT appearance: LENTICULAR (biconvex) hyperdense lesion",
"Rapid neurological deterioration due to arterial pressure",
"Ipsilateral fixed dilated pupil = uncal herniation",
"NEUROSURGICAL EMERGENCY – requires immediate craniotomy and evacuation",
"Excellent outcome if operated early before deterioration",
]
add_bullets(s, [(0, t) for t in edh], 0.4, 1.4, 8.3, 5.4, font_size=14, color=DARK_GREY)
add_textbox(s, "CT Appearance\n\nLenticular (biconvex)\nhyperdense lesion\nbetween skull & dura\n\nDoes NOT cross\nsuture lines\n\nOften in temporal region",
9.15, 1.35, 3.75, 5.4, font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 11 – SUBDURAL HAEMATOMA
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Subdural Haematoma (SDH)", "Section 1 | Injury Types")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
sdh_types = [
("ACUTE SDH", RGBColor(0xC0, 0x00, 0x00),
"• High-energy injury; rupture of cortical surface vessels\n"
"• Rapid deterioration – no lucid interval\n"
"• CT: concave (crescent) hyperdense collection over brain surface\n"
"• May cross suture lines (unlike EDH)\n"
"• Often with significant primary brain injury\n"
"• Evacuation by craniotomy or craniectomy"),
("CHRONIC SDH", RGBColor(0x00, 0x44, 0x88),
"• Elderly, anticoagulated patients; low-energy trauma (trivial or forgotten)\n"
"• Osmotic expansion of haematoma over weeks\n"
"• Presents with headache, confusion, personality change\n"
"• CT: hypodense (old blood) concave collection; may be bilateral\n"
"• Smaller bleeds → conservative management\n"
"• Larger bleeds / midline shift → burr holes or craniotomy"),
]
for i, (label, col, desc) in enumerate(sdh_types):
x = 0.4 + i * 6.4
add_rect(s, x, 1.4, 6.0, 0.5, col)
add_textbox(s, label, x+0.05, 1.42, 5.9, 0.46,
font_size=15, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(s, x, 1.95, 6.0, 4.7, WHITE)
add_textbox(s, desc, x+0.1, 2.0, 5.8, 4.6, font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 12 – INTRACEREBRAL HAEMATOMA & CONTUSION
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Intracerebral Haematoma & Contusion", "Section 1 | Injury Types")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
add_textbox(s, "Contusion", 0.5, 1.35, 5.8, 0.4, font_size=15, bold=True, color=DARK_BLUE)
cont = [
"Bruising of brain parenchyma at cortical surface",
"Coup injury: directly under impact site",
"Contrecoup: opposite pole of brain (frontal and temporal poles after occipital impact)",
"CT: heterogeneous density; may worsen over 24–48 hours (TALK AND DIE)",
"Serial imaging in first 24–48 hours is essential",
"May evolve into intracerebral haematoma",
]
add_bullets(s, [(0, t) for t in cont], 0.4, 1.8, 6.0, 5.0, font_size=13, color=DARK_GREY)
add_textbox(s, "Intracerebral Haematoma", 7.2, 1.35, 5.8, 0.4, font_size=15, bold=True, color=DARK_BLUE)
ich = [
"Blood within brain parenchyma itself",
"Typically frontal or temporal location (contrecoup)",
"CT: hyperdense intra-axial collection",
"Associated with significant surrounding oedema",
"May cause progressive mass effect and raised ICP",
"Surgery considered if >3 cm, accessible location, deteriorating patient",
"May be managed conservatively if small and stable",
]
add_bullets(s, [(0, t) for t in ich], 7.1, 1.8, 6.0, 5.0, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 13 – MILD HEAD INJURY DISCHARGE CRITERIA
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Minor/Mild Head Injury – Assessment & Discharge", "Section 1 | Management")
add_rect(s, 0.3, 1.3, 6.0, 5.6, LIGHT_BLUE)
add_rect(s, 6.7, 1.3, 6.3, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
add_textbox(s, "NICE Discharge Criteria", 0.5, 1.35, 5.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
dc = [
"GCS 15/15 with no focal deficits",
"Normal CT brain (if indicated)",
"Patient NOT under influence of alcohol/drugs",
"Accompanied by a responsible adult",
"Written head injury advice – seek help if:",
" – Persistent/worsening headache",
" – Persistent vomiting",
" – Drowsiness",
" – Visual disturbance",
" – Limb weakness or numbness",
]
add_bullets(s, [(0, t) for t in dc], 0.4, 1.8, 5.9, 5.0, font_size=13, color=DARK_GREY)
add_textbox(s, "CT within 1 HOUR if:", 6.9, 1.35, 5.9, 0.4, font_size=14, bold=True, color=RED)
ct1 = ["GCS <13 at any point", "GCS <15 at 2 hours",
"Focal neurological deficit", "Suspected open/depressed/basal skull fracture",
"More than 1 episode of vomiting", "Post-traumatic seizure"]
add_bullets(s, [(0, t) for t in ct1], 6.8, 1.8, 6.1, 2.7, font_size=13, color=DARK_GREY)
add_textbox(s, "CT within 8 HOURS if:", 6.9, 4.6, 5.9, 0.4, font_size=14, bold=True, color=ORANGE)
ct8 = ["Age >65", "Coagulopathy (aspirin, warfarin, rivaroxaban)",
"Dangerous mechanism (fall from height, RTA)",
"Retrograde amnesia >30 min"]
add_bullets(s, [(0, t) for t in ct8], 6.8, 5.1, 6.1, 2.0, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SECTION DIVIDER – SECTION 2
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
add_rect(s, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(s, 0, 3.5, 13.333, 0.12, ORANGE)
add_textbox(s, "SECTION 2", 1, 1.5, 11.333, 1, font_size=22,
color=RGBColor(0xAA, 0xCC, 0xFF), align=PP_ALIGN.CENTER)
add_textbox(s, "Increased Intracranial Pressure", 1, 2.5, 11.333, 1.2,
font_size=36, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(s, "Pathophysiology, Monitoring & Management", 1, 3.7, 11.333, 0.9,
font_size=22, color=RGBColor(0xAA, 0xCC, 0xFF), align=PP_ALIGN.CENTER)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 15 – ICP & CEREBRAL BLOOD FLOW
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "ICP & Cerebral Blood Flow", "Section 2 | ICP")
add_rect(s, 0.3, 1.3, 7.5, 5.6, LIGHT_BLUE)
add_rect(s, 8.1, 1.3, 4.9, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
cbf = [
"Brain requires CONTINUOUS perfusion for O₂ and glucose",
"Normal CBF = 55 mL/min per 100 g brain tissue",
"Ischaemia: CBF drops below 20 mL/min",
"Infarction: even lower if not promptly corrected",
"CEREBRAL PERFUSION PRESSURE (CPP) governs flow:",
" CPP = MAP – ICP",
" Normal: CPP 75–105 mmHg",
" Normal: MAP 90–110 mmHg",
" Normal: ICP 5–15 mmHg",
"Cerebral AUTOREGULATION maintains constant CBF across MAP 50–150 mmHg",
"Autoregulation IMPAIRED in TBI → active regulation of MAP & ICP essential",
]
add_bullets(s, [(0, t) for t in cbf], 0.4, 1.4, 7.3, 5.4, font_size=13, color=DARK_GREY)
add_textbox(s, "Key Formula", 8.2, 1.35, 4.6, 0.4, font_size=14, bold=True, color=DARK_BLUE)
add_rect(s, 8.2, 1.8, 4.7, 1.0, DARK_BLUE)
add_textbox(s, "CPP = MAP – ICP", 8.2, 1.8, 4.7, 1.0,
font_size=22, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, "Treatment targets:\n• Maintain CPP > 60 mmHg\n• Keep ICP < 20 mmHg\n• Systolic BP ≥ 90 mmHg\n• Avoid hypoxia (SpO₂ > 95%)\n• Head elevation 30°\n• Normocapnia (pCO₂ 35–40 mmHg)\n• Normothermia",
8.2, 2.9, 4.7, 4.0, font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 16 – MONRO-KELLIE DOCTRINE
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "The Monro–Kellie Doctrine", "Section 2 | ICP Physiology")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
add_textbox(s, "\"The cranium is a rigid box containing a nearly incompressible brain\" – Alexander Monro (1783)",
0.5, 1.35, 12.3, 0.55, font_size=14, italic=True, color=DARK_BLUE)
add_textbox(s, "Three Fixed Compartments:", 0.5, 2.0, 5.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
comps = [("Brain tissue", "~80% of intracranial volume"),
("Blood (arterial + venous)", "~10%"),
("CSF", "~10%")]
for i, (comp, vol) in enumerate(comps):
add_rect(s, 0.5, 2.45 + i*0.7, 2.8, 0.6, DARK_BLUE)
add_textbox(s, comp, 0.52, 2.47 + i*0.7, 2.76, 0.56,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE, align=PP_ALIGN.CENTER)
add_textbox(s, vol, 3.35, 2.47 + i*0.7, 3.0, 0.56, font_size=13, color=DARK_GREY, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, "Compensatory Mechanism:", 0.5, 4.7, 5.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
add_textbox(s, "When a mass lesion expands, ICP is initially buffered by\n"
"displacement of venous blood and CSF from the cranium.\n"
"Once compensation is exhausted → EXPONENTIAL rise in ICP.",
0.5, 5.15, 6.0, 1.7, font_size=13, color=DARK_GREY, wrap=True)
add_textbox(s, "Clinical Implication:", 7.5, 2.0, 5.5, 0.4, font_size=14, bold=True, color=RED)
add_textbox(s,
"• Small increments in volume → large rises in ICP\n"
"• The 'tipping point': once compensation lost, rapid deterioration\n"
"• ICP-volume curve is EXPONENTIAL (not linear)\n"
"• Explains the lucid interval in EDH\n"
"• Once ICP > CPP → cerebral perfusion ceases → death\n"
"• Herniation syndromes develop as compartments decompress across fixed partitions",
7.5, 2.5, 5.5, 4.3, font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 17 – HERNIATION SYNDROMES
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Herniation Syndromes", "Section 2 | ICP")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
hern = [
("Uncal (Transtentorial)\nHerniation",
"Medial temporal lobe herniates over tentorium cerebelli\n"
"Compresses CN III → ipsilateral fixed dilated pupil (first sign)\n"
"Progresses to contralateral hemiplegia (cerebral peduncle compression)\n"
"Kernohan's notch phenomenon: ipsilateral hemiplegia (false localising sign)"),
("Central / Transtentorial\nHerniation",
"Bilateral downward displacement of diencephalon\n"
"Bilateral pupil changes, Cheyne-Stokes breathing\n"
"Progressive coma, decorticate then decerebrate posturing"),
("Tonsillar (Foraminal)\nHerniation",
"Cerebellar tonsils herniate through foramen magnum\n"
"Compresses medullary vasomotor and respiratory centres\n"
"CUSHING'S TRIAD: hypertension + bradycardia + irregular breathing\n"
"Terminal event – respiratory arrest imminent"),
]
for i, (name, desc) in enumerate(hern):
add_rect(s, 0.4, 1.4 + i*1.7, 3.2, 1.6, DARK_BLUE)
add_textbox(s, name, 0.42, 1.42 + i*1.7, 3.16, 1.56,
font_size=13, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(s, 3.65, 1.4 + i*1.7, 9.3, 1.6, WHITE)
add_textbox(s, desc, 3.75, 1.44 + i*1.7, 9.1, 1.52,
font_size=13, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 18 – ICP MONITORING
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "ICP Monitoring", "Section 2 | Monitoring")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
add_textbox(s, "Indications for ICP Monitoring", 0.5, 1.35, 5.8, 0.4, font_size=14, bold=True, color=DARK_BLUE)
ind = [
"GCS ≤ 8 after resuscitation",
"Abnormal CT scan (haematoma, contusion, oedema, or compressed basal cisterns)",
"Normal CT + age >40, posturing, or SBP <90 mmHg",
"Unable to clinically assess (intubated/sedated patients)",
]
add_bullets(s, [(0, t) for t in ind], 0.4, 1.8, 6.0, 2.5, font_size=13, color=DARK_GREY)
add_textbox(s, "Monitoring Modalities", 0.5, 4.4, 5.8, 0.4, font_size=14, bold=True, color=DARK_BLUE)
mods = [
("Intraventricular catheter (EVD)", "Gold standard; allows CSF drainage; most accurate"),
("Intraparenchymal probe", "Simpler insertion; no CSF drainage; accurate"),
("Subdural / Epidural bolt", "Less accurate; lower risk of infection"),
]
for i, (name, desc) in enumerate(mods):
add_rect(s, 0.5, 4.85 + i*0.72, 3.5, 0.65, DARK_BLUE)
add_textbox(s, name, 0.55, 4.87 + i*0.72, 3.4, 0.61,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, desc, 4.1, 4.87 + i*0.72, 8.5, 0.61, font_size=12, color=DARK_GREY, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, "ICP Targets", 7.3, 1.35, 5.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
targets = [
"ICP target: < 20 mmHg (some centres use <22 mmHg per BTF guidelines)",
"CPP target: 60–70 mmHg",
"MAP target: maintain ≥ 90 mmHg systolic",
"Waveform analysis: P2 > P1 indicates decreased compliance",
"Pressure reactivity index (PRx): guides optimal CPP",
]
add_bullets(s, [(0, t) for t in targets], 7.2, 1.8, 5.9, 5.0, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 19 – MEDICAL MANAGEMENT OF RAISED ICP (TIER 1)
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Medical Management of Raised ICP – Tier 1", "Section 2 | ICP Management")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
add_textbox(s, "First-line (Tier 1) measures – applied to all severe TBI patients:", 0.5, 1.35, 12.2, 0.4,
font_size=14, bold=True, color=DARK_BLUE)
t1 = [
("Head of bed elevation 30°", "Promotes venous drainage; reduces ICP without compromising CPP"),
("Avoid neck compression", "Ensure cervical collar not too tight; venous outflow obstruction worsens ICP"),
("Sedation & analgesia", "Reduces cerebral metabolic demand (propofol or midazolam + fentanyl/morphine)"),
("Controlled ventilation", "Normocapnia (pCO₂ 35–40 mmHg); avoid hyper/hypocapnia; SpO₂ > 95%"),
("Osmotherapy – Mannitol", "0.25–1 g/kg IV bolus; reduces brain water; onset 15–30 min; watch for rebound"),
("Hypertonic saline (3–23.4%)", "Alternative to mannitol; may be superior in hypovolaemic patients; sustained effect"),
("Maintain normothermia", "Fever dramatically increases cerebral metabolic rate; active cooling if >37.5°C"),
("Tight glycaemic control", "Avoid hyperglycaemia (worsens outcome) and hypoglycaemia"),
]
for i, (meas, desc) in enumerate(t1):
y = 1.8 + i * 0.68
add_rect(s, 0.4, y, 3.5, 0.62, DARK_BLUE)
add_textbox(s, meas, 0.45, y+0.02, 3.4, 0.58, font_size=12, bold=True, color=WHITE,
v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(s, 3.95, y, 8.95, 0.62, WHITE)
add_textbox(s, desc, 4.0, y+0.02, 8.85, 0.58, font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 20 – MEDICAL MANAGEMENT OF RAISED ICP (TIER 2 & 3)
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Medical Management of Raised ICP – Tier 2 & 3", "Section 2 | ICP Management")
add_rect(s, 0.3, 1.3, 6.0, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
add_rect(s, 7.0, 1.3, 6.0, 5.6, RGBColor(0xFF, 0xE6, 0xE6))
add_textbox(s, "Tier 2 – Refractory ICP", 0.5, 1.35, 5.5, 0.4, font_size=14, bold=True, color=ORANGE)
t2 = [
"CSF drainage via EVD (if in situ)",
"Neuromuscular blockade to reduce ICP spikes",
"Therapeutic hyperventilation (pCO₂ 30–35 mmHg) – TEMPORARY only",
"Optimise MAP with vasopressors (noradrenaline/vasopressin)",
"Brief trial of optimising sedation depth",
"Repeat imaging to identify new surgical lesion",
]
add_bullets(s, [(0, t) for t in t2], 0.4, 1.8, 5.9, 5.0, font_size=13, color=DARK_GREY)
add_textbox(s, "Tier 3 – Last Resort", 7.1, 1.35, 5.5, 0.4, font_size=14, bold=True, color=RED)
t3 = [
"Barbiturate coma (thiopentone/pentobarbital) – reduces CMRO₂",
"Therapeutic hypothermia (32–34°C) – reduces metabolic demand",
"Decompressive craniectomy (DC) – removes a bone flap to allow brain expansion",
"DC reduces ICP but evidence for outcome improvement is debated (DECRA, RESCUEicp trials)",
"Steroids are CONTRAINDICATED in TBI (CRASH trial – increased mortality)",
]
add_bullets(s, [(0, t) for t in t3], 7.05, 1.8, 5.9, 5.0, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SECTION DIVIDER – SECTION 3
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
add_rect(s, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(s, 0, 3.5, 13.333, 0.12, ORANGE)
add_textbox(s, "SECTION 3", 1, 1.5, 11.333, 1, font_size=22,
color=RGBColor(0xAA, 0xCC, 0xFF), align=PP_ALIGN.CENTER)
add_textbox(s, "Surgical Indications in Head Injury", 1, 2.5, 11.333, 1.2,
font_size=36, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_textbox(s, "Haematoma Evacuation, Decompression & Fracture Repair", 1, 3.7, 11.333, 0.9,
font_size=22, color=RGBColor(0xAA, 0xCC, 0xFF), align=PP_ALIGN.CENTER)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 22 – SURGICAL INDICATIONS: EDH
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Surgical Indications: Extradural Haematoma", "Section 3 | Surgery")
add_rect(s, 0.3, 1.3, 8.0, 5.6, LIGHT_BLUE)
add_rect(s, 8.65, 1.3, 4.4, 5.6, RGBColor(0xFF, 0xE6, 0xE6))
add_textbox(s, "Indications for Surgery", 0.5, 1.35, 7.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
edh_surg = [
"ANY patient with neurological deterioration attributable to EDH",
"EDH volume > 30 mL",
"EDH thickness > 15 mm on CT",
"Midline shift > 5 mm",
"Rapid expansion of haematoma on serial imaging",
"GCS < 9 with EDH on CT",
"Pupillary abnormality (asymmetry, dilation, unreactivity)",
"EDH in posterior fossa (lower threshold for surgery due to rapid decompensation)",
]
add_bullets(s, [(0, t) for t in edh_surg], 0.4, 1.8, 8.0, 5.0, font_size=13, color=DARK_GREY)
add_textbox(s, "Surgical Procedure", 8.75, 1.35, 4.1, 0.4, font_size=14, bold=True, color=RED)
add_textbox(s,
"Emergency CRANIOTOMY\n\n"
"• Bone flap removed over haematoma\n"
"• Clot evacuated\n"
"• Middle meningeal artery identified and coagulated\n"
"• Dura hitched up to bone edges\n"
"• Bone flap replaced\n\n"
"Outcome: Excellent if operated BEFORE fixed dilated pupil\n\n"
"Conservative management only for small EDH (<10 mL, <5 mm thick, <5 mm shift) in alert neurologically intact patients with close monitoring",
8.75, 1.8, 4.1, 5.1, font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 23 – SURGICAL INDICATIONS: ACUTE SDH
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Surgical Indications: Acute Subdural Haematoma", "Section 3 | Surgery")
add_rect(s, 0.3, 1.3, 8.0, 5.6, LIGHT_BLUE)
add_rect(s, 8.65, 1.3, 4.4, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
add_textbox(s, "Indications for Surgical Evacuation", 0.5, 1.35, 7.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
asdh_surg = [
"SDH thickness > 10 mm on CT",
"Midline shift > 5 mm (regardless of GCS)",
"ICP > 20 mmHg in monitored patients",
"GCS deterioration of ≥ 2 points from time of injury",
"Pupillary asymmetry or fixed dilated pupils",
"Intracranial pressure refractory to medical management",
"Large haematoma with significant mass effect (even if GCS preserved)",
]
add_bullets(s, [(0, t) for t in asdh_surg], 0.4, 1.8, 8.0, 5.0, font_size=13, color=DARK_GREY)
add_textbox(s, "Surgical Options", 8.75, 1.35, 4.1, 0.4, font_size=14, bold=True, color=ORANGE)
add_textbox(s,
"CRANIOTOMY\n"
"• Primary choice for acute SDH\n"
"• Removes bone flap, evacuates clot\n"
"• Allows inspection of underlying brain\n\n"
"DECOMPRESSIVE CRANIECTOMY\n"
"• Consider if severe brain swelling\n"
"• Bone flap NOT replaced\n"
"• Brain allowed to expand out of skull\n"
"• Higher rate of complications (paradoxical herniation, hygroma)\n\n"
"Note: Higher mortality than EDH due to associated primary brain injury",
8.75, 1.8, 4.1, 5.1, font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 24 – SURGICAL INDICATIONS: CHRONIC SDH
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Surgical Indications: Chronic Subdural Haematoma", "Section 3 | Surgery")
add_rect(s, 0.3, 1.3, 7.5, 5.6, LIGHT_BLUE)
add_rect(s, 8.1, 1.3, 4.9, 5.6, RGBColor(0xE6, 0xFF, 0xE6))
add_textbox(s, "Indications for Surgery", 0.5, 1.35, 7.0, 0.4, font_size=14, bold=True, color=DARK_BLUE)
csdh_surg = [
"Symptomatic chronic SDH with significant haematoma",
"Midline shift > 5 mm",
"Haematoma thickness > 10 mm",
"Neurological deterioration attributable to haematoma",
"Progressive enlargement on serial imaging",
"Failure of conservative management",
"Acute-on-chronic SDH with significant fresh bleeding",
]
add_bullets(s, [(0, t) for t in csdh_surg], 0.4, 1.8, 7.3, 3.8, font_size=13, color=DARK_GREY)
add_textbox(s, "Conservative Management (small, asymptomatic haematoma):", 0.5, 5.65, 7.3, 0.4,
font_size=13, bold=True, color=DARK_BLUE)
add_textbox(s, "Serial CT; reverse anticoagulation; dexamethasone (limited evidence); watchful waiting 7–10 days for clot liquefaction",
0.5, 6.1, 7.3, 0.7, font_size=12, color=DARK_GREY, wrap=True)
add_textbox(s, "Surgical Procedure", 8.2, 1.35, 4.5, 0.4, font_size=14, bold=True, color=GREEN)
add_textbox(s,
"BURR HOLE EVACUATION\n"
"(preferred for liquefied chronic SDH)\n\n"
"• 1–2 burr holes over haematoma\n"
"• Membrane opened; fluid drained\n"
"• Drain left in situ 24–48 hours\n"
"• Simple, lower risk, can be under LA\n\n"
"CRANIOTOMY\n"
"(if membranes loculated or mixed density suggesting acute component)\n\n"
"• Required for organised/solid haematoma\n"
"• Bilateral haematomas often need bilateral burr holes\n\n"
"Recurrence rate: ~10–20%",
8.2, 1.8, 4.65, 5.1, font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 25 – SURGICAL INDICATIONS: DEPRESSED SKULL FRACTURES
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Surgical Indications: Depressed Skull Fractures", "Section 3 | Surgery")
add_rect(s, 0.3, 1.3, 7.5, 5.6, LIGHT_BLUE)
add_rect(s, 8.1, 1.3, 4.9, 5.6, RGBColor(0xFF, 0xF3, 0xCD))
add_textbox(s, "Indications for Surgery", 0.5, 1.35, 7.0, 0.4, font_size=14, bold=True, color=DARK_BLUE)
dsf_surg = [
"Depression > thickness of adjacent skull (full-thickness depression)",
"Open (compound) fracture – wound contamination and risk of infection/meningitis",
"Underlying dural tear or brain laceration",
"Significant underlying haematoma requiring evacuation",
"Cosmetically unacceptable depression in visible area",
"Associated neurological deficit attributable to compression",
"Fracture over dural venous sinus – handle with extreme caution (risk of massive haemorrhage)",
]
add_bullets(s, [(0, t) for t in dsf_surg], 0.4, 1.8, 7.3, 4.2, font_size=13, color=DARK_GREY)
add_textbox(s, "Conservative Management:", 0.5, 6.1, 7.3, 0.35, font_size=13, bold=True, color=DARK_BLUE)
add_textbox(s, "Closed, non-contaminated, neurologically intact with depression < skull thickness – observation acceptable",
0.5, 6.5, 7.3, 0.6, font_size=12, color=DARK_GREY, wrap=True)
add_textbox(s, "Surgical Procedure", 8.2, 1.35, 4.5, 0.4, font_size=14, bold=True, color=ORANGE)
add_textbox(s,
"• Thorough wound debridement\n"
"• Elevation of depressed fragments\n"
"• Repair of dural tear (dural substitute if needed)\n"
"• Antibiotics for open/contaminated fractures\n"
"• Heavily contaminated open fractures: fragments may need removal (cranioplasty deferred)\n\n"
"Antibiotic prophylaxis:\n"
"• Reduces meningitis risk in compound fractures\n"
"• Co-amoxiclav or cephalosporin typically used\n\n"
"Prophylactic anticonvulsants:\n"
"• Consider in first 7 days post-injury for high-risk patients",
8.2, 1.8, 4.65, 5.1, font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 26 – ICP-GUIDED SURGICAL DECOMPRESSION
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "ICP-Guided Surgical Decision Making", "Section 3 | Surgery")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
add_textbox(s, "Decompressive Craniectomy (DC)", 0.5, 1.35, 7.0, 0.4, font_size=14, bold=True, color=DARK_BLUE)
dc_items = [
"Removal of a large bone flap (usually fronto-temporo-parietal) to allow brain expansion",
"Indicated: refractory raised ICP (>20–25 mmHg) unresponsive to medical management",
"Bifrontal DC for diffuse cerebral oedema",
"Unilateral DC for focal lesions / hemispheric swelling",
"DECRA Trial (2011): early DC in diffuse injury reduced ICP but worse functional outcome",
"RESCUEicp Trial (2016): DC reduced mortality but increased severe disability",
"Bone flap stored subcutaneously (abdomen) or in bone bank; cranioplasty at 3–6 months",
"Complications: paradoxical herniation, hygroma, bone flap resorption",
]
add_bullets(s, [(0, t) for t in dc_items], 0.4, 1.8, 7.5, 5.0, font_size=13, color=DARK_GREY)
add_textbox(s, "Posterior Fossa Surgery", 8.5, 1.35, 4.5, 0.4, font_size=14, bold=True, color=RED)
pf_items = [
"Posterior fossa has very limited compensatory reserve",
"Low threshold for surgery in posterior fossa haematomas",
"Even small posterior fossa EDH can rapidly cause brainstem compression",
"Suboccipital craniectomy for evacuation",
"Monitor for obstructive hydrocephalus (may need EVD)",
]
add_bullets(s, [(0, t) for t in pf_items], 8.4, 1.8, 4.6, 5.0, font_size=13, color=DARK_GREY)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 27 – MANAGEMENT ALGORITHM
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "TBI Management Algorithm", "Overview | Summary")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
steps = [
("STEP 1\nPrimary Survey\n(ATLS)", "Airway + C-spine, Breathing, Circulation; GCS & pupils; BSL", DARK_BLUE),
("STEP 2\nImaging", "CT head (+ cervical spine); identify haematomas, fractures, oedema", MID_BLUE),
("STEP 3\nNeurosurgical\nReview", "Discuss all GCS <13, focal deficits, significant CT abnormalities", RGBColor(0x26, 0x6D, 0xC1)),
("STEP 4\nSurgery vs\nConservative", "EDH/SDH with surgical criteria → Theatre; Others → ITU", ORANGE),
("STEP 5\nICP\nManagement", "Monitor ICP; Tier 1 → 2 → 3 escalation; CPP target 60–70 mmHg", RGBColor(0x99, 0x44, 0x00)),
("STEP 6\nRehabilitation", "Early physio/OT/SALT; neurocognitive assessment; long-term follow-up", GREEN),
]
for i, (step, desc, col) in enumerate(steps):
x = 0.35 + i * 2.1
add_rect(s, x, 1.4, 1.95, 1.1, col)
add_textbox(s, step, x+0.02, 1.42, 1.91, 1.06,
font_size=11, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# arrow (except last)
if i < 5:
add_rect(s, x+1.97, 1.77, 0.12, 0.36, ORANGE)
add_rect(s, x, 2.55, 1.95, 4.1, WHITE)
add_textbox(s, desc, x+0.05, 2.6, 1.85, 4.0, font_size=11, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 28 – PROGNOSIS & OUTCOMES
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Prognosis & Outcomes", "Summary")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
add_textbox(s, "Prognostic Factors", 0.5, 1.35, 5.8, 0.4, font_size=14, bold=True, color=DARK_BLUE)
prog = [
"GCS motor score – strongest predictor of neurological outcome",
"Age: worse outcome in elderly",
"Pupillary responses: bilateral fixed pupils = poor prognosis",
"Time to surgery: key for EDH – outcomes excellent if early",
"Associated extracranial injuries",
"Hypotension and hypoxia at scene (secondary insults)",
"CT findings: cistern effacement, midline shift, haematoma volume",
]
add_bullets(s, [(0, t) for t in prog], 0.4, 1.8, 6.0, 4.5, font_size=13, color=DARK_GREY)
add_textbox(s, "Glasgow Outcome Scale (GOS)", 7.3, 1.35, 5.5, 0.4, font_size=14, bold=True, color=DARK_BLUE)
gos = [
("GOS 5 – Good Recovery", "Minor deficits; returns to normal life"),
("GOS 4 – Moderate Disability", "Independent but disabled; cannot return to work"),
("GOS 3 – Severe Disability", "Dependent; conscious but requires care"),
("GOS 2 – Persistent Vegetative", "Unaware; reflex responses only"),
("GOS 1 – Dead", ""),
]
for i, (grade, desc) in enumerate(gos):
col = [GREEN, RGBColor(0x66, 0xBB, 0x44), ORANGE, RED, DARK_GREY][i]
add_rect(s, 7.3, 1.8 + i*0.92, 3.5, 0.84, col)
add_textbox(s, grade, 7.33, 1.82 + i*0.92, 3.44, 0.8,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s, desc, 10.85, 1.82 + i*0.92, 2.1, 0.8, font_size=11, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 29 – KEY SUMMARY
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "Key Summary Points", "Summary")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
summary_cols = [
("Introduction & Classification",
["TBI = primary (non-modifiable) + secondary (modifiable) injury",
"GCS: Minor(15), Mild(14–15+LOC), Moderate(9–13), Severe(3–8)",
"EDH: lenticular, lucid interval, arterial bleed",
"Acute SDH: crescent, high-energy, rapid deterioration",
"Chronic SDH: elderly, anticoagulated, weeks–months later",
"DAI: no haematoma, axonal shearing, prolonged coma"]),
("Increased ICP",
["ICP normal 5–15 mmHg; treat if >20 mmHg",
"CPP = MAP – ICP; target CPP 60–70 mmHg",
"Monro–Kellie: exponential ICP rise after compensation lost",
"Uncal herniation: ipsilateral fixed pupil – emergency",
"Tier 1: head elevation, sedation, osmotherapy, normocapnia",
"STEROIDS CONTRAINDICATED in TBI"]),
("Surgical Indications",
["EDH >30 mL or >15 mm or >5 mm shift → craniotomy",
"Acute SDH >10 mm or >5 mm shift or ICP >20 → craniotomy",
"Chronic SDH symptomatic / shifting → burr holes",
"Depressed fracture open/compound/> skull thickness → surgery",
"Decompressive craniectomy for refractory ICP",
"Posterior fossa: low threshold for surgery"]),
]
for i, (heading, points) in enumerate(summary_cols):
x = 0.4 + i * 4.2
add_rect(s, x, 1.35, 3.9, 0.5, DARK_BLUE)
add_textbox(s, heading, x+0.05, 1.37, 3.8, 0.46,
font_size=13, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(s, x, 1.88, 3.9, 4.95, WHITE)
for j, pt in enumerate(points):
add_textbox(s, f"✔ {pt}", x+0.1, 1.95 + j*0.77, 3.75, 0.72,
font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 30 – REFERENCES
# ═══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank_layout)
slide_header(s, "References", "Bibliography")
add_rect(s, 0.3, 1.3, 12.7, 5.6, LIGHT_BLUE)
refs = [
"1. Bailey & Love's Short Practice of Surgery, 28th Edition (2023). Chapter 28: Head Injury. Editors: Williams NS, O'Connell PR, McCaskie AW.",
"2. Brain Trauma Foundation (BTF) Guidelines for the Management of Severe Traumatic Brain Injury, 4th Edition (2016).",
"3. NICE Clinical Guideline CG176 – Head Injury: Assessment and Early Management (updated 2023). National Institute for Health and Care Excellence.",
"4. Cooper DJ, et al. (DECRA Trial). Decompressive craniectomy in diffuse traumatic brain injury. N Engl J Med. 2011;364:1493–1502.",
"5. Hutchinson PJ, et al. (RESCUEicp Trial). Trial of decompressive craniectomy for traumatic intracranial hypertension. N Engl J Med. 2016;375:1119–1130.",
"6. CRASH Trial Collaborators. Effect of intravenous corticosteroids on death within 14 days in 10,008 adults with clinically significant head injury. Lancet. 2004;364:1321–1328.",
]
for i, ref in enumerate(refs):
add_textbox(s, ref, 0.5, 1.4 + i*0.78, 12.3, 0.72, font_size=12, color=DARK_GREY, wrap=True)
footer(s)
# ── Save ─────────────────────────────────────────────────────────────────────
out_path = "/tmp/workspace/traumatic-head-injury/Traumatic_Head_Injury.pptx"
buf = BytesIO()
prs.save(buf)
with open(out_path, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out_path}")
print(f"Total slides: {len(prs.slides)}")
cd /tmp/workspace/traumatic-head-injury && python build_pptx.py 2>&1
~/traumatic-head-injury/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/traumatic-head-injury/build_pptx.py'
cd /tmp/workspace/traumatic-head-injury && python build_pptx.py 2>&1
Traumatic Head Injury
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title slide |
| 2 | Contents overview |
| 3 | Section 1 divider |
| 4 | Introduction & Epidemiology (3–4% ED attendances, 1500/100k/yr, leading cause of death in young adults, RTA = 50%) |
| 5 | Primary vs Secondary Brain Injury (mechanisms, modifiability) |
| 6 | Glasgow Coma Scale – full 3-component table with scoring |
| 7 | Classification by GCS – Minor / Mild / Moderate / Severe with clinical notes |
| 8 | Skull Fractures – Linear, Depressed, Basal, Compound |
| 9 | Concussion, DAI & Second Impact Syndrome |
| 10 | Extradural Haematoma – lenticular lesion, lucid interval, arterial bleed |
| 11 | Subdural Haematoma – Acute vs Chronic (CT appearance, mechanisms) |
| 12 | Intracerebral Haematoma & Contusion (coup-contrecoup, "talk and die") |
| 13 | Minor/Mild Head Injury – NICE discharge criteria & CT indications |
| # | Slide |
|---|---|
| 14 | Section 2 divider |
| 15 | ICP & Cerebral Blood Flow – CPP = MAP − ICP formula, autoregulation |
| 16 | Monro–Kellie Doctrine – 3 compartments, exponential ICP rise |
| 17 | Herniation Syndromes – Uncal, Central, Tonsillar (Cushing's triad) |
| 18 | ICP Monitoring – Indications, EVD vs parenchymal probe, targets |
| 19 | Medical Management Tier 1 – Head elevation, sedation, osmotherapy, ventilation |
| 20 | Medical Management Tier 2 & 3 – CSF drainage, barbiturate coma, decompressive craniectomy; STEROIDS CONTRAINDICATED |
| # | Slide |
|---|---|
| 21 | Section 3 divider |
| 22 | Surgical Indications: EDH – volume >30 mL, thickness >15 mm, shift >5 mm → craniotomy |
| 23 | Surgical Indications: Acute SDH – thickness >10 mm, shift >5 mm, ICP >20 → craniotomy/craniectomy |
| 24 | Surgical Indications: Chronic SDH – symptomatic + shifting → burr holes; conservative if small |
| 25 | Surgical Indications: Depressed Skull Fractures – open/compound, >skull thickness, contaminated |
| 26 | ICP-Guided Decompressive Craniectomy (DECRA & RESCUEicp trial data) |
| 27 | TBI Management Algorithm – 6-step flowchart |
| 28 | Prognosis & Outcomes – GCS motor score, Glasgow Outcome Scale |
| 29 | Key Summary – 3-column recap of all three sections |
| 30 | References – Bailey & Love, BTF Guidelines, NICE CG176, CRASH, DECRA, RESCUEicp |