~/clinical-tools/umn-lmn-tool.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UMN vs LMN Clinical Decision Tool</title>
<style>
:root {
--umn: #2563eb;
--lmn: #dc2626;
--both: #7c3aed;
--neutral: #374151;
--bg: #f8fafc;
--card: #ffffff;
--border: #e2e8f0;
--shadow: 0 2px 8px rgba(0,0,0,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--neutral); }
header {
background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
color: white; padding: 24px 32px;
display: flex; align-items: center; gap: 16px;
}
header h1 { font-size: 1.6rem; font-weight: 700; }
header p { font-size: 0.9rem; opacity: 0.85; margin-top: 4px; }
.badge { background: rgba(255,255,255,0.2); border-radius: 20px; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
/* ---- CHECKER ---- */
.checker-card {
background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
padding: 28px; margin-bottom: 28px; border: 1px solid var(--border);
}
.checker-card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; color: #1e3a5f; }
.checker-card p.subtitle { font-size: 0.85rem; color: #64748b; margin-bottom: 20px; }
.signs-grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 12px; margin-bottom: 20px;
}
.sign-item {
background: #f1f5f9; border-radius: 10px; padding: 12px 14px;
display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
border: 2px solid transparent; transition: all 0.18s;
}
.sign-item:hover { background: #e0e7ff; }
.sign-item.selected-umn { border-color: var(--umn); background: #eff6ff; }
.sign-item.selected-lmn { border-color: var(--lmn); background: #fff1f2; }
.sign-item label { font-size: 0.88rem; font-weight: 500; cursor: pointer; line-height: 1.4; }
.sign-item input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--umn); }
.sign-tag { font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: auto; white-space: nowrap; }
.tag-umn { background: #dbeafe; color: var(--umn); }
.tag-lmn { background: #fee2e2; color: var(--lmn); }
.tag-both { background: #ede9fe; color: var(--both); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { padding: 10px 22px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: 0.15s; }
.btn-primary { background: #1e3a5f; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-reset { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; }
.btn-reset:hover { background: #e2e8f0; }
/* ---- RESULT ---- */
#result { margin-top: 20px; display: none; }
.result-box {
border-radius: 14px; padding: 22px 24px; border: 2px solid;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.result-box.umn { border-color: var(--umn); background: #eff6ff; }
.result-box.lmn { border-color: var(--lmn); background: #fff1f2; }
.result-box.mixed { border-color: var(--both); background: #faf5ff; }
.result-box.unclear { border-color: #94a3b8; background: #f8fafc; }
.result-title { font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.result-score { font-size: 0.88rem; color: #64748b; margin-top: 6px; margin-bottom: 14px; }
.result-hints { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.hint { background: rgba(255,255,255,0.7); border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; }
.hint strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; margin-bottom: 3px; }
/* ---- COMPARISON TABLE ---- */
.section-title { font-size: 1.1rem; font-weight: 700; color: #1e3a5f; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
table.comp { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.comp th { padding: 10px 14px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; background: #1e3a5f; color: white; }
table.comp th:first-child { border-radius: 8px 0 0 0; }
table.comp th:last-child { border-radius: 0 8px 0 0; }
table.comp td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.comp tr:last-child td { border-bottom: none; }
table.comp tr:nth-child(even) td { background: #f8fafc; }
.umn-cell { color: var(--umn); font-weight: 600; }
.lmn-cell { color: var(--lmn); font-weight: 600; }
/* ---- TWO COLS ---- */
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media (max-width: 680px) { .two-cols { grid-template-columns: 1fr; } .result-hints { grid-template-columns: 1fr; } }
.info-card {
background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
padding: 22px; border: 1px solid var(--border);
}
.info-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.info-card ul { list-style: none; padding: 0; }
.info-card li { padding: 6px 0; font-size: 0.86rem; border-bottom: 1px solid #f1f5f9; display: flex; gap: 8px; align-items: flex-start; }
.info-card li:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.dot-umn { background: var(--umn); }
.dot-lmn { background: var(--lmn); }
.dot-both { background: var(--both); }
/* ---- PATHWAY DIAGRAM ---- */
.pathway { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 28px; border: 1px solid var(--border); }
.pathway-flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.p-node {
background: #f1f5f9; border-radius: 10px; padding: 12px 16px; text-align: center;
font-size: 0.82rem; font-weight: 600; border: 2px solid var(--border); min-width: 110px;
}
.p-node.umn-node { background: #dbeafe; border-color: var(--umn); color: var(--umn); }
.p-node.lmn-node { background: #fee2e2; border-color: var(--lmn); color: var(--lmn); }
.p-node.muscle-node { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.p-arrow { font-size: 1.4rem; color: #94a3b8; padding: 0 6px; }
.p-label { font-size: 0.72rem; color: #64748b; display: block; margin-top: 3px; font-weight: 400; }
/* ---- FOOTER ---- */
footer { text-align: center; padding: 20px; font-size: 0.8rem; color: #94a3b8; border-top: 1px solid var(--border); margin-top: 8px; }
.warning { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 10px 14px; font-size: 0.82rem; color: #92400e; margin-top: 16px; }
</style>
</head>
<body>
<header>
<div>
<h1>🧠 UMN vs LMN Clinical Decision Tool</h1>
<p>Upper Motor Neuron & Lower Motor Neuron lesion differentiation — based on clinical signs</p>
</div>
<span class="badge">Neurology</span>
</header>
<div class="container">
<!-- CHECKER -->
<div class="checker-card">
<h2>Clinical Sign Checker</h2>
<p class="subtitle">Select all signs present in your patient. The tool will suggest the most likely lesion type.</p>
<div class="signs-grid" id="signsGrid">
<!-- filled by JS -->
</div>
<div class="btn-row">
<button class="btn btn-primary" onclick="assess()">Assess Findings</button>
<button class="btn btn-reset" onclick="resetAll()">Reset</button>
</div>
<div id="result">
<div class="result-box" id="resultBox">
<div class="result-title" id="resultTitle"></div>
<div class="result-score" id="resultScore"></div>
<div class="result-hints" id="resultHints"></div>
</div>
<div class="warning">⚠️ This tool is an educational aid only. Clinical judgment, history, and investigations are required for diagnosis.</div>
</div>
</div>
<!-- MOTOR PATHWAY -->
<div class="pathway">
<div class="section-title">⬇️ The Two-Neuron Motor Pathway</div>
<div class="pathway-flow">
<div class="p-node">Motor Cortex<br><span class="p-label">(Precentral gyrus)</span></div>
<span class="p-arrow">→</span>
<div class="p-node umn-node">UMN Axon<br><span class="p-label">Corticospinal / corticobulbar tract</span></div>
<span class="p-arrow">→</span>
<div class="p-node">Anterior Horn<br><span class="p-label">Spinal cord (or CN nucleus)</span></div>
<span class="p-arrow">→</span>
<div class="p-node lmn-node">LMN Axon<br><span class="p-label">Peripheral nerve</span></div>
<span class="p-arrow">→</span>
<div class="p-node muscle-node">Skeletal Muscle<br><span class="p-label">Neuromuscular junction</span></div>
</div>
<p style="text-align:center; font-size:0.8rem; color:#64748b; margin-top:14px;">
Lesion <strong>above</strong> the anterior horn → <span style="color:var(--umn); font-weight:700;">UMN signs</span> |
Lesion <strong>at or below</strong> the anterior horn → <span style="color:var(--lmn); font-weight:700;">LMN signs</span>
</p>
</div>
<!-- COMPARISON TABLE -->
<div class="checker-card" style="margin-bottom:28px;">
<div class="section-title">📋 Full Comparison Table</div>
<table class="comp">
<thead>
<tr>
<th>Sign / Feature</th>
<th>UMN Lesion</th>
<th>LMN Lesion</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr><td><strong>Weakness</strong></td><td class="umn-cell">Yes</td><td class="lmn-cell">Yes</td><td>Both cause weakness — not discriminating alone</td></tr>
<tr><td><strong>Muscle tone</strong></td><td class="umn-cell">↑ Spasticity</td><td class="lmn-cell">↓ Flaccidity</td><td>Acutely, UMN may show flaccid paralysis ("spinal shock")</td></tr>
<tr><td><strong>Deep tendon reflexes</strong></td><td class="umn-cell">↑ Hyperreflexia</td><td class="lmn-cell">↓ Hyporeflexia / absent</td><td>Acutely, UMN reflexes may be reduced</td></tr>
<tr><td><strong>Babinski sign</strong></td><td class="umn-cell">Present (extensor plantar)</td><td class="lmn-cell">Absent</td><td>Most specific UMN sign</td></tr>
<tr><td><strong>Clonus</strong></td><td class="umn-cell">May be present</td><td class="lmn-cell">Absent</td><td>Sustained clonus strongly suggests UMN</td></tr>
<tr><td><strong>Muscle atrophy</strong></td><td class="umn-cell">Absent (mild disuse atrophy possible)</td><td class="lmn-cell">Present (denervation)</td><td>LMN atrophy is more rapid and prominent</td></tr>
<tr><td><strong>Fasciculations</strong></td><td class="umn-cell">Absent</td><td class="lmn-cell">Present</td><td>Spontaneous anterior horn cell firing</td></tr>
<tr><td><strong>Distribution</strong></td><td class="umn-cell">Pyramidal pattern: arm flexors > extensors; leg extensors > flexors</td><td class="lmn-cell">Follows myotome or peripheral nerve territory</td><td>Key for localization</td></tr>
<tr><td><strong>Pattern (face CN VII)</strong></td><td class="umn-cell">Lower face only (forehead spared — bilateral UMN supply)</td><td class="lmn-cell">Entire face (including forehead)</td><td>Important stroke vs Bell's palsy distinction</td></tr>
<tr><td><strong>Hoffmann's sign</strong></td><td class="umn-cell">Present</td><td class="lmn-cell">Absent</td><td>Upper limb equivalent of Babinski</td></tr>
<tr><td><strong>Coordination</strong></td><td class="umn-cell">Impaired (if cerebellar tracts also affected)</td><td class="lmn-cell">Impaired by weakness, not cerebellar</td><td></td></tr>
<tr><td><strong>Location of lesion</strong></td><td class="umn-cell">Brain, brainstem, or spinal cord (above anterior horn)</td><td class="lmn-cell">Anterior horn, nerve root, peripheral nerve, NMJ</td><td></td></tr>
</tbody>
</table>
</div>
<!-- EXAMPLES -->
<div class="two-cols">
<div class="info-card">
<h3 style="color:var(--umn);">🔵 UMN Conditions</h3>
<ul>
<li><span class="dot dot-umn"></span><div><strong>Stroke</strong> — MCA territory most common; contralateral hemiplegia</div></li>
<li><span class="dot dot-umn"></span><div><strong>Multiple Sclerosis</strong> — white matter demyelination; relapsing-remitting</div></li>
<li><span class="dot dot-umn"></span><div><strong>Spinal cord compression</strong> — bilateral UMN below lesion level</div></li>
<li><span class="dot dot-umn"></span><div><strong>Cerebral palsy</strong> — perinatal corticospinal tract injury</div></li>
<li><span class="dot dot-umn"></span><div><strong>Primary lateral sclerosis</strong> — pure UMN variant of MND</div></li>
<li><span class="dot dot-umn"></span><div><strong>Syringomyelia</strong> — UMN below syrinx level</div></li>
<li><span class="dot dot-both"></span><div><strong>ALS</strong> — both UMN + LMN signs simultaneously</div></li>
</ul>
</div>
<div class="info-card">
<h3 style="color:var(--lmn);">🔴 LMN Conditions</h3>
<ul>
<li><span class="dot dot-lmn"></span><div><strong>Bell's palsy</strong> — CN VII; complete ipsilateral facial weakness incl. forehead</div></li>
<li><span class="dot dot-lmn"></span><div><strong>Peripheral neuropathy</strong> — GBS, diabetic, toxic</div></li>
<li><span class="dot dot-lmn"></span><div><strong>Poliomyelitis</strong> — anterior horn cell destruction; no sensory loss</div></li>
<li><span class="dot dot-lmn"></span><div><strong>Radiculopathy</strong> — nerve root compression (disc herniation)</div></li>
<li><span class="dot dot-lmn"></span><div><strong>Spinal muscular atrophy (SMA)</strong> — anterior horn cell degeneration</div></li>
<li><span class="dot dot-lmn"></span><div><strong>Mononeuropathy</strong> — radial nerve palsy, carpal tunnel</div></li>
<li><span class="dot dot-lmn"></span><div><strong>Myasthenia gravis</strong> — NMJ (fatigable weakness, no atrophy/fasciculations)</div></li>
</ul>
</div>
</div>
<!-- LOCALIZATION TIP -->
<div class="checker-card">
<div class="section-title">📍 Lesion Localization Guide</div>
<table class="comp">
<thead>
<tr><th>Pattern</th><th>Likely Location</th><th>Key Features</th></tr>
</thead>
<tbody>
<tr><td>Contralateral face + arm + leg UMN</td><td>Internal capsule / corona radiata (stroke)</td><td>Contralateral hemisensory loss if posterior limb involved</td></tr>
<tr><td>Ipsilateral CN palsy + contralateral limb UMN</td><td>Brainstem (crossed syndrome)</td><td>e.g., Weber's syndrome (ipsilateral CN III + contralateral hemiplegia)</td></tr>
<tr><td>Bilateral UMN below a level</td><td>Spinal cord</td><td>Paraplegia/quadriplegia; sensory level; bladder/bowel involvement</td></tr>
<tr><td>UMN + LMN at same level</td><td>Anterior horn + corticospinal tract</td><td>Think ALS; also consider cervical myelopathy with radiculopathy</td></tr>
<tr><td>Dermatomal sensory loss + LMN in myotome</td><td>Nerve root (radiculopathy)</td><td>Disc herniation, foraminal stenosis</td></tr>
<tr><td>LMN following peripheral nerve distribution</td><td>Peripheral nerve (mononeuropathy)</td><td>Trauma, compression, entrapment</td></tr>
<tr><td>Distal > proximal LMN; stocking-glove sensory loss</td><td>Peripheral neuropathy (polyneuropathy)</td><td>Diabetes, alcohol, GBS (ascending)</td></tr>
<tr><td>Complete unilateral facial weakness (incl. forehead)</td><td>LMN CN VII (facial nerve)</td><td>Bell's palsy, Lyme disease, parotid tumor</td></tr>
<tr><td>Unilateral lower facial weakness (forehead spared)</td><td>UMN CN VII (contralateral hemisphere)</td><td>Stroke, tumor</td></tr>
</tbody>
</table>
</div>
</div>
<footer>
Clinical Decision Tool — For educational use. Based on <em>Neuroanatomy through Clinical Cases, 3rd Ed.</em> & <em>Ganong's Review of Medical Physiology</em>. Not a substitute for clinical judgment.
</footer>
<script>
const signs = [
{ id: 'spasticity', label: 'Increased tone (spasticity)', type: 'umn' },
{ id: 'hyperreflexia', label: 'Hyperreflexia (brisk DTRs)', type: 'umn' },
{ id: 'babinski', label: 'Babinski sign present', type: 'umn' },
{ id: 'clonus', label: 'Clonus', type: 'umn' },
{ id: 'hoffmann', label: "Hoffmann's sign", type: 'umn' },
{ id: 'forehead_spare', label: 'Forehead spared (facial)', type: 'umn' },
{ id: 'pyramidal', label: 'Pyramidal weakness pattern', type: 'umn' },
{ id: 'flaccid', label: 'Decreased tone (flaccidity)', type: 'lmn' },
{ id: 'hyporeflexia', label: 'Hyporeflexia / absent reflexes', type: 'lmn' },
{ id: 'atrophy', label: 'Muscle atrophy', type: 'lmn' },
{ id: 'fasciculations', label: 'Fasciculations', type: 'lmn' },
{ id: 'forehead_all', label: 'Full face weak (incl. forehead)', type: 'lmn' },
{ id: 'nerve_dist', label: 'Nerve/dermatomal distribution', type: 'lmn' },
{ id: 'weakness', label: 'Weakness (non-specific)', type: 'both' },
];
const grid = document.getElementById('signsGrid');
signs.forEach(s => {
const div = document.createElement('div');
div.className = 'sign-item';
div.id = 'item_' + s.id;
const tagClass = s.type === 'umn' ? 'tag-umn' : s.type === 'lmn' ? 'tag-lmn' : 'tag-both';
const tagLabel = s.type === 'umn' ? 'UMN' : s.type === 'lmn' ? 'LMN' : 'Both';
div.innerHTML = `
<input type="checkbox" id="chk_${s.id}">
<label for="chk_${s.id}">${s.label}</label>
<span class="sign-tag ${tagClass}">${tagLabel}</span>`;
div.querySelector('input').addEventListener('change', function() {
div.classList.remove('selected-umn','selected-lmn');
if (this.checked) {
div.classList.add(s.type === 'lmn' ? 'selected-lmn' : 'selected-umn');
}
});
grid.appendChild(div);
});
function assess() {
let umnScore = 0, lmnScore = 0;
const umnSigns = [], lmnSigns = [];
signs.forEach(s => {
const chk = document.getElementById('chk_' + s.id);
if (chk && chk.checked) {
if (s.type === 'umn') { umnScore += 2; umnSigns.push(s.label); }
else if (s.type === 'lmn') { lmnScore += 2; lmnSigns.push(s.label); }
else { umnScore += 0.5; lmnScore += 0.5; }
}
});
const resultDiv = document.getElementById('result');
const box = document.getElementById('resultBox');
const title = document.getElementById('resultTitle');
const score = document.getElementById('resultScore');
const hints = document.getElementById('resultHints');
resultDiv.style.display = 'block';
box.className = 'result-box';
if (umnScore === 0 && lmnScore === 0) {
box.classList.add('unclear');
title.innerHTML = '⬜ No discriminating signs selected';
score.textContent = 'Select clinical signs above to see an assessment.';
hints.innerHTML = '';
return;
}
let verdict, cls, icon, nextSteps, differential;
if (umnScore > 0 && lmnScore > 0 && Math.abs(umnScore - lmnScore) <= 2) {
cls = 'mixed'; icon = '🟣';
verdict = 'Mixed UMN + LMN Pattern';
nextSteps = 'Consider ALS / MND, cervical myelopathy with radiculopathy, or a multi-level lesion.';
differential = 'ALS, cervical spondylotic myelopathy, subacute combined degeneration, syringomyelia with cord expansion.';
} else if (umnScore > lmnScore) {
cls = 'umn'; icon = '🔵';
verdict = 'Likely Upper Motor Neuron (UMN) Lesion';
nextSteps = 'Localise above the anterior horn: brain (cortex, internal capsule, brainstem) or spinal cord. MRI brain ± spine.';
differential = 'Stroke, MS, spinal cord compression, cerebral palsy, tumour, TBI.';
} else {
cls = 'lmn'; icon = '🔴';
verdict = 'Likely Lower Motor Neuron (LMN) Lesion';
nextSteps = 'Localise at/below anterior horn: nerve root, plexus, peripheral nerve, NMJ, or muscle. EMG/NCS often indicated.';
differential = 'Radiculopathy, peripheral neuropathy, GBS, polio, MND (LMN variant), Bell\'s palsy.';
}
box.classList.add(cls);
title.innerHTML = `${icon} ${verdict}`;
score.innerHTML = `UMN signs: <strong>${umnScore > 0 ? umnSigns.length : 0}</strong> | LMN signs: <strong>${lmnScore > 0 ? lmnSigns.length : 0}</strong>`;
hints.innerHTML = `
<div class="hint"><strong>Next steps</strong>${nextSteps}</div>
<div class="hint"><strong>Differential diagnosis</strong>${differential}</div>`;
}
function resetAll() {
signs.forEach(s => {
const chk = document.getElementById('chk_' + s.id);
if (chk) chk.checked = false;
const item = document.getElementById('item_' + s.id);
if (item) item.classList.remove('selected-umn','selected-lmn');
});
document.getElementById('result').style.display = 'none';
}
</script>
</body>
</html>