General prescribing guidelines for lactation
general prescribing guidelines drugs during lactation breastfeeding 2024
https://www.aafp.org/afp/2022/1200/medication-safety-breastf…
| Principle | Details |
|---|---|
| Avoid drug therapy when possible | Non-pharmacologic options first |
| Benefit-risk assessment | Benefits of breastfeeding are substantial; contraindications are few |
| Safe in infants = generally safe | If a drug is safely used directly in infants, it is generally safe during breastfeeding |
| Pregnancy safety ≠ lactation safety | These are pharmacologically distinct scenarios |
| Use topical therapy where possible | Minimises systemic absorption and milk transfer; avoid applying to nipples |
| Use the lowest effective dose | For the shortest necessary duration |
| Use well-studied agents | Prefer medications with established safety data in nursing mothers |
| Property | Effect on Milk Transfer |
|---|---|
| High lipid solubility | Increases transfer into milk |
| Low molecular weight (<200 Da) | Passes through water-filled membrane pores |
| Low protein binding | More free drug available to enter milk |
| Non-ionised form | Enters mammary cells more readily via diffusion |
| Long half-life | Prolonged infant exposure |
| High oral bioavailability | Drug absorbed from milk by infant |
| Basic (high pKa) drugs | "Ion trapping" in milk (pH 7.0 vs. plasma pH 7.4) - concentrate in milk |
| Category | Meaning |
|---|---|
| L1 - Safest | Extensive data; no adverse effects observed |
| L2 - Safer | Limited data; no increased risk |
| L3 - Moderately Safe | No controlled studies; risk possible but benefit may outweigh risk |
| L4 - Possibly Hazardous | Positive evidence of risk; use only when benefit justifies risk |
| L5 - Contraindicated | Risk to infant clearly outweighs any benefit |
| Resource | Details |
|---|---|
| LactMed (NIH) | Free, continuously updated government database; generally considered the least restrictive and most up-to-date |
| Hale's Medications and Mothers' Milk | Widely used handbook; updated regularly |
| InfantRisk Center (infantrisk.com) | Expert consultations; phone helpline |
| MotherToBaby.org | Teratogen information service |
| Academy of Breastfeeding Medicine (ABM) Protocols | Evidence-based clinical protocols |
| AAP Committee on Drugs statements | Periodically updated drug lists |
| Condition | Preferred Agents | Comments |
|---|---|---|
| Pain | Acetaminophen, ibuprofen | Naproxen discouraged (long half-life, bleeding risk) |
| Depression/Anxiety | Sertraline, paroxetine (SSRIs) | Best studied, lowest RID; fluoxetine less preferred (long half-life) |
| Hypertension | Labetalol, nifedipine, methyldopa | Generally compatible |
| Diabetes | Insulin, metformin, 2nd-gen sulfonylureas | Newer agents (SGLT-2i, GLP-1) lack lactation data |
| Asthma/Allergic rhinitis | Inhaled steroids, intranasal treatments | Minimal systemic absorption; preferred |
| Antiepileptics | Valproate, carbamazepine, phenytoin, phenobarbital | All compatible with breastfeeding (despite pregnancy teratogenicity) |
| Antibiotics | Most penicillins, cephalosporins, azithromycin | Generally safe; metronidazole compatible at standard doses |
| Contraception | Progestin-only (mini-pill), barrier methods | Combined estrogen-progestin may reduce milk supply |
| Antipsychotics | Quetiapine, olanzapine (with monitoring) | Clozapine - caution; agranulocytosis risk to infant |
Create a ppt presentation for migraine therapy for pharmacology subject
mkdir -p /tmp/workspace/migraine-ppt && ls /tmp/workspace/migraine-ppt/
~/migraine-ppt/build_migraine_ppt.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.enum.shapes import MSO_SHAPE
from io import BytesIO
# ── Colour palette ─────────────────────────────────────────────────────────
DARK_PURPLE = RGBColor(0x3B, 0x10, 0x5E) # deep purple (header / bg)
MID_PURPLE = RGBColor(0x6A, 0x2C, 0x9A) # medium purple accent
LIGHT_PURPLE = RGBColor(0xD9, 0xCB, 0xF5) # very light lavender (body bg)
ACCENT_TEAL = RGBColor(0x00, 0xB0, 0xC0) # teal highlight
ACCENT_ORANGE = RGBColor(0xF7, 0x83, 0x1F) # warm orange accent
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GRAY = RGBColor(0x22, 0x22, 0x22)
MID_GRAY = RGBColor(0x55, 0x55, 0x55)
LIGHT_GRAY = RGBColor(0xF0, 0xEC, 0xF8)
W = Inches(13.333)
H = Inches(7.5)
prs = Presentation()
prs.slide_width = W
prs.slide_height = H
blank = prs.slide_layouts[6] # fully blank
# ── Helper: solid-fill background rect ─────────────────────────────────────
def bg_rect(slide, color, left=0, top=0, width=None, height=None):
width = width or W
height = height or H
shp = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, left, top, width, height)
shp.fill.solid(); shp.fill.fore_color.rgb = color
shp.line.fill.background()
return shp
# ── Helper: add a textbox ───────────────────────────────────────────────────
def txt(slide, text, left, top, width, height,
size=18, bold=False, color=WHITE, align=PP_ALIGN.LEFT,
wrap=True, italic=False, v_anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(left, top, width, height)
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = v_anchor
tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.size = Pt(size)
run.font.bold = bold
run.font.color.rgb = color
run.font.italic = italic
return tb
# ── Helper: add a bullet textbox (multiple items) ──────────────────────────
def bullets(slide, items, left, top, width, height,
size=16, color=DARK_GRAY, bold_first=False,
sub_items=None):
"""items: list of str. sub_items: dict {idx: [sub1,sub2,...]}"""
sub_items = sub_items or {}
tb = slide.shapes.add_textbox(left, top, width, height)
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Inches(0.05)
tf.margin_top = Pt(4)
for i, item in enumerate(items):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.space_before = Pt(3)
p.space_after = Pt(3)
run = p.add_run()
run.text = "\u2022 " + item
run.font.size = Pt(size)
run.font.color.rgb = color
run.font.bold = bold and (i == 0) if bold_first else False
if i in sub_items:
for sub in sub_items[i]:
sp = tf.add_paragraph()
sp.space_before = Pt(1)
sr = sp.add_run()
sr.text = " \u2013 " + sub
sr.font.size = Pt(size - 2)
sr.font.color.rgb = color
return tb
# ── Helper: section header bar ─────────────────────────────────────────────
def header_bar(slide, title, subtitle=None):
bg_rect(slide, DARK_PURPLE, 0, 0, W, Inches(1.35))
# accent stripe
shp = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,
0, Inches(1.35), W, Pt(5))
shp.fill.solid(); shp.fill.fore_color.rgb = ACCENT_TEAL
shp.line.fill.background()
txt(slide, title, Inches(0.5), Inches(0.1), Inches(10), Inches(0.85),
size=32, bold=True, color=WHITE)
if subtitle:
txt(slide, subtitle, Inches(0.5), Inches(0.9), Inches(10), Inches(0.45),
size=16, color=LIGHT_PURPLE)
# ── Helper: coloured card ───────────────────────────────────────────────────
def card(slide, left, top, width, height, fill_color, text,
text_size=15, text_color=WHITE, bold=False):
shp = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
left, top, width, height)
shp.fill.solid(); shp.fill.fore_color.rgb = fill_color
shp.line.fill.background()
tf = shp.text_frame
tf.word_wrap = True
tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.12)
tf.margin_right = Inches(0.08)
tf.margin_top = tf.margin_bottom = Pt(6)
p = tf.paragraphs[0]
p.alignment = PP_ALIGN.LEFT
run = p.add_run()
run.text = text
run.font.size = Pt(text_size)
run.font.color.rgb = text_color
run.font.bold = bold
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 1 – Title
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, DARK_PURPLE)
# decorative gradient-like overlay (two overlapping shapes)
shp = s.shapes.add_shape(MSO_SHAPE.OVAL, Inches(9), Inches(-1), Inches(6), Inches(6))
shp.fill.solid(); shp.fill.fore_color.rgb = MID_PURPLE
shp.line.fill.background()
shp2 = s.shapes.add_shape(MSO_SHAPE.OVAL, Inches(10), Inches(3.5), Inches(5), Inches(5))
shp2.fill.solid(); shp2.fill.fore_color.rgb = RGBColor(0x55, 0x1F, 0x8A)
shp2.line.fill.background()
# accent bar left
bar = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, Pt(10), H)
bar.fill.solid(); bar.fill.fore_color.rgb = ACCENT_TEAL
bar.line.fill.background()
txt(s, "MIGRAINE THERAPY", Inches(0.7), Inches(1.6), Inches(9), Inches(1.4),
size=52, bold=True, color=WHITE)
txt(s, "Pharmacology | Mechanisms, Acute Treatment & Prophylaxis",
Inches(0.7), Inches(3.1), Inches(9), Inches(0.7),
size=22, color=LIGHT_PURPLE)
txt(s, "Department of Pharmacology", Inches(0.7), Inches(4.1),
Inches(8), Inches(0.5), size=17, color=ACCENT_TEAL)
# bottom line
ln = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(0.7), Inches(4.75),
Inches(7), Pt(3))
ln.fill.solid(); ln.fill.fore_color.rgb = ACCENT_ORANGE
ln.line.fill.background()
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 2 – Overview / Table of Contents
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
bg_rect(s, LIGHT_GRAY, 0, 0, Inches(4.0), H)
header_bar(s, "Overview", "What we will cover today")
topics = [
("1", "Migraine: Definition & Epidemiology"),
("2", "Pathophysiology"),
("3", "Classification of Migraine"),
("4", "Non-Specific (Symptomatic) Therapy"),
("5", "Triptans – 5-HT\u2081B/\u2081D Agonists"),
("6", "Ergot Alkaloids"),
("7", "Ditans & Gepants (Newer Agents)"),
("8", "Migraine Prophylaxis"),
("9", "CGRP Monoclonal Antibodies"),
("10", "Drug Selection Guide"),
]
colors = [MID_PURPLE, ACCENT_TEAL, DARK_PURPLE, MID_PURPLE, ACCENT_TEAL,
DARK_PURPLE, MID_PURPLE, ACCENT_TEAL, DARK_PURPLE, MID_PURPLE]
for i, (num, topic) in enumerate(topics):
col = 0 if i < 5 else 1
row = i % 5
left = Inches(0.25 + col * 6.6)
top = Inches(1.6 + row * 1.1)
card(s, left, top, Inches(6.3), Inches(0.95), colors[i],
f" {num}. {topic}", text_size=16, bold=False)
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 3 – Definition & Epidemiology
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Migraine – Definition & Epidemiology")
# Left column
bg_rect(s, LIGHT_GRAY, 0, Inches(1.45), Inches(6.4), Inches(6.1))
txt(s, "Definition", Inches(0.3), Inches(1.6), Inches(6), Inches(0.5),
size=20, bold=True, color=DARK_PURPLE)
bullets(s, [
"Primary episodic headache disorder",
"Unilateral, pulsating, moderate-to-severe pain lasting 2–72 hours",
"Associated: nausea, vomiting, photophobia, phonophobia",
"Worsened by routine physical activity",
"May be preceded by neurologic aura (visual, sensory, motor, speech)",
], Inches(0.3), Inches(2.1), Inches(5.9), Inches(3.0), size=15, color=DARK_GRAY)
txt(s, "Two Main Types", Inches(0.3), Inches(5.1), Inches(6), Inches(0.5),
size=18, bold=True, color=MID_PURPLE)
card(s, Inches(0.3), Inches(5.6), Inches(2.8), Inches(0.75), MID_PURPLE,
"Migraine WITHOUT Aura\n(~85% of patients)", text_size=13)
card(s, Inches(3.35), Inches(5.6), Inches(2.8), Inches(0.75), ACCENT_TEAL,
"Migraine WITH Aura\n(~15% of patients)", text_size=13)
# Right column
txt(s, "Epidemiology", Inches(6.8), Inches(1.6), Inches(6.2), Inches(0.5),
size=20, bold=True, color=DARK_PURPLE)
epi_items = [
"~12–15% of the general population affected",
"Women 3× more likely than men (hormonal influence)",
"Peak prevalence: ages 25–55 years",
"3rd most prevalent disorder worldwide (WHO)",
"Leading cause of disability in under-50 age group",
"Strong genetic component (family history in 70%)",
]
bullets(s, epi_items, Inches(6.8), Inches(2.1), Inches(6.1), Inches(3.5),
size=15, color=DARK_GRAY)
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 4 – Pathophysiology
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Pathophysiology of Migraine")
# 4 pathway boxes
phases = [
(DARK_PURPLE, "1. Cortical Spreading\nDepression (CSD)",
"Slow wave of depolarisation spreading across cortex\nat ~3 mm/min. Produces hypoperfusion (aura)."),
(MID_PURPLE, "2. Trigeminal Activation",
"CSD activates trigeminal nerve fibres innervating\npial and dural blood vessels."),
(ACCENT_TEAL, "3. Neurogenic Inflammation",
"Release of CGRP, substance P, neurokinin A → vasodilation\nand plasma protein extravasation around meningeal vessels."),
(ACCENT_ORANGE, "4. Central Sensitisation",
"Peripheral sensitisation → central sensitisation in trigeminal\nnucleus → allodynia and prolonged headache."),
]
for i, (col, title, body) in enumerate(phases):
left = Inches(0.3 + i * 3.2)
shp = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
left, Inches(1.55), Inches(3.0), Inches(2.5))
shp.fill.solid(); shp.fill.fore_color.rgb = col
shp.line.fill.background()
tf = shp.text_frame; tf.word_wrap = True
tf.vertical_anchor = MSO_ANCHOR.TOP
tf.margin_left = tf.margin_right = Inches(0.1)
tf.margin_top = Inches(0.1)
p = tf.paragraphs[0]; p.alignment = PP_ALIGN.LEFT
r = p.add_run(); r.text = title
r.font.size = Pt(15); r.font.bold = True; r.font.color.rgb = WHITE
p2 = tf.add_paragraph(); p2.space_before = Pt(6)
r2 = p2.add_run(); r2.text = body
r2.font.size = Pt(13); r2.font.color.rgb = WHITE
# arrow (except last)
if i < 3:
arr = s.shapes.add_shape(MSO_SHAPE.RIGHT_ARROW,
left + Inches(3.0), Inches(2.2),
Inches(0.2), Inches(0.7))
arr.fill.solid(); arr.fill.fore_color.rgb = MID_GRAY
arr.line.fill.background()
# Key molecules box
txt(s, "Key Mediators in Migraine", Inches(0.3), Inches(4.3),
Inches(12.7), Inches(0.45), size=18, bold=True, color=DARK_PURPLE)
mols = [
("CGRP", DARK_PURPLE,
"Potent vasodilator released from trigeminal fibres.\nElevated during acute migraine. PRIMARY drug target."),
("Serotonin (5-HT)", MID_PURPLE,
"5-HT\u2081B/\u2081D: vasoconstriction + inhibits neuropeptide release.\n5-HT\u2081F: neuronal inhibition (ditan target)."),
("Substance P &\nNeurokinin A", ACCENT_TEAL,
"Promote neurogenic inflammation and\nplasma protein extravasation."),
("Dopamine", ACCENT_ORANGE,
"Involved in prodrome symptoms\n(yawning, nausea, osmophobia)."),
]
for i, (mol, col, desc) in enumerate(mols):
left = Inches(0.3 + i * 3.2)
shp = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
left, Inches(4.85), Inches(3.0), Inches(2.3))
shp.fill.solid(); shp.fill.fore_color.rgb = col
shp.line.fill.background()
tf = shp.text_frame; tf.word_wrap = True
tf.margin_left = tf.margin_right = Inches(0.1); tf.margin_top = Inches(0.08)
p = tf.paragraphs[0]
r = p.add_run(); r.text = mol
r.font.size = Pt(14); r.font.bold = True; r.font.color.rgb = WHITE
p2 = tf.add_paragraph(); p2.space_before = Pt(4)
r2 = p2.add_run(); r2.text = desc
r2.font.size = Pt(12); r2.font.color.rgb = WHITE
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 5 – Acute Therapy: Non-Specific
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Acute Therapy – Non-Specific (Symptomatic)")
txt(s, "Step-care strategy: Start with non-specific analgesics for mild-to-moderate attacks",
Inches(0.4), Inches(1.5), Inches(12.5), Inches(0.5),
size=15, color=MID_GRAY, italic=True)
# 3 cards
categories = [
(DARK_PURPLE, "NSAIDs & Analgesics",
["Aspirin 900 mg, Ibuprofen 400–800 mg, Naproxen 500–1000 mg",
"Ketorolac (IV/IM) – useful in ED settings",
"Acetaminophen 1000 mg – safe, effective for mild attacks",
"Mechanism: COX inhibition → ↓ prostaglandin-mediated sensitisation",
"ADRs: GI irritation, dyspepsia; avoid in peptic ulcer disease"]),
(MID_PURPLE, "Antiemetics (Adjuncts)",
["Metoclopramide 10 mg IV/oral – prokinetic + antiemetic",
"Prochlorperazine 10 mg IV/oral – D2 receptor blocker",
"Domperidone 20 mg oral",
"Dual benefit: control nausea AND enhance analgesic absorption",
"Metoclopramide alone has mild acute antimigraine effect"]),
(ACCENT_TEAL, "Combination Analgesics",
["Aspirin + acetaminophen + caffeine (e.g., Excedrin)",
"Caffeine enhances vasoconstriction and analgesic efficacy",
"Butalbital combinations – limited use (dependence risk)",
"Opioids: generally AVOIDED – cause MOH and central sensitisation",
"Corticosteroids (dexamethasone) – reduce headache recurrence"]),
]
for i, (col, title, pts) in enumerate(categories):
left = Inches(0.25 + i * 4.35)
shp = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
left, Inches(2.1), Inches(4.1), Inches(0.6))
shp.fill.solid(); shp.fill.fore_color.rgb = col
shp.line.fill.background()
tf = shp.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.1)
p = tf.paragraphs[0]
r = p.add_run(); r.text = title
r.font.size = Pt(16); r.font.bold = True; r.font.color.rgb = WHITE
tb = s.shapes.add_textbox(left, Inches(2.75), Inches(4.1), Inches(4.5))
tf2 = tb.text_frame; tf2.word_wrap = True; tf2.margin_left = Inches(0.1)
for j, pt in enumerate(pts):
p2 = tf2.paragraphs[0] if j == 0 else tf2.add_paragraph()
p2.space_before = Pt(4)
r2 = p2.add_run(); r2.text = "\u2022 " + pt
r2.font.size = Pt(13); r2.font.color.rgb = DARK_GRAY
# Medication overuse warning
warn = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0.3), Inches(6.55), Inches(12.7), Inches(0.75))
warn.fill.solid(); warn.fill.fore_color.rgb = ACCENT_ORANGE
warn.line.fill.background()
tf = warn.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.2)
p = tf.paragraphs[0]
r = p.add_run()
r.text = "\u26a0 Medication Overuse Headache (MOH): Using acute analgesics >10–15 days/month leads to rebound headache. Limit acute medication use!"
r.font.size = Pt(13); r.font.bold = True; r.font.color.rgb = WHITE
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 6 – Triptans
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Triptans – Selective 5-HT₁B/₁D Receptor Agonists",
"First-line migraine-specific therapy")
# Mechanism box
mbox = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0.3), Inches(1.55), Inches(4.6), Inches(2.7))
mbox.fill.solid(); mbox.fill.fore_color.rgb = DARK_PURPLE
mbox.line.fill.background()
tf = mbox.text_frame; tf.word_wrap = True
tf.margin_left = tf.margin_right = Inches(0.15); tf.margin_top = Inches(0.1)
p = tf.paragraphs[0]; r = p.add_run()
r.text = "Mechanism of Action"; r.font.size = Pt(17); r.font.bold = True; r.font.color.rgb = WHITE
items2 = [
"Agonists at 5-HT\u2081B receptors \u2192 cerebral vasoconstriction",
"Agonists at 5-HT\u2081D receptors \u2192 inhibit trigeminal neuropeptide release (CGRP, substance P)",
"Peripheral: reduce neurogenic inflammation",
"Central: modulate trigeminal nucleus activity",
]
for it in items2:
pp = tf.add_paragraph(); pp.space_before = Pt(5)
rr = pp.add_run(); rr.text = "\u2022 " + it
rr.font.size = Pt(12.5); rr.font.color.rgb = WHITE
# Adverse effects box
abox = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0.3), Inches(4.35), Inches(4.6), Inches(2.85))
abox.fill.solid(); abox.fill.fore_color.rgb = MID_PURPLE
abox.line.fill.background()
tf = abox.text_frame; tf.word_wrap = True
tf.margin_left = tf.margin_right = Inches(0.15); tf.margin_top = Inches(0.1)
p = tf.paragraphs[0]; r = p.add_run()
r.text = "Adverse Effects & Contraindications"; r.font.size = Pt(15); r.font.bold = True; r.font.color.rgb = WHITE
aes = [
"Triptan sensations: chest tightness, tingling",
"Nausea, dizziness, somnolence",
"CONTRAINDICATED: ischaemic heart disease, uncontrolled HTN, stroke",
"Do NOT use within 24 h of ergotamine (risk of coronary ischaemia)",
"Serotonin syndrome risk with concomitant serotonergic drugs",
]
for it in aes:
pp = tf.add_paragraph(); pp.space_before = Pt(4)
rr = pp.add_run(); rr.text = "\u2022 " + it
rr.font.size = Pt(12); rr.font.color.rgb = WHITE
# Triptans table
txt(s, "Available Triptans", Inches(5.2), Inches(1.55), Inches(7.8), Inches(0.45),
size=18, bold=True, color=DARK_PURPLE)
table_data = [
["Drug", "Route(s)", "T½ (h)", "Notes"],
["Sumatriptan", "PO, SC, IN, PR", "~2", "Prototype; most formulations; first-choice"],
["Rizatriptan", "PO, ODT", "~2–3", "Fastest onset; highest efficacy on population basis"],
["Eletriptan", "PO", "~4", "High efficacy; less headache recurrence"],
["Zolmitriptan", "PO, nasal", "~2.5–3", "Nasal: useful with early nausea/vomiting"],
["Naratriptan", "PO", "~5–6", "Slowest onset; fewest side effects; ↓ recurrence"],
["Frovatriptan", "PO", "~26", "Longest T½; useful for menstrual migraine prevention"],
["Almotriptan", "PO", "~3.5", "Good tolerability; fewer ADRs than sumatriptan"],
]
col_widths = [Inches(2.0), Inches(2.1), Inches(0.9), Inches(2.75)]
row_height = Inches(0.56)
table_left = Inches(5.2)
table_top = Inches(2.1)
header_color = DARK_PURPLE
row_colors = [LIGHT_GRAY, WHITE]
for r_idx, row in enumerate(table_data):
for c_idx, cell_text in enumerate(row):
left = table_left + sum(col_widths[:c_idx])
top = table_top + r_idx * row_height
fill = header_color if r_idx == 0 else row_colors[r_idx % 2]
shp = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, left, top,
col_widths[c_idx], row_height)
shp.fill.solid(); shp.fill.fore_color.rgb = fill
shp.line.color.rgb = RGBColor(0xCC, 0xCC, 0xCC)
shp.line.width = Pt(0.5)
tf = shp.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.08); tf.margin_right = Inches(0.04)
p2 = tf.paragraphs[0]; p2.alignment = PP_ALIGN.LEFT
rr = p2.add_run(); rr.text = cell_text
rr.font.size = Pt(12.5 if r_idx > 0 else 13)
rr.font.bold = (r_idx == 0)
rr.font.color.rgb = WHITE if r_idx == 0 else DARK_GRAY
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 7 – Ergot Alkaloids
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Ergot Alkaloids", "Non-selective receptor agonists – historical & second-line")
left_items = [
("Ergotamine", DARK_PURPLE,
["Binds 5-HT\u2081, \u03b1-adrenergic & dopamine receptors",
"Causes VASOCONSTRICTION of cranial blood vessels",
"Available: sublingual, oral (with caffeine), suppository",
"Most effective when used EARLY in migraine attack",
"Strict daily & weekly dose limits due to rebound headache risk",
"Dependence and medication overuse headache common"]),
("Dihydroergotamine\n(DHE)", MID_PURPLE,
["Semisynthetic derivative; better tolerability than ergotamine",
"Routes: IV, IM, intranasal spray (2 mg)",
"Efficacy similar to sumatriptan SC",
"Reserved for SEVERE / refractory migraine",
"Nausea is common ADR (pre-treat with antiemetic)",
"DHE 45 protocol: IV DHE + metoclopramide, q8h × 3 doses"]),
]
for i, (drug, col, pts) in enumerate(left_items):
left_x = Inches(0.3 + i * 6.4)
shp = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
left_x, Inches(1.55), Inches(6.1), Inches(0.6))
shp.fill.solid(); shp.fill.fore_color.rgb = col
shp.line.fill.background()
tf = shp.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.12)
p = tf.paragraphs[0]; r = p.add_run()
r.text = drug; r.font.size = Pt(17); r.font.bold = True; r.font.color.rgb = WHITE
# bullet list below
tb = s.shapes.add_textbox(left_x, Inches(2.22), Inches(6.1), Inches(3.3))
tf2 = tb.text_frame; tf2.word_wrap = True; tf2.margin_left = Inches(0.1)
for j, pt in enumerate(pts):
p2 = tf2.paragraphs[0] if j == 0 else tf2.add_paragraph()
p2.space_before = Pt(4)
r2 = p2.add_run(); r2.text = "\u2022 " + pt
r2.font.size = Pt(14); r2.font.color.rgb = DARK_GRAY
# Contraindications box
cibox = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0.3), Inches(5.55), Inches(12.7), Inches(1.65))
cibox.fill.solid(); cibox.fill.fore_color.rgb = RGBColor(0xFF, 0xEE, 0xE0)
cibox.line.color.rgb = ACCENT_ORANGE; cibox.line.width = Pt(2)
tf = cibox.text_frame; tf.word_wrap = True
tf.margin_left = Inches(0.2); tf.margin_top = Inches(0.1)
p = tf.paragraphs[0]; r = p.add_run()
r.text = "\u26a0 Contraindications to Ergot Alkaloids"
r.font.size = Pt(15); r.font.bold = True; r.font.color.rgb = ACCENT_ORANGE
ci_list = " Ischaemic heart disease | Peripheral vascular disease | Uncontrolled hypertension | Hepatic/renal impairment | Pregnancy | Sepsis | Within 24 h of triptan use | Co-administration with potent CYP3A4 inhibitors (risk of peripheral ischaemia)"
p2 = tf.add_paragraph(); p2.space_before = Pt(4)
r2 = p2.add_run(); r2.text = ci_list
r2.font.size = Pt(13); r2.font.color.rgb = DARK_GRAY
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 8 – Newer Agents: Ditans & Gepants
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Newer Acute Agents – Ditans & Gepants",
"Options for patients with cardiovascular contraindications to triptans")
# Lasmiditan (Ditan) – left half
bg_rect(s, LIGHT_GRAY, 0, Inches(1.45), Inches(6.4), Inches(5.85))
txt(s, "DITANS – 5-HT\u2081F Agonists", Inches(0.3), Inches(1.6),
Inches(6.0), Inches(0.55), size=18, bold=True, color=DARK_PURPLE)
card(s, Inches(0.3), Inches(2.2), Inches(5.9), Inches(0.55), DARK_PURPLE,
"Lasmiditan (REYVOW)", text_size=16, bold=True)
ditan_pts = [
"Selective 5-HT\u2081F receptor agonist (neuronal, NOT vascular)",
"Does NOT cause vasoconstriction \u2192 cardiovascular-safe",
"Mechanism: inhibition of trigeminal pain pathways",
"Dose: 50 mg, 100 mg, or 200 mg orally",
"Indicated for acute migraine WITH or WITHOUT aura",
"Classified as CONTROLLED SUBSTANCE (Schedule V in US)",
"Major ADR: dizziness, somnolence, paresthesia",
"Patients must NOT drive or operate machinery for \u22658 hours after dose",
"No contraindication in ischaemic heart disease",
]
bullets(s, ditan_pts, Inches(0.3), Inches(2.85), Inches(5.9), Inches(3.8),
size=13.5, color=DARK_GRAY)
# Gepants – right half
txt(s, "GEPANTS – CGRP Receptor Antagonists", Inches(6.6), Inches(1.6),
Inches(6.4), Inches(0.55), size=18, bold=True, color=MID_PURPLE)
gepant_data = [
(ACCENT_TEAL, "Rimegepant (NURTEC ODT)", [
"75 mg orally disintegrating tablet",
"Acute treatment AND episodic prevention of migraine",
"T½ ~11 h \u2192 fewer rebound headaches",
"Can be used every other day for prevention",
]),
(MID_PURPLE, "Ubrogepant (UBRELVY)", [
"50 mg or 100 mg oral tablet",
"Acute treatment only",
"Contraindicated with strong CYP3A4 inhibitors",
"No significant cardiovascular effects",
]),
(DARK_PURPLE, "Zavegepant (ZAVZPRET)", [
"10 mg intranasal spray",
"Useful when nausea/vomiting prevents oral dosing",
"Fastest onset among gepants",
"ADR: nasal discomfort, dysgeusia",
]),
(ACCENT_ORANGE, "Atogepant (QULIPTA)", [
"10–60 mg oral \u2013 PREVENTION use only",
"Once daily for episodic and chronic migraine",
"Not indicated for acute treatment",
"ADR: nausea, constipation, fatigue",
]),
]
for i, (col, name, pts) in enumerate(gepant_data):
top = Inches(2.2 + i * 1.3)
card(s, Inches(6.6), top, Inches(6.4), Inches(0.5), col, name,
text_size=14, bold=True)
tb = s.shapes.add_textbox(Inches(6.65), top + Inches(0.52),
Inches(6.3), Inches(0.75))
tf = tb.text_frame; tf.word_wrap = True; tf.margin_left = Inches(0.1)
for j, pt in enumerate(pts):
p2 = tf.paragraphs[0] if j == 0 else tf.add_paragraph()
r2 = p2.add_run(); r2.text = "\u2022 " + pt
r2.font.size = Pt(12.5); r2.font.color.rgb = DARK_GRAY; p2.space_before = Pt(1)
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 9 – Prophylaxis
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Migraine Prophylaxis (Preventive Therapy)")
# Indications strip
ind = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0.3), Inches(1.55), Inches(12.7), Inches(0.65))
ind.fill.solid(); ind.fill.fore_color.rgb = ACCENT_TEAL
ind.line.fill.background()
tf = ind.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.2)
p = tf.paragraphs[0]; r = p.add_run()
r.text = "INDICATIONS: \u2265 4 migraine days/month | Severe/disabling attacks | Failure of acute therapy | Medication overuse headache | Specific migraine subtypes (hemiplegic, brainstem aura)"
r.font.size = Pt(13.5); r.font.bold = True; r.font.color.rgb = WHITE
# Drug class table
proph_data = [
("Drug Class", "Agents", "Dose", "Key Notes"),
("\u03b2-Blockers\n(1st line)", "Propranolol\nMetoprolol\nTimolol", "80–240 mg/day\n25–200 mg/day\n10–30 mg/day", "Most widely used. Avoid in asthma,\nbradycardia, depression. FDA-approved."),
("Anticonvulsants\n(1st line)", "Topiramate\nValproate (VPA)", "50–200 mg/day\n500–1500 mg/day", "Topiramate: weight loss, cognitive slowing, renal stones.\nVPA: teratogenic – AVOID in women of childbearing age."),
("TCAs", "Amitriptyline\nNortriptyline", "10–75 mg/night\n10–75 mg/night", "Useful when comorbid depression/insomnia.\nSedation, anticholinergic effects. Not FDA-approved."),
("CCBs", "Verapamil\nFlunarizine*", "80–320 mg/day\n5–10 mg/night", "Verapamil: 2nd line. Constipation, bradycardia.\nFlunarizine: not available in USA; weight gain."),
("ARBs / ACEi", "Candesartan\nLisinopril", "16 mg/day\n10–40 mg/day", "Well-tolerated alternatives.\nUseful in hypertensive migraineurs."),
("OnabotulinumtoxinA\n(BOTOX\u00ae)", "Botulinum toxin A", "155–195 U q12wk\nIM injection", "FDA-approved for CHRONIC migraine (\u226515 days/month).\nNOT for episodic migraine."),
]
col_w2 = [Inches(2.2), Inches(2.2), Inches(2.2), Inches(5.7)]
rh2 = Inches(0.79)
t_top = Inches(2.35)
for r_idx, row in enumerate(proph_data):
for c_idx, cell in enumerate(row):
lft = Inches(0.3) + sum(col_w2[:c_idx])
top = t_top + r_idx * rh2
fill = DARK_PURPLE if r_idx == 0 else (LIGHT_GRAY if r_idx % 2 == 0 else WHITE)
shp = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, lft, top, col_w2[c_idx], rh2)
shp.fill.solid(); shp.fill.fore_color.rgb = fill
shp.line.color.rgb = RGBColor(0xCC, 0xCC, 0xCC); shp.line.width = Pt(0.5)
tf = shp.text_frame; tf.word_wrap = True; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.margin_left = Inches(0.07); tf.margin_right = Inches(0.05)
p2 = tf.paragraphs[0]
rr = p2.add_run(); rr.text = cell
rr.font.size = Pt(12 if r_idx > 0 else 13); rr.font.bold = (r_idx == 0)
rr.font.color.rgb = WHITE if r_idx == 0 else DARK_GRAY
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 10 – CGRP Monoclonal Antibodies
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "CGRP-Targeted Monoclonal Antibodies",
"Novel preventive therapy – FDA-approved for episodic & chronic migraine")
txt(s, "Mechanism: Block CGRP ligand or its receptor \u2192 prevent trigeminovascular activation. Monthly or quarterly SC injection.",
Inches(0.4), Inches(1.55), Inches(12.5), Inches(0.5),
size=14.5, color=MID_GRAY, italic=True)
mab_data = [
(DARK_PURPLE, "Erenumab\n(AIMOVIG)",
["Anti-CGRP receptor mAb", "70 mg or 140 mg SC monthly",
"First CGRP mAb approved (2018)", "AEs: injection site reactions, constipation"]),
(MID_PURPLE, "Fremanezumab\n(AJOVY)",
["Anti-CGRP ligand mAb", "225 mg SC monthly\nOR 675 mg SC quarterly",
"Flexible dosing schedule", "AEs: injection site reactions"]),
(ACCENT_TEAL, "Galcanezumab\n(EMGALITY)",
["Anti-CGRP ligand mAb", "Loading: 240 mg SC, then 120 mg/month",
"Also approved for cluster headache", "AEs: injection site pain"]),
(ACCENT_ORANGE,"Eptinezumab\n(VYEPTI)",
["Anti-CGRP ligand mAb", "100 mg or 300 mg IV every 3 months",
"Only IV formulation; rapid onset (day 1)", "AEs: nasopharyngitis, hypersensitivity"]),
]
for i, (col, name, pts) in enumerate(mab_data):
left_x = Inches(0.3 + i * 3.25)
# header card
shp = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
left_x, Inches(2.15), Inches(3.05), Inches(0.75))
shp.fill.solid(); shp.fill.fore_color.rgb = col; shp.line.fill.background()
tf = shp.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE; tf.margin_left = Inches(0.1)
p = tf.paragraphs[0]; r = p.add_run()
r.text = name; r.font.size = Pt(15); r.font.bold = True; r.font.color.rgb = WHITE
# body
tb = s.shapes.add_textbox(left_x, Inches(2.98), Inches(3.05), Inches(2.8))
tf2 = tb.text_frame; tf2.word_wrap = True; tf2.margin_left = Inches(0.08)
for j, pt in enumerate(pts):
p2 = tf2.paragraphs[0] if j == 0 else tf2.add_paragraph()
p2.space_before = Pt(5)
r2 = p2.add_run(); r2.text = "\u2022 " + pt
r2.font.size = Pt(13); r2.font.color.rgb = DARK_GRAY
# Advantages box
advbox = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0.3), Inches(5.8), Inches(12.7), Inches(1.5))
advbox.fill.solid(); advbox.fill.fore_color.rgb = LIGHT_GRAY; advbox.line.fill.background()
tf = advbox.text_frame; tf.word_wrap = True
tf.margin_left = Inches(0.2); tf.margin_top = Inches(0.1)
p = tf.paragraphs[0]; r = p.add_run()
r.text = "Advantages of CGRP mAbs over conventional prophylaxis:"
r.font.size = Pt(15); r.font.bold = True; r.font.color.rgb = DARK_PURPLE
adv_txt = " \u2022 Onset within 1 month (vs. 2–12 weeks for oral drugs) \u2022 Excellent tolerability profile \u2022 Monthly or quarterly dosing improves adherence \u2022 Effective in patients who failed multiple oral preventive drugs \u2022 Also useful in medication overuse headache"
p2 = tf.add_paragraph(); p2.space_before = Pt(5)
r2 = p2.add_run(); r2.text = adv_txt
r2.font.size = Pt(13); r2.font.color.rgb = DARK_GRAY
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 11 – Drug Selection Guide
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, WHITE)
header_bar(s, "Drug Selection Guide for Migraine")
scenarios = [
(DARK_PURPLE, "Mild-to-Moderate Attack",
"NSAIDs (ibuprofen 400–800 mg) or\nAcetaminophen 1000 mg\n± Antiemetic (metoclopramide)"),
(MID_PURPLE, "Moderate-to-Severe / NSAID Failure",
"Triptan (sumatriptan 50–100 mg PO\nor rizatriptan 10 mg)\n± Antiemetic"),
(ACCENT_TEAL, "Nausea / Vomiting Present",
"Zolmitriptan 5 mg nasal spray\nZavegepant 10 mg nasal spray\nSumatriptan 6 mg SC"),
(ACCENT_ORANGE,"CV Contraindication to Triptans",
"Lasmiditan (ditan) 50–200 mg PO\nRimegepant 75 mg ODT\nUbrogepant 50–100 mg PO"),
(DARK_PURPLE, "Very Severe / Refractory",
"DHE 1 mg IM or intranasal 2 mg\nIV DHE protocol + metoclopramide\nIV valproate, IV ketorolac"),
(MID_PURPLE, "Menstrual Migraine",
"Frovatriptan 2.5 mg PO (long T½)\nRimegepant 75 mg q2 days (perimenstrual)\nEstrogen patches (short-term prevention)"),
(ACCENT_TEAL, "Episodic Prevention (\u22654 days/month)",
"Propranolol 40–240 mg/day (1st line)\nTopiramate 50–200 mg/day\nAmitriptyline 10–75 mg/night"),
(ACCENT_ORANGE,"Chronic Migraine Prevention",
"OnabotulinumtoxinA (BOTOX\u00ae) 155–195 U\nCGRP mAbs (erenumab, fremanezumab)\nTopiramate + CGRP mAb combination"),
]
for i, (col, scenario, advice) in enumerate(scenarios):
col_idx = i % 4
row_idx = i // 4
lft = Inches(0.25 + col_idx * 3.27)
top = Inches(1.6 + row_idx * 2.75)
shp = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, lft, top,
Inches(3.05), Inches(0.55))
shp.fill.solid(); shp.fill.fore_color.rgb = col; shp.line.fill.background()
tf = shp.text_frame; tf.vertical_anchor = MSO_ANCHOR.MIDDLE; tf.margin_left = Inches(0.1)
p = tf.paragraphs[0]; r = p.add_run()
r.text = scenario; r.font.size = Pt(13.5); r.font.bold = True; r.font.color.rgb = WHITE
# body text
tb = s.shapes.add_textbox(lft, top + Inches(0.58), Inches(3.05), Inches(2.1))
tf2 = tb.text_frame; tf2.word_wrap = True; tf2.margin_left = Inches(0.1)
p2 = tf2.paragraphs[0]; r2 = p2.add_run()
r2.text = advice; r2.font.size = Pt(13); r2.font.color.rgb = DARK_GRAY
# ══════════════════════════════════════════════════════════════════════════
# SLIDE 12 – Summary & Key Points
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg_rect(s, DARK_PURPLE)
# decorative
for ox, oy, sz, alpha_col in [
(Inches(11), Inches(-1), Inches(5), RGBColor(0x55, 0x1F, 0x8A)),
(Inches(-1), Inches(5), Inches(4), RGBColor(0x4A, 0x17, 0x7A)),
]:
shp = s.shapes.add_shape(MSO_SHAPE.OVAL, ox, oy, sz, sz)
shp.fill.solid(); shp.fill.fore_color.rgb = alpha_col; shp.line.fill.background()
bar = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, Pt(10), H)
bar.fill.solid(); bar.fill.fore_color.rgb = ACCENT_TEAL; bar.line.fill.background()
txt(s, "Summary & Key Take-Aways", Inches(0.7), Inches(0.3),
Inches(11), Inches(0.8), size=32, bold=True, color=WHITE)
key_points = [
"Migraine pathophysiology involves cortical spreading depression, trigeminal activation, CGRP release and neurogenic inflammation.",
"Non-specific treatment (NSAIDs, antiemetics) is appropriate for mild attacks; limit use to <10–15 days/month to avoid MOH.",
"Triptans (5-HT\u2081B/\u2081D agonists) are first-line migraine-specific acute therapy; rizatriptan and eletriptan are among the most efficacious.",
"Ergot alkaloids (ergotamine, DHE) are nonselective; reserved for refractory cases; contraindicated in CV disease.",
"Lasmiditan (ditan) is cardiovascular-safe but is a controlled substance with driving impairment risk.",
"Gepants (rimegepant, ubrogepant, zavegepant) block CGRP receptors; safe in CV disease; rimegepant also approved for prevention.",
"Prophylaxis is indicated when attacks occur \u22654 days/month; \u03b2-blockers (propranolol) and topiramate are 1st-line oral options.",
"CGRP monoclonal antibodies (erenumab, fremanezumab, galcanezumab, eptinezumab) represent a major advance in prevention with rapid onset and excellent tolerability.",
"OnabotulinumtoxinA is FDA-approved specifically for CHRONIC migraine (\u226515 days/month) – not for episodic.",
"Always assess for medication overuse headache (MOH) in any patient with frequent headaches.",
]
tb = s.shapes.add_textbox(Inches(0.7), Inches(1.2), Inches(12.3), Inches(6.0))
tf = tb.text_frame; tf.word_wrap = True; tf.margin_left = Inches(0.05)
for i, pt in enumerate(key_points):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.space_before = Pt(5)
r = p.add_run(); r.text = f"{i+1}. " + pt
r.font.size = Pt(14.5); r.font.color.rgb = WHITE if i % 2 == 0 else LIGHT_PURPLE
# ══════════════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════════════
out = "/tmp/workspace/migraine-ppt/Migraine_Therapy_Pharmacology.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out} ({len(buf.getvalue())//1024} KB)")