Myastenia management
"myasthenia gravis" AND treatment
Prescription
What kind of prescription info do you need, following up on the myasthenia gravis discussion?
Create a quick reference PDF guide for MG prescribing protocols
mkdir -p /tmp/workspace/mg-prescribing-guide && ls -la /tmp/workspace/
~/mg-prescribing-guide/build_pdf.py
#!/usr/bin/env python3
"""Build a Myasthenia Gravis Prescribing Quick Reference PDF."""
from reportlab.lib.pagesizes import letter
from reportlab.lib.units import inch
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, ListFlowable, ListItem
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
OUT = "/tmp/workspace/mg-prescribing-guide/MG_Prescribing_Quick_Reference.pdf"
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"TitleStyle", parent=styles["Title"], fontSize=20, textColor=colors.HexColor("#1a3c6e"),
spaceAfter=4, alignment=TA_CENTER
)
subtitle_style = ParagraphStyle(
"SubtitleStyle", parent=styles["Normal"], fontSize=10.5, textColor=colors.HexColor("#555555"),
alignment=TA_CENTER, spaceAfter=14
)
h1 = ParagraphStyle(
"H1", parent=styles["Heading1"], fontSize=14, textColor=colors.white,
backColor=colors.HexColor("#1a3c6e"), spaceBefore=14, spaceAfter=8,
leftIndent=6, borderPadding=(6, 6, 6, 6)
)
h2 = ParagraphStyle(
"H2", parent=styles["Heading2"], fontSize=11.5, textColor=colors.HexColor("#1a3c6e"),
spaceBefore=10, spaceAfter=4
)
body = ParagraphStyle(
"Body", parent=styles["Normal"], fontSize=9.3, leading=13, spaceAfter=4
)
bullet_style = ParagraphStyle(
"Bullet", parent=body, leftIndent=12, bulletIndent=2, spaceAfter=3
)
warn_style = ParagraphStyle(
"Warn", parent=body, textColor=colors.HexColor("#7a1f1f"), backColor=colors.HexColor("#fdecea"),
borderPadding=(6, 6, 6, 6), spaceAfter=6
)
note_style = ParagraphStyle(
"Note", parent=body, textColor=colors.HexColor("#1a3c6e"), backColor=colors.HexColor("#eaf1fb"),
borderPadding=(6, 6, 6, 6), spaceAfter=6
)
footer_style = ParagraphStyle(
"Footer", parent=styles["Normal"], fontSize=7.5, textColor=colors.HexColor("#888888"), alignment=TA_CENTER
)
TABLE_HEAD_BG = colors.HexColor("#1a3c6e")
TABLE_ALT_BG = colors.HexColor("#f2f5fa")
def std_table(data, col_widths, font_size=8.3):
t = Table(data, colWidths=col_widths, repeatRows=1)
style = [
("BACKGROUND", (0, 0), (-1, 0), TABLE_HEAD_BG),
("TEXTCOLOR", (0, 0), (-1, 0), colors.white),
("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"),
("FONTSIZE", (0, 0), (-1, -1), font_size),
("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#c9c9c9")),
("VALIGN", (0, 0), (-1, -1), "TOP"),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
("TOPPADDING", (0, 0), (-1, -1), 4),
("BOTTOMPADDING", (0, 0), (-1, -1), 4),
]
for i in range(1, len(data)):
if i % 2 == 0:
style.append(("BACKGROUND", (0, i), (-1, i), TABLE_ALT_BG))
t.setStyle(TableStyle(style))
return t
def p(text, style=body):
return Paragraph(text, style)
def bullets(items, style=bullet_style):
return ListFlowable(
[ListItem(Paragraph(it, style), bulletColor=colors.HexColor("#1a3c6e")) for it in items],
bulletType="bullet", start="circle", leftIndent=14
)
elements = []
# ---------- TITLE ----------
elements.append(Paragraph("Myasthenia Gravis", title_style))
elements.append(Paragraph("Prescribing Quick Reference Guide", ParagraphStyle(
"Sub2", parent=title_style, fontSize=13, spaceAfter=2)))
elements.append(Paragraph(
"For clinician reference only — individualize therapy per patient antibody subtype, severity, and comorbidities",
subtitle_style))
elements.append(HRFlowable(width="100%", thickness=1.2, color=colors.HexColor("#1a3c6e"), spaceAfter=10))
elements.append(p(
"<b>Goal of therapy:</b> No symptoms/functional limitation from MG, with no more than mild, "
"non-intervention-requiring side effects (MGFA consensus).", note_style))
# ---------- SECTION 1: First-line symptomatic ----------
elements.append(Paragraph("1. First-Line Symptomatic Therapy — Cholinesterase Inhibitor", h1))
data1 = [
["Drug", "Starting Dose", "Titration / Max", "Key Points"],
["Pyridostigmine\nbromide (Mestinon)",
"60 mg PO q6h\n(adult)",
"60–120 mg q3–4h\nMax 480 mg/day",
"Time dose ~30–45 min before meals if bulbar weakness. "
"Timed-release 180 mg tab useful at bedtime. Caution: erratic absorption."],
["Pyridostigmine\n(pediatric)", "1 mg/kg PO", "Titrate to response",
"Syrup 60 mg/5 mL available for NG/impaired swallowing."],
]
elements.append(std_table(data1, [1.15*inch, 1.1*inch, 1.25*inch, 2.5*inch]))
elements.append(Spacer(1, 6))
elements.append(Paragraph("Managing cholinergic (muscarinic) side effects:", h2))
elements.append(bullets([
"Glycopyrrolate 1 mg PO BID–TID PRN for secretions/cramping",
"Loperamide 2 mg PO PRN for diarrhea",
"Hyoscyamine or propantheline as alternatives",
]))
elements.append(p(
"<b>Caution:</b> Anti-MuSK antibody-positive MG may worsen with cholinesterase inhibitors — "
"favor early immunotherapy in this subgroup.", warn_style))
# ---------- SECTION 2: Chronic immunotherapy ----------
elements.append(Paragraph("2. Chronic Immunotherapy (Generalized / ChEI-Refractory MG)", h1))
data2 = [
["Agent", "Induction", "Maintenance / Taper", "Monitoring"],
["Prednisone",
"10–20 mg/day,\nup-titrate over 1–2 wks",
"Up to 1 mg/kg/day (max ~60–80 mg/day);\ntaper to lowest effective dose once stable (1–3 mo)",
"Glucose, BP, bone density; co-Rx calcium + vit D \u00b1 bisphosphonate"],
["Azathioprine",
"50 mg/day",
"Titrate to 2–3 mg/kg/day over several weeks",
"Check TPMT/NUDT15 first; CBC + LFTs q1–2 wks initially, then q1–3 mo"],
["Mycophenolate\nmofetil",
"500 mg PO BID",
"Titrate to 1000 mg PO BID",
"CBC periodically; teratogenic — avoid in pregnancy"],
["Rituximab",
"Per protocol\n(e.g., 375 mg/m\u00b2 or\nfixed-dose regimens)",
"Repeat per B-cell repletion / clinical relapse",
"Preferred in refractory anti-MuSK MG; screen HBV before use"],
]
elements.append(std_table(data2, [1.0*inch, 1.15*inch, 1.85*inch, 2.0*inch], font_size=8.0))
elements.append(Spacer(1, 6))
elements.append(p(
"<b>Pre-immunosuppression screening:</b> chest CT/MRI for thymoma, TB test "
"(skin test or QuantiFERON-TB Gold), hepatitis B/C serology.", note_style))
elements.append(p(
"<b>Principle:</b> use the lowest effective dose long-term — chronic risks of infection "
"and malignancy, while not precisely quantified, are associated with these agents.", body))
# ---------- SECTION 3: Rapid-onset / crisis ----------
elements.append(Paragraph("3. Rapid-Onset Therapy — Severe Exacerbation / Myasthenic Crisis", h1))
data3 = [
["Modality", "Regimen", "Onset / Duration", "Notes"],
["IVIG", "0.4 g/kg/day IV \u00d7 5 days",
"Onset days; benefit\nlasts weeks–months",
"Preferred if venous access difficult or renal/cardiac fluid-shift risk with PLEX"],
["Plasma exchange\n(PLEX)", "5–6 exchanges,\nevery other day\n(2–3 L/exchange)",
"Onset days; wears off\n~4 wks, up to 3 mo",
"Used pre-thymectomy, crisis, or to prevent steroid-induced flare. Not for chronic maintenance."],
]
elements.append(std_table(data3, [1.05*inch, 1.55*inch, 1.4*inch, 2.0*inch], font_size=8.2))
elements.append(Spacer(1, 6))
elements.append(p(
"<b>Myasthenic crisis:</b> ICU-level monitoring, serial vital capacity / negative inspiratory "
"force, early airway support if bulbar/respiratory compromise. Continue or initiate chronic "
"immunotherapy concurrently.", warn_style))
# ---------- SECTION 4: Biologics ----------
elements.append(Paragraph("4. Targeted Biologic Agents (Refractory Generalized MG)", h1))
elements.append(bullets([
"<b>Complement (C5) inhibitors</b> (e.g., eculizumab) — for refractory AChR-antibody-positive generalized MG",
"<b>Anti-FcRn agents</b> (e.g., efgartigimod) — accelerate IgG degradation, reduce pathogenic antibody levels",
"<b>Amifampridine</b> — symptomatic benefit reported particularly in anti-MuSK MG",
]))
elements.append(p(
"A 2025 systematic review / network meta-analysis of novel biologics in MG "
"(PMID: 40346603) supports growing evidence for these agents as add-on/refractory-disease "
"options — discuss with a treating neurologist before initiating.", note_style))
elements.append(PageBreak())
# ---------- SECTION 5: Thymectomy ----------
elements.append(Paragraph("5. Thymectomy", h1))
elements.append(bullets([
"Recommended for most AChR-antibody-positive generalized MG patients, especially with thymoma "
"(present in 10–15% of MG patients)",
"Nearly all thymoma patients should undergo surgical resection regardless of age",
"Advanced-stage / higher WHO grade tumors (Stage II–IV, B2/B3) require adjunctive radiation therapy",
"Elderly/multimorbid patients with small tumors may be followed with periodic imaging instead",
]))
# ---------- SECTION 6: Drugs to avoid ----------
elements.append(Paragraph("6. Drugs to Avoid or Use with Caution in MG", h1))
data6 = [
["Category", "Examples"],
["Antibiotics", "Aminoglycosides, fluoroquinolones, telithromycin, macrolides (high dose)"],
["Cardiovascular", "Beta-blockers, some calcium channel blockers, procainamide, quinidine"],
["Anesthesia-related", "Neuromuscular blocking agents (non-depolarizing/depolarizing), high-dose local anesthetics"],
["Electrolytes", "Magnesium salts (IV magnesium especially)"],
["Rheumatologic", "Penicillamine, chloroquine/hydroxychloroquine"],
["Psychiatric", "Lithium, high-dose benzodiazepines/phenothiazines"],
]
elements.append(std_table(data6, [1.5*inch, 4.5*inch], font_size=8.3))
elements.append(Spacer(1, 6))
elements.append(p(
"Clinical judgment applies — associations are often based on case reports; weigh "
"risk/benefit rather than treating this as an absolute contraindication list.", body))
# ---------- SECTION 7: Comorbidity management ----------
elements.append(Paragraph("7. Managing Concurrent Conditions", h1))
elements.append(bullets([
"<b>Thyroid disease:</b> treat vigorously — both hyper- and hypothyroidism worsen myasthenic weakness",
"<b>Infections:</b> treat immediately — can precipitate crisis, especially in immunosuppressed patients",
"<b>Pregnancy:</b> avoid mycophenolate and methotrexate (teratogenic); pyridostigmine and prednisone "
"are generally considered compatible — manage with maternal-fetal medicine and neurology co-input",
]))
# ---------- SECTION 8: Quick decision snapshot ----------
elements.append(Paragraph("8. Quick Decision Snapshot", h1))
data8 = [
["Presentation", "First Choice"],
["Ocular / mild generalized MG", "Pyridostigmine \u00b1 low-dose steroid"],
["Moderate-severe generalized MG", "Pyridostigmine + corticosteroid + steroid-sparing agent"],
["Anti-MuSK MG", "Immunotherapy-focused (rituximab); ChEIs may worsen symptoms; consider amifampridine"],
["Thymoma present", "Surgical thymectomy \u00b1 radiation, regardless of MG severity"],
["Myasthenic crisis", "ICU + IVIG or PLEX + continue/escalate chronic immunotherapy"],
["Refractory to conventional therapy", "Consider complement inhibitor / FcRn antagonist / rituximab"],
]
elements.append(std_table(data8, [2.2*inch, 3.8*inch], font_size=8.3))
elements.append(Spacer(1, 14))
elements.append(HRFlowable(width="100%", thickness=0.8, color=colors.HexColor("#c9c9c9")))
elements.append(Spacer(1, 6))
elements.append(Paragraph(
"This guide is a general clinical reference synthesized from Bradley and Daroff's Neurology in "
"Clinical Practice, International Consensus Guidance for Management of Myasthenia Gravis (2020 "
"update, Neurology 2021;96:114–122), and current systematic review literature (e.g., PMID: "
"40346603). It is NOT a substitute for individualized clinical judgment, institutional protocols, "
"or current prescribing information. Always verify doses, contraindications, and monitoring "
"requirements against current package inserts and specialist guidance before prescribing.",
footer_style
))
doc = SimpleDocTemplate(
OUT, pagesize=letter,
topMargin=0.55*inch, bottomMargin=0.55*inch,
leftMargin=0.6*inch, rightMargin=0.6*inch,
title="MG Prescribing Quick Reference"
)
doc.build(elements)
print("Saved:", OUT)
cd /tmp/workspace/mg-prescribing-guide && python3 build_pdf.py
cd /tmp/workspace/mg-prescribing-guide && python3 -c " from pypdf import PdfReader r = PdfReader('MG_Prescribing_Quick_Reference.pdf') print('Pages:', len(r.pages)) print('Size KB:', __import__('os').path.getsize('MG_Prescribing_Quick_Reference.pdf')/1024) " ls -la /tmp/workspace/mg-prescribing-guide/
MG Prescribing Quick Reference
PDF Document · PDF