~/peripheral-neuropathy-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5 inches
pres.title = "Peripheral Neuropathy: Differential Diagnosis Patterns";
pres.author = "Orris Medical";
// ─── PALETTE ───────────────────────────────────────────────────────────────
const C = {
navy: "0D1F3C", // dominant dark background
teal: "00B4A6", // primary accent
tealLight: "00D4C4", // lighter teal
gold: "F4A621", // highlight / rules-in
red: "E8394A", // rules-out
white: "FFFFFF",
lightGray: "EFF3F7",
midGray: "8D9CB8",
cardBg: "162B4D", // card background on dark slides
cardLight: "F5F8FC", // card background on light slides
greenDark: "0A7A52", // rules-in header
redDark: "B22030", // rules-out header
};
// ─── HELPER: section divider slide ─────────────────────────────────────────
function addDivider(pres, label, subtitle) {
const s = pres.addSlide();
s.background = { color: C.navy };
// Left accent bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.12, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(label, {
x: 0.4, y: 2.6, w: 12.5, h: 1.2,
fontSize: 44, bold: true, color: C.white, fontFace: "Calibri"
});
if (subtitle) {
s.addText(subtitle, {
x: 0.4, y: 3.9, w: 10, h: 0.7,
fontSize: 20, color: C.teal, fontFace: "Calibri", italic: true
});
}
return s;
}
// ─── HELPER: small tag badge ────────────────────────────────────────────────
function addBadge(slide, pres, text, x, y, color) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w: 1.5, h: 0.3,
fill: { color }, line: { color }, rectRadius: 0.06
});
slide.addText(text, {
x, y, w: 1.5, h: 0.3,
fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0
});
}
// ─── SLIDE 1: TITLE ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.navy };
// Large teal bar across bottom
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 6.2, w: 13.3, h: 1.3,
fill: { color: C.teal }, line: { color: C.teal }
});
// Top accent line
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 13.3, h: 0.08,
fill: { color: C.gold }, line: { color: C.gold }
});
s.addText("PERIPHERAL NEUROPATHY", {
x: 0.6, y: 0.7, w: 12, h: 1.2,
fontSize: 48, bold: true, color: C.white, charSpacing: 3, fontFace: "Calibri"
});
s.addText("Differential Diagnosis Patterns\n& How to Rule Out Each Diagnosis", {
x: 0.6, y: 2.0, w: 10, h: 1.6,
fontSize: 26, color: C.tealLight, fontFace: "Calibri"
});
s.addText("Based on Harrison's Principles of Internal Medicine, 22nd Ed.", {
x: 0.6, y: 6.25, w: 10, h: 0.6,
fontSize: 14, color: C.navy, bold: false, fontFace: "Calibri", italic: true
});
// Small legend squares bottom right
s.addShape(pres.shapes.RECTANGLE, { x: 11.0, y: 6.3, w: 0.18, h: 0.18, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Rules In", { x: 11.25, y: 6.27, w: 1, h: 0.25, fontSize: 11, color: C.navy, bold: true });
s.addShape(pres.shapes.RECTANGLE, { x: 11.0, y: 6.6, w: 0.18, h: 0.18, fill: { color: C.red }, line: { color: C.red } });
s.addText("Rules Out", { x: 11.25, y: 6.57, w: 1, h: 0.25, fontSize: 11, color: C.navy, bold: true });
}
// ─── SLIDE 2: OVERVIEW - 3 Goals + 7 Questions ──────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.lightGray };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("The Clinical Framework", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 28, bold: true, color: C.white, fontFace: "Calibri"
});
// 3 Goals box
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.15, w: 3.8, h: 5.9,
fill: { color: C.navy }, line: { color: C.navy },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.2 }
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.15, w: 3.8, h: 0.45, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("3 GOALS", { x: 0.3, y: 1.15, w: 3.8, h: 0.45, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", charSpacing: 2 });
const goals = [
["1", "Localise the lesion"],
["2", "Identify the cause"],
["3", "Determine treatment"],
];
goals.forEach(([num, txt], i) => {
const y = 1.8 + i * 1.0;
s.addShape(pres.shapes.ELLIPSE, { x: 0.65, y: y, w: 0.45, h: 0.45, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(num, { x: 0.65, y: y, w: 0.45, h: 0.45, fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(txt, { x: 1.2, y: y, w: 2.6, h: 0.45, fontSize: 14, color: C.white, valign: "middle" });
});
// 7 Questions box
s.addShape(pres.shapes.RECTANGLE, {
x: 4.5, y: 1.15, w: 8.5, h: 5.9,
fill: { color: C.white }, line: { color: "D0D8E4", pt: 1 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.12 }
});
s.addShape(pres.shapes.RECTANGLE, { x: 4.5, y: 1.15, w: 8.5, h: 0.45, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("7 KEY HISTORY QUESTIONS", { x: 4.5, y: 1.15, w: 8.5, h: 0.45, fontSize: 14, bold: true, color: C.navy, align: "center", valign: "middle", charSpacing: 2 });
const questions = [
["Q1", "What systems are involved? (Motor / Sensory / Autonomic)"],
["Q2", "What is the distribution of weakness?"],
["Q3", "What is the nature of sensory involvement?"],
["Q4", "Is there upper motor neuron (UMN) involvement?"],
["Q5", "What is the temporal evolution? (Acute / Subacute / Chronic)"],
["Q6", "Is there evidence of a hereditary neuropathy?"],
["Q7", "Are there associated medical conditions?"],
];
questions.forEach(([q, txt], i) => {
const y = 1.75 + i * 0.72;
s.addShape(pres.shapes.RECTANGLE, { x: 4.65, y: y + 0.05, w: 0.55, h: 0.42, fill: { color: C.navy }, line: { color: C.navy } });
s.addText(q, { x: 4.65, y: y + 0.05, w: 0.55, h: 0.42, fontSize: 11, bold: true, color: C.teal, align: "center", valign: "middle", margin: 0 });
s.addText(txt, { x: 5.3, y: y, w: 7.4, h: 0.52, fontSize: 13, color: C.navy, valign: "middle" });
});
}
// ─── SLIDE 3: DIVIDER – Pattern Recognition ─────────────────────────────────
addDivider(pres, "Pattern Recognition", "10 anatomical and functional patterns that guide diagnosis");
// ─── SLIDE 4: PATTERNS 1 & 2 ────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Symmetric Polyneuropathy Patterns", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri"
});
// Pattern 1
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 6.1, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 6.1, h: 0.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("PATTERN 1 · Symmetric Proximal + Distal Weakness + Sensory Loss", {
x: 0.35, y: 1.1, w: 6.0, h: 0.5, fontSize: 11, bold: true, color: C.white, valign: "middle"
});
s.addText([
{ text: "Clinical Picture:\n", options: { bold: true, breakLine: false } },
{ text: "Weakness affects both proximal & distal muscles equally. Areflexia. Ascending paralysis (GBS). Chronic relapsing form (CIDP). Sensory loss variable.\n\n", options: { breakLine: false } },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark, breakLine: false } },
{ text: "• Symmetric proximal + distal weakness\n• Onset days–weeks (GBS) or months (CIDP)\n• Cytoalbuminous dissociation in CSF\n• Demyelinating NCS (slow velocity, prolonged latency)\n• Preceding GI/respiratory illness (GBS)\n\n", options: { breakLine: false } },
{ text: "Rules Out:\n", options: { bold: true, color: C.redDark, breakLine: false } },
{ text: "• Asymmetric or distal-only weakness → NOT GBS/CIDP\n• Length-dependent distribution → NOT GBS/CIDP\n• Normal NCS → NOT demyelinating\n• Genetic/childhood onset → NOT acquired CIDP", options: {} },
], { x: 0.45, y: 1.7, w: 5.85, h: 5.2, fontSize: 11, color: "2C3E50", valign: "top", fontFace: "Calibri" });
// Pattern 2
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.1, w: 6.1, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.1, w: 6.1, h: 0.5, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("PATTERN 2 · Symmetric Distal Sensory Loss ± Distal Weakness", {
x: 6.95, y: 1.1, w: 6.0, h: 0.5, fontSize: 11, bold: true, color: C.navy, valign: "middle"
});
s.addText([
{ text: "Clinical Picture:\n", options: { bold: true, breakLine: false } },
{ text: "Classic 'stocking-glove' pattern. Distal > proximal. Feet affected before hands (length-dependent). Insidious onset.\n\n", options: { breakLine: false } },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark, breakLine: false } },
{ text: "• Stocking-glove sensory loss\n• Ankle jerks lost first\n• Slow, progressive course\n• Diabetes / glucose intolerance on history\n• Alcohol, B12 deficiency, toxic exposure\n• Axonal NCS: reduced amplitude, preserved velocity\n\n", options: { breakLine: false } },
{ text: "Rules Out:\n", options: { bold: true, color: C.redDark, breakLine: false } },
{ text: "• Asymmetric distribution → NOT metabolic\n• Proximal > distal weakness → NOT length-dependent\n• Acute onset → NOT diabetic/toxic (consider GBS)\n• UMN signs present → NOT pure peripheral", options: {} },
], { x: 7.05, y: 1.7, w: 5.85, h: 5.2, fontSize: 11, color: "2C3E50", valign: "top", fontFace: "Calibri" });
}
// ─── SLIDE 5: PATTERNS 3 & 4 (Asymmetric) ───────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Asymmetric Neuropathy Patterns", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri"
});
// Pattern 3
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 6.1, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 6.1, h: 0.5, fill: { color: "7B3FA0" }, line: { color: "7B3FA0" } });
s.addText("PATTERN 3 · Asymmetric Distal Weakness + Sensory Loss", {
x: 0.35, y: 1.1, w: 6.0, h: 0.5, fontSize: 11, bold: true, color: C.white, valign: "middle"
});
s.addText([
{ text: "Clinical Picture:\n", options: { bold: true, breakLine: false } },
{ text: "Multiple nerves individually affected (mononeuropathy multiplex). Involvement is patchy, asymmetric, non-contiguous. Often painful.\n\n", options: { breakLine: false } },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark, breakLine: false } },
{ text: "• Non-contiguous, asymmetric nerve deficits\n• Constitutional symptoms (vasculitis, malignancy)\n• Elevated ESR, ANCA, cryoglobulins\n• Skin lesions → leprosy, vasculitis, sarcoid\n• Tick bite history → Lyme neuropathy\n• Hepatitis B/C serology positive\n\n", options: { breakLine: false } },
{ text: "Rules Out:\n", options: { bold: true, color: C.redDark, breakLine: false } },
{ text: "• Symmetric stocking-glove → NOT mononeuropathy multiplex\n• No systemic illness → vasculitis less likely\n• Slow hereditary pattern → NOT vasculitis\n• Single nerve territory → mononeuropathy, not multiplex", options: {} },
], { x: 0.45, y: 1.7, w: 5.85, h: 5.2, fontSize: 11, color: "2C3E50", valign: "top", fontFace: "Calibri" });
// Pattern 4
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.1, w: 6.1, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.1, w: 6.1, h: 0.5, fill: { color: "D4520A" }, line: { color: "D4520A" } });
s.addText("PATTERN 4 · Asymmetric Proximal + Distal Weakness + Sensory Loss", {
x: 6.95, y: 1.1, w: 6.0, h: 0.5, fontSize: 11, bold: true, color: C.white, valign: "middle"
});
s.addText([
{ text: "Clinical Picture:\n", options: { bold: true, breakLine: false } },
{ text: "Radiculopathy or plexopathy pattern. Painful, asymmetric. Common in diabetic amyotrophy (Bruns-Garland syndrome). Thigh pain + weakness.\n\n", options: { breakLine: false } },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark, breakLine: false } },
{ text: "• Proximal limb pain + weakness asymmetrically\n• Diabetes mellitus on history\n• MRI showing plexopathy / leptomeningeal enhancement\n• CSF with elevated protein + cells → carcinomatosis\n• Sarcoidosis (serum ACE elevated)\n\n", options: { breakLine: false } },
{ text: "Rules Out:\n", options: { bold: true, color: C.redDark, breakLine: false } },
{ text: "• Symmetric pattern → NOT plexopathy\n• No diabetes or malignancy → reconsider\n• Pure distal distribution → NOT plexopathy\n• Normal MRI + CSF → unlikely carcinomatosis", options: {} },
], { x: 7.05, y: 1.7, w: 5.85, h: 5.2, fontSize: 11, color: "2C3E50", valign: "top", fontFace: "Calibri" });
}
// ─── SLIDE 6: PATTERNS 5, 6 & 7 ────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Motor-Predominant & Combined System Patterns", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri"
});
const cards = [
{
x: 0.25, col: "1F7A4A", label: "PATTERN 5 · Asymmetric Distal Weakness WITHOUT Sensory Loss",
body: [
{ text: "Clinical Picture:\n", options: { bold: true } },
{ text: "Focal or multifocal motor weakness, no sensory deficit. Differential includes motor neuron disease vs. treatable motor neuropathy.\n\n" },
{ text: "Rules In (Multifocal Motor Neuropathy):\n", options: { bold: true, color: C.greenDark } },
{ text: "• Anti-GM1 antibodies (+)\n• Conduction block on NCS\n• No UMN signs\n• Responds to IVIg\n\n" },
{ text: "Rules Out ALS:\n", options: { bold: true, color: C.redDark } },
{ text: "• No conduction block → consider ALS\n• UMN signs present → ALS not MMN\n• Sensory loss → NOT pure motor neuropathy" },
]
},
{
x: 4.6, col: "2A5FA8", label: "PATTERN 6 · Sensory Loss + Distal Areflexia + UMN Signs",
body: [
{ text: "Clinical Picture:\n", options: { bold: true } },
{ text: "Combined central + peripheral disease. Spastic legs + sensory loss + absent ankle jerks. B12 deficiency most common.\n\n" },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark } },
{ text: "• Low serum B12 / elevated MMA + homocysteine\n• Low serum copper\n• HIV with myelopathy + neuropathy\n• Adrenomyeloneuropathy (VLCFA elevated)\n• MRI: posterior + lateral column signal\n\n" },
{ text: "Rules Out pure peripheral neuropathy:\n", options: { bold: true, color: C.redDark } },
{ text: "• UMN signs (hyperreflexia, Babinski) → NOT pure PN\n• Normal B12 + copper → consider HIV, AMN" },
]
},
{
x: 8.95, col: "8B2FC9", label: "PATTERN 7 · Symmetric Weakness WITHOUT Sensory Loss",
body: [
{ text: "Clinical Picture:\n", options: { bold: true } },
{ text: "Pure motor weakness, symmetric, with no sensory symptoms. Suggests anterior horn cell disease (SMA) or hereditary motor neuropathy.\n\n" },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark } },
{ text: "• Positive family history\n• SMN1 gene deletion → SMA\n• Proximal + distal = SMA\n• Distal only = distal SMA or CMT variant\n• No sensory deficit on formal testing\n\n" },
{ text: "Rules Out sensory neuropathy:\n", options: { bold: true, color: C.redDark } },
{ text: "• Any sensory loss → NOT pure motor\n• UMN signs → motor neuron disease, NOT SMA" },
]
},
];
cards.forEach(card => {
const w = 4.1;
s.addShape(pres.shapes.RECTANGLE, { x: card.x, y: 1.1, w, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: card.x, y: 1.1, w, h: 0.5, fill: { color: card.col }, line: { color: card.col } });
s.addText(card.label, { x: card.x + 0.05, y: 1.1, w: w - 0.1, h: 0.5, fontSize: 9.5, bold: true, color: C.white, valign: "middle" });
s.addText(card.body, { x: card.x + 0.12, y: 1.68, w: w - 0.2, h: 5.25, fontSize: 10.5, color: "2C3E50", valign: "top" });
});
}
// ─── SLIDE 7: PATTERNS 9 & 10 ───────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Sensory Neuronopathy & Autonomic Patterns", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri"
});
// Pattern 9
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 6.1, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 6.1, h: 0.5, fill: { color: "1A7090" }, line: { color: "1A7090" } });
s.addText("PATTERN 9 · Asymmetric Proprioceptive Loss WITHOUT Weakness", {
x: 0.35, y: 1.1, w: 6.0, h: 0.5, fontSize: 11, bold: true, color: C.white, valign: "middle"
});
s.addText([
{ text: "Clinical Picture:\n", options: { bold: true } },
{ text: "Sensory ataxia, pseudoathetosis. Proprioception and vibration severely impaired. Arms may be equally or more affected than legs (non-length-dependent). Positive Romberg.\n\n" },
{ text: "Rules In (Sensory Neuronopathy / Ganglionopathy):\n", options: { bold: true, color: C.greenDark } },
{ text: "• Arms ≥ legs involvement\n• Anti-Hu antibodies → paraneoplastic (lung cancer)\n• Sjögren's: anti-Ro/La, dry eyes/mouth\n• Cisplatin chemotherapy history\n• CANVAS: cerebellar ataxia + vestibular loss\n• B6 toxicity (>200 mg/day)\n\n" },
{ text: "Rules Out:\n", options: { bold: true, color: C.redDark } },
{ text: "• Symmetric stocking-glove → NOT ganglionopathy\n• Distal > proximal loss → length-dependent, NOT sensory neuronopathy\n• Normal anti-Hu, no cancer → paraneoplastic less likely\n• No Sjögren's features → reconsider cause" },
], { x: 0.45, y: 1.7, w: 5.85, h: 5.2, fontSize: 11, color: "2C3E50", valign: "top" });
// Pattern 10
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.1, w: 6.1, h: 5.95, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.1, w: 6.1, h: 0.5, fill: { color: "C9501A" }, line: { color: "C9501A" } });
s.addText("PATTERN 10 · Prominent Autonomic Features", {
x: 6.95, y: 1.1, w: 6.0, h: 0.5, fontSize: 11, bold: true, color: C.white, valign: "middle"
});
s.addText([
{ text: "Clinical Picture:\n", options: { bold: true } },
{ text: "Orthostatic hypotension, anhidrosis, erectile dysfunction, gastroparesis, bladder dysfunction, cardiac arrhythmia. Distal sensory loss may be present.\n\n" },
{ text: "Rules In:\n", options: { bold: true, color: C.greenDark } },
{ text: "• Orthostatic hypotension WITHOUT compensatory tachycardia\n• Diabetes mellitus on history (most common)\n• Congo red staining on biopsy → amyloid\n• Porphyria: urine porphyrins elevated\n• Vincristine / chemotherapy history\n• Hereditary sensory-autonomic neuropathy (HSAN) if childhood onset\n\n" },
{ text: "Rules Out:\n", options: { bold: true, color: C.redDark } },
{ text: "• No diabetes + no amyloid → look for porphyria, GBS, vincristine\n• Only postural symptoms without sensory/motor → consider primary dysautonomia (not neuropathy)\n• Normal sweat tests + normal BP → NOT significant autonomic neuropathy" },
], { x: 7.05, y: 1.7, w: 5.85, h: 5.2, fontSize: 11, color: "2C3E50", valign: "top" });
}
// ─── SLIDE 8: DIVIDER – Specific Diagnoses ──────────────────────────────────
addDivider(pres, "Specific Diagnoses", "Key features, ruling in, and ruling out each condition");
// ─── SLIDE 9: GBS ────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.15, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("GUILLAIN-BARRÉ SYNDROME (GBS)", {
x: 0.4, y: 0.25, w: 12, h: 0.7,
fontSize: 28, bold: true, color: C.teal, fontFace: "Calibri", charSpacing: 1
});
s.addText("Acute Inflammatory Demyelinating Polyneuropathy", {
x: 0.4, y: 0.95, w: 10, h: 0.4,
fontSize: 16, color: C.white, italic: true
});
// Three columns
const cols = [
{
x: 0.4, title: "RULE IN", color: C.teal,
items: [
"Ascending flaccid paralysis (days to 4 weeks)",
"Preceding GI or respiratory illness (1-4 weeks prior)",
"Areflexia — globally absent DTRs",
"Cytoalbuminous dissociation in CSF",
"Demyelinating NCS: prolonged latency, slow velocity",
"Bilateral facial weakness (facial diplegia)",
"Autonomic instability (tachycardia, BP lability)",
"Albuminocytologic dissociation: protein up, cells normal",
]
},
{
x: 4.55, title: "RULE OUT", color: C.red,
items: [
"Asymmetric or purely focal weakness",
"Normal CSF protein (early; repeat at 1 week)",
"Fever + CSF pleocytosis → meningitis/encephalitis",
"Persistent hyperreflexia → NOT GBS",
"No preceding illness → consider toxic, metabolic",
"Bladder/bowel symptoms at onset → myelopathy first",
"Gradual onset > 8 weeks → CIDP, not GBS",
"Pure sensory without motor → NOT classic GBS",
]
},
{
x: 8.7, title: "KEY TESTS", color: C.gold,
items: [
"CSF: albumin-cytologic dissociation",
"NCS/EMG: demyelinating or axonal pattern",
"Anti-ganglioside antibodies (anti-GM1, anti-GQ1b)",
"Anti-GQ1b → Miller-Fisher variant",
"MRI spine (to exclude cord compression)",
"Respiratory function: FVC — ICU if <20 mL/kg",
"Autonomic monitoring: ECG, BP",
"Anti-Campylobacter antibodies",
]
},
];
cols.forEach(col => {
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.45, w: 3.9, h: 5.7, fill: { color: C.cardBg }, line: { color: col.color, pt: 1.5 } });
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.45, w: 3.9, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
s.addText(col.title, { x: col.x, y: 1.45, w: 3.9, h: 0.42, fontSize: 13, bold: true, color: col.color === C.gold ? C.navy : C.white, align: "center", valign: "middle", charSpacing: 2, margin: 0 });
const bullets = col.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < col.items.length - 1, fontSize: 11, color: C.white }
}));
s.addText(bullets, { x: col.x + 0.12, y: 1.95, w: 3.7, h: 5.1, valign: "top", fontFace: "Calibri" });
});
}
// ─── SLIDE 10: CIDP ──────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.15, h: 7.5, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("CHRONIC INFLAMMATORY DEMYELINATING POLYNEUROPATHY (CIDP)", {
x: 0.4, y: 0.25, w: 12.5, h: 0.7,
fontSize: 24, bold: true, color: C.gold, fontFace: "Calibri"
});
s.addText("Chronic acquired demyelinating neuropathy — progresses >8 weeks, often relapsing", {
x: 0.4, y: 0.95, w: 11, h: 0.4,
fontSize: 15, color: C.white, italic: true
});
const cols = [
{
x: 0.4, title: "RULE IN", color: C.teal,
items: [
"Symmetric proximal + distal weakness >8 weeks",
"Sensory loss with reduced reflexes",
"Relapsing-remitting or chronic progressive course",
"Elevated CSF protein (no pleocytosis)",
"Markedly slow NCS: demyelinating features",
"Responds to IVIg, corticosteroids, plasmapheresis",
"CIDP may be associated with diabetes or paraprotein",
"Young to middle-aged adults; also paediatric",
]
},
{
x: 4.55, title: "RULE OUT", color: C.red,
items: [
"Onset + peak <4 weeks → GBS, not CIDP",
"Axonal NCS → not primary demyelinating",
"Strong family history → hereditary CMT, not CIDP",
"Positive genetic test (PMP22 duplication) → CMT",
"No response to immunotherapy → reconsider",
"Concurrent paraprotein → POEMS or anti-MAG",
"Pure motor, no sensory → MMN not CIDP",
"Only autonomic features → autonomic neuropathy",
]
},
{
x: 8.7, title: "KEY TESTS", color: C.gold,
items: [
"NCS/EMG: prolonged distal latency, conduction block",
"CSF: raised protein, normal cell count",
"Serum protein electrophoresis (paraprotein?)",
"Anti-MAG antibodies if IgM paraprotein",
"POEMS screen: VEGF, bone survey",
"Nerve biopsy (onion-bulb formation) if uncertain",
"Genetic panel for hereditary demyelinating",
"IVIg trial — response confirms diagnosis",
]
},
];
cols.forEach(col => {
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.45, w: 3.9, h: 5.7, fill: { color: C.cardBg }, line: { color: col.color, pt: 1.5 } });
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.45, w: 3.9, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
s.addText(col.title, { x: col.x, y: 1.45, w: 3.9, h: 0.42, fontSize: 13, bold: true, color: col.color === C.gold ? C.navy : C.white, align: "center", valign: "middle", charSpacing: 2, margin: 0 });
const bullets = col.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < col.items.length - 1, fontSize: 11, color: C.white }
}));
s.addText(bullets, { x: col.x + 0.12, y: 1.95, w: 3.7, h: 5.1, valign: "top" });
});
}
// ─── SLIDE 11: DIABETIC NEUROPATHY ──────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: "0A6B3A" }, line: { color: "0A6B3A" } });
s.addText("DIABETIC PERIPHERAL NEUROPATHY", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri"
});
// Summary bar
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 12.7, h: 0.5, fill: { color: "E8F5EE" }, line: { color: "A8D8BB", pt: 1 } });
s.addText("Most common cause of peripheral neuropathy worldwide. Length-dependent, distal, axonal. Associated with small-fiber involvement early.", {
x: 0.5, y: 1.1, w: 12.3, h: 0.5, fontSize: 12, italic: true, color: "0A6B3A", valign: "middle"
});
// Three column cards
const cols = [
{
x: 0.3, color: "0A6B3A", title: "RULE IN",
items: [
"Known DM or impaired fasting glucose",
"Stocking-glove pattern, feet >> hands",
"Burning feet worse at night (small fiber)",
"Absent ankle jerks",
"Autonomic features: impotence, gastroparesis, orthostasis",
"Axonal NCS: low amplitude, normal velocity",
"Trophic changes: ulcers, Charcot joint",
"HbA1c >7% consistently",
]
},
{
x: 4.65, color: C.red, title: "RULE OUT",
items: [
"Normal blood glucose/HbA1c → other aetiology",
"Asymmetric distribution → vasculitis, mononeuropathy multiplex",
"Acute/subacute onset → NOT typical diabetic",
"Proximal > distal weakness → consider diabetic amyotrophy (Pattern 4)",
"Demyelinating NCS → CIDP, not DM",
"B12 or thyroid deficiency found → correct these first",
"Alcohol >14 units/week → alcoholic neuropathy",
"Relevant drug history (chemotherapy, INH)",
]
},
{
x: 9.0, color: C.gold, title: "KEY TESTS",
items: [
"Fasting glucose + HbA1c",
"OGTT if fasting normal (glucose intolerance)",
"NCS/EMG: axonal sensorimotor",
"Serum B12, folate, TSH",
"Skin punch biopsy: reduced IENFD (small fiber)",
"Quantitative sudomotor axon reflex test (QSART)",
"Ankle-brachial index (peripheral arterial disease)",
"Urine microalbumin (concurrent nephropathy)",
]
},
];
cols.forEach(col => {
const w = 4.1;
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 5.5, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
s.addText(col.title, { x: col.x, y: 1.7, w, h: 0.42, fontSize: 13, bold: true, color: col.color === C.gold ? C.navy : C.white, align: "center", valign: "middle", charSpacing: 2, margin: 0 });
const bullets = col.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < col.items.length - 1, fontSize: 11, color: "2C3E50" }
}));
s.addText(bullets, { x: col.x + 0.12, y: 2.2, w: w - 0.2, h: 4.85, valign: "top" });
});
}
// ─── SLIDE 12: VASCULITIC NEUROPATHY ────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: "8B1A2A" }, line: { color: "8B1A2A" } });
s.addText("VASCULITIC NEUROPATHY (Mononeuropathy Multiplex)", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 12.7, h: 0.5, fill: { color: "FCECED" }, line: { color: "F4B0B5", pt: 1 } });
s.addText("Nerve ischaemia from inflammation of vasa nervorum. Classic presentation: painful, asymmetric, stepwise multi-nerve involvement.", {
x: 0.5, y: 1.1, w: 12.3, h: 0.5, fontSize: 12, italic: true, color: "8B1A2A", valign: "middle"
});
const cols = [
{
x: 0.3, color: "8B1A2A", title: "RULE IN",
items: [
"Asymmetric, painful, stepwise nerve deficits",
"Constitutional: fever, weight loss, malaise",
"Elevated ESR, CRP",
"ANCA positive (p-ANCA, c-ANCA)",
"Cryoglobulins + hepatitis C positive",
"Skin: purpura, livedo reticularis, ulcers",
"Nerve biopsy: perivascular inflammation + axonal loss",
"Rheumatoid arthritis / SLE on history",
]
},
{
x: 4.65, color: C.red, title: "RULE OUT",
items: [
"Symmetric stocking-glove → NOT vasculitis",
"Normal ESR, CRP, ANCA → vasculitis less likely",
"No systemic illness → consider DM or leprosy",
"Demyelinating NCS → NOT vasculitic (axonal)",
"Childhood onset + family history → hereditary",
"Single nerve territory only → compressive mononeuropathy",
"No constitutional symptoms → low probability",
"Responds to B12/glucose control → metabolic first",
]
},
{
x: 9.0, color: C.gold, title: "KEY TESTS",
items: [
"ESR, CRP, CBC",
"ANCA (anti-PR3 + anti-MPO)",
"Cryoglobulins + hepatitis B/C serology",
"ANA, anti-dsDNA, rheumatoid factor",
"Nerve + muscle biopsy (gold standard)",
"NCS: multifocal axonal involvement",
"CT chest/abdomen (lymphoma, carcinoma)",
"Sural nerve biopsy: epineurial vessel wall thickening",
]
},
];
cols.forEach(col => {
const w = 4.1;
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 5.5, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
s.addText(col.title, { x: col.x, y: 1.7, w, h: 0.42, fontSize: 13, bold: true, color: col.color === C.gold ? C.navy : C.white, align: "center", valign: "middle", charSpacing: 2, margin: 0 });
const bullets = col.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < col.items.length - 1, fontSize: 11, color: "2C3E50" }
}));
s.addText(bullets, { x: col.x + 0.12, y: 2.2, w: w - 0.2, h: 4.85, valign: "top" });
});
}
// ─── SLIDE 13: CMT / HEREDITARY ─────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: "3A1FA8" }, line: { color: "3A1FA8" } });
s.addText("CHARCOT-MARIE-TOOTH DISEASE (Hereditary Motor and Sensory Neuropathy)", {
x: 0.4, y: 0.1, w: 12.5, h: 0.8,
fontSize: 22, bold: true, color: C.white
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 12.7, h: 0.5, fill: { color: "EDEAFC" }, line: { color: "A89FE8", pt: 1 } });
s.addText("Most common hereditary neuropathy. Slowly progressive. Key clue: significant signs with few symptoms (patients have adapted since childhood).", {
x: 0.5, y: 1.1, w: 12.3, h: 0.5, fontSize: 12, italic: true, color: "3A1FA8", valign: "middle"
});
const cols = [
{
x: 0.3, color: "3A1FA8", title: "RULE IN",
items: [
"Family history of neuropathy (multigenerational)",
"Childhood/adolescent onset",
"Pes cavus (high-arched feet), hammer toes",
"Scoliosis",
"Distal > proximal wasting ('inverted champagne bottle' legs)",
"Lack of sensory symptoms despite sensory signs",
"Demyelinating (CMT1) or axonal (CMT2) NCS",
"PMP22 duplication (CMT1A) on genetics",
]
},
{
x: 4.65, color: C.red, title: "RULE OUT",
items: [
"No family history → acquired neuropathy first",
"Acute/subacute onset → GBS, toxic",
"Age >50 first presentation → less likely CMT",
"Inflammatory markers elevated → vasculitis",
"Responds to IVIg → CIDP (not CMT)",
"Relapsing course → CIDP, porphyria",
"Severe sensory symptoms dominate → acquired",
"Normal genetics testing → does not exclude all types",
]
},
{
x: 9.0, color: C.gold, title: "KEY TESTS",
items: [
"NCS/EMG: slowed velocity <38 m/s (CMT1)",
"Genetic panel: PMP22, MFN2, GJB1, MPZ",
"Family neurological examination",
"Electrophysiology of parents/siblings",
"Nerve biopsy: onion-bulb formation (CMT1)",
"X-ray feet: pes cavus confirmation",
"Spine X-ray if scoliosis suspected",
"Genetic counselling recommended",
]
},
];
cols.forEach(col => {
const w = 4.1;
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 5.5, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
s.addText(col.title, { x: col.x, y: 1.7, w, h: 0.42, fontSize: 13, bold: true, color: col.color === C.gold ? C.navy : C.white, align: "center", valign: "middle", charSpacing: 2, margin: 0 });
const bullets = col.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < col.items.length - 1, fontSize: 11, color: "2C3E50" }
}));
s.addText(bullets, { x: col.x + 0.12, y: 2.2, w: w - 0.2, h: 4.85, valign: "top" });
});
}
// ─── SLIDE 14: B12 / COMBINED SYSTEM DEGENERATION ────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: "2A7A6A" }, line: { color: "2A7A6A" } });
s.addText("VITAMIN B12 DEFICIENCY — Combined System Degeneration", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.1, w: 12.7, h: 0.5, fill: { color: "E8F5F2" }, line: { color: "9ACFC5", pt: 1 } });
s.addText("Pattern 6: Peripheral neuropathy + UMN signs = combined system degeneration. Must distinguish from pure peripheral or pure CNS disease.", {
x: 0.5, y: 1.1, w: 12.3, h: 0.5, fontSize: 12, italic: true, color: "2A7A6A", valign: "middle"
});
const cols = [
{
x: 0.3, color: "2A7A6A", title: "RULE IN",
items: [
"Symmetric distal sensory loss + absent ankle jerks",
"UMN signs: brisk knee jerks, Babinski positive",
"Subacute combined degeneration of cord (MRI)",
"Macrocytic anaemia (MCV >100)",
"Low serum B12 <200 pg/mL",
"Elevated serum MMA + homocysteine",
"Veganism, pernicious anaemia, gastric bypass",
"Glossitis, angular stomatitis (B12 deficiency signs)",
]
},
{
x: 4.65, color: C.red, title: "RULE OUT",
items: [
"Normal B12 → consider copper, HIV, AMN",
"Pure peripheral signs, no UMN → not combined system",
"Normal MMA + homocysteine → functional B12 sufficient",
"No macrocytic anaemia → B12 less likely (but possible)",
"Axonal NCS with no UMN → simple polyneuropathy",
"Only sensory neuronopathy pattern → paraneoplastic?",
"Normal MRI cord → lower cord involvement not present",
"Responds to glucose control → DM neuropathy, not B12",
]
},
{
x: 9.0, color: C.gold, title: "KEY TESTS",
items: [
"Serum B12 (low sensitivity; use MMA + Hcy)",
"Serum methylmalonic acid (MMA)",
"Serum total homocysteine",
"Serum copper + ceruloplasmin",
"MRI spine: T2 hyperintensity posterior columns",
"NCS: axonal sensorimotor neuropathy",
"Anti-intrinsic factor antibodies (pernicious anaemia)",
"VLCFA (very long-chain fatty acids) if AMN suspected",
]
},
];
cols.forEach(col => {
const w = 4.1;
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 5.5, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: col.x, y: 1.7, w, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
s.addText(col.title, { x: col.x, y: 1.7, w, h: 0.42, fontSize: 13, bold: true, color: col.color === C.gold ? C.navy : C.white, align: "center", valign: "middle", charSpacing: 2, margin: 0 });
const bullets = col.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < col.items.length - 1, fontSize: 11, color: "2C3E50" }
}));
s.addText(bullets, { x: col.x + 0.12, y: 2.2, w: w - 0.2, h: 4.85, valign: "top" });
});
}
// ─── SLIDE 15: MASTER DIFFERENTIAL TABLE ────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.lightGray };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.9, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Master Differential: Feature Comparison", {
x: 0.4, y: 0.08, w: 12, h: 0.74,
fontSize: 24, bold: true, color: C.white
});
const H = { fill: { color: C.navy }, color: C.white, bold: true, align: "center" };
const rows = [
[
{ text: "Diagnosis", options: { ...H, fill: { color: C.navy } } },
{ text: "Onset", options: { ...H } },
{ text: "Pattern", options: { ...H } },
{ text: "Key Feature to RULE IN", options: { ...H, fill: { color: "0A6B3A" } } },
{ text: "Key Feature to RULE OUT", options: { ...H, fill: { color: "8B1A2A" } } },
],
["GBS", "Acute (days–4w)", "Sym prox+distal motor", "Ascending paralysis + cytoalbuminous dissociation", "Gradual >8w, asymmetric, normal CSF"],
["CIDP", "Chronic (>8w)", "Sym prox+distal", "Demyelinating NCS + IVIg response", "Genetic family history, onset <4w"],
["Diabetic Polyneuropathy", "Gradual", "Distal symmetric", "Known DM, stocking-glove, HbA1c elevated", "Asymmetric, acute, demyelinating NCS"],
["Vasculitic", "Subacute, stepwise", "Asymmetric multiplex", "Constitutional symptoms, elevated ESR/ANCA", "Symmetric, no systemic illness"],
["CMT (Hereditary)", "Childhood", "Distal motor+sensory", "Pes cavus, family history, signs > symptoms", "Acute onset, no family history, responds to treatment"],
["B12 Deficiency", "Subacute", "Distal + UMN", "Brisk knees + absent ankles + low B12/MMA", "No UMN signs, normal MMA+homocysteine"],
["Sensory Neuronopathy", "Variable", "Asymmetric, non-length-dep", "Arms >= legs, anti-Hu, Sjögren's features", "Stocking-glove symmetric pattern"],
["Leprous Neuropathy", "Chronic", "Asymmetric + nerve thickening", "Enlarged nerves, hypopigmented skin patches", "Temperate climate, no skin lesions"],
["Toxic/Drug-induced", "Subacute", "Distal symmetric axonal", "Chemotherapy/isoniazid/alcohol exposure", "No toxic history, demyelinating features"],
];
const colW = [2.4, 1.35, 1.9, 3.5, 3.5];
const tableRows = rows.map((row, ri) => {
if (ri === 0) return row;
return row.map((cell, ci) => {
const fillColor = ri % 2 === 0 ? "FFFFFF" : "F3F7FB";
const textColor = ci === 3 ? "0A4A2A" : ci === 4 ? "6A0A14" : "1A2A3A";
return { text: cell, options: { fill: { color: fillColor }, color: textColor, fontSize: 10, valign: "middle", margin: 3 } };
});
});
s.addTable(tableRows, {
x: 0.15, y: 0.98, w: 13.0, colW,
border: { pt: 0.5, color: "C8D4E4" },
rowH: 0.53,
});
}
// ─── SLIDE 16: SMALL-FIBER vs LARGE-FIBER ────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: "4A2070" }, line: { color: "4A2070" } });
s.addText("Small-Fiber vs Large-Fiber Neuropathy — Critical Distinction", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 24, bold: true, color: C.white
});
// Two boxes
[
{
x: 0.3, title: "SMALL-FIBER NEUROPATHY", color: "E84060",
body: [
{ text: "Fibres involved: C (unmyelinated) + A-delta (small myelinated)\n\n", options: { bold: true } },
{ text: "Symptoms:\n", options: { bold: true } },
{ text: "Burning, stabbing, dysaesthetic pain. Allodynia. Worse at night. Loss of pain + temperature sensation.\n\n" },
{ text: "Key Exam Findings:\n", options: { bold: true } },
{ text: "Normal strength. Normal reflexes. Normal vibration + proprioception. Pinprick + temperature impaired.\n\n" },
{ text: "NCS: NORMAL\n", options: { bold: true, color: "E84060" } },
{ text: "(large-fiber tests only — NCS misses small fiber disease)\n\n" },
{ text: "Diagnoses to consider:\n", options: { bold: true } },
{ text: "Diabetes / glucose intolerance (most common). Amyloidosis. Fabry disease. Idiopathic (50%). HIV. Sarcoidosis.\n\n" },
{ text: "Confirmatory test:\n", options: { bold: true } },
{ text: "Skin punch biopsy — reduced intra-epidermal nerve fiber density (IENFD). QSART (autonomic)." },
]
},
{
x: 6.9, title: "LARGE-FIBER NEUROPATHY", color: "2A70A8",
body: [
{ text: "Fibres involved: A-alpha/A-beta (large myelinated)\n\n", options: { bold: true } },
{ text: "Symptoms:\n", options: { bold: true } },
{ text: "Numbness, imbalance, gait ataxia. Positive Romberg. May have weakness. Less pain.\n\n" },
{ text: "Key Exam Findings:\n", options: { bold: true } },
{ text: "Reduced vibration. Impaired proprioception. Absent ankle jerks. Positive Romberg. Sensory ataxia.\n\n" },
{ text: "NCS: ABNORMAL\n", options: { bold: true, color: "2A70A8" } },
{ text: "(reduced SNAP amplitudes; slowed velocity if demyelinating)\n\n" },
{ text: "Diagnoses to consider:\n", options: { bold: true } },
{ text: "B12 deficiency. CIDP. GBS. CMT. Paraneoplastic sensory neuronopathy. Diabetes (advanced). Toxic (cisplatin, taxanes).\n\n" },
{ text: "Confirmatory test:\n", options: { bold: true } },
{ text: "NCS (SNAP + CMAP amplitude and velocity). Nerve biopsy if needed." },
]
},
].forEach(card => {
s.addShape(pres.shapes.RECTANGLE, { x: card.x, y: 1.1, w: 6.1, h: 6.1, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: card.x, y: 1.1, w: 6.1, h: 0.48, fill: { color: card.color }, line: { color: card.color } });
s.addText(card.title, { x: card.x + 0.05, y: 1.1, w: 6.0, h: 0.48, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", charSpacing: 2 });
s.addText(card.body, { x: card.x + 0.18, y: 1.65, w: 5.75, h: 5.45, fontSize: 11.5, color: "2C3E50", valign: "top" });
});
}
// ─── SLIDE 17: TEMPORAL EVOLUTION TABLE ──────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.15, h: 7.5, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Temporal Evolution as a Diagnostic Filter", {
x: 0.4, y: 0.2, w: 12, h: 0.7,
fontSize: 28, bold: true, color: C.white
});
const rows2 = [
[
{ text: "Timeframe", options: { fill: { color: C.teal }, color: C.navy, bold: true, align: "center" } },
{ text: "Duration", options: { fill: { color: C.teal }, color: C.navy, bold: true, align: "center" } },
{ text: "Diagnoses to Consider", options: { fill: { color: C.teal }, color: C.navy, bold: true, align: "center" } },
{ text: "Diagnoses Ruled Out", options: { fill: { color: C.teal }, color: C.navy, bold: true, align: "center" } },
],
[
{ text: "ACUTE", options: { fill: { color: "1A2D4A" }, color: C.gold, bold: true, align: "center" } },
{ text: "Days to 4 weeks", options: { fill: { color: "1A2D4A" }, color: C.white, align: "center" } },
{ text: "GBS, vasculitis, porphyria, diphtheria, ischaemia, thallium toxicity, acute compression", options: { fill: { color: "1A2D4A" }, color: C.white } },
{ text: "CIDP, CMT, diabetic polyneuropathy, alcoholic neuropathy", options: { fill: { color: "1A2D4A" }, color: "F4A0A8" } },
],
[
{ text: "SUBACUTE", options: { fill: { color: "162541" }, color: C.teal, bold: true, align: "center" } },
{ text: "4 to 8 weeks", options: { fill: { color: "162541" }, color: C.white, align: "center" } },
{ text: "Most toxins, drug-induced, nutritional deficiency, uraemia, diabetic plexopathy, neoplasm-related", options: { fill: { color: "162541" }, color: C.white } },
{ text: "GBS (too long), CMT, pure metabolic polyneuropathy", options: { fill: { color: "162541" }, color: "F4A0A8" } },
],
[
{ text: "CHRONIC", options: { fill: { color: "1A2D4A" }, color: C.gold, bold: true, align: "center" } },
{ text: "Months to years", options: { fill: { color: "1A2D4A" }, color: C.white, align: "center" } },
{ text: "CIDP, diabetic polyneuropathy, CMT, alcohol, hypothyroid, B12 deficiency, paraprotein neuropathy", options: { fill: { color: "1A2D4A" }, color: C.white } },
{ text: "GBS (unless very atypical), acute toxic, acute vasculitis", options: { fill: { color: "1A2D4A" }, color: "F4A0A8" } },
],
[
{ text: "RELAPSING", options: { fill: { color: "162541" }, color: C.teal, bold: true, align: "center" } },
{ text: "Episodic worsening", options: { fill: { color: "162541" }, color: C.white, align: "center" } },
{ text: "CIDP, porphyria, Refsum disease, HIV, GBS (rare relapse), hereditary neuropathy with pressure palsy (HNPP)", options: { fill: { color: "162541" }, color: C.white } },
{ text: "GBS first episode, simple metabolic/toxic neuropathy (those progress, not relapse)", options: { fill: { color: "162541" }, color: "F4A0A8" } },
],
];
s.addTable(rows2, {
x: 0.3, y: 1.05, w: 12.75, colW: [1.5, 1.5, 4.9, 4.85],
border: { pt: 0.5, color: "2A4A6A" },
rowH: 1.1,
});
}
// ─── SLIDE 18: INVESTIGATION ALGORITHM ──────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.white };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("Investigation Strategy — Tier-Based Approach", {
x: 0.4, y: 0.1, w: 12, h: 0.8,
fontSize: 26, bold: true, color: C.white
});
const tiers = [
{
label: "TIER 1\nAll Patients", color: C.teal, x: 0.25, y: 1.15, w: 3.9,
items: [
"Fasting glucose + HbA1c",
"Serum B12 + folate",
"TSH (thyroid function)",
"Full blood count + ESR/CRP",
"Serum urea, creatinine, electrolytes",
"Liver function tests",
"Serum protein electrophoresis",
"NCS and EMG (electrophysiology)",
]
},
{
label: "TIER 2\nIf Tier 1 Negative", color: C.gold, x: 4.55, y: 1.15, w: 3.9,
items: [
"Methylmalonic acid + homocysteine",
"Serum copper + ceruloplasmin",
"OGTT (if fasting glucose normal)",
"ANA, ANCA, anti-dsDNA, RF",
"Cryoglobulins + hepatitis B/C",
"HIV serology",
"Anti-Hu, anti-Ro (paraneoplastic, Sjögren's)",
"VDRL / Lyme serology (if exposure)",
]
},
{
label: "TIER 3\nSpecialist Tests", color: "8B1A2A", x: 8.85, y: 1.15, w: 4.2,
items: [
"Skin punch biopsy (IENFD — small fiber)",
"Nerve biopsy (vasculitis, amyloid, CMT)",
"Autonomic testing (QSART, tilt table)",
"MRI spine + brain",
"CSF analysis (protein, cells, cytology)",
"Genetic panel (PMP22, MFN2, etc.)",
"VGCC / GM1 antibodies",
"Urine porphyrins (porphyria screen)",
]
},
];
tiers.forEach(tier => {
s.addShape(pres.shapes.RECTANGLE, { x: tier.x, y: tier.y, w: tier.w, h: 6.1, fill: { color: C.cardLight }, line: { color: "C8D4E4", pt: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x: tier.x, y: tier.y, w: tier.w, h: 0.72, fill: { color: tier.color }, line: { color: tier.color } });
s.addText(tier.label, { x: tier.x + 0.05, y: tier.y, w: tier.w - 0.1, h: 0.72, fontSize: 14, bold: true, color: tier.color === C.gold ? C.navy : C.white, align: "center", valign: "middle" });
const bullets = tier.items.map((item, idx) => ({
text: item,
options: { bullet: true, breakLine: idx < tier.items.length - 1, fontSize: 12, color: "1A2A3A" }
}));
s.addText(bullets, { x: tier.x + 0.15, y: tier.y + 0.82, w: tier.w - 0.25, h: 5.2, valign: "top" });
});
}
// ─── SLIDE 19: FINAL SUMMARY / TAKE-HOME ─────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.08, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.42, w: 13.3, h: 0.08, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Take-Home Summary", {
x: 0.5, y: 0.2, w: 12, h: 0.75,
fontSize: 32, bold: true, color: C.teal, charSpacing: 1
});
const points = [
["Pattern first", "Localise the lesion before investigating — Is it symmetric or asymmetric? Distal or proximal? Motor, sensory, or both?"],
["Temporal clue", "Acute = GBS/vasculitis. Subacute = toxic/nutritional. Chronic = DM/CMT/CIDP. Relapsing = CIDP/porphyria."],
["Small vs large fiber", "Normal NCS does NOT exclude neuropathy — small-fiber disease needs skin biopsy (IENFD)."],
["UMN alert", "Brisk reflexes + sensory loss = combined system degeneration — check B12, copper, HIV, MRI spine."],
["Hereditary clue", "Pes cavus + family history + signs > symptoms + childhood onset = hereditary neuropathy, check genetics."],
["Treat the treatable", "GBS/CIDP (IVIg), vasculitis (steroids/cyclophosphamide), B12 deficiency (replacement) — diagnose early."],
["Half are idiopathic", "~50% of sensory polyneuropathies have no aetiology found despite full workup (CSPN) — diagnosis of exclusion."],
];
points.forEach(([bold, txt], i) => {
const y = 1.1 + i * 0.84;
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: y, w: 0.08, h: 0.55, fill: { color: C.teal }, line: { color: C.teal } });
s.addText([
{ text: bold + ": ", options: { bold: true, color: C.gold } },
{ text: txt, options: { color: C.white } }
], { x: 0.55, y: y, w: 12.4, h: 0.55, fontSize: 13, valign: "middle" });
});
s.addText("Source: Harrison's Principles of Internal Medicine 22E | Textbook of Family Medicine 9E", {
x: 0.5, y: 7.1, w: 12, h: 0.3,
fontSize: 10, color: C.midGray, italic: true
});
}
// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/peripheral-neuropathy-pptx/Peripheral_Neuropathy_DDx.pptx" })
.then(() => console.log("DONE: file written"))
.catch(e => { console.error("ERROR:", e.message); process.exit(1); });