Clinical examination of sensory pathway ppt for practical use
mkdir -p /home/daytona/workspace/sensory-pathway-ppt && ls /home/daytona/workspace/
~/sensory-pathway-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Clinical Neurology";
pres.title = "Clinical Examination of Sensory Pathways";
// ─── COLOR PALETTE ────────────────────────────────────────────────────────────
const COL = {
darkNavy: "0D1B2A", // dominant background
midNavy: "1B3A5C", // secondary panels
accent: "2ECC9A", // teal-green accent (anatomy feel)
accentWarm: "E8A838", // amber for highlights / warnings
white: "FFFFFF",
lightGray: "D6E4F0",
textDark: "0D1B2A",
textMid: "2C4A6B",
subtext: "7FA8C9",
};
// ─── HELPERS ──────────────────────────────────────────────────────────────────
function addSlide(bg) {
const s = pres.addSlide();
s.background = { color: bg || COL.darkNavy };
return s;
}
function sectionTag(slide, text) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.08,
fill: { color: COL.accent },
line: { color: COL.accent },
});
slide.addText(text.toUpperCase(), {
x: 0.35, y: 0.12, w: 4, h: 0.28,
fontSize: 7, bold: true, color: COL.accent,
charSpacing: 3, margin: 0,
});
}
function slideTitle(slide, title, subtitle) {
slide.addText(title, {
x: 0.35, y: 0.48, w: 9.3, h: 0.7,
fontSize: 26, bold: true, color: COL.white, margin: 0,
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.35, y: 1.18, w: 9.3, h: 0.38,
fontSize: 13, color: COL.subtext, italic: true, margin: 0,
});
}
}
function divider(slide, y) {
slide.addShape(pres.ShapeType.rect, {
x: 0.35, y: y, w: 1.2, h: 0.04,
fill: { color: COL.accent },
line: { color: COL.accent },
});
}
function bullet(text, sub) {
const items = [{ text: " " + text, options: { bullet: { code: "25B8" }, color: COL.white, fontSize: 12.5, bold: false, breakLine: !sub } }];
if (sub) items.push({ text: "", options: { breakLine: true } });
return items;
}
function subbullet(text) {
return [{ text: " - " + text, options: { color: COL.lightGray, fontSize: 11, breakLine: true } }];
}
function labelBox(slide, label, value, x, y, w, h, accentCol) {
// background pill
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: COL.midNavy },
line: { color: accentCol || COL.accent, width: 1.5 },
rectRadius: 0.08,
});
slide.addText([
{ text: label + "\n", options: { bold: true, fontSize: 9, color: accentCol || COL.accent } },
{ text: value, options: { fontSize: 10.5, color: COL.white } },
], { x: x + 0.1, y: y + 0.08, w: w - 0.2, h: h - 0.16, valign: "top", margin: 0 });
}
function stepBox(slide, num, title, desc, x, y, w, h) {
slide.addShape(pres.ShapeType.rect, {
x, y, w: 0.36, h,
fill: { color: COL.accent },
line: { color: COL.accent },
});
slide.addText(num, {
x, y, w: 0.36, h,
fontSize: 16, bold: true, color: COL.darkNavy,
align: "center", valign: "middle", margin: 0,
});
slide.addShape(pres.ShapeType.rect, {
x: x + 0.36, y, w: w - 0.36, h,
fill: { color: COL.midNavy },
line: { color: COL.midNavy },
});
slide.addText([
{ text: title + "\n", options: { bold: true, fontSize: 12, color: COL.white } },
{ text: desc, options: { fontSize: 10.5, color: COL.lightGray } },
], { x: x + 0.46, y: y + 0.1, w: w - 0.56, h: h - 0.2, valign: "top", margin: 0 });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
// accent bar left
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.12, h: 5.625,
fill: { color: COL.accent }, line: { color: COL.accent },
});
// subtle circuit pattern (horizontal lines)
for (let i = 0; i < 5; i++) {
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: 0.4 + i * 1.0, w: 9.5, h: 0.01,
fill: { color: "1B3A5C" }, line: { color: "1B3A5C" },
});
}
s.addText("CLINICAL EXAMINATION OF", {
x: 0.35, y: 1.0, w: 9, h: 0.55,
fontSize: 18, bold: false, color: COL.subtext, charSpacing: 4, margin: 0,
});
s.addText("SENSORY PATHWAYS", {
x: 0.35, y: 1.5, w: 9, h: 1.1,
fontSize: 44, bold: true, color: COL.white, margin: 0,
});
divider(s, 2.7);
s.addText("A Practical Guide for Clinical Practice", {
x: 0.35, y: 2.85, w: 9, h: 0.4,
fontSize: 14, italic: true, color: COL.lightGray, margin: 0,
});
s.addText("Anatomy | Modalities | Technique | Localization | Patterns", {
x: 0.35, y: 3.35, w: 9, h: 0.35,
fontSize: 11, color: COL.subtext, margin: 0,
});
// badge row
const badges = ["Neurology", "Clinical Skills", "Practical Use"];
badges.forEach((b, i) => {
s.addShape(pres.ShapeType.roundRect, {
x: 0.35 + i * 1.85, y: 4.5, w: 1.65, h: 0.35,
fill: { color: COL.midNavy }, line: { color: COL.accent, width: 1 },
rectRadius: 0.12,
});
s.addText(b, {
x: 0.35 + i * 1.85, y: 4.5, w: 1.65, h: 0.35,
fontSize: 9.5, bold: true, color: COL.accent, align: "center", valign: "middle", margin: 0,
});
});
s.addText("Bradley & Daroff's Neurology | Textbook of Family Medicine | Sabiston Surgery", {
x: 0.35, y: 5.2, w: 9, h: 0.25,
fontSize: 8, color: "3C6080", italic: true, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — LEARNING OBJECTIVES
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Overview");
slideTitle(s, "Learning Objectives");
divider(s, 1.1);
const objs = [
["1", "Understand the two major sensory tracts and their anatomy"],
["2", "Identify the modalities carried by each tract"],
["3", "Perform a systematic sensory examination step by step"],
["4", "Localize a lesion based on the sensory pattern found"],
["5", "Recognize common clinical syndromes affecting sensation"],
];
objs.forEach(([n, text], i) => {
const y = 1.35 + i * 0.78;
s.addShape(pres.ShapeType.ellipse, {
x: 0.35, y, w: 0.36, h: 0.36,
fill: { color: COL.accent }, line: { color: COL.accent },
});
s.addText(n, {
x: 0.35, y, w: 0.36, h: 0.36,
fontSize: 14, bold: true, color: COL.darkNavy,
align: "center", valign: "middle", margin: 0,
});
s.addText(text, {
x: 0.85, y: y + 0.02, w: 8.8, h: 0.35,
fontSize: 13, color: COL.white, valign: "middle", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — OVERVIEW OF SENSORY SYSTEM
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Anatomy");
slideTitle(s, "The Two Major Sensory Tracts", "Sensory information ascends via distinct anatomical pathways");
divider(s, 1.15);
// Left column — Dorsal Column
s.addShape(pres.ShapeType.roundRect, {
x: 0.35, y: 1.32, w: 4.4, h: 3.85,
fill: { color: COL.midNavy }, line: { color: COL.accent, width: 2 },
rectRadius: 0.1,
});
s.addText("DORSAL COLUMN", {
x: 0.45, y: 1.42, w: 4.2, h: 0.38,
fontSize: 13, bold: true, color: COL.accent, align: "center", margin: 0,
});
s.addText("(Medial Lemniscal Pathway)", {
x: 0.45, y: 1.78, w: 4.2, h: 0.3,
fontSize: 10, color: COL.lightGray, align: "center", italic: true, margin: 0,
});
s.addText([
{ text: "Modalities:\n", options: { bold: true, color: COL.accentWarm, fontSize: 11 } },
{ text: "• Fine/discriminative touch\n• Vibration sense\n• Proprioception / joint position\n• 2-point discrimination\n• Stereognosis, graphesthesia\n\n", options: { color: COL.white, fontSize: 11 } },
{ text: "Pathway:\n", options: { bold: true, color: COL.accentWarm, fontSize: 11 } },
{ text: "• 1st neuron: ipsilateral dorsal column\n• Decussates at medulla (nucleus gracilis/cuneatus)\n• 2nd neuron: contralateral medial lemniscus\n• 3rd neuron: VPL thalamus → cortex (S1)", options: { color: COL.white, fontSize: 11 } },
], { x: 0.5, y: 2.1, w: 4.1, h: 2.9, valign: "top", margin: 0 });
// Right column — Spinothalamic
s.addShape(pres.ShapeType.roundRect, {
x: 5.25, y: 1.32, w: 4.4, h: 3.85,
fill: { color: COL.midNavy }, line: { color: COL.accentWarm, width: 2 },
rectRadius: 0.1,
});
s.addText("SPINOTHALAMIC TRACT", {
x: 5.35, y: 1.42, w: 4.2, h: 0.38,
fontSize: 13, bold: true, color: COL.accentWarm, align: "center", margin: 0,
});
s.addText("(Anterolateral Pathway)", {
x: 5.35, y: 1.78, w: 4.2, h: 0.3,
fontSize: 10, color: COL.lightGray, align: "center", italic: true, margin: 0,
});
s.addText([
{ text: "Modalities:\n", options: { bold: true, color: COL.accent, fontSize: 11 } },
{ text: "• Pain (sharp / dull)\n• Temperature (hot / cold)\n• Crude touch\n• Pressure\n\n", options: { color: COL.white, fontSize: 11 } },
{ text: "Pathway:\n", options: { bold: true, color: COL.accent, fontSize: 11 } },
{ text: "• 1st neuron: enters cord, synapses in dorsal horn\n• Decussates within 2-3 spinal levels (anterior white commissure)\n• 2nd neuron: contralateral lateral column\n• 3rd neuron: VPL thalamus → cortex (S1)", options: { color: COL.white, fontSize: 11 } },
], { x: 5.4, y: 2.1, w: 4.1, h: 2.9, valign: "top", margin: 0 });
// vs arrow
s.addText("vs", {
x: 4.75, y: 2.9, w: 0.5, h: 0.4,
fontSize: 16, bold: true, color: COL.subtext, align: "center", margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — RECEPTOR TYPES
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Anatomy");
slideTitle(s, "Sensory Receptors & Fiber Types", "Linking receptor to modality to clinical test");
divider(s, 1.15);
const data = [
["Aβ (large, myelinated)", "Meissner / Merkel / Pacinian", "Touch, vibration, pressure", "Dorsal column"],
["Aδ (small, myelinated)", "Free nerve endings", "Sharp pain, cold", "Spinothalamic"],
["C (unmyelinated)", "Free nerve endings", "Dull/burning pain, warmth", "Spinothalamic"],
["Ia / II (muscle spindle)", "Muscle spindle, Golgi tendon", "Proprioception", "Dorsal column"],
];
// header
const cols = ["Fiber Type", "Receptor", "Modality", "Tract"];
const cw = [2.4, 2.5, 2.5, 2.3];
const cx = [0.18, 2.58, 5.08, 7.58];
cols.forEach((c, i) => {
s.addShape(pres.ShapeType.rect, {
x: cx[i], y: 1.35, w: cw[i] - 0.05, h: 0.42,
fill: { color: COL.accent }, line: { color: COL.accent },
});
s.addText(c, {
x: cx[i] + 0.06, y: 1.35, w: cw[i] - 0.17, h: 0.42,
fontSize: 11, bold: true, color: COL.darkNavy, valign: "middle", margin: 0,
});
});
data.forEach((row, ri) => {
const bg = ri % 2 === 0 ? COL.midNavy : "162E48";
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, {
x: cx[ci], y: 1.77 + ri * 0.7, w: cw[ci] - 0.05, h: 0.68,
fill: { color: bg }, line: { color: bg },
});
s.addText(cell, {
x: cx[ci] + 0.06, y: 1.77 + ri * 0.7, w: cw[ci] - 0.17, h: 0.68,
fontSize: 11, color: ci === 3 ? (cell === "Dorsal column" ? COL.accent : COL.accentWarm) : COL.white,
bold: ci === 0,
valign: "middle", margin: 0,
});
});
});
s.addText("Key: Large myelinated fibers (Aβ, Ia) → fast conduction, dorsal column | Small / unmyelinated (Aδ, C) → pain & temperature, spinothalamic", {
x: 0.18, y: 4.72, w: 9.6, h: 0.55,
fontSize: 9.5, color: COL.subtext, italic: true, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — PRE-EXAMINATION SETUP
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Technique");
slideTitle(s, "Before You Begin", "Patient setup and equipment");
divider(s, 1.15);
const boxes = [
{ label: "Patient state", val: "Alert, cooperative, eyes closed during testing", col: COL.accent },
{ label: "Position", val: "Comfortable supine or sitting; exposed limbs", col: COL.accent },
{ label: "Explanation", val: "Instruct patient on what to expect before each test — reduces anxiety & false positives", col: COL.accent },
{ label: "Equipment", val: "Cotton wool · Pin / Neurotip · 128 Hz tuning fork · Coin/key (stereognosis) · Pen (graphesthesia)", col: COL.accentWarm },
{ label: "Approach", val: "Test proximal → distal, compare left vs right, compare upper vs lower limbs", col: COL.accentWarm },
{ label: "Baseline", val: "Establish normal area first, then move to abnormal zone", col: COL.accentWarm },
];
boxes.forEach((b, i) => {
const col = i < 3 ? 0 : 1;
const row = i % 3;
const x = col === 0 ? 0.35 : 5.15;
const y = 1.35 + row * 1.35;
labelBox(s, b.label, b.val, x, y, 4.6, 1.2, b.col);
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — STEP-BY-STEP EXAM (LIGHT TOUCH & PAIN)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Technique");
slideTitle(s, "Step-by-Step: Light Touch & Superficial Pain");
divider(s, 1.1);
// Light touch
s.addShape(pres.ShapeType.rect, {
x: 0.35, y: 1.25, w: 9.3, h: 0.32,
fill: { color: COL.midNavy }, line: { color: COL.midNavy },
});
s.addText("LIGHT TOUCH (Dorsal Column — Aβ fibers)", {
x: 0.45, y: 1.25, w: 9, h: 0.32,
fontSize: 11.5, bold: true, color: COL.accent, valign: "middle", margin: 0,
});
const ltSteps = [
["1", "Use a wisp of cotton or tissue"],
["2", "Touch the face, upper limb dermatomes (C5, C6, C7, C8, T1), trunk, and lower limb (L1-L5, S1)"],
["3", "Ask: \"Can you feel this?\" — compare both sides"],
["4", "Note dermatomal loss or distal-to-proximal gradient (glove/stocking pattern)"],
];
ltSteps.forEach(([n, t], i) => {
stepBox(s, n, "", t, 0.35, 1.65 + i * 0.52, 9.3, 0.48);
});
// Pain
s.addShape(pres.ShapeType.rect, {
x: 0.35, y: 3.75, w: 9.3, h: 0.32,
fill: { color: COL.midNavy }, line: { color: COL.midNavy },
});
s.addText("SUPERFICIAL PAIN (Spinothalamic — Aδ/C fibers)", {
x: 0.45, y: 3.75, w: 9, h: 0.32,
fontSize: 11.5, bold: true, color: COL.accentWarm, valign: "middle", margin: 0,
});
const ppSteps = [
["1", "Use a fresh disposable pin or Neurotip — NEVER re-use (infection risk)"],
["2", "Apply to the same dermatomal areas — ask \"sharp or dull?\""],
["3", "Alternate randomly with blunt end to test reliability"],
];
ppSteps.forEach(([n, t], i) => {
stepBox(s, n, "", t, 0.35, 4.15 + i * 0.47, 9.3, 0.43);
});
s.addText("Note: Temperature (hot/cold test tubes) uses same pathway as pain — substitute when detailed assessment needed", {
x: 0.35, y: 5.32, w: 9.3, h: 0.22,
fontSize: 9, color: COL.subtext, italic: true, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — VIBRATION & PROPRIOCEPTION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Technique");
slideTitle(s, "Vibration Sense & Proprioception", "Dorsal column function — 128 Hz tuning fork");
divider(s, 1.15);
// Left: Vibration
s.addShape(pres.ShapeType.roundRect, {
x: 0.35, y: 1.32, w: 4.55, h: 3.95,
fill: { color: COL.midNavy }, line: { color: COL.accent, width: 1.5 },
rectRadius: 0.08,
});
s.addText("Vibration Sense", {
x: 0.45, y: 1.42, w: 4.35, h: 0.38,
fontSize: 14, bold: true, color: COL.accent, align: "center", margin: 0,
});
s.addText([
{ text: "Equipment: ", options: { bold: true, color: COL.accentWarm, fontSize: 11 } },
{ text: "128 Hz tuning fork (low frequency = detects early neuropathy)\n\n", options: { color: COL.white, fontSize: 11 } },
{ text: "Technique:\n", options: { bold: true, color: COL.accentWarm, fontSize: 11 } },
{ text: "1. Strike fork, apply base to bony prominence\n2. Start distal: great toe (1st MTP joint), then thumb (DIP)\n3. Ask: \"Can you feel vibration / buzzing? Tell me when it stops\"\n4. If absent distally → move proximally (medial malleolus → knee → ASIS)\n5. Compare left vs right\n\n", options: { color: COL.white, fontSize: 11 } },
{ text: "Clinical tip: ", options: { bold: true, color: COL.accent, fontSize: 11 } },
{ text: "Myelopathy → test vibration up spinous processes to find sensory level", options: { color: COL.lightGray, fontSize: 11 } },
], { x: 0.5, y: 1.85, w: 4.25, h: 3.3, valign: "top", margin: 0 });
// Right: Proprioception
s.addShape(pres.ShapeType.roundRect, {
x: 5.1, y: 1.32, w: 4.55, h: 3.95,
fill: { color: COL.midNavy }, line: { color: "7B68EE, width: 1.5" },
rectRadius: 0.08,
});
s.addShape(pres.ShapeType.roundRect, {
x: 5.1, y: 1.32, w: 4.55, h: 3.95,
fill: { color: COL.midNavy }, line: { color: "7B68EE", width: 1.5 },
rectRadius: 0.08,
});
s.addText("Proprioception (JPS)", {
x: 5.2, y: 1.42, w: 4.35, h: 0.38,
fontSize: 14, bold: true, color: "9B8EE8", align: "center", margin: 0,
});
s.addText([
{ text: "Technique:\n", options: { bold: true, color: COL.accentWarm, fontSize: 11 } },
{ text: "1. Grasp digit on SIDES (not dorsum/plantar — avoid touch cue)\n2. Show patient \"up\" and \"down\" movements\n3. Move digit gently — even 1-2 mm should be detected\n4. Start: great toe, then thumb / fingers\n5. If impaired distally → move to ankle, then knee\n\n", options: { color: COL.white, fontSize: 11 } },
{ text: "Romberg Test (screens proprioception):\n", options: { bold: true, color: COL.accentWarm, fontSize: 11 } },
{ text: "Feet together, arms at sides. Close eyes → increased sway = positive Romberg → dorsal column dysfunction\n\n", options: { color: COL.white, fontSize: 11 } },
{ text: "Clinical tip: ", options: { bold: true, color: "9B8EE8", fontSize: 11 } },
{ text: "Sensory ataxia (unsteady gait) + positive Romberg = suspect dorsal column / posterior cord lesion", options: { color: COL.lightGray, fontSize: 11 } },
], { x: 5.25, y: 1.85, w: 4.25, h: 3.3, valign: "top", margin: 0 });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — CORTICAL SENSORY TESTS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Technique");
slideTitle(s, "Cortical (Higher) Sensory Tests", "Test only if primary sensory modalities are intact");
divider(s, 1.15);
const tests = [
{ name: "Stereognosis", how: "Place a familiar small object (coin, key) in patient's hand. Ask them to identify without looking.", path: "Requires intact proprioception + touch + cortical integration (parietal lobe)", deficit: "Astereognosis → parietal lesion" },
{ name: "Graphesthesia", how: "Draw a number or letter on the patient's palm with your fingertip. Ask them to identify it.", path: "Primary sensory + parietal association cortex", deficit: "Agraphesthesia → parietal lesion" },
{ name: "2-Point Discrimination", how: "Two-point discriminator or opened paper clip. Ask: \"One point or two?\" Normal fingertip: 2-4 mm.", path: "High-density Meissner/Merkel receptors → parietal cortex", deficit: "Impaired → peripheral neuropathy or cortical lesion" },
{ name: "Sensory Extinction", how: "Touch the same area on both sides simultaneously. Ask: \"Which side?\" (or both?)", path: "Tests cortical attention to sensory input", deficit: "Unilateral extinction → contralateral parietal lesion" },
];
tests.forEach((t, i) => {
const x = i % 2 === 0 ? 0.3 : 5.15;
const y = i < 2 ? 1.35 : 3.45;
s.addShape(pres.ShapeType.roundRect, {
x, y, w: 4.65, h: 1.85,
fill: { color: COL.midNavy }, line: { color: COL.accent, width: 1.2 },
rectRadius: 0.08,
});
s.addText(t.name, {
x: x + 0.12, y: y + 0.1, w: 4.4, h: 0.32,
fontSize: 13, bold: true, color: COL.accent, margin: 0,
});
s.addText([
{ text: "How: ", options: { bold: true, color: COL.accentWarm, fontSize: 10.5 } },
{ text: t.how + "\n", options: { color: COL.white, fontSize: 10.5 } },
{ text: "Deficit: ", options: { bold: true, color: COL.accentWarm, fontSize: 10.5 } },
{ text: t.deficit, options: { color: COL.lightGray, fontSize: 10.5 } },
], { x: x + 0.12, y: y + 0.44, w: 4.38, h: 1.3, valign: "top", margin: 0 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — SENSORY LEVEL & SYSTEMATIC DOCUMENTATION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Technique");
slideTitle(s, "Systematic Documentation", "Examination sequence & sensory level");
divider(s, 1.15);
// Dermatomal landmarks table
s.addText("Key Dermatomal Landmarks", {
x: 0.35, y: 1.25, w: 5.1, h: 0.35,
fontSize: 13, bold: true, color: COL.accent, margin: 0,
});
const dermatomes = [
["C4", "Top of shoulder"],
["C6", "Thumb / lateral forearm"],
["C7", "Middle finger"],
["C8", "Little finger / medial hand"],
["T4", "Nipple line"],
["T10", "Umbilicus"],
["L1", "Groin"],
["L3", "Medial knee"],
["L5", "Dorsum of foot / big toe"],
["S1", "Lateral foot / heel"],
];
dermatomes.forEach(([root, area], i) => {
const col = i % 2 === 0 ? COL.midNavy : "162E48";
const y = 1.65 + i * 0.35;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 5.1, h: 0.34, fill: { color: col }, line: { color: col } });
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 0.65, h: 0.34, fill: { color: COL.accent }, line: { color: COL.accent } });
s.addText(root, { x: 0.35, y, w: 0.65, h: 0.34, fontSize: 11, bold: true, color: COL.darkNavy, align: "center", valign: "middle", margin: 0 });
s.addText(area, { x: 1.05, y, w: 4.3, h: 0.34, fontSize: 11, color: COL.white, valign: "middle", margin: 0 });
});
// Right side: order of testing
s.addText("Recommended Examination Order", {
x: 5.65, y: 1.25, w: 4, h: 0.35,
fontSize: 13, bold: true, color: COL.accentWarm, margin: 0,
});
const order = [
"1. Light touch (cotton)",
"2. Superficial pain (pin)",
"3. Temperature (if pain abnormal)",
"4. Vibration (128 Hz fork)",
"5. Proprioception (JPS)",
"6. Cortical tests (if primary intact)",
"7. Romberg test",
];
order.forEach((step, i) => {
s.addShape(pres.ShapeType.rect, {
x: 5.65, y: 1.65 + i * 0.5, w: 4.0, h: 0.46,
fill: { color: i % 2 === 0 ? COL.midNavy : "162E48" }, line: { color: "162E48" },
});
s.addText(step, {
x: 5.75, y: 1.65 + i * 0.5, w: 3.85, h: 0.46,
fontSize: 11.5, color: COL.white, valign: "middle", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — SENSORY LOCALIZATION TABLE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Localization");
slideTitle(s, "Sensory Localization by Level of Lesion");
divider(s, 1.1);
const rows = [
{ level: "Cortex (parietal)", features: "Contralateral hemibody — arm > leg or leg > arm depending on homunculus region. Cortical tests impaired (stereognosis, graphesthesia, extinction).", col: "#C084FC" },
{ level: "Internal Capsule", features: "Contralateral hemibody, equally affecting face + arm + leg. Usually accompanied by motor findings (hemiparesis).", col: "#94A3B8" },
{ level: "Thalamus (VPL)", features: "Contralateral hemibody including face. All modalities affected. Sensory loss WITHOUT weakness is highly suggestive of thalamic lesion.", col: "#60A5FA" },
{ level: "Spinal Cord (complete transection)", features: "Loss of ALL sensation below the lesion level (bilaterally). Motor loss also present.", col: COL.accentWarm },
{ level: "Spinal Cord (hemisection — Brown-Séquard)", features: "Ipsilateral: loss of vibration + proprioception (dorsal column)\nContralateral: loss of pain + temperature 1-2 levels below (spinothalamic)", col: COL.accent },
{ level: "Nerve Root (radiculopathy)", features: "Dermatomal distribution. May be associated with radicular pain and specific motor/reflex signs.", col: "#34D399" },
{ level: "Peripheral Nerve (neuropathy)", features: "Glove-and-stocking distribution (length-dependent). Distal > proximal.", col: "#FB923C" },
];
rows.forEach((row, i) => {
const y = 1.25 + i * 0.58;
s.addShape(pres.ShapeType.rect, {
x: 0.15, y, w: 0.22, h: 0.53,
fill: { color: row.col.replace("#", "") }, line: { color: row.col.replace("#", "") },
});
s.addShape(pres.ShapeType.rect, {
x: 0.37, y, w: 9.48, h: 0.53,
fill: { color: i % 2 === 0 ? COL.midNavy : "162E48" }, line: { color: "162E48" },
});
s.addText(row.level, {
x: 0.47, y: y + 0.06, w: 2.3, h: 0.43,
fontSize: 10.5, bold: true, color: row.col.replace("#", ""), valign: "middle", margin: 0,
});
s.addText(row.features, {
x: 2.85, y: y + 0.03, w: 6.85, h: 0.5,
fontSize: 10, color: COL.white, valign: "middle", margin: 0,
});
});
s.addText("Source: Bradley & Daroff's Neurology in Clinical Practice — TABLE 31.1 Sensory Localization", {
x: 0.15, y: 5.3, w: 9.7, h: 0.22,
fontSize: 8, color: "3C6080", italic: true, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — BROWN-SÉQUARD SYNDROME (detailed)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Clinical Patterns");
slideTitle(s, "Brown-Séquard Syndrome", "Spinal cord hemisection — classic crossed sensory-motor dissociation");
divider(s, 1.15);
// Left: findings
s.addShape(pres.ShapeType.roundRect, {
x: 0.35, y: 1.32, w: 5.6, h: 3.9,
fill: { color: COL.midNavy }, line: { color: COL.accent, width: 1.5 },
rectRadius: 0.08,
});
s.addText("Clinical Findings (below lesion level)", {
x: 0.45, y: 1.42, w: 5.4, h: 0.35,
fontSize: 12, bold: true, color: COL.accent, margin: 0,
});
const bss = [
{ side: "IPSILATERAL", findings: ["Motor weakness (corticospinal tract)", "Loss of vibration & proprioception (dorsal column)"], col: COL.accent },
{ side: "CONTRALATERAL", findings: ["Loss of pain & temperature (spinothalamic — crosses 1-2 levels above)"], col: COL.accentWarm },
{ side: "AT THE LEVEL", findings: ["Ipsilateral LMN signs at level (flaccid weakness, areflexia)", "Band of hyperalgesia just above lesion level"], col: "9B8EE8" },
];
let yy = 1.82;
bss.forEach((b) => {
s.addShape(pres.ShapeType.rect, {
x: 0.45, y: yy, w: 1.3, h: 0.28,
fill: { color: b.col.replace("#", "") }, line: { color: b.col.replace("#", "") },
});
s.addText(b.side, {
x: 0.45, y: yy, w: 1.3, h: 0.28,
fontSize: 8.5, bold: true, color: COL.darkNavy, align: "center", valign: "middle", margin: 0,
});
b.findings.forEach((f, fi) => {
s.addText("• " + f, {
x: 1.85, y: yy + fi * 0.34, w: 4, h: 0.32,
fontSize: 11, color: COL.white, margin: 0,
});
});
yy += b.findings.length * 0.34 + 0.45;
});
s.addText("Causes: Trauma, disc herniation, MS (demyelination), spinal tumour, cord infarction", {
x: 0.45, y: 4.7, w: 5.3, h: 0.38,
fontSize: 10, color: COL.subtext, italic: true, margin: 0,
});
// Right: pathway diagram (text-based)
s.addShape(pres.ShapeType.roundRect, {
x: 6.15, y: 1.32, w: 3.5, h: 3.9,
fill: { color: "0F2540" }, line: { color: COL.subtext, width: 1 },
rectRadius: 0.08,
});
s.addText("SPINAL CORD", {
x: 6.25, y: 1.42, w: 3.3, h: 0.32,
fontSize: 11, bold: true, color: COL.subtext, align: "center", margin: 0,
});
s.addText("Cross-section at lesion", {
x: 6.25, y: 1.72, w: 3.3, h: 0.26,
fontSize: 9, color: COL.subtext, italic: true, align: "center", margin: 0,
});
// diagram - left half shaded
s.addShape(pres.ShapeType.ellipse, { x: 6.6, y: 2.1, w: 2.6, h: 1.6, fill: { color: "1B3A5C" }, line: { color: COL.subtext, width: 1 } });
s.addShape(pres.ShapeType.rect, { x: 7.9, y: 2.1, w: 1.3, h: 1.6, fill: { color: COL.midNavy }, line: { color: COL.midNavy } });
s.addText([
{ text: "Left half lesion:\n", options: { bold: true, color: COL.accent, fontSize: 10.5 } },
{ text: "• L dorsal column lost\n (vibration, JPS — L)\n• L corticospinal lost\n (weakness — L)\n• R spinothalamic lost\n (pain, temp — R)\n", options: { color: COL.white, fontSize: 10 } },
], { x: 6.25, y: 3.8, w: 3.3, h: 1.3, valign: "top", margin: 0 });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — COMMON SENSORY PATTERNS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Clinical Patterns");
slideTitle(s, "Common Sensory Loss Patterns at a Glance");
divider(s, 1.1);
const patterns = [
{ name: "Glove & Stocking", mod: "All modalities distally", site: "Peripheral neuropathy (DM, B12 def)", col: COL.accentWarm },
{ name: "Dermatomal", mod: "Pain + paresthesia in root territory", site: "Radiculopathy (disc, foraminal stenosis)", col: COL.accent },
{ name: "Dissociated (pain/temp ↓, vibration intact)", mod: "Spinothalamic only", site: "Syringomyelia, central cord syndrome", col: "#60A5FA" },
{ name: "Hemibody (face + arm + leg)", mod: "All modalities contralateral", site: "Thalamic / internal capsule stroke", col: "#C084FC" },
{ name: "Hemibody (arm > leg)", mod: "Cortical pattern", site: "MCA territory cortical infarct", col: "#94A3B8" },
{ name: "Suspended band", mod: "C fibers at lesion level, intact above/below", site: "Intramedullary cord lesion (e.g. syrinx)", col: "#34D399" },
];
patterns.forEach((p, i) => {
const x = i % 2 === 0 ? 0.3 : 5.1;
const y = 1.3 + Math.floor(i / 2) * 1.45;
s.addShape(pres.ShapeType.roundRect, {
x, y, w: 4.6, h: 1.35,
fill: { color: COL.midNavy }, line: { color: p.col, width: 1.8 },
rectRadius: 0.08,
});
s.addShape(pres.ShapeType.rect, {
x, y, w: 0.18, h: 1.35,
fill: { color: p.col }, line: { color: p.col },
});
s.addText(p.name, { x: x + 0.28, y: y + 0.08, w: 4.2, h: 0.3, fontSize: 12, bold: true, color: p.col, margin: 0 });
s.addText([
{ text: "Modalities: ", options: { bold: true, color: COL.accentWarm, fontSize: 10.5 } },
{ text: p.mod + "\n", options: { color: COL.white, fontSize: 10.5 } },
{ text: "Think of: ", options: { bold: true, color: COL.subtext, fontSize: 10.5 } },
{ text: p.site, options: { color: COL.lightGray, fontSize: 10.5 } },
], { x: x + 0.28, y: y + 0.42, w: 4.2, h: 0.85, valign: "top", margin: 0 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — SENSORY SYMPTOM TERMINOLOGY
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Terminology");
slideTitle(s, "Sensory Symptom Terminology", "Know the vocabulary for accurate documentation");
divider(s, 1.15);
const terms = [
{ term: "Hypoesthesia", def: "Decreased sensitivity to a sensory stimulus" },
{ term: "Anesthesia", def: "Complete absence of sensation" },
{ term: "Hyperesthesia", def: "Increased sensitivity to stimulation" },
{ term: "Paresthesia", def: "Spontaneous abnormal sensation (pins & needles, tingling) — no stimulus required" },
{ term: "Dysesthesia", def: "Abnormal/unpleasant sensation in response to a stimulus (e.g. pressure causing burning)" },
{ term: "Allodynia", def: "Pain produced by a normally non-painful stimulus (e.g. light touch)" },
{ term: "Hyperpathia", def: "Augmented/painful response to a stimulus, often with raised threshold" },
{ term: "Neuropathic pain", def: "Pain from damage to sensory nerve — burning, shooting, electric shock quality" },
{ term: "Sensory ataxia", def: "Incoordination due to loss of proprioception — positive Romberg, worsens with eyes closed" },
];
const half = Math.ceil(terms.length / 2);
terms.forEach((t, i) => {
const col = i < half ? 0 : 1;
const row = col === 0 ? i : i - half;
const x = col === 0 ? 0.3 : 5.05;
const y = 1.3 + row * 0.62;
s.addShape(pres.ShapeType.rect, {
x, y, w: 4.55, h: 0.58,
fill: { color: row % 2 === 0 ? COL.midNavy : "162E48" }, line: { color: "162E48" },
});
s.addShape(pres.ShapeType.rect, {
x, y, w: 0.15, h: 0.58,
fill: { color: COL.accent }, line: { color: COL.accent },
});
s.addText([
{ text: t.term + ": ", options: { bold: true, color: COL.accent, fontSize: 11 } },
{ text: t.def, options: { color: COL.white, fontSize: 10.5 } },
], { x: x + 0.22, y, w: 4.2, h: 0.58, valign: "middle", margin: 0 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — QUICK CLINICAL REFERENCE CARD
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
sectionTag(s, "Quick Reference");
slideTitle(s, "Quick Clinical Reference Card", "Summary for bedside use");
divider(s, 1.1);
// Header row
const heads = ["Test", "Tool", "Pathway", "Abnormality Suggests"];
const cw2 = [2.0, 1.5, 2.5, 3.65];
const cx2 = [0.18, 2.18, 3.68, 6.18];
heads.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x: cx2[i], y: 1.25, w: cw2[i] - 0.05, h: 0.36, fill: { color: COL.accent }, line: { color: COL.accent } });
s.addText(h, { x: cx2[i] + 0.05, y: 1.25, w: cw2[i] - 0.15, h: 0.36, fontSize: 11, bold: true, color: COL.darkNavy, valign: "middle", margin: 0 });
});
const rows2 = [
["Light Touch", "Cotton wisp", "Dorsal column (Aβ)", "Neuropathy, cortical, cord"],
["Pinprick / Pain", "Neurotip / pin", "Spinothalamic (Aδ/C)", "Spinothalamic tract, small fiber neuropathy"],
["Temperature", "Hot/cold tubes", "Spinothalamic (Aδ/C)", "Same as pain — dissociation = syrinx"],
["Vibration", "128 Hz fork", "Dorsal column (Aβ)", "B12 def, tabes dorsalis, MS, neuropathy"],
["Proprioception (JPS)", "Digit movement", "Dorsal column (Ia)", "Cord lesion, large fiber neuropathy"],
["Romberg", "Stance / eyes closed", "Dorsal column (integration)", "Posterior cord / sensory ataxia"],
["Stereognosis", "Familiar object", "Parietal cortex", "Parietal lobe lesion (astereognosis)"],
["Graphesthesia", "Pen on palm", "Parietal cortex", "Parietal lobe lesion"],
];
rows2.forEach((row, ri) => {
const bg = ri % 2 === 0 ? COL.midNavy : "162E48";
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x: cx2[ci], y: 1.65 + ri * 0.47, w: cw2[ci] - 0.05, h: 0.45, fill: { color: bg }, line: { color: bg } });
s.addText(cell, {
x: cx2[ci] + 0.05, y: 1.65 + ri * 0.47, w: cw2[ci] - 0.1, h: 0.45,
fontSize: 10, color: ci === 2 ? (cell.includes("Dorsal") ? COL.accent : COL.accentWarm) : COL.white,
bold: ci === 0,
valign: "middle", margin: 0,
});
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — SUMMARY / KEY TAKEAWAYS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(COL.darkNavy);
// accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: COL.accent }, line: { color: COL.accent } });
s.addText("KEY TAKEAWAYS", { x: 0.35, y: 0.35, w: 9, h: 0.38, fontSize: 10, bold: true, color: COL.accent, charSpacing: 4, margin: 0 });
s.addText("Sensory Examination — 5 Core Principles", { x: 0.35, y: 0.72, w: 9, h: 0.7, fontSize: 28, bold: true, color: COL.white, margin: 0 });
divider(s, 1.48);
const takes = [
["Two tracts, different decussation levels", "Dorsal columns cross in the medulla; spinothalamic crosses at cord level within 1-2 segments"],
["Always test both tracts", "Pain + temperature (spinothalamic) AND vibration + proprioception (dorsal column) — dissociation is diagnostically key"],
["Patient must be alert and cooperative", "Explain each test first; keep eyes closed; establish normal reference area before testing abnormal"],
["Localize systematically", "Pattern (dermatomal? hemibody? distal?) → Level (cortex? thalamus? cord? root? nerve?) → Cause"],
["Cortical tests require intact primary sensation", "Only test stereognosis/graphesthesia if touch and proprioception are preserved — otherwise result is uninterpretable"],
];
takes.forEach(([title, desc], i) => {
const y = 1.65 + i * 0.76;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 9.3, h: 0.7, fill: { color: COL.midNavy }, line: { color: COL.midNavy } });
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 0.06, h: 0.7, fill: { color: COL.accent }, line: { color: COL.accent } });
s.addText([
{ text: title + " — ", options: { bold: true, color: COL.accent, fontSize: 12 } },
{ text: desc, options: { color: COL.white, fontSize: 11.5 } },
], { x: 0.52, y: y + 0.1, w: 9.0, h: 0.5, valign: "middle", margin: 0 });
});
s.addText("Sources: Bradley & Daroff's Neurology in Clinical Practice · Textbook of Family Medicine 9e · Sabiston Textbook of Surgery", {
x: 0.35, y: 5.35, w: 9.3, h: 0.22,
fontSize: 8, color: "3C6080", italic: true, margin: 0,
});
}
// ── WRITE FILE ────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/sensory-pathway-ppt/Sensory_Pathway_Clinical_Examination.pptx" })
.then(() => console.log("DONE"))
.catch(e => { console.error(e); process.exit(1); });
~/sensory-pathway-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/sensory-pathway-ppt/build.js'