Create ppt on headache
headache types classification diagram

This orthopaedic anatomical diagram illustrates the Chiron classification (2004) for femoral head fractures, shown across five categorized types (Type I to Type V). Each type is presented using a dry bone model of the proximal femur from two perspectives: a lateral/oblique view and a frontal view of the femoral head. Fracture lines are demarcated by solid black lines to indicate the morphology and size of the fracture fragments. Type I displays small osteochondral fragments at the superior-lateral aspect. Type II shows a 1/4 head fragment on the anterior-superior surface. Type III demonstrates a 1/3 head fragment extending from superior to posterior. Type IV depicts a vertical fracture dividing approximately 1/2 of the femoral head. Type V illustrates cranial cartilage impaction with multiple intersecting lines across the superior articular surface. The classification is clinically relevant for orthopedic surgeons and residents for determining the severity of femoral head trauma and informing surgical decisions, such as fragment fixation versus excision based on size and location.

Educational diagram illustrating the Judet-Letournel classification of acetabular fractures using anatomical specimens of the hemipelvis. The visual is divided into two rows: 'Elementary' and 'Associated' fracture types. White lines superimposed on the specimens delineate specific fracture patterns. The 'Elementary' row features five simple patterns: Anterior column (vertical line through the pelvic brim), Anterior wall (localized articular segment), Posterior column (ischiadic notch through obturator foramen), Posterior wall (localized posterior rim), and Transverse (horizontal line bisecting the acetabulum). The 'Associated' row demonstrates complex configurations: Both column, Transverse plus posterior wall, Posterior column plus posterior wall, Anterior column with posterior hemitransverse (a vertical anterior column line joined by a horizontal posterior component), and T-type (a transverse fracture with an additional vertical stem extending through the obturator foramen). This orthopedic diagram serves as a clinical reference for orthopedic surgeons and medical students to understand pelvic trauma morphology and surgical planning.

This educational infographic details the Echinococcus multilocularis Ulm Classification for Computed Tomography (EMUC-CT), a standardized system for evaluating hepatic Alveolar Echinococcosis (AE). The diagram is divided into two sections: Primary Morphology and Patterns of Calcification. The left section illustrates five morphological types (I-V) using axial CT cross-sections of the liver. Type I (diffuse infiltrating) and Type II (primarily circumscribed, tumor-like) are sub-categorized by the presence or absence of a cystoid portion. Type III (primarily cystoid) distinguishes between intermediate and widespread involvement, further categorized by solid peripheral portions. Type IV displays small-cystoid, metastasis-like lesions, while Type V represents mainly calcified, inactive lesions. The right panel illustrates six distinct calcification patterns within hepatic lesions: feathery (branching), focal (isolated spots), diffuse (widespread), edge-weighted (peripheral), and central. The classification system is designed to improve diagnostic accuracy and clinical assessment of disease activity in patients with Alveolar Echinococcosis.

Summary : This figure illustrates the type classification of aortic dissections according to the Stanford system, showing three anatomical variants: Stanford Type A, Stanford Type B, and nonA-nonB dissection, with clear visualizations of the affected aortic segments. illustration: # Aortic Dissection Types : • Three labeled anatomical diagrams of the aorta, each showing a different type of aortic dissection. • Labels above each aorta: "STANFORD TYPE A", "STANFORD TYPE B", and "nonA-nonB DISSECTION". ## Stanford Type A : • Dissection involves the ascending aorta and extends beyond the aortic arch. • The false lumen (depicted as a split in the aortic wall) is present from the ascending aorta through the arch and into the descending aorta. ## Stanford Type B : • Dissection starts distal to the left subclavian artery, involving only the descending aorta. • The ascending aorta and arch are not involved. ## nonA-nonB Dissection : • Dissection involves the aortic arch but does not extend into the ascending aorta. • The false lumen is present in the arch and descending aorta, sparing the ascending aorta. # Scene Overview : • All diagrams are oriented with the aortic root at the top and the abdominal aorta at the bottom. • The aortic branches (brachiocephalic, left common carotid, left subclavian) are visible at the top of each diagram. • The false lumen is shown as a darker inner channel within the aortic wall. # Technical Details : • No scale bar or magnification is provided. • The diagrams use red and orange hues to differentiate the true and false lumens. # Spatial Relationships : • The three diagrams are aligned side-by-side for direct comparison. • The extent and location of the dissection vary between the types, highlighting the anatomical differences. # Analysis : • The figure visually distinguishes the three main anatomical patterns of aortic dissection. • Stanford Type A involves the ascending aorta, Stanford Type B is limited to the descending aorta, and nonA-nonB involves the arch without the ascending aorta. • This classification is critical for clinical decision-making and management of aortic dissections.
migraine pathophysiology trigeminal nerve brain

This medical illustration depicts the pathophysiology of the trigeminovascular system in migraine. The right panel shows a sagittal view of the human brain, mapping the ascending pain pathway from meningeal blood vessels through the trigeminal ganglion to the trigeminal nucleus caudalis (TNC) in the brainstem. From the TNC, signals project to the hypothalamus, thalamus, and cerebral cortex. The left panel provides a detailed molecular view of the neurovascular junction. It shows a dural nerve ending where reactive oxygen species (ROS) and nitric oxide (NO) activate the TRPA1 channel, while a CACN1A mutation affects the CaV2.1 channel. Both pathways lead to calcium influx and the exocytosis of Calcitonin Gene-Related Peptide (CGRP). CGRP binds to its receptor (comprising RAMP1, CLR, and RCP) on a cerebrovascular smooth muscle cell. This binding activates adenylate cyclase (AC), increasing cAMP and Protein Kinase A (PKA), ultimately causing vasodilation and migraine symptoms.

An anatomical diagram in sagittal profile illustrating the trigemino-vascular system and its role in migraine pathophysiology. The central focus is the trigeminal ganglion (TG), from which three primary divisions of the trigeminal nerve (CN V) emerge: the ophthalmic (V1), maxillary (V2), and mandibular (V3) branches. These peripheral afferents are shown innervating the scalp, forehead, mid-face, and jaw regions, with yellow dots indicating the release of Calcitonin Gene-Related Peptide (CGRP) at nerve terminals. Intracranially, the diagram highlights the ophthalmic division's (V1) innervation of the dura mater and cerebral vasculature. Centrally, a primary nerve tract is depicted traveling from the trigeminal ganglion toward the brainstem and trigeminocervical complex (TCC), representing the pathway for nociceptive signal transmission. The illustration combines a stylized mid-sagittal section of the human brain—including the cerebrum, cerebellum, and brainstem—with a facial outline to demonstrate the neuroanatomical connection between intracranial meningeal structures and peripheral facial sensory distribution.

This pathophysiology diagram illustrates the central mechanisms of migraine, overlaid on a sagittal view of the human brain. The illustration highlights the interplay between several key neuroanatomical structures and processes. A central text box indicates 'Hypothalamic activation' leading to 'premonitory symptoms', with arrows showing its influence on the 'Spinal trigeminal nucleus' in the brainstem. Cortical spreading depression, associated with 'aura', is depicted as a large arrow targeting the same spinal trigeminal nucleus. The diagram outlines the involvement of the trigeminal nerve system, showing bidirectional activity: activation of the spinal trigeminal nucleus leads to 'Neurogenic inflammation at the trigeminal ganglion and terminal' (represented by a starburst graphic), while 'Neurotransmitter' release is shown signaling back from the brainstem to the peripheral trigeminal structures. This diagram serves as an educational tool for medical students and clinicians to understand the trigeminovascular system's role in migraine pathogenesis, specifically how hypothalamic and cortical triggers converge on the brainstem and peripheral nerve terminals.
mkdir -p /tmp/workspace/headache-ppt && ls /tmp/workspace/headache-ppt/
~/headache-ppt/build_ppt.py
import subprocess, json, base64
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.oxml.ns import qn
from lxml import etree
# --- Colour palette (deep navy + teal accent) ---
NAVY = RGBColor(0x0D, 0x2B, 0x55) # slide bg / title bar
TEAL = RGBColor(0x00, 0x8B, 0x8B) # accent bar / bullet marker
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT = RGBColor(0xE8, 0xF4, 0xF8) # content box bg
DARK = RGBColor(0x1A, 0x1A, 0x2E) # body text
ORANGE = RGBColor(0xE8, 0x6B, 0x0A) # highlight / warning
GREY = RGBColor(0x60, 0x70, 0x80) # footnote / sub
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=None, alpha=None):
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.line.fill.background()
if fill:
shape.fill.solid()
shape.fill.fore_color.rgb = fill
else:
shape.fill.background()
return shape
def add_textbox(slide, x, y, w, h, text, size=18, bold=False, color=DARK,
align=PP_ALIGN.LEFT, wrap=True, italic=False, anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = anchor
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
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
return tf
def add_bullets(slide, x, y, w, h, items, size=16, color=DARK, bold_first=False,
bullet_color=TEAL, heading=None, heading_size=20):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(4)
tf.margin_bottom = Pt(4)
first = True
if heading:
p = tf.paragraphs[0]
p.alignment = PP_ALIGN.LEFT
r = p.add_run()
r.text = heading
r.font.size = Pt(heading_size)
r.font.bold = True
r.font.color.rgb = TEAL
first = False
for i, item in enumerate(items):
if first and i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.alignment = PP_ALIGN.LEFT
p.space_before = Pt(3)
# bullet symbol
r0 = p.add_run()
r0.text = "▸ "
r0.font.size = Pt(size)
r0.font.bold = True
r0.font.color.rgb = bullet_color
r1 = p.add_run()
r1.text = item
r1.font.size = Pt(size)
r1.font.bold = (bold_first and i == 0)
r1.font.color.rgb = color
first = False
return tf
def fetch_image_b64(url):
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py", url]
))
return result[0] if result else None
def add_image_from_url(slide, url, x, y, w, h):
img = fetch_image_b64(url)
if img and img.get("base64"):
_, b64data = img["base64"].split(",", 1) if "," in img["base64"] else ("", img["base64"])
raw = base64.b64decode(b64data)
buf = BytesIO(raw)
slide.shapes.add_picture(buf, Inches(x), Inches(y), Inches(w), Inches(h))
return True
return False
def slide_bg(slide, color=NAVY):
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = color
def accent_bar(slide, y=0.0, height=0.08, color=TEAL):
add_rect(slide, 0, y, 13.333, height, fill=color)
def footer(slide, text="Headache | Medical Education", color=GREY):
add_rect(slide, 0, 7.25, 13.333, 0.25, fill=RGBColor(0x12, 0x35, 0x55))
add_textbox(slide, 0.2, 7.27, 8, 0.2, text, size=9, color=RGBColor(0xAA, 0xCC, 0xDD),
italic=True)
add_textbox(slide, 11, 7.27, 2, 0.2, "Source: Goldman-Cecil Medicine, Harrison's, Bradley's",
size=7, color=RGBColor(0x88, 0xAA, 0xBB), align=PP_ALIGN.RIGHT)
# ============================================================
# SLIDE 1 — TITLE
# ============================================================
s1 = prs.slides.add_slide(BLANK)
slide_bg(s1, NAVY)
# decorative teal bar left
add_rect(s1, 0, 0, 0.5, 7.5, fill=TEAL)
# large title
add_textbox(s1, 0.8, 1.5, 9, 1.8,
"HEADACHE", size=72, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
# subtitle
add_textbox(s1, 0.8, 3.4, 9, 0.7,
"A Clinical Overview for Medical Students & Clinicians",
size=22, color=RGBColor(0x90, 0xD5, 0xE4), italic=True)
# divider line
add_rect(s1, 0.8, 4.2, 8.5, 0.06, fill=TEAL)
# sub-info
add_textbox(s1, 0.8, 4.4, 9, 0.5,
"Classification • Pathophysiology • Diagnosis • Management",
size=16, color=RGBColor(0xCC, 0xE5, 0xF0))
add_textbox(s1, 0.8, 5.1, 9, 0.4,
"August 2026", size=13, color=GREY)
footer(s1)
# ============================================================
# SLIDE 2 — OVERVIEW / CLASSIFICATION
# ============================================================
s2 = prs.slides.add_slide(BLANK)
slide_bg(s2, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s2, 0, 0, 13.333, 1.1, fill=NAVY)
add_textbox(s2, 0.4, 0.15, 12, 0.75,
"Overview & Classification", size=32, bold=True, color=WHITE)
accent_bar(s2, y=1.1, height=0.06, color=TEAL)
# Two column boxes
# Left — Primary headaches
add_rect(s2, 0.4, 1.3, 5.8, 5.5, fill=WHITE)
add_rect(s2, 0.4, 1.3, 5.8, 0.5, fill=TEAL)
add_textbox(s2, 0.45, 1.32, 5.7, 0.45,
"PRIMARY HEADACHES", size=17, bold=True, color=WHITE)
primary = [
"Migraine (with/without aura)",
"Tension-type headache (TTH)",
"Cluster headache & TACs",
" - Paroxysmal hemicrania",
" - SUNCT / SUNA",
"New daily persistent headache",
"Hemicrania continua",
]
add_bullets(s2, 0.5, 1.85, 5.6, 4.8, primary, size=15)
# Right — Secondary headaches
add_rect(s2, 6.8, 1.3, 6.1, 5.5, fill=WHITE)
add_rect(s2, 6.8, 1.3, 6.1, 0.5, fill=ORANGE)
add_textbox(s2, 6.85, 1.32, 6.0, 0.45,
"SECONDARY HEADACHES (Red Flags)", size=17, bold=True, color=WHITE)
secondary = [
"Subarachnoid / intracranial hemorrhage",
"Meningitis / encephalitis",
"Brain tumor / metastases",
"Cerebral venous thrombosis",
"Idiopathic intracranial hypertension",
"Giant cell arteritis (>60 yrs)",
"Cervical artery dissection",
"Post-traumatic headache",
]
add_bullets(s2, 6.9, 1.85, 5.9, 4.8, secondary, size=15, bullet_color=ORANGE)
footer(s2)
# ============================================================
# SLIDE 3 — RED FLAGS (SNOOP4)
# ============================================================
s3 = prs.slides.add_slide(BLANK)
slide_bg(s3, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s3, 0, 0, 13.333, 1.1, fill=RGBColor(0x7B, 0x1F, 0x1F))
add_textbox(s3, 0.4, 0.15, 12, 0.75,
"Red Flags — When to Investigate", size=32, bold=True, color=WHITE)
accent_bar(s3, y=1.1, height=0.06, color=ORANGE)
flags = [
("S", "Systemic symptoms", "Fever, night sweats, weight loss, HIV, malignancy"),
("N", "Neurological deficits", "Focal signs, altered consciousness, papilledema"),
("O", "Onset sudden", '"Worst headache of life", thunderclap → rule out SAH'),
("O", "Older age of onset", "New headache >50 yrs → giant cell arteritis, tumor"),
("P", "Progressive worsening", "Increasing frequency/severity, postural variation"),
("P", "Precipitated by Valsalva", "Cough, exertion, bending → raised ICP"),
("P", "Positional change", "Better/worse supine vs upright → CSF pressure issue"),
("P", "Papilledema present", "Raised ICP until proven otherwise"),
]
for i, (letter, title, detail) in enumerate(flags):
col = i % 2
row = i // 2
bx = 0.3 + col * 6.5
by = 1.3 + row * 1.45
# Letter badge
badge = slide.shapes if False else s3.shapes
add_rect(s3, bx, by, 0.55, 0.55, fill=ORANGE)
add_textbox(s3, bx + 0.02, by + 0.02, 0.5, 0.5,
letter, size=22, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
anchor=MSO_ANCHOR.MIDDLE)
add_rect(s3, bx + 0.6, by, 5.6, 0.55, fill=WHITE)
tb = s3.shapes.add_textbox(Inches(bx + 0.65), Inches(by + 0.03),
Inches(5.5), Inches(0.5))
tf = tb.text_frame
tf.word_wrap = True
p = tf.paragraphs[0]
r = p.add_run()
r.text = title + ": "
r.font.bold = True
r.font.size = Pt(14)
r.font.color.rgb = NAVY
r2 = p.add_run()
r2.text = detail
r2.font.size = Pt(13)
r2.font.color.rgb = DARK
footer(s3)
# ============================================================
# SLIDE 4 — MIGRAINE
# ============================================================
s4 = prs.slides.add_slide(BLANK)
slide_bg(s4, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s4, 0, 0, 13.333, 1.1, fill=NAVY)
add_textbox(s4, 0.4, 0.15, 12, 0.75,
"Migraine", size=32, bold=True, color=WHITE)
accent_bar(s4, y=1.1, height=0.06, color=TEAL)
# Left content
add_rect(s4, 0.3, 1.25, 6.2, 5.9, fill=WHITE)
add_bullets(s4, 0.4, 1.3, 6.0, 5.8,
[
"Prevalence: ~12% population; F:M = 3:1",
"Unilateral, throbbing pain — moderate to severe",
"Lasts 4–72 hours (untreated)",
"Worsens with routine physical activity",
"Nausea ± vomiting",
"Photophobia AND phonophobia",
"Aura in ~30%: visual scotoma, fortification spectra, sensory/speech disturbance (5–60 min before pain)",
"IHS criteria: ≥5 attacks fulfilling above features",
],
size=15,
heading="Clinical Features",
)
# Right — image placeholder + phases
img_ok = add_image_from_url(
s4,
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_174d671ad9d4140857fd918dd1c6239954fb8b8a36cb22164804d9e77f1f2d12.jpg",
6.8, 1.25, 6.1, 3.6
)
if not img_ok:
add_rect(s4, 6.8, 1.25, 6.1, 3.6, fill=LIGHT)
add_rect(s4, 6.8, 5.0, 6.1, 2.15, fill=WHITE)
add_bullets(s4, 6.9, 5.0, 6.0, 2.1,
["Prodrome → Aura → Headache → Postdrome"],
heading="Phases of Migraine", heading_size=16, size=14)
footer(s4)
# ============================================================
# SLIDE 5 — MIGRAINE PATHOPHYSIOLOGY
# ============================================================
s5 = prs.slides.add_slide(BLANK)
slide_bg(s5, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s5, 0, 0, 13.333, 1.1, fill=NAVY)
add_textbox(s5, 0.4, 0.15, 12, 0.75,
"Migraine — Pathophysiology", size=32, bold=True, color=WHITE)
accent_bar(s5, y=1.1, height=0.06, color=TEAL)
# Image
img_ok2 = add_image_from_url(
s5,
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_0810b588704a8ce1af4982011a2865f6a65a7def49d7429ff15b8d059d0ea01e.jpg",
0.3, 1.25, 6.5, 5.9
)
# Key points
add_rect(s5, 7.1, 1.25, 5.9, 5.9, fill=WHITE)
add_bullets(s5, 7.2, 1.3, 5.7, 5.8,
[
"Cortical spreading depression (CSD) underlies aura — wave of depolarisation at 3–5 mm/min",
"Trigeminovascular activation: peripheral nociceptors on dural vessels",
"Trigeminal nucleus caudalis (TNC) in brainstem — central sensitisation",
"CGRP (calcitonin gene-related peptide) — key mediator of vasodilation & pain",
"Hypothalamic activation → prodromal symptoms (yawning, food craving)",
"Serotonin (5-HT) modulates pain pathways — basis for triptan therapy",
"Genetic predisposition (CACNA1A, ATP1A2) in familial hemiplegic migraine",
],
size=14.5,
heading="Key Mechanisms",
)
footer(s5)
# ============================================================
# SLIDE 6 — TENSION & CLUSTER HEADACHE
# ============================================================
s6 = prs.slides.add_slide(BLANK)
slide_bg(s6, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s6, 0, 0, 13.333, 1.1, fill=NAVY)
add_textbox(s6, 0.4, 0.15, 12, 0.75,
"Tension-Type & Cluster Headache", size=32, bold=True, color=WHITE)
accent_bar(s6, y=1.1, height=0.06, color=TEAL)
# Tension-type
add_rect(s6, 0.3, 1.25, 6.2, 5.9, fill=WHITE)
add_rect(s6, 0.3, 1.25, 6.2, 0.45, fill=RGBColor(0x20, 0x60, 0xA0))
add_textbox(s6, 0.35, 1.27, 6.1, 0.4, "TENSION-TYPE HEADACHE",
size=16, bold=True, color=WHITE)
add_bullets(s6, 0.4, 1.8, 6.0, 5.2,
[
"Most common headache type (~40% lifetime prevalence)",
"Bilateral, pressing/tightening band-like pain",
"Mild–moderate intensity; NOT aggravated by activity",
"Duration: 30 min – 7 days",
"No nausea/vomiting; mild photo- or phonophobia (not both)",
"Episodic (<15 days/month) or Chronic (≥15 days/month)",
"Pathogenesis: peripheral myofascial tenderness + central sensitisation",
"Rx: NSAIDs, paracetamol; amitriptyline for chronic TTH",
], size=14)
# Cluster
add_rect(s6, 6.8, 1.25, 6.1, 5.9, fill=WHITE)
add_rect(s6, 6.8, 1.25, 6.1, 0.45, fill=RGBColor(0x8B, 0x00, 0x00))
add_textbox(s6, 6.85, 1.27, 6.0, 0.4, "CLUSTER HEADACHE (TAC)",
size=16, bold=True, color=WHITE)
add_bullets(s6, 6.9, 1.8, 5.9, 5.2,
[
"Prevalence: ~0.1%; M:F = 3–4:1",
"Strictly unilateral orbital/periorbital excruciating pain",
'Described as "suicidal headache" (10/10 severity)',
"Duration: 15–180 minutes; occurs 1–8×/day",
"Ipsilateral autonomic: lacrimation, rhinorrhea, ptosis, miosis, conjunctival injection",
"Circadian periodicity — often nocturnal",
"Cluster periods: weeks–months; then remission",
"Acute Rx: 100% O₂ (12 L/min, 15 min), sumatriptan SC/IN; Prophylaxis: verapamil",
], size=14, bullet_color=RGBColor(0xB0, 0x20, 0x20))
footer(s6)
# ============================================================
# SLIDE 7 — DIFFERENTIAL DIAGNOSIS TABLE
# ============================================================
s7 = prs.slides.add_slide(BLANK)
slide_bg(s7, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s7, 0, 0, 13.333, 1.1, fill=NAVY)
add_textbox(s7, 0.4, 0.15, 12, 0.75,
"Differential Diagnosis at a Glance", size=32, bold=True, color=WHITE)
accent_bar(s7, y=1.1, height=0.06, color=TEAL)
# Table headers
headers = ["Feature", "Migraine", "Tension-Type", "Cluster"]
col_widths = [2.5, 3.0, 3.0, 3.0]
col_x = [0.3]
for w in col_widths[:-1]:
col_x.append(col_x[-1] + w + 0.12)
row_h = 0.72
start_y = 1.3
rows = [
["Location", "Unilateral (60%)", "Bilateral", "Unilateral (orbital)"],
["Quality", "Throbbing/pulsating", "Pressing/tightening", "Stabbing/burning"],
["Severity", "Moderate–severe", "Mild–moderate", "Severe (worst)"],
["Duration", "4–72 hours", "30 min – 7 days", "15–180 min"],
["Nausea/vomiting", "Yes", "No", "No"],
["Photo/phonophobia", "Both", "One (not both)", "No"],
["Autonomic signs", "None", "None", "Ipsilateral (ptosis, tearing)"],
["Activity effect", "Worsened", "No change", "Restless / agitated"],
]
header_colors = [NAVY, TEAL, RGBColor(0x20, 0x60, 0xA0), RGBColor(0x8B, 0x00, 0x00)]
for ci, (hdr, cw, cx) in enumerate(zip(headers, col_widths, col_x)):
add_rect(s7, cx, start_y, cw, row_h * 0.65, fill=header_colors[ci])
add_textbox(s7, cx + 0.05, start_y + 0.05, cw - 0.1, row_h * 0.6,
hdr, size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
anchor=MSO_ANCHOR.MIDDLE)
for ri, row in enumerate(rows):
by = start_y + (ri + 1) * row_h * 0.75
fill_c = LIGHT if ri % 2 == 0 else WHITE
for ci, (cell, cw, cx) in enumerate(zip(row, col_widths, col_x)):
add_rect(s7, cx, by, cw, row_h * 0.68, fill=fill_c)
add_textbox(s7, cx + 0.05, by + 0.03, cw - 0.1, row_h * 0.65,
cell, size=12.5, color=DARK, align=PP_ALIGN.CENTER,
anchor=MSO_ANCHOR.MIDDLE)
footer(s7)
# ============================================================
# SLIDE 8 — MANAGEMENT
# ============================================================
s8 = prs.slides.add_slide(BLANK)
slide_bg(s8, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s8, 0, 0, 13.333, 1.1, fill=NAVY)
add_textbox(s8, 0.4, 0.15, 12, 0.75,
"Management", size=32, bold=True, color=WHITE)
accent_bar(s8, y=1.1, height=0.06, color=TEAL)
# Acute treatment
add_rect(s8, 0.3, 1.25, 6.2, 2.8, fill=WHITE)
add_rect(s8, 0.3, 1.25, 6.2, 0.45, fill=TEAL)
add_textbox(s8, 0.35, 1.27, 6.1, 0.4, "ACUTE / ABORTIVE THERAPY",
size=16, bold=True, color=WHITE)
add_bullets(s8, 0.4, 1.75, 6.0, 2.25,
[
"Step 1 — Mild–moderate: NSAIDs (ibuprofen 400–800 mg), paracetamol ± caffeine",
"Step 2 — Moderate–severe: Triptans (sumatriptan 50–100 mg PO or 6 mg SC)",
"Antiemetics: metoclopramide, domperidone (also speed gastric absorption)",
"Cluster acute: 100% O₂ (12 L/min), sumatriptan SC 6 mg",
"Ergotamine: 2nd line (vasoconstriction, many contraindications)",
], size=13.5)
# Preventive treatment
add_rect(s8, 0.3, 4.2, 6.2, 2.95, fill=WHITE)
add_rect(s8, 0.3, 4.2, 6.2, 0.45, fill=RGBColor(0x20, 0x60, 0xA0))
add_textbox(s8, 0.35, 4.22, 6.1, 0.4, "PREVENTIVE THERAPY",
size=16, bold=True, color=WHITE)
add_bullets(s8, 0.4, 4.7, 6.0, 2.4,
[
"Indications: ≥4 migraine days/month, poor response to acute Rx, MOH",
"Beta-blockers: propranolol 40–240 mg/day (first-line)",
"TCAs: amitriptyline 10–75 mg (also for chronic TTH)",
"Anticonvulsants: topiramate 25–100 mg, valproate",
"CGRP mAbs: erenumab, fremanezumab (newer; reserved for refractory)",
"Cluster prophylaxis: verapamil 240–480 mg/day",
], size=13.5)
# Non-pharmacological
add_rect(s8, 6.8, 1.25, 6.1, 5.9, fill=WHITE)
add_rect(s8, 6.8, 1.25, 6.1, 0.45, fill=RGBColor(0x00, 0x70, 0x50))
add_textbox(s8, 6.85, 1.27, 6.0, 0.4, "NON-PHARMACOLOGICAL",
size=16, bold=True, color=WHITE)
add_bullets(s8, 6.9, 1.75, 5.9, 5.3,
[
"Sleep hygiene — regular sleep-wake cycle",
"Hydration and regular meals (skip fasting as trigger)",
"Trigger identification & avoidance diary",
" (alcohol, cheese, stress, bright lights, hormones)",
"Biofeedback, CBT — evidence-based for TTH/migraine",
"Acupuncture — moderate evidence for prevention",
"Exercise — regular aerobic activity reduces frequency",
"Medication-overuse headache (MOH): wean analgesics if >10–15 days/month use",
], size=14)
footer(s8)
# ============================================================
# SLIDE 9 — THUNDERCLAP & SECONDARY HEADACHES
# ============================================================
s9 = prs.slides.add_slide(BLANK)
slide_bg(s9, RGBColor(0xF4, 0xF8, 0xFF))
add_rect(s9, 0, 0, 13.333, 1.1, fill=RGBColor(0x7B, 0x1F, 0x1F))
add_textbox(s9, 0.4, 0.15, 12, 0.75,
"Thunderclap Headache & Imaging", size=32, bold=True, color=WHITE)
accent_bar(s9, y=1.1, height=0.06, color=ORANGE)
# Thunderclap box
add_rect(s9, 0.3, 1.25, 8.2, 3.5, fill=WHITE)
add_rect(s9, 0.3, 1.25, 8.2, 0.45, fill=ORANGE)
add_textbox(s9, 0.35, 1.27, 8.1, 0.4,
"THUNDERCLAP HEADACHE — Sudden onset, maximal within 60 seconds",
size=15, bold=True, color=WHITE)
add_bullets(s9, 0.4, 1.75, 8.0, 2.95,
[
"Subarachnoid hemorrhage (SAH) — most feared cause; LP if CT negative",
"Intracerebral / subdural hemorrhage",
"Cerebral venous thrombosis (CVT) — especially in pregnancy/OCP use",
"Cervical artery dissection",
"Reversible cerebral vasoconstriction syndrome (RCVS)",
"Pituitary apoplexy — sudden visual loss + ophthalmoplegia",
], size=14, bullet_color=ORANGE)
# Imaging guide
add_rect(s9, 0.3, 4.9, 8.2, 2.3, fill=WHITE)
add_rect(s9, 0.3, 4.9, 8.2, 0.45, fill=NAVY)
add_textbox(s9, 0.35, 4.92, 8.1, 0.4,
"IMAGING STRATEGY", size=15, bold=True, color=WHITE)
add_bullets(s9, 0.4, 5.4, 8.0, 1.7,
[
"Acute thunderclap / suspected SAH: Non-contrast CT head → if -ve, LP for xanthochromia",
"Persistent/progressive headache: MRI brain ± gadolinium (superior for mass lesions, CVT, low-grade tumours)",
"Vasospasm/RCVS suspected: CT-angiography or MR-angiography",
"ESR/CRP: if >60 yrs to rule out giant cell arteritis",
], size=13.5)
# Side box — Indications to image
add_rect(s9, 8.8, 1.25, 4.2, 5.9, fill=WHITE)
add_rect(s9, 8.8, 1.25, 4.2, 0.45, fill=NAVY)
add_textbox(s9, 8.85, 1.27, 4.1, 0.4,
"IMAGE IF…", size=15, bold=True, color=WHITE)
add_bullets(s9, 8.9, 1.75, 4.0, 5.3,
[
"First/worst headache",
"Thunderclap onset",
"Focal neuro deficit",
"Fever + stiff neck",
"Papilledema",
"HIV / malignancy",
"Headache >60 yrs (new)",
"Postural variation",
"No response to usual Rx",
"Nocturnal awakening",
], size=13.5)
footer(s9)
# ============================================================
# SLIDE 10 — SUMMARY
# ============================================================
s10 = prs.slides.add_slide(BLANK)
slide_bg(s10, NAVY)
add_rect(s10, 0, 0, 0.5, 7.5, fill=TEAL)
add_textbox(s10, 0.8, 0.3, 10, 0.9,
"Key Take-Home Messages", size=36, bold=True, color=WHITE)
add_rect(s10, 0.8, 1.2, 10, 0.06, fill=TEAL)
msgs = [
"Classify first — Primary vs Secondary headaches guide investigation and treatment",
"Red flags (SNOOP4) mandate urgent workup; never miss thunderclap / SAH",
"Migraine: IHS criteria, triptan-based acute Rx, prevention with beta-blocker/topiramate",
"Tension-type: commonest; bilateral pressing, no autonomic features; NSAIDs ± amitriptyline",
"Cluster: unilateral orbital, autonomic features, responds to O₂ + sumatriptan; verapamil prevents",
"CGRP pathway is the key target for modern migraine-specific therapy (gepants, mAbs)",
"Medication overuse headache (MOH): >10–15 analgesic days/month worsens headache",
"Non-pharmacological: trigger diary, sleep hygiene, biofeedback — adjuncts to all types",
]
for i, msg in enumerate(msgs):
by = 1.4 + i * 0.71
add_rect(s10, 0.8, by, 0.45, 0.55, fill=TEAL)
add_textbox(s10, 0.82, by + 0.02, 0.4, 0.5,
str(i + 1), size=18, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_rect(s10, 1.35, by, 11.5, 0.55, fill=RGBColor(0x10, 0x35, 0x60))
add_textbox(s10, 1.45, by + 0.05, 11.3, 0.48,
msg, size=14.5, color=WHITE, anchor=MSO_ANCHOR.MIDDLE)
footer(s10)
# ── SAVE ─────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/headache-ppt/Headache_Clinical_Overview.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Slides: {len(prs.slides)}")
cd /tmp/workspace/headache-ppt && python build_ppt.py 2>&1
**/fetch_images.py in /tmp/skills
python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_174d671ad9d4140857fd918dd1c6239954fb8b8a36cb22164804d9e77f1f2d12.jpg" 2>&1 | head -20
cd /tmp/workspace/headache-ppt && python build_ppt.py 2>&1
Headache Clinical Overview
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Overview & Classification — Primary vs Secondary headaches |
| 3 | Red Flags — SNOOP4 mnemonic (8 warning signs) |
| 4 | Migraine — Clinical features, IHS criteria, phases (with real medical image) |
| 5 | Migraine Pathophysiology — CGRP, trigeminovascular system, CSD (with diagram) |
| 6 | Tension-type vs Cluster headache — side-by-side comparison |
| 7 | Differential Diagnosis Table — Migraine / TTH / Cluster compared across 8 features |
| 8 | Management — Acute, Preventive, and Non-pharmacological |
| 9 | Thunderclap Headache & Imaging Strategy — When to scan |
| 10 | Key Take-Home Messages (8 points) |