Prepare a ppt on bibrachial MND..how it occurs in proximal nd distal...dd for the condition with clinical features on investigations

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/bibrachial-mnd-p…

Writing File

~/bibrachial-mnd-ppt/build.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Bibrachial MND - Flail Arm Syndrome";
pres.author = "Neurology";

// ─── Color Palette ────────────────────────────────────────────────────────────
const DARK_BG    = "0D1B2A";   // deep navy
const MID_BG     = "1B2E45";   // mid navy
const ACCENT1    = "E84545";   // bright red (MND awareness color)
const ACCENT2    = "F5A623";   // amber
const ACCENT3    = "4FC3F7";   // light blue
const WHITE      = "FFFFFF";
const LIGHT_GREY = "D6E4F0";
const TEXT_DARK  = "1A1A2E";

// Helper: dark-bg slide with colored left bar
function darkSlide(title, barColor) {
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  // left accent bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: barColor || ACCENT1 } });
  // title
  s.addText(title, {
    x: 0.25, y: 0.15, w: 9.5, h: 0.72,
    fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  // title underline
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 9.2, h: 0.03, fill: { color: barColor || ACCENT1 } });
  return s;
}

// Helper: light-bg slide
function lightSlide(title, barColor) {
  const s = pres.addSlide();
  s.background = { color: "F0F6FF" };
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: barColor || ACCENT1 } });
  s.addText(title, {
    x: 0.25, y: 0.15, w: 9.5, h: 0.72,
    fontSize: 26, bold: true, color: TEXT_DARK, fontFace: "Calibri", margin: 0
  });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 9.2, h: 0.03, fill: { color: barColor || ACCENT1 } });
  return s;
}

function bullet(text, indent, color, bold, size) {
  return {
    text: text,
    options: {
      bullet: indent ? { indent: indent * 18 } : true,
      breakLine: true,
      fontSize: size || 16,
      color: color || WHITE,
      bold: bold || false,
      fontFace: "Calibri"
    }
  };
}

function subbullet(text, color) {
  return bullet(text, 1, color || LIGHT_GREY, false, 14);
}

// ─── SLIDE 1: TITLE ──────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  // big red diagonal accent
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.2, h: 5.625, fill: { color: ACCENT1 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.5, w: 10, h: 1.125, fill: { color: MID_BG } });

  s.addText("BIBRACHIAL MND", {
    x: 0.4, y: 0.8, w: 9.2, h: 1.1,
    fontSize: 46, bold: true, color: WHITE, fontFace: "Calibri", align: "left", charSpacing: 3
  });
  s.addText("Flail Arm Syndrome  |  Vulpian–Bernhardt Syndrome", {
    x: 0.4, y: 1.9, w: 9.2, h: 0.55,
    fontSize: 20, bold: false, color: ACCENT3, fontFace: "Calibri", align: "left"
  });
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 2.5, w: 5, h: 0.04, fill: { color: ACCENT2 } });
  s.addText([
    { text: "Progressive Amyotrophic Brachial Diplegia", options: { breakLine: true, fontSize: 17, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: '"Man-in-a-Barrel Syndrome"', options: { breakLine: false, fontSize: 17, color: ACCENT2, fontFace: "Calibri", italic: true } }
  ], { x: 0.4, y: 2.65, w: 9, h: 0.7 });
  s.addText("A Regional Variant of Motor Neuron Disease", {
    x: 0.4, y: 4.55, w: 9.2, h: 0.45,
    fontSize: 14, color: ACCENT3, fontFace: "Calibri", italic: true
  });
}

// ─── SLIDE 2: OVERVIEW & DEFINITION ──────────────────────────────────────────
{
  const s = darkSlide("Overview & Definition", ACCENT1);
  s.addText([
    bullet("Bibrachial MND (Flail Arm Syndrome / FAS)", 0, ACCENT2, true, 17),
    bullet("A regional variant of Amyotrophic Lateral Sclerosis (ALS)", 1, LIGHT_GREY, false, 15),
    bullet("Also known as:", 0, ACCENT2, true, 17),
    bullet("Vulpian–Bernhardt Syndrome", 1, LIGHT_GREY, false, 15),
    bullet('"Man-in-a-Barrel" Syndrome', 1, LIGHT_GREY, false, 15),
    bullet("Progressive Amyotrophic Brachial Diplegia", 1, LIGHT_GREY, false, 15),
    bullet("Characterized by:", 0, ACCENT2, true, 17),
    bullet("Symmetrical atrophy and weakness of BOTH arms", 1, LIGHT_GREY, false, 15),
    bullet("Minimal lower extremity or bulbar involvement", 1, LIGHT_GREY, false, 15),
    bullet("Accounts for ~10% of all ALS presentations", 1, LIGHT_GREY, false, 15),
    bullet("Stronger male predominance than classic ALS", 1, LIGHT_GREY, false, 15),
    bullet("Better prognosis than classic ALS", 1, LIGHT_GREY, false, 15),
  ], { x: 0.25, y: 1.0, w: 9.5, h: 4.4, margin: 5 });
}

// ─── SLIDE 3: EPIDEMIOLOGY ────────────────────────────────────────────────────
{
  const s = lightSlide("Epidemiology", ACCENT1);
  // Box 1
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 2.8, h: 3.8, fill: { color: DARK_BG }, line: { color: ACCENT1, width: 2 }, rounding: 0.1 });
  s.addText("Sex", { x: 0.25, y: 1.05, w: 2.8, h: 0.45, fontSize: 15, bold: true, color: ACCENT1, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText([
    { text: "Strongly male-predominant", options: { breakLine: true, fontSize: 13, color: WHITE, fontFace: "Calibri", bold: true } },
    { text: "(more so than classic ALS)", options: { breakLine: true, fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: "\nClassic ALS M:F = 2:1", options: { breakLine: true, fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: "FAS M:F even higher", options: { breakLine: false, fontSize: 12, color: ACCENT2, fontFace: "Calibri" } },
  ], { x: 0.3, y: 1.55, w: 2.7, h: 3.1, margin: 5 });

  // Box 2
  s.addShape(pres.ShapeType.rect, { x: 3.35, y: 1.05, w: 2.9, h: 3.8, fill: { color: DARK_BG }, line: { color: ACCENT2, width: 2 }, rounding: 0.1 });
  s.addText("Age & Onset", { x: 3.35, y: 1.05, w: 2.9, h: 0.45, fontSize: 15, bold: true, color: ACCENT2, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText([
    { text: "Onset typically >45 years", options: { breakLine: true, fontSize: 13, color: WHITE, fontFace: "Calibri", bold: true } },
    { text: "\nBegins in PROXIMAL muscles of upper limb", options: { breakLine: true, fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: "\nSpreads distally to hands", options: { breakLine: true, fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: "\nLeg/bulbar involvement late or absent", options: { breakLine: false, fontSize: 12, color: ACCENT3, fontFace: "Calibri" } },
  ], { x: 3.4, y: 1.55, w: 2.8, h: 3.1, margin: 5 });

  // Box 3
  s.addShape(pres.ShapeType.rect, { x: 6.5, y: 1.05, w: 3.0, h: 3.8, fill: { color: DARK_BG }, line: { color: ACCENT3, width: 2 }, rounding: 0.1 });
  s.addText("Prognosis", { x: 6.5, y: 1.05, w: 3.0, h: 0.45, fontSize: 15, bold: true, color: ACCENT3, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText([
    { text: "Better survival than classic ALS", options: { breakLine: true, fontSize: 13, color: WHITE, fontFace: "Calibri", bold: true } },
    { text: "\nMany ultimately develop UMN signs", options: { breakLine: true, fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: "\n~10% of all ALS presentations", options: { breakLine: true, fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri" } },
    { text: "\nFlail Leg (FLS) is analogous distal LE variant", options: { breakLine: false, fontSize: 12, color: ACCENT2, fontFace: "Calibri" } },
  ], { x: 6.55, y: 1.55, w: 2.9, h: 3.1, margin: 5 });
}

// ─── SLIDE 4: PATHOPHYSIOLOGY ─────────────────────────────────────────────────
{
  const s = darkSlide("Pathophysiology: How Bibrachial MND Occurs", ACCENT2);

  // Central pathway chain
  const boxes = [
    { label: "Genetic Factors", sub: "SOD1, TDP-43, FUS/TLS, C9orf72\nAberrant RNA metabolism", color: ACCENT1 },
    { label: "Anterior Horn Cell Loss", sub: "Cervical spinal cord (C5–T1)\nDegeneration of LMNs", color: ACCENT2 },
    { label: "Corticospinal Tract\nInvolvement", sub: "UMN degeneration\n(variable, less prominent in FAS)", color: ACCENT3 },
    { label: "Muscle Denervation", sub: "Shoulder girdle → arms → hands\nProximal before distal", color: "7EC8E3" },
  ];

  boxes.forEach((b, i) => {
    const x = 0.3 + i * 2.4;
    s.addShape(pres.ShapeType.rect, { x, y: 1.05, w: 2.2, h: 1.55,
      fill: { color: b.color + "22" }, line: { color: b.color, width: 2 }, rounding: 0.1 });
    s.addText(b.label, { x, y: 1.1, w: 2.2, h: 0.52,
      fontSize: 13, bold: true, color: b.color, fontFace: "Calibri", align: "center", margin: 2 });
    s.addText(b.sub, { x, y: 1.62, w: 2.2, h: 0.9,
      fontSize: 11, color: WHITE, fontFace: "Calibri", align: "center", margin: 2 });
    if (i < boxes.length - 1) {
      s.addText("→", { x: x + 2.2, y: 1.5, w: 0.2, h: 0.5,
        fontSize: 22, bold: true, color: ACCENT2, fontFace: "Calibri", align: "center" });
    }
  });

  s.addText("Key Mechanisms", {
    x: 0.25, y: 2.75, w: 9.5, h: 0.38,
    fontSize: 15, bold: true, color: ACCENT2, fontFace: "Calibri", margin: 0
  });
  s.addText([
    bullet("Oxidative stress from mutant SOD1 → selective motor neuron death", 0, LIGHT_GREY, false, 14),
    bullet("Aberrant RNA processing (TDP-43/FUS) → toxic RNA species in motor neurons", 0, LIGHT_GREY, false, 14),
    bullet("Glutamate-mediated excitotoxicity → calcium overload → apoptosis", 0, LIGHT_GREY, false, 14),
    bullet("Mitochondrial dysfunction + neuroinflammation (microglial activation)", 0, LIGHT_GREY, false, 14),
    bullet("Preferential cervical AHC involvement explains bibrachial distribution", 0, ACCENT2, true, 14),
  ], { x: 0.25, y: 3.12, w: 9.5, h: 2.3, margin: 3 });
}

// ─── SLIDE 5: PROXIMAL vs DISTAL ─────────────────────────────────────────────
{
  const s = lightSlide("Proximal vs Distal Presentation in Bibrachial MND", ACCENT1);

  // LEFT PANEL - PROXIMAL
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 4.5, h: 4.3, fill: { color: DARK_BG }, line: { color: ACCENT1, width: 2.5 }, rounding: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 4.5, h: 0.55, fill: { color: ACCENT1 }, rounding: 0.08 });
  s.addText("PROXIMAL ONSET (Typical FAS)", { x: 0.25, y: 1.05, w: 4.5, h: 0.55,
    fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText([
    bullet("Shoulder girdle / deltoid weakness first", 0, ACCENT2, true, 13),
    subbullet("Inability to raise arms above head", WHITE),
    bullet("Periscapular wasting prominent", 0, ACCENT2, true, 13),
    subbullet("Winged scapula, wasting of supra/infraspinatus", WHITE),
    bullet("Neck flexor weakness", 0, ACCENT2, true, 13),
    subbullet("\"Dropped head\" appearance", WHITE),
    bullet("Hands relatively spared early", 0, ACCENT2, true, 13),
    subbullet("Retained grip strength initially", WHITE),
    bullet("More common presentation", 0, ACCENT2, true, 13),
    subbullet("Described in Bradley & Daroff: proximal\nbefore distal spread in flail arm", WHITE),
  ], { x: 0.35, y: 1.65, w: 4.3, h: 3.6, margin: 3 });

  // RIGHT PANEL - DISTAL
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.05, w: 4.7, h: 4.3, fill: { color: DARK_BG }, line: { color: ACCENT3, width: 2.5 }, rounding: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.05, w: 4.7, h: 0.55, fill: { color: ACCENT3 }, rounding: 0.08 });
  s.addText("DISTAL ONSET (Less Common)", { x: 5.0, y: 1.05, w: 4.7, h: 0.55,
    fontSize: 14, bold: true, color: TEXT_DARK, fontFace: "Calibri", align: "center", margin: 0 });
  s.addText([
    bullet("Intrinsic hand muscle wasting first", 0, ACCENT3, true, 13),
    subbullet("Difficulty with buttons, keys, fine motor", WHITE),
    bullet("Thenar & hypothenar wasting", 0, ACCENT3, true, 13),
    subbullet("'Split-hand' phenomenon on EDX", WHITE),
    bullet("Forearm flexors/extensors involved", 0, ACCENT3, true, 13),
    subbullet("'Claw hand' deformity", WHITE),
    bullet("Spreads proximally over time", 0, ACCENT3, true, 13),
    subbullet("Resembles classic distal ALS onset", WHITE),
    bullet("ALS usually: Distal > Proximal", 0, ACCENT2, true, 13),
    subbullet("Myotomal (root) distribution pattern", WHITE),
  ], { x: 5.1, y: 1.65, w: 4.5, h: 3.6, margin: 3 });
}

// ─── SLIDE 6: CLINICAL FEATURES ───────────────────────────────────────────────
{
  const s = darkSlide("Clinical Features", ACCENT1);

  s.addText("MOTOR (Lower + Upper Motor Neuron)", {
    x: 0.25, y: 1.0, w: 9.5, h: 0.38,
    fontSize: 15, bold: true, color: ACCENT1, fontFace: "Calibri", margin: 0
  });
  s.addText([
    bullet("Bilateral arm/shoulder weakness and wasting with fasciculations", 0, WHITE, false, 14),
    bullet("Fasciculations — complex morphology; brisk reflexes may be retained in weak limbs (key paradox)", 0, WHITE, false, 14),
    bullet("Legs strong (absent or very late leg involvement distinguishes FAS from classic ALS)", 0, LIGHT_GREY, false, 14),
    bullet("No sensory loss — pure motor syndrome", 0, ACCENT2, true, 14),
  ], { x: 0.25, y: 1.38, w: 9.5, h: 1.5, margin: 3 });

  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 2.85, w: 9.5, h: 0.03, fill: { color: ACCENT1 } });

  s.addText("BULBAR & OTHER FEATURES", {
    x: 0.25, y: 2.9, w: 9.5, h: 0.38,
    fontSize: 15, bold: true, color: ACCENT2, fontFace: "Calibri", margin: 0
  });
  s.addText([
    bullet("Bulbar involvement: minimal or absent at onset (differentiates from progressive bulbar palsy)", 0, WHITE, false, 14),
    bullet("No pain in the classical picture", 0, WHITE, false, 14),
    bullet("No cognitive decline in most (unlike FTD-ALS)", 0, LIGHT_GREY, false, 14),
    bullet("UMN signs: spasticity, hyperreflexia, Babinski — present in some, less prominent than classic ALS", 0, WHITE, false, 14),
    bullet("Respiratory muscles: affected late; vital capacity monitoring essential", 0, ACCENT2, true, 14),
  ], { x: 0.25, y: 3.28, w: 9.5, h: 2.1, margin: 3 });
}

// ─── SLIDE 7: INVESTIGATIONS ──────────────────────────────────────────────────
{
  const s = lightSlide("Investigations", ACCENT2);

  const rows = [
    ["Investigation", "Typical Finding in Bibrachial MND", "Purpose"],
    ["EMG (Needle)", "Fibrillations, +ve sharp waves, fasciculations, enlarged polyphasic MUPs in widespread distribution; NOT confined to single root/nerve", "Confirm LMN degeneration, extent"],
    ["Motor NCS", "Normal or reduced CMAP amplitude; NO conduction block or slowing (distinguishes from MMN/CIDP)", "Rule out demyelinating disorders"],
    ["Sensory NCS (SNAPs)", "NORMAL — key finding", "Rule out polyneuropathy"],
    ["MRI Cervical Spine", "Rule out cord compression/spondylosis; may show T2 signal in anterior horn cells or corticospinal tracts", "Exclude structural causes"],
    ["MRI Brain", "May show corticospinal tract T2/FLAIR changes; rule out paraneoplastic/structural", "UMN confirmation"],
    ["Serum CK", "Mildly elevated (especially early, active males)", "Baseline, exclude myopathy"],
    ["Blood: Anti-GM1 Ab", "ABSENT (elevated in MMN — key DD)", "Exclude multifocal motor neuropathy"],
    ["Blood Panel", "FBC, CMP, TFT, Vit B12, ACE, HbA1c, VDRL, HIV, serum protein electrophoresis", "Exclude metabolic/infective mimics"],
    ["Genetic Testing", "SOD1, C9orf72, TDP-43, FUS (if familial/atypical)", "Familial ALS confirmation"],
    ["CSF", "Usually normal; reserve for suspected infection/lymphoma/CIDP", "Selected cases only"],
  ];

  const colW = [2.0, 4.3, 3.3];
  const colX = [0.25, 2.27, 6.6];
  const rowH = 0.38;

  rows.forEach((row, ri) => {
    const bg = ri === 0 ? DARK_BG : (ri % 2 === 0 ? "D6E4F0" : WHITE);
    const textColor = ri === 0 ? WHITE : TEXT_DARK;
    row.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, {
        x: colX[ci], y: 1.0 + ri * rowH, w: colW[ci], h: rowH,
        fill: { color: ri === 0 ? DARK_BG : (ri % 2 === 0 ? "D6E4F0" : "EAF3FB") },
        line: { color: "AACFDE", width: 0.5 }
      });
      s.addText(cell, {
        x: colX[ci] + 0.03, y: 1.0 + ri * rowH, w: colW[ci] - 0.05, h: rowH,
        fontSize: ri === 0 ? 11 : 10, bold: ri === 0, color: textColor,
        fontFace: "Calibri", valign: "middle", margin: 2, wrap: true
      });
    });
  });

  s.addText("El Escorial / Awaji Criteria: EDX must show LMN changes in ≥3 neuraxis regions (bulbar, cervical, thoracic, lumbosacral) for Definite ALS", {
    x: 0.25, y: 5.18, w: 9.5, h: 0.35,
    fontSize: 10, italic: true, color: ACCENT1, fontFace: "Calibri"
  });
}

// ─── SLIDE 8: DIFFERENTIAL DIAGNOSIS ──────────────────────────────────────────
{
  const s = darkSlide("Differential Diagnosis", ACCENT1);

  const dds = [
    { name: "Multifocal Motor Neuropathy (MMN)", clue: "Anti-GM1 Ab +ve, conduction block on NCS, responds to IVIg — TREATABLE", color: ACCENT1 },
    { name: "CIDP", clue: "Sensory loss present, elevated CSF protein, conduction slowing/block, responds to steroids/IVIg", color: ACCENT2 },
    { name: "Brachial Neuritis (Parsonage–Turner)", clue: "Acute onset, severe pain preceding weakness, EMG: patchy denervation", color: ACCENT3 },
    { name: "Cervical Spondylotic Myelopathy", clue: "Neck pain, sensory changes, MRI: cord compression — SURGICAL", color: "A3D977" },
    { name: "Kennedy Disease (SBMA)", clue: "X-linked, perioral fasciculations, gynecomastia, androgen receptor CAG repeat expansion", color: "F4B5C0" },
    { name: "Hirayama Disease", clue: "Young males, distal arm wasting, dynamic cervical cord compression; self-limiting", color: "C8A9E0" },
    { name: "Benign Monomelic Amyotrophy", clue: "Focal, self-limiting; does NOT progress to other regions (no widespread EMG changes)", color: ACCENT2 },
    { name: "Paraneoplastic MND", clue: "Anti-Hu Ab, underlying malignancy (check chest X-ray/CT)", color: "F4B5C0" },
    { name: "Lead / Dapsone Neuropathy", clue: "Toxic motor neuropathy — pure motor, exposure history", color: ACCENT3 },
    { name: "SMA Type IV (Adult Onset)", clue: "Proximal, SMN1 mutation, AR; no UMN signs, normal SNAPs", color: "A3D977" },
  ];

  const perCol = 5;
  dds.forEach((dd, i) => {
    const col = Math.floor(i / perCol);
    const row = i % perCol;
    const x = 0.25 + col * 4.85;
    const y = 1.05 + row * 0.88;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.82,
      fill: { color: dd.color + "18" }, line: { color: dd.color, width: 1.5 }, rounding: 0.08 });
    s.addText(dd.name, { x: x + 0.08, y: y + 0.03, w: 4.44, h: 0.28,
      fontSize: 12, bold: true, color: dd.color, fontFace: "Calibri", margin: 0 });
    s.addText(dd.clue, { x: x + 0.08, y: y + 0.32, w: 4.44, h: 0.44,
      fontSize: 10, color: LIGHT_GREY, fontFace: "Calibri", margin: 0, wrap: true });
  });
}

// ─── SLIDE 9: COMPARISON TABLE ────────────────────────────────────────────────
{
  const s = lightSlide("Bibrachial MND vs Classic ALS vs MMN — Key Differentiators", ACCENT1);

  const headers = ["Feature", "Bibrachial MND (FAS)", "Classic ALS", "MMN"];
  const rows2 = [
    ["Distribution", "Bilateral arms, proximal > distal", "Distal > proximal, multi-region", "Asymmetric, distal, follows nerve"],
    ["UMN signs", "Mild/absent or late", "Prominent", "Absent"],
    ["Sensory", "Normal", "Normal", "Normal"],
    ["Anti-GM1 Ab", "Absent (<15%)", "Absent (<15%)", "Positive (50-60%)"],
    ["Conduction block", "Absent", "Absent", "Prominent"],
    ["CSF protein", "Normal", "Normal", "Normal (70%)"],
    ["Leg involvement", "Late / minimal", "Common, variable", "Can occur"],
    ["Prognosis", "Better than ALS", "5-year survival ~20%", "Good with IVIg"],
    ["Treatment", "Riluzole, supportive", "Riluzole, supportive", "IVIg (responds well)"],
  ];

  const cW = [2.4, 2.5, 2.5, 2.1];
  const cX = [0.25, 2.67, 5.2, 7.73];
  const rH = 0.44;

  [headers, ...rows2].forEach((row, ri) => {
    const isHeader = ri === 0;
    row.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, {
        x: cX[ci], y: 1.0 + ri * rH, w: cW[ci], h: rH,
        fill: { color: isHeader ? DARK_BG : (ri % 2 === 0 ? "D6E4F0" : "EAF3FB") },
        line: { color: "AACFDE", width: 0.5 }
      });
      s.addText(cell, {
        x: cX[ci] + 0.04, y: 1.0 + ri * rH, w: cW[ci] - 0.06, h: rH,
        fontSize: isHeader ? 11 : 10, bold: isHeader || ci === 0,
        color: isHeader ? WHITE : TEXT_DARK,
        fontFace: "Calibri", valign: "middle", margin: 2, wrap: true
      });
    });
  });
}

// ─── SLIDE 10: DIAGNOSTIC CRITERIA ────────────────────────────────────────────
{
  const s = darkSlide("Diagnostic Criteria (Revised El Escorial + Awaji)", ACCENT2);

  const rows3 = [
    ["Definite ALS", "UMN + LMN signs in ≥3 regions (bulbar + 2 spinal, or 3 spinal)", ACCENT1],
    ["Probable ALS", "UMN + LMN signs in 2 regions, UMN signs rostral to LMN signs", ACCENT2],
    ["Probable ALS (Lab)", "UMN + LMN in 1 region + UMN alone in another + EMG LMN evidence in ≥2 limbs", ACCENT3],
    ["Possible ALS", "UMN + LMN in 1 region; or UMN alone in ≥2 regions; or LMN rostral to UMN", "A3D977"],
    ["FAS / Bibrachial", "LMN signs restricted to bilateral upper extremities for ≥12 months before spread to other regions", ACCENT2],
  ];

  rows3.forEach((row, i) => {
    s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05 + i * 0.82, w: 2.5, h: 0.72,
      fill: { color: row[2] + "25" }, line: { color: row[2], width: 2 }, rounding: 0.08 });
    s.addText(row[0], { x: 0.3, y: 1.1 + i * 0.82, w: 2.4, h: 0.62,
      fontSize: 13, bold: true, color: row[2], fontFace: "Calibri", valign: "middle", align: "center" });
    s.addShape(pres.ShapeType.rect, { x: 3.0, y: 1.05 + i * 0.82, w: 6.7, h: 0.72,
      fill: { color: DARK_BG }, line: { color: row[2], width: 1 }, rounding: 0.08 });
    s.addText(row[1], { x: 3.05, y: 1.1 + i * 0.82, w: 6.6, h: 0.62,
      fontSize: 13, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
  });

  s.addText("Awaji Algorithm: Fasciculation potentials = acute denervation marker (equal weight to fibrillations/PSWs)", {
    x: 0.25, y: 5.15, w: 9.5, h: 0.35,
    fontSize: 11, italic: true, color: ACCENT2, fontFace: "Calibri"
  });
}

// ─── SLIDE 11: MANAGEMENT ─────────────────────────────────────────────────────
{
  const s = lightSlide("Management", ACCENT1);

  const cols = [
    { title: "Disease-Modifying", color: ACCENT1, items: [
      "Riluzole 50 mg BD — only approved drug for ALS (modest survival benefit ~3 months)",
      "Edaravone (Radicava) — IV, approved in some countries for early ALS",
      "Tofersen — antisense oligonucleotide for SOD1-ALS"
    ]},
    { title: "Symptomatic", color: ACCENT2, items: [
      "Physiotherapy — maintain function, prevent contractures",
      "Sialorrhea: hyoscine, amitriptyline, botulinum toxin",
      "Spasticity: baclofen, tizanidine",
      "Cramps: quinine, mexiletine",
      "Pain: NSAIDs, low-dose opioids, gabapentin"
    ]},
    { title: "Supportive / MDT", color: ACCENT3, items: [
      "Respiratory: NIV (BiPAP) when FVC <50% or symptomatic",
      "Nutritional: PEG if weight loss / dysphagia",
      "Communication aids: AAC devices",
      "Orthoses: wrist/hand splints, arm supports",
      "Psychological support + palliative care",
      "Genetic counseling (familial cases)"
    ]},
  ];

  cols.forEach((col, i) => {
    const x = 0.25 + i * 3.25;
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 3.15, h: 4.4,
      fill: { color: DARK_BG }, line: { color: col.color, width: 2 }, rounding: 0.1 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 3.15, h: 0.48,
      fill: { color: col.color }, rounding: 0.1 });
    s.addText(col.title, { x, y: 1.0, w: 3.15, h: 0.48,
      fontSize: 13, bold: true, color: i === 1 ? TEXT_DARK : WHITE,
      fontFace: "Calibri", align: "center", margin: 0 });
    const items = col.items.map((t, j) => ({
      text: t,
      options: { bullet: true, breakLine: j < col.items.length - 1, fontSize: 11, color: j === 0 ? col.color : LIGHT_GREY, fontFace: "Calibri", bold: j === 0 }
    }));
    s.addText(items, { x: x + 0.08, y: 1.52, w: 3.0, h: 3.8, margin: 3 });
  });
}

// ─── SLIDE 12: SUMMARY ────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.background = { color: DARK_BG };
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.2, fill: { color: ACCENT1 } });
  s.addText("KEY TAKEAWAYS", {
    x: 0.2, y: 0.15, w: 9.6, h: 0.9,
    fontSize: 32, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
  });

  const points = [
    { num: "1", text: "Bibrachial MND = ALS variant with bilateral arm weakness, minimal leg/bulbar involvement for ≥12 months", color: ACCENT1 },
    { num: "2", text: "PROXIMAL onset (shoulder/deltoid) more typical; distal onset (hands) less common — both eventually merge", color: ACCENT2 },
    { num: "3", text: "Clinical hallmark: UMN + LMN signs in arms, NORMAL sensory exam, legs strong", color: ACCENT3 },
    { num: "4", text: "Most critical DD: MMN (treatable!) — check anti-GM1 Ab and look for conduction block on NCS", color: "A3D977" },
    { num: "5", text: "Key investigations: EMG/NCS (widespread denervation), MRI spine, blood panel, anti-GM1 Ab", color: ACCENT2 },
    { num: "6", text: "Diagnosis by Revised El Escorial + Awaji criteria; better prognosis than classic ALS", color: ACCENT3 },
  ];

  points.forEach((p, i) => {
    const y = 1.3 + i * 0.7;
    s.addShape(pres.ShapeType.ellipse, { x: 0.2, y: y, w: 0.48, h: 0.48, fill: { color: p.color } });
    s.addText(p.num, { x: 0.2, y: y, w: 0.48, h: 0.48,
      fontSize: 16, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    s.addText(p.text, { x: 0.82, y: y + 0.02, w: 9.0, h: 0.44,
      fontSize: 13, color: WHITE, fontFace: "Calibri", valign: "middle" });
  });

  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: MID_BG } });
  s.addText("Sources: Bradley & Daroff's Neurology | Adams & Victor's Principles of Neurology | Localization in Clinical Neurology 8e | Frameworks for Internal Medicine", {
    x: 0.1, y: 5.36, w: 9.8, h: 0.255,
    fontSize: 8, color: "88AACC", fontFace: "Calibri", italic: true
  });
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/bibrachial-mnd-ppt/Bibrachial_MND_Flail_Arm_Syndrome.pptx" })
  .then(() => console.log("DONE"))
  .catch(e => { console.error(e); process.exit(1); });
Running Command

cd /home/daytona/workspace/bibrachial-mnd-ppt && node build.js 2>&1

Editing File

~/bibrachial-mnd-ppt/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/bibrachial-mnd-ppt/build.js'
Running Command

cd /home/daytona/workspace/bibrachial-mnd-ppt && sed -i "s/b\.color + '22'/\"1E3…

Running Command

cd /home/daytona/workspace/bibrachial-mnd-ppt && python3 -c " content = open('bu…

Running Command

ls -lh /home/daytona/workspace/bibrachial-mnd-ppt/

Your presentation is ready! Here it is:

Bibrachial MND Flail Arm Syndrome

Presentation · PPTX


What's inside - 12 slides, dark navy + red clinical theme:

SlideContent
1Title - Bibrachial MND / Vulpian-Bernhardt / Man-in-a-Barrel Syndrome
2Overview & Definition - what it is, how it fits within ALS spectrum
3Epidemiology - sex, age, onset pattern, prognosis (3-column cards)
4Pathophysiology - pathway chain (genetics → AHC loss → CS tract → muscle), key mechanisms (SOD1/TDP-43/RNA/excitotoxicity)
5Proximal vs Distal Presentation - side-by-side comparison panels
6Clinical Features - motor findings, sensory sparing, bulbar, respiratory
7Investigations table - EMG/NCS, MRI, bloods, anti-GM1, genetic testing + El Escorial note
8Differential Diagnosis - 10 conditions in card layout (MMN, CIDP, Parsonage-Turner, cervical spondylosis, Kennedy disease, Hirayama, SMA-IV, etc.)
9Comparison table - Bibrachial MND vs Classic ALS vs MMN
10El Escorial + Awaji Criteria - Definite/Probable/Possible/FAS categories
11Management - 3-column: disease-modifying (riluzole, edaravone), symptomatic, MDT/supportive
12Key Takeaways - 6 numbered points summary
Key clinical pearls captured from textbooks:
  • FAS typically starts proximal (shoulder girdle/deltoid) before spreading distally - unlike classic ALS which is distal > proximal
  • The paradox of brisk reflexes in wasted arms is a hallmark
  • Anti-GM1 antibody and conduction block absence is what separates it from MMN (the most important treatable mimic)
  • Sensory SNAPs are always normal - any sensory involvement should make you reconsider the diagnosis
This is a shared conversation. Sign in to Orris to start your own chat.