Diagnostic approach to acute transverse myelopathy, compressive versus non-compressive from for mbbs in short
| Feature | Details |
|---|---|
| Motor | Weakness/paralysis below lesion; initially flaccid (spinal shock), later spastic (UMN signs) |
| Sensory | All modalities lost below a sensory level; pin-prick loss most valuable to localize |
| Autonomic | Urinary retention, loss of bowel control, erectile dysfunction |
Tip: With extramedullary lesions, the sensory level may be found several segments below the actual lesion level (due to somatotopic organization of the spinothalamic tract - sacral fibers are most superficial/lateral).
| Level | Clinical Clue |
|---|---|
| Cervical | Quadriplegia + C3-C5 involvement may cause respiratory failure |
| Thoracic (most common) | Paraplegia; thoracic back pain |
| Conus medullaris | Mixed UMN + LMN; early sphincter involvement |
| Cauda equina (not cord) | Pure LMN; radicular pain; saddle anesthesia |
"The first priority is to exclude treatable compression of the cord by a mass lesion." - Harrison's 22E
| Category | Examples |
|---|---|
| Vascular / Ischemic | Anterior spinal artery infarction (aortic disease, hypotension, surgery) |
| Autoimmune / Demyelinating | Multiple sclerosis (MS), Neuromyelitis optica spectrum disorder (NMOSD), MOG-antibody disease |
| Inflammatory / Idiopathic | Acute transverse myelitis (idiopathic), sarcoidosis, SLE, Sjogren's |
| Demyelinating - Post-infectious | Acute Disseminated Encephalomyelitis (ADEM) |
| Parainfectious / Infectious | HSV, VZV, CMV, EBV, enteroviruses, HIV, HTLV-1, schistosomiasis |
| MRI Feature | Suggests |
|---|---|
| Epidural mass, cord compression, loss of CSF signal around cord | Compressive |
| Intramedullary T2 hyperintensity, cord swelling, enhancement | Inflammatory/demyelinating |
| "Pencil sign" - longitudinal anterior T2 bright signal + diffusion restriction | Cord ischemia (anterior spinal artery) |
| "Owl's eyes" - bilateral anterior horn T2 signal on axial view | Cord infarction |
| Short T2 lesion (<2 vertebral segments) | Suggests MS |
| Long T2 lesion (>3 vertebral segments, LETM) | Suggests NMOSD, sarcoid, ischemia |
| Test | Purpose |
|---|---|
| CSF analysis | Pleocytosis + elevated protein = inflammatory/infectious; oligoclonal bands = MS |
| AQP4-IgG (anti-NMO antibody) | NMOSD diagnosis |
| MOG-IgG antibody | MOG-antibody disease |
| CRMP5, amphiphysin IgG | Paraneoplastic myelopathy |
| ANA, dsDNA, ANCA, ENA | SLE, Sjogren's, vasculitis |
| Viral PCR (HSV, VZV, CMV, EBV, HIV, HTLV-1) | Infectious myelitis |
| ESR, CRP, cultures | Epidural abscess |
| Vit B12, folate | Subacute combined degeneration (if chronic) |
| VDRL/RPR | Neurosyphilis |
| Chest X-ray + ACE level | Sarcoidosis |
Acute onset of bilateral motor + sensory + autonomic deficit
↓
MRI SPINE WITH GADOLINIUM (URGENT)
↓
┌─────────────────────────────────┐
▼ ▼
COMPRESSION SEEN NO COMPRESSION
(epidural mass/abscess) (intramedullary signal)
↓ ↓
EMERGENCY ┌────────────────┐
DECOMPRESSION ▼ ▼
(surgery ± Vascular? Inflammatory?
steroids/antibiotics) (sudden onset, (subacute,
aortic dz) young, CSF)
↓ ↓
Supportive CSF + antibody
care panel (AQP4,
MOG, ANA, viral PCR)
| Feature | Compressive | Non-Compressive |
|---|---|---|
| Onset | Subacute/gradual | Sudden (ischemia) or subacute (inflammatory) |
| Pain | Vertebral/radicular, mechanical | Midline/absent (inflammatory) |
| Fever | Present (abscess) | May be present (post-infectious) |
| Progression | Hours to days | Minutes (vascular) to days (inflammatory) |
| MRI | Epidural mass, cord compression | Intramedullary T2 signal change |
| CSF | Often normal | Pleocytosis (inflammatory), normal (ischemia) |
| Treatment | Surgery/antibiotics (URGENT) | Steroids, plasma exchange, antivirals |
Generate a diagnostic flowchart poster for exam prep
A medical diagnostic flowchart poster for MBBS exam prep titled "Acute Transverse Myelopathy: Diagnostic Approach". Clean clinical style with white background. The flowchart starts at the top with a blue header box: "ACUTE TRANSVERSE MYELOPATHY" with subtitle "Motor + Sensory + Autonomic deficit below a spinal level" Below it, three symptom boxes in a row connected by lines: - Green box: "MOTOR: Weakness/Paralysis (flaccid→spastic)" - Yellow box: "SENSORY: Sensory level (pin-prick most useful)" - Orange box: "AUTONOMIC: Bladder retention, Bowel dysfunction" Arrow pointing down to a large red urgent box: "URGENT MRI SPINE WITH GADOLINIUM (Image entire spine: C to S)" From this MRI box, two branches with arrows going left and right: LEFT BRANCH (red/orange box): "COMPRESSION SEEN" - Epidural mass/tumor - Epidural abscess - Hematoma - Herniated disc - Spondylosis Below it: "CLINICAL CLUES: Back/neck pain (worse at night), Radicular pain, Known malignancy, Fever+immunocompromise, Anticoagulation use" Below: RED EMERGENCY box: "EMERGENCY DECOMPRESSION Surgery ± Steroids/Antibiotics" RIGHT BRANCH (blue/green box): "NO COMPRESSION (Intramedullary signal)" Split into two sub-branches: Sub-branch 1 (purple): "VASCULAR (Anterior spinal artery)" - Sudden onset (minutes) - MRI: Pencil sign, Owl's eyes - Aortic disease/surgery - Treatment: Supportive Sub-branch 2 (teal): "INFLAMMATORY / INFECTIOUS" - Subacute onset (hours-days) - Young patient, post-infection - Long T2 lesion (LETM = NMOSD) - Short lesion = MS Below: "CSF + ANTIBODY PANEL: AQP4-IgG (NMOSD), MOG-IgG, ANA/dsDNA (SLE), Viral PCR (HSV,VZV,HIV), CRMP5 (paraneoplastic)" Treatment: "Steroids / PLEX / Antivirals" At the bottom, a summary comparison table with two columns: Left: COMPRESSIVE | Right: NON-COMPRESSIVE Row 1: Onset - Subacute/gradual | Sudden or subacute Row 2: Pain - Vertebral/radicular | Absent or midline Row 3: MRI - Epidural mass | Intramedullary T2 signal Row 4: CSF - Often normal | Pleocytosis (inflammatory) Row 5: Tx - Surgery/Antibiotics URGENT | Steroids/PLEX/Antivirals Footer: "Harrison's 22E | For MBBS Exam Prep" Use color coding: red for emergency/compressive, blue for non-compressive/vascular, teal for inflammatory, clear arrows and connecting lines, professional medical poster layout
mkdir -p /tmp/workspace/myelopathy-poster && ls /tmp/workspace/
~/myelopathy-poster/generate_poster.py
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
fig, ax = plt.subplots(figsize=(20, 28))
ax.set_xlim(0, 20)
ax.set_ylim(0, 28)
ax.axis('off')
fig.patch.set_facecolor('#F7F9FC')
ax.set_facecolor('#F7F9FC')
# ─── Helper functions ───────────────────────────────────────────────
def rounded_box(ax, x, y, w, h, color, text, fontsize=10, text_color='white',
bold=False, alpha=1.0, radius=0.3, ha='center', va='center',
wrap_width=None, lineheight=1.4):
box = FancyBboxPatch((x, y), w, h,
boxstyle=f"round,pad=0.0,rounding_size={radius}",
linewidth=1.5, edgecolor='white',
facecolor=color, alpha=alpha, zorder=3)
ax.add_patch(box)
weight = 'bold' if bold else 'normal'
ax.text(x + w/2, y + h/2, text, ha=ha, va=va,
fontsize=fontsize, color=text_color, weight=weight,
zorder=4, linespacing=lineheight,
multialignment='center')
def arrow(ax, x1, y1, x2, y2, color='#555555', lw=2):
ax.annotate('', xy=(x2, y2), xytext=(x1, y1),
arrowprops=dict(arrowstyle='->', color=color,
lw=lw, connectionstyle='arc3,rad=0.0'),
zorder=5)
def line(ax, x1, y1, x2, y2, color='#AAAAAA', lw=1.5):
ax.plot([x1, x2], [y1, y2], color=color, lw=lw, zorder=2)
# ─── COLORS ─────────────────────────────────────────────────────────
C_HEADER = '#1A237E' # deep navy
C_SYMPTOM = '#1565C0' # blue
C_URGENT = '#B71C1C' # dark red
C_COMPRESS = '#C62828' # red
C_COMPRESS2= '#EF5350' # lighter red
C_VASCULAR = '#6A1B9A' # purple
C_INFLAM = '#00695C' # teal
C_COMPARE = '#263238' # dark slate
C_FOOT = '#37474F'
C_ARROW = '#37474F'
C_LIGHT = '#FFEBEE'
C_LBLUE = '#E3F2FD'
C_LTEAL = '#E0F2F1'
C_LPURP = '#F3E5F5'
# ══════════════════════════════════════════════════════
# ROW 1 — MAIN TITLE (y=26.0)
# ══════════════════════════════════════════════════════
rounded_box(ax, 1, 26.1, 18, 1.6, C_HEADER,
'ACUTE TRANSVERSE MYELOPATHY\nDiagnostic Approach: Compressive vs Non-Compressive',
fontsize=17, bold=True, radius=0.4, lineheight=1.5)
# ══════════════════════════════════════════════════════
# ROW 2 — THREE SYMPTOM BOXES (y=24.0)
# ══════════════════════════════════════════════════════
arrow(ax, 10, 26.1, 10, 25.25, C_ARROW, lw=2)
sx, sy, sw, sh = 1.0, 23.3, 5.5, 1.6
rounded_box(ax, sx, sy, sw, sh, '#1565C0',
'MOTOR\nWeakness / Paralysis\nFlaccid → Spastic (UMN)',
fontsize=9.5, radius=0.3, lineheight=1.5)
rounded_box(ax, 7.25, sy, sw, sh, '#E65100',
'SENSORY\nSensory level below lesion\nPin-prick most useful',
fontsize=9.5, radius=0.3, lineheight=1.5)
rounded_box(ax, 13.5, sy, sw, sh, '#2E7D32',
'AUTONOMIC\nUrinary retention\nBowel / Sphincter dysfunction',
fontsize=9.5, radius=0.3, lineheight=1.5)
# ══════════════════════════════════════════════════════
# ROW 3 — URGENT MRI BOX (y=21.3)
# ══════════════════════════════════════════════════════
arrow(ax, 10, 23.3, 10, 22.6, C_ARROW, lw=2)
rounded_box(ax, 3, 21.0, 14, 1.5, C_URGENT,
'⚡ URGENT: MRI SPINE WITH GADOLINIUM\n'
'Image entire spine (Cervical → Sacral) | First investigation',
fontsize=12, bold=True, radius=0.4, lineheight=1.5)
# ══════════════════════════════════════════════════════
# BRANCH LINES from MRI box
# ══════════════════════════════════════════════════════
# horizontal bar
line(ax, 5.0, 21.0, 5.0, 20.3, C_COMPRESS, lw=2.5)
line(ax, 15.0, 21.0, 15.0, 20.3, C_INFLAM, lw=2.5)
line(ax, 5.0, 20.3, 15.0, 20.3, '#888888', lw=2)
arrow(ax, 5.0, 20.3, 5.0, 19.7, C_COMPRESS, lw=2.5)
arrow(ax, 15.0, 20.3, 15.0, 19.7, C_INFLAM, lw=2.5)
# ══════════════════════════════════════════════════════
# LEFT BRANCH — COMPRESSIVE (x=0.5..9.5)
# ══════════════════════════════════════════════════════
# Header
rounded_box(ax, 0.5, 18.8, 9.0, 0.85, C_COMPRESS,
'COMPRESSION SEEN',
fontsize=12, bold=True, radius=0.3)
# Causes box
causes_txt = (
'Causes (TEHSD):\n'
'• Tumor – spinal metastases (breast, lung, prostate)\n'
'• Epidural Abscess (fever + back pain + deficit)\n'
'• Hemorrhage – epidural/subdural hematoma\n'
'• Spondylosis / Herniated disc\n'
'• Subluxation / Trauma'
)
rounded_box(ax, 0.5, 16.3, 9.0, 2.35, C_LIGHT,
causes_txt, fontsize=8.5, text_color='#B71C1C',
radius=0.3, lineheight=1.5)
# Clues box
clues_txt = (
'Clinical Clues:\n'
'• Back/neck pain, worse at night or with movement\n'
'• Radicular / radiating pain\n'
'• Known malignancy\n'
'• Fever + immunocompromise\n'
'• Anticoagulation use\n'
'• Vertebral tenderness on percussion'
)
rounded_box(ax, 0.5, 13.7, 9.0, 2.45, '#FFCDD2',
clues_txt, fontsize=8.5, text_color='#7B1FA2',
radius=0.3, lineheight=1.5)
arrow(ax, 5.0, 13.7, 5.0, 13.0, C_COMPRESS, lw=2.5)
# Treatment box
rounded_box(ax, 0.5, 11.8, 9.0, 1.1, C_COMPRESS,
'🚨 EMERGENCY DECOMPRESSION\n'
'Surgery ± Steroids / Antibiotics (abscess)',
fontsize=9.5, bold=True, radius=0.35, lineheight=1.5)
# ══════════════════════════════════════════════════════
# RIGHT BRANCH — NON-COMPRESSIVE (x=10.5..19.5)
# ══════════════════════════════════════════════════════
rounded_box(ax, 10.5, 18.8, 9.0, 0.85, C_INFLAM,
'NO COMPRESSION (Intramedullary Signal)',
fontsize=12, bold=True, radius=0.3)
# Sub-branch split
line(ax, 13.0, 18.8, 13.0, 18.3, C_VASCULAR, lw=2)
line(ax, 18.0, 18.8, 18.0, 18.3, C_INFLAM, lw=2)
line(ax, 13.0, 18.3, 18.0, 18.3, '#888888', lw=1.5)
arrow(ax, 13.0, 18.3, 13.0, 17.85, C_VASCULAR, lw=2)
arrow(ax, 18.0, 18.3, 18.0, 17.85, C_INFLAM, lw=2)
# VASCULAR sub-box
rounded_box(ax, 10.5, 16.0, 4.0, 0.75, C_VASCULAR,
'VASCULAR', fontsize=9, bold=True, radius=0.25)
vasc_txt = (
'Anterior Spinal Artery\n'
'• Sudden onset (mins-hrs)\n'
'• Sharp midline back pain\n'
'• Anterior cord syndrome\n'
' (motor loss + pain/temp loss,\n'
' vibration SPARED)\n'
'MRI: Pencil sign, Owl\'s eyes\n'
'Causes: aortic disease/surgery,\n'
'hypotension, dissection\n'
'Rx: Supportive'
)
rounded_box(ax, 10.5, 13.0, 4.0, 2.9, C_LPURP,
vasc_txt, fontsize=7.8, text_color='#4A148C',
radius=0.25, lineheight=1.45)
# INFLAMMATORY sub-box
rounded_box(ax, 15.0, 16.0, 4.5, 0.75, C_INFLAM,
'INFLAMMATORY / INFECTIVE', fontsize=8.5, bold=True, radius=0.25)
inflam_txt = (
'Causes:\n'
'• MS – short lesion (<2 seg)\n'
'• NMOSD – LETM (>3 seg)\n'
' → AQP4-IgG antibody\n'
'• MOG-antibody disease\n'
'• Post-infectious / ADEM\n'
'• SLE, Sjogren\'s, sarcoid\n'
'• Viral: HSV, VZV, HIV, CMV\n'
'• HTLV-1 (tropical spastic)\n'
'Rx: IV Steroids / PLEX\n'
' Antivirals (if viral)'
)
rounded_box(ax, 15.0, 13.0, 4.5, 2.9, C_LTEAL,
inflam_txt, fontsize=7.8, text_color='#004D40',
radius=0.25, lineheight=1.45)
# ══════════════════════════════════════════════════════
# INVESTIGATIONS PANEL (y=10.5 .. 12.8)
# ══════════════════════════════════════════════════════
rounded_box(ax, 10.5, 12.0, 9.0, 0.75, '#01579B',
'INVESTIGATIONS (if Non-Compressive)', fontsize=10, bold=True, radius=0.3)
inv_txt = (
'Blood: CBC, ESR, CRP | ANA, dsDNA, ANCA | ACE level | Vit B12 | HIV, HTLV-1, VDRL/RPR\n'
'CSF: Cell count, protein, glucose | Oligoclonal bands (MS) | Viral PCR (HSV, VZV, CMV, EBV)\n'
'Antibodies: AQP4-IgG (NMOSD) | MOG-IgG | CRMP5, amphiphysin (paraneoplastic)\n'
'Imaging: CXR (sarcoid/tumor) | CT chest (lymphoma) | VEPs (MS)'
)
rounded_box(ax, 10.5, 10.3, 9.0, 1.6, C_LBLUE,
inv_txt, fontsize=8, text_color='#0D47A1',
radius=0.3, lineheight=1.5)
# ══════════════════════════════════════════════════════
# COMPARISON TABLE (y=8.0 .. 10.3)
# ══════════════════════════════════════════════════════
arrow(ax, 10, 11.8, 10, 11.1, C_ARROW, lw=1.5)
rounded_box(ax, 1, 10.0, 18, 0.7, C_COMPARE,
'QUICK COMPARISON: Compressive vs Non-Compressive',
fontsize=10.5, bold=True, radius=0.3)
# Table headers
rounded_box(ax, 1.0, 9.05, 3.5, 0.75, '#37474F', 'Feature', fontsize=9, bold=True, radius=0.1)
rounded_box(ax, 4.6, 9.05, 7.2, 0.75, C_COMPRESS,'COMPRESSIVE', fontsize=9, bold=True, radius=0.1)
rounded_box(ax, 12.0, 9.05, 7.0, 0.75, C_INFLAM, 'NON-COMPRESSIVE', fontsize=9, bold=True, radius=0.1)
rows = [
('Onset', 'Gradual / subacute', 'Sudden (vascular) or subacute (inflam.)'),
('Pain', 'Vertebral / radicular pain', 'Absent or midline; post-infectious hx'),
('Fever', 'Present (abscess)', 'May be present (post-viral)'),
('MRI', 'Epidural mass, cord compressed','Intramedullary T2 signal change'),
('CSF', 'Usually normal', 'Pleocytosis + ↑ protein (inflammatory)'),
('Key Clue', 'Malignancy / anticoagulation', 'Young + optic neuritis = MS/NMOSD'),
('Treatment', '🚨 Surgery / Antibiotics URGENT','Steroids / PLEX / Antivirals'),
]
row_colors = ['#ECEFF1', '#F5F5F5']
for i, (feat, comp, noncomp) in enumerate(rows):
ry = 9.05 - (i+1)*0.82
bg = row_colors[i % 2]
rounded_box(ax, 1.0, ry, 3.5, 0.72, bg, feat, fontsize=8.2, text_color='#212121', radius=0.08, bold=True)
rounded_box(ax, 4.6, ry, 7.2, 0.72, '#FFEBEE', comp, fontsize=8.0, text_color='#B71C1C', radius=0.08)
rounded_box(ax, 12.0, ry, 7.0, 0.72, '#E0F2F1', noncomp, fontsize=8.0, text_color='#004D40', radius=0.08)
# ══════════════════════════════════════════════════════
# MRI FINDINGS LEGEND (y=2.0 .. 3.2)
# ══════════════════════════════════════════════════════
rounded_box(ax, 1, 2.8, 18, 0.6, '#455A64',
'KEY MRI FINDINGS', fontsize=10, bold=True, radius=0.25)
mri_items = [
('Epidural mass / cord\ncompression', C_COMPRESS, 'Compressive'),
('Pencil sign +\nOwl\'s eyes (axial)', C_VASCULAR, 'Cord Ischemia'),
('Short T2 lesion\n(<2 vertebral seg)', '#1565C0', 'Multiple Sclerosis'),
('LETM >3 seg +\nAQP4-IgG +ve', C_INFLAM, 'NMOSD'),
('Cord swelling +\ngad. enhancement', '#F57F17', 'ATM / Inflammatory'),
]
for i, (label, color, title) in enumerate(mri_items):
xi = 1.0 + i * 3.65
rounded_box(ax, xi, 1.9, 3.4, 0.75, color, f'{title}\n{label}',
fontsize=7.5, radius=0.2, lineheight=1.4)
# ══════════════════════════════════════════════════════
# FOOTER
# ══════════════════════════════════════════════════════
rounded_box(ax, 1, 0.7, 18, 0.9, C_FOOT,
'Source: Harrison\'s Principles of Internal Medicine 22E | Localization in Clinical Neurology 8E\n'
'For MBBS Exam Preparation | Orris Medical Education',
fontsize=8.5, radius=0.3, lineheight=1.5)
plt.tight_layout(pad=0)
plt.savefig('/tmp/workspace/myelopathy-poster/acute_transverse_myelopathy_poster.png',
dpi=180, bbox_inches='tight', facecolor=fig.get_facecolor())
plt.close()
print("Poster saved successfully.")
cd /tmp/workspace/myelopathy-poster && python generate_poster.py 2>&1
~/myelopathy-poster/generate_poster.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/myelopathy-poster/generate_poster.py'
~/myelopathy-poster/generate_poster.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/myelopathy-poster/generate_poster.py'
~/myelopathy-poster/generate_poster.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/myelopathy-poster/generate_poster.py'
~/myelopathy-poster/generate_poster.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/myelopathy-poster/generate_poster.py'
cd /tmp/workspace/myelopathy-poster && python generate_poster.py 2>&1
ls -lh /tmp/workspace/myelopathy-poster/
acute transverse myelopathy poster
Image · PNG