make a ppt on hand functions and patterns of grasp prehension using pedretti book of occupational therapy and trombly book

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Searching Images

patterns of grasp prehension hand function occupational therapy

Searching the Web

hand function patterns of grasp prehension Pedretti Trombly occupational therapy classification

Searching Images

cylindrical grasp spherical grasp hook grasp types hand therapy

Searching Images

lateral pinch tip pinch palmar pinch prehension hand

Reading Web Page

https://www.myotspot.com/5-types-of-grasp-patterns/

Running Command

mkdir -p /home/daytona/workspace/hand-functions-ppt && ls /home/daytona/workspace/hand-functions-ppt/

Writing File

~/hand-functions-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Occupational Therapy";
pres.title = "Hand Functions and Patterns of Grasp & Prehension";

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:    "1A2B4A",  // dominant dark
  teal:    "1B6CA8",  // accent blue
  gold:    "E8A020",  // warm accent
  light:   "EFF4FA",  // slide bg
  white:   "FFFFFF",
  text:    "1A2B4A",
  subtext: "3A5070",
  gray:    "8099B0",
  green:   "2A8C5E",
  red:     "C0392B",
};

// ─── HELPER: Fetch images ─────────────────────────────────────────────────────
function fetchImages(urls) {
  try {
    const result = execSync(
      `node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
      { timeout: 30000 }
    ).toString();
    return JSON.parse(result);
  } catch (e) {
    console.error("Image fetch error:", e.message);
    return urls.map(() => ({ base64: null, error: e.message }));
  }
}

// Pre-fetch all images
const imageUrls = [
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4541c904f300a56284177f73d78d50e28de70c63c8ec5bdf3a5501d66d69fba8.jpg",  // power + precision + non-grasp
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ff9a727e35a7c755696a8d759b416527bfa3b1c543f34f157de72204f723fc22.jpg",  // 6-panel grasp grid
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_71f36ca9746f6d3aea2ae1026f51582b15ce16c24cf6fd19688656b8ae26ad14.jpg",  // sphere grasp tennis ball
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c275dc8a74e2d34595773ec1886892bc9b97ba7d17d3dbed151845f44d2c91fd.jpg",  // 6-panel: pinch, cyl, lumbrical
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a1fac7cfa3fd601e63625d924dd5ccfebd0e221917ea7a543550eec63619691a.jpg",  // tip/palmar/key pinch
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c244e111e17592236ae0b47315f116a80e4c9b9e9eac186a844d27d63e927ef2.jpg",  // hook grip child
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_30519c2614bcfc6a4699c2ddae2b407ef56d7ceb42e29af783d279eacebe81dc.jpg",  // lateral pinch plate
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7898b2e09fcc93ff0f079c745211e090d4c451b575c95a0936360cab19586aea.jpg",  // prehension patterns grid
];

console.log("Fetching images...");
const imgs = fetchImages(imageUrls);
console.log("Images fetched:", imgs.map((i,idx) => `${idx}: ${i.error ? 'ERROR' : 'OK'}`));

function imgData(idx) {
  return imgs[idx] && !imgs[idx].error ? imgs[idx].base64 : null;
}

// ─── SLIDE HELPER FUNCTIONS ───────────────────────────────────────────────────

function addSlideHeader(slide, title, subtitle, opts = {}) {
  // Top accent bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 0.08,
    fill: { color: C.gold },
    line: { color: C.gold }
  });
  // Left side accent bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0.08, w: 0.12, h: 5.545,
    fill: { color: C.teal },
    line: { color: C.teal }
  });
  // Title bg
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0.08, w: 10, h: 0.75,
    fill: { color: C.navy },
    line: { color: C.navy }
  });
  slide.addText(title, {
    x: 0.25, y: 0.1, w: 9.5, h: 0.7,
    fontSize: opts.titleSize || 22,
    bold: true,
    color: C.white,
    fontFace: "Calibri",
    valign: "middle",
    margin: 0,
  });
  if (subtitle) {
    slide.addShape(pres.ShapeType.rect, {
      x: 0, y: 0.83, w: 10, h: 0.28,
      fill: { color: C.teal },
      line: { color: C.teal }
    });
    slide.addText(subtitle, {
      x: 0.25, y: 0.84, w: 9.5, h: 0.26,
      fontSize: 11,
      color: C.white,
      fontFace: "Calibri",
      italic: true,
      valign: "middle",
      margin: 0,
    });
  }
}

function addSlideFooter(slide, source) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 5.45, w: 10, h: 0.175,
    fill: { color: C.navy },
    line: { color: C.navy }
  });
  slide.addText(source, {
    x: 0.2, y: 5.45, w: 9.6, h: 0.175,
    fontSize: 7.5,
    color: "AABBD0",
    fontFace: "Calibri",
    italic: true,
    valign: "middle",
    margin: 0,
  });
}

function contentCard(slide, x, y, w, h, title, titleColor, bodyLines) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h,
    fill: { color: C.white },
    line: { color: C.teal, width: 1.2 },
    rectRadius: 0.08,
  });
  // Card header
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h: 0.32,
    fill: { color: titleColor || C.teal },
    line: { color: titleColor || C.teal },
    rectRadius: 0.08,
  });
  slide.addText(title, {
    x: x + 0.1, y: y + 0.01, w: w - 0.2, h: 0.3,
    fontSize: 10.5,
    bold: true,
    color: C.white,
    fontFace: "Calibri",
    valign: "middle",
    margin: 0,
  });
  const bullets = bodyLines.map((line, i) => ({
    text: line,
    options: { bullet: true, fontSize: 9, color: C.text, fontFace: "Calibri", breakLine: i < bodyLines.length - 1 }
  }));
  slide.addText(bullets, {
    x: x + 0.08, y: y + 0.34, w: w - 0.16, h: h - 0.38,
    valign: "top",
    margin: [2, 2, 2, 8],
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  // Full background gradient effect
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "1B3A6B" }, line: { color: "1B3A6B" } });

  // Gold accent top bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.15, fill: { color: C.gold }, line: { color: C.gold } });
  // Gold accent bottom bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.475, w: 10, h: 0.15, fill: { color: C.gold }, line: { color: C.gold } });

  // Decorative teal diagonal block
  s.addShape(pres.ShapeType.rect, { x: 7.2, y: 0.15, w: 2.8, h: 5.325, fill: { color: C.teal }, line: { color: C.teal } });

  // Image on right panel
  const img0 = imgData(0);
  if (img0) {
    s.addImage({ data: img0, x: 7.25, y: 0.25, w: 2.7, h: 3.5 });
  }
  const img2 = imgData(2);
  if (img2) {
    s.addImage({ data: img2, x: 7.25, y: 3.85, w: 2.7, h: 1.6 });
  }

  // Main title
  s.addText("Hand Functions &", {
    x: 0.35, y: 1.0, w: 6.7, h: 0.95,
    fontSize: 38, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", margin: 0
  });
  s.addText("Patterns of Grasp", {
    x: 0.35, y: 1.85, w: 6.7, h: 0.95,
    fontSize: 38, bold: true, color: C.gold,
    fontFace: "Calibri", valign: "middle", margin: 0
  });
  s.addText("& Prehension", {
    x: 0.35, y: 2.7, w: 6.7, h: 0.8,
    fontSize: 32, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", margin: 0
  });

  // Subtitle line
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.55, w: 5.5, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });

  s.addText("Based on Pedretti's Occupational Therapy & Trombly's Occupational Therapy for Physical Dysfunction", {
    x: 0.35, y: 3.65, w: 6.6, h: 0.55,
    fontSize: 10.5, color: "A8C4E0",
    fontFace: "Calibri", italic: true, valign: "top", margin: 0
  });

  s.addText("Occupational Therapy  |  Hand Rehabilitation", {
    x: 0.35, y: 4.35, w: 6.6, h: 0.4,
    fontSize: 10, color: "7AAED0",
    fontFace: "Calibri", valign: "middle", margin: 0
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / OUTLINE
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Overview", "Structure of this Presentation");
  addSlideFooter(s, "Pedretti's OT (8th ed.) | Trombly's OT for Physical Dysfunction (6th ed.)");

  const topics = [
    ["01", "Anatomy Basis of Hand Function", C.navy],
    ["02", "Components of Hand Function", C.teal],
    ["03", "Prehension — Definition & Importance", C.green],
    ["04", "Power Grasp Patterns", C.navy],
    ["05", "Precision Pinch Patterns", C.teal],
    ["06", "Non-Prehensile Hand Functions", C.green],
    ["07", "Muscle Control & Nerve Innervation", "7B3F8E"],
    ["08", "Assessment of Hand Function", C.red],
    ["09", "Clinical Applications in OT", C.navy],
  ];

  topics.forEach((t, i) => {
    const col = i < 5 ? 0 : 1;
    const row = i < 5 ? i : i - 5;
    const x = col === 0 ? 0.25 : 5.2;
    const y = 1.3 + row * 0.73;
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.7, h: 0.58,
      fill: { color: C.white },
      line: { color: t[2], width: 1.5 },
      rectRadius: 0.08
    });
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 0.45, h: 0.58,
      fill: { color: t[2] },
      line: { color: t[2] }
    });
    s.addText(t[0], {
      x: x, y, w: 0.45, h: 0.58,
      fontSize: 14, bold: true, color: C.white,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0
    });
    s.addText(t[1], {
      x: x + 0.52, y: y + 0.05, w: 4.1, h: 0.48,
      fontSize: 11, color: C.text,
      fontFace: "Calibri", valign: "middle", margin: 0
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — ANATOMICAL BASIS
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Anatomical Basis of Hand Function", "The structural foundation enabling prehension");
  addSlideFooter(s, "Trombly: 'The hand is the principal effector of occupational performance.' | Pedretti's OT 8th ed., Chapter on Hand");

  // Left column — text content
  const sections = [
    { title: "Bony Architecture", color: C.navy, lines: [
      "27 bones: 8 carpal, 5 metacarpal, 14 phalanges",
      "Arches: longitudinal, proximal & distal transverse",
      "Arches maintain concave palm for object adaptation",
    ]},
    { title: "Joints", color: C.teal, lines: [
      "CMC joint of thumb — saddle, enables opposition",
      "MCP joints — flexion, extension, abduction, adduction",
      "PIP & DIP joints — hinge joints, fine precision",
    ]},
    { title: "Muscle Groups", color: C.green, lines: [
      "Extrinsic: FDP, FDS (flexors); EDC, EI, EDM (extensors)",
      "Intrinsic: lumbricals, interossei, thenar, hypothenar",
      "Intrinsics critical for precision and fine motor tasks",
    ]},
    { title: "Nerve Supply", color: "7B3F8E", lines: [
      "Median: thenar eminence, lateral 3½ fingers (sensation)",
      "Ulnar: intrinsic muscles, medial 1½ fingers",
      "Radial: wrist & finger extension",
    ]},
  ];

  sections.forEach((sec, i) => {
    const y = 1.3 + i * 1.02;
    contentCard(s, 0.2, y, 5.4, 0.97, sec.title, sec.color, sec.lines);
  });

  // Right — image
  const img7 = imgData(7);
  if (img7) {
    s.addImage({ data: img7, x: 5.8, y: 1.2, w: 3.9, h: 3.85 });
  }
  s.addText("Hand prehension & grasping patterns", {
    x: 5.8, y: 5.05, w: 3.9, h: 0.3,
    fontSize: 8, color: C.gray, italic: true, align: "center",
    fontFace: "Calibri", margin: 0
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — COMPONENTS OF HAND FUNCTION
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Components of Hand Function", "Pedretti & Trombly Framework");
  addSlideFooter(s, "Pedretti's Occupational Therapy 8th ed. | Trombly: Occupational Therapy for Physical Dysfunction 6th ed.");

  // Central diagram boxes
  const components = [
    { label: "Reach", desc: "Moving the hand toward an object using shoulder, elbow & wrist", color: C.navy, x: 0.2, y: 1.3 },
    { label: "Grasp", desc: "Taking hold of an object — power or precision pattern selected based on task", color: C.teal, x: 3.45, y: 1.3 },
    { label: "Carry", desc: "Transporting object from one location to another while maintaining grasp", color: C.green, x: 6.7, y: 1.3 },
    { label: "Voluntary Release", desc: "Controlled opening of hand to place object precisely", color: "7B3F8E", x: 0.2, y: 3.0 },
    { label: "In-Hand Manipulation", desc: "Repositioning objects within the hand (translation, rotation, shift)", color: C.gold, x: 3.45, y: 3.0 },
    { label: "Bilateral Integration", desc: "Coordinated use of both hands together for complex tasks", color: C.red, x: 6.7, y: 3.0 },
  ];

  components.forEach(c => {
    s.addShape(pres.ShapeType.roundRect, {
      x: c.x, y: c.y, w: 3.0, h: 1.5,
      fill: { color: c.color },
      line: { color: c.color },
      rectRadius: 0.12
    });
    s.addText(c.label, {
      x: c.x + 0.1, y: c.y + 0.08, w: 2.8, h: 0.45,
      fontSize: 15, bold: true, color: C.white,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0
    });
    s.addShape(pres.ShapeType.rect, {
      x: c.x + 0.1, y: c.y + 0.52, w: 2.8, h: 0.02,
      fill: { color: "FFFFFF40" }, line: { color: "FFFFFF50" }
    });
    s.addText(c.desc, {
      x: c.x + 0.1, y: c.y + 0.6, w: 2.8, h: 0.82,
      fontSize: 9.5, color: "E8F0FB",
      fontFace: "Calibri", align: "center", valign: "top", margin: 2
    });
  });

  s.addText("According to Trombly, these components form the foundation of all occupational performance requiring hand use.", {
    x: 0.2, y: 4.65, w: 9.6, h: 0.55,
    fontSize: 10.5, color: C.teal, italic: true,
    fontFace: "Calibri", align: "center", valign: "middle",
    margin: 0
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — PREHENSION DEFINED
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Prehension — Definition & Classification", "The act of grasping or seizing objects");
  addSlideFooter(s, "Pedretti's OT 8th ed. | Trombly's OT for Physical Dysfunction 6th ed. | Napier (1956) classification");

  // Definition box
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.25, w: 9.6, h: 0.82,
    fill: { color: C.navy }, line: { color: C.gold, width: 2 }, rectRadius: 0.1
  });
  s.addText([
    { text: "Prehension ", options: { bold: true, color: C.gold, fontSize: 13 }},
    { text: "— the application of directed forces to an object by the hand for the purpose of performing a task. It involves the coordinated use of thumb, fingers, and palm.", options: { color: C.white, fontSize: 12 }}
  ], { x: 0.35, y: 1.3, w: 9.3, h: 0.72, valign: "middle", fontFace: "Calibri", margin: 4 });

  // Two column classification
  // Left: Napier
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 2.2, w: 4.65, h: 3.0,
    fill: { color: C.white }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.1
  });
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 2.2, w: 4.65, h: 0.38,
    fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1
  });
  s.addText("Napier's Classification (1956)", {
    x: 0.3, y: 2.22, w: 4.45, h: 0.34,
    fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  const napierItems = [
    { text: "POWER GRASP", style: { bold: true, color: C.navy, fontSize: 10.5 } },
    { text: "Object held between partly flexed fingers and palm; thumb adducts to lock the grip.", style: { color: C.text, fontSize: 9.5 } },
    { text: "   •  Cylindrical grasp\n   •  Spherical grasp\n   •  Hook grasp\n   •  Lumbrical grasp", style: { color: C.subtext, fontSize: 9.5 } },
    { text: "PRECISION GRASP", style: { bold: true, color: C.navy, fontSize: 10.5 } },
    { text: "Object held between tips or pads of thumb and fingers; palm not involved.", style: { color: C.text, fontSize: 9.5 } },
    { text: "   •  Tip pinch\n   •  Palmar (3-jaw chuck) pinch\n   •  Lateral (key) pinch", style: { color: C.subtext, fontSize: 9.5 } },
  ];
  let ny = 2.65;
  napierItems.forEach(item => {
    s.addText(item.text, { x: 0.32, y: ny, w: 4.4, h: 0.38, ...item.style, fontFace: "Calibri", valign: "top", margin: 0 });
    ny += item.text.split('\n').length * 0.27 + 0.04;
  });

  // Right: Exner & Bonder extension
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.15, y: 2.2, w: 4.65, h: 3.0,
    fill: { color: C.white }, line: { color: C.green, width: 1.5 }, rectRadius: 0.1
  });
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.15, y: 2.2, w: 4.65, h: 0.38,
    fill: { color: C.green }, line: { color: C.green }, rectRadius: 0.1
  });
  s.addText("Pedretti's Expanded Classification", {
    x: 5.25, y: 2.22, w: 4.45, h: 0.34,
    fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  const pedrItems = [
    ["Power Grasps", "Require strength; object stabilized against palm", C.navy],
    ["Precision Grasps", "Require dexterity; fingertip/pad contact", C.teal],
    ["Non-Prehensile", "Hand movements without object grasp (pushing, hooking)", C.green],
    ["Bimanual Patterns", "Both hands working in complementary roles", "7B3F8E"],
  ];
  pedrItems.forEach((item, i) => {
    const py = 2.68 + i * 0.61;
    s.addShape(pres.ShapeType.rect, {
      x: 5.22, y: py + 0.02, w: 0.06, h: 0.3,
      fill: { color: item[2] }, line: { color: item[2] }
    });
    s.addText(item[0], {
      x: 5.38, y: py, w: 4.3, h: 0.28,
      fontSize: 10, bold: true, color: item[2], fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(item[1], {
      x: 5.38, y: py + 0.28, w: 4.3, h: 0.28,
      fontSize: 9, color: C.subtext, fontFace: "Calibri", valign: "top", margin: 0
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — POWER GRASP OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Power Grasp Patterns", "Force application with whole-hand involvement");
  addSlideFooter(s, "Pedretti's Occupational Therapy 8th ed., Pendleton & Schultz-Krohn | Trombly's OT for Physical Dysfunction 6th ed.");

  // Image left
  const img1 = imgData(1);
  if (img1) {
    s.addImage({ data: img1, x: 0.18, y: 1.2, w: 4.2, h: 3.3 });
    s.addText("Six key grasp patterns used in ADL assessment", {
      x: 0.18, y: 4.5, w: 4.2, h: 0.25,
      fontSize: 7.5, color: C.gray, italic: true, align: "center", fontFace: "Calibri", margin: 0
    });
  }

  // Right — power grasp cards
  const powerGrasps = [
    { name: "Cylindrical Grasp", color: C.navy, desc: "Fingers flex around cylindrical object; thumb opposes. Most common static power grasp. ADL: holding a cup, jar, hammer handle." },
    { name: "Spherical Grasp", color: C.teal, desc: "Similar to cylindrical but 4th–5th digits more extended to accommodate round object. ADL: holding a ball, apple, door knob." },
    { name: "Hook Grasp", color: C.green, desc: "MCP extended, IPs flexed; thumb uninvolved. Provides sustained grip without fatigue. ADL: carrying a briefcase or grocery bag." },
    { name: "Lumbrical (Plate) Grasp", color: "7B3F8E", desc: "MCPs flexed ~75°, IPs extended (intrinsic-plus). Used to carry flat objects. ADL: holding a plate, tray, or book." },
  ];

  powerGrasps.forEach((g, i) => {
    const y = 1.2 + i * 1.02;
    s.addShape(pres.ShapeType.roundRect, {
      x: 4.55, y, w: 5.2, h: 0.93,
      fill: { color: C.white }, line: { color: g.color, width: 1.5 }, rectRadius: 0.08
    });
    s.addShape(pres.ShapeType.rect, {
      x: 4.55, y, w: 1.45, h: 0.93,
      fill: { color: g.color }, line: { color: g.color }
    });
    s.addText(g.name, {
      x: 4.58, y: y + 0.05, w: 1.38, h: 0.83,
      fontSize: 9, bold: true, color: C.white, fontFace: "Calibri",
      align: "center", valign: "middle", margin: 0, wrap: true
    });
    s.addText(g.desc, {
      x: 6.08, y: y + 0.05, w: 3.58, h: 0.83,
      fontSize: 9.5, color: C.text, fontFace: "Calibri", valign: "middle", margin: 4
    });
  });

  s.addShape(pres.ShapeType.roundRect, {
    x: 4.55, y: 5.1, w: 5.2, h: 0.28,
    fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.06
  });
  s.addText("Power grasps use wrist extension for stability; 27–52 lbs grip strength in healthy adults (Pedretti, 8th ed.)", {
    x: 4.62, y: 5.1, w: 5.1, h: 0.28,
    fontSize: 8.5, color: C.white, italic: true, fontFace: "Calibri", valign: "middle", margin: 0
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — CYLINDRICAL & SPHERICAL GRASP DETAIL
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Cylindrical & Spherical Grasp — In Depth", "Most common power grasp patterns");
  addSlideFooter(s, "Pedretti's OT 8th ed. | Trombly's OT for Physical Dysfunction 6th ed., Chapter 26");

  // Spherical grasp image
  const img2 = imgData(2);
  if (img2) {
    s.addImage({ data: img2, x: 5.55, y: 1.25, w: 4.2, h: 3.6 });
    s.addText("Power sphere grasp — tennis ball", {
      x: 5.55, y: 4.9, w: 4.2, h: 0.25,
      fontSize: 7.5, color: C.gray, italic: true, align: "center", fontFace: "Calibri", margin: 0
    });
  }

  // Cylindrical
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.25, w: 5.1, h: 1.9,
    fill: { color: C.white }, line: { color: C.navy, width: 1.8 }, rectRadius: 0.1
  });
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.25, w: 5.1, h: 0.38,
    fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.1
  });
  s.addText("🤜  Cylindrical Grasp", {
    x: 0.3, y: 1.27, w: 4.9, h: 0.34,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  const cylLines = [
    "Fingers partially flexed, object held against palm",
    "Thumb actively opposes to lock fingers onto object",
    "Wrist in slight extension for maximal grip strength",
    "Most common static power grasp in daily life",
    "Examples: hammer, cup, steering wheel, walker handle",
    "Muscles: FDP, FDS, lumbricals; thenar group (thumb)",
  ];
  s.addText(cylLines.map((l, i) => ({
    text: l, options: { bullet: true, fontSize: 10, color: C.text, fontFace: "Calibri", breakLine: i < cylLines.length - 1 }
  })), { x: 0.3, y: 1.68, w: 4.9, h: 1.42, valign: "top", margin: [2, 2, 2, 8] });

  // Spherical
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 3.25, w: 5.1, h: 1.9,
    fill: { color: C.white }, line: { color: C.teal, width: 1.8 }, rectRadius: 0.1
  });
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 3.25, w: 5.1, h: 0.38,
    fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.1
  });
  s.addText("⚽  Spherical Grasp", {
    x: 0.3, y: 3.27, w: 4.9, h: 0.34,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  const sphLines = [
    "4th & 5th digits more extended than in cylindrical grasp",
    "Greater MCP abduction accommodates curved surfaces",
    "Thumb opposition critical; strong palmar contact",
    "Requires wrist stability; forearm pronation typical",
    "Examples: grasping a baseball, apple, round door knob",
    "Key difference: wider hand opening and more abduction",
  ];
  s.addText(sphLines.map((l, i) => ({
    text: l, options: { bullet: true, fontSize: 10, color: C.text, fontFace: "Calibri", breakLine: i < sphLines.length - 1 }
  })), { x: 0.3, y: 3.68, w: 4.9, h: 1.42, valign: "top", margin: [2, 2, 2, 8] });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — HOOK & LUMBRICAL GRASP
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Hook Grasp & Lumbrical (Plate) Grasp", "Sustained holding and flat object transport");
  addSlideFooter(s, "Pedretti's OT 8th ed. | Trombly's OT for Physical Dysfunction 6th ed.");

  const img5 = imgData(5);
  if (img5) {
    s.addImage({ data: img5, x: 5.6, y: 1.25, w: 4.15, h: 3.2 });
    s.addText("Hook grasp — carrying an object by hook grip", {
      x: 5.6, y: 4.5, w: 4.15, h: 0.25,
      fontSize: 7.5, color: C.gray, italic: true, align: "center", fontFace: "Calibri", margin: 0
    });
  }

  // Hook grasp
  const hookData = [
    "MCP joints in neutral/slight extension",
    "PIP and DIP joints flexed — 'hook' configuration",
    "Thumb typically uninvolved (adducted or free)",
    "Weight borne through flexor tendons (FDP, FDS)",
    "Requires minimal intrinsic muscle activity",
    "Less fatiguing for sustained carrying tasks",
    "Examples: carrying briefcase, shopping bag, bucket",
    "OT concern: assess FDP strength and IP joint ROM",
  ];

  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.25, w: 5.15, h: 2.0,
    fill: { color: C.white }, line: { color: C.green, width: 1.8 }, rectRadius: 0.1
  });
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.25, w: 5.15, h: 0.38,
    fill: { color: C.green }, line: { color: C.green }, rectRadius: 0.1
  });
  s.addText("Hook Grasp", {
    x: 0.3, y: 1.27, w: 4.95, h: 0.34,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  s.addText(hookData.map((l, i) => ({
    text: l, options: { bullet: true, fontSize: 9.5, color: C.text, fontFace: "Calibri", breakLine: i < hookData.length - 1 }
  })), { x: 0.3, y: 1.68, w: 4.95, h: 1.52, valign: "top", margin: [2, 2, 2, 8] });

  // Lumbrical grasp
  const lumData = [
    "MCP joints flexed ~75°; IP joints fully extended",
    "Called 'intrinsic-plus' or plate grasp",
    "Requires balanced intrinsic (lumbricals/interossei) activity",
    "Enables carrying wide flat objects with palmar surface",
    "Examples: carrying a plate, tray, flat book, sheet of paper",
    "Critical for table-top dining independence in OT",
    "OT concern: assess intrinsic muscle strength & coordination",
  ];
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 3.35, w: 5.15, h: 1.9,
    fill: { color: C.white }, line: { color: "7B3F8E", width: 1.8 }, rectRadius: 0.1
  });
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 3.35, w: 5.15, h: 0.38,
    fill: { color: "7B3F8E" }, line: { color: "7B3F8E" }, rectRadius: 0.1
  });
  s.addText("Lumbrical (Plate) Grasp", {
    x: 0.3, y: 3.37, w: 4.95, h: 0.34,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  s.addText(lumData.map((l, i) => ({
    text: l, options: { bullet: true, fontSize: 9.5, color: C.text, fontFace: "Calibri", breakLine: i < lumData.length - 1 }
  })), { x: 0.3, y: 3.78, w: 4.95, h: 1.47, valign: "top", margin: [2, 2, 2, 8] });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — PRECISION PINCH PATTERNS
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Precision Pinch Patterns", "Fine motor prehension — fingertip and pad contact");
  addSlideFooter(s, "Pedretti's OT 8th ed. | Trombly's OT for Physical Dysfunction 6th ed.");

  const img4 = imgData(4);
  if (img4) {
    s.addImage({ data: img4, x: 5.55, y: 1.25, w: 4.2, h: 3.0 });
    s.addText("Tip, palmar (3-jaw chuck), and lateral pinch with dynamometry", {
      x: 5.55, y: 4.28, w: 4.2, h: 0.35,
      fontSize: 7.5, color: C.gray, italic: true, align: "center", fontFace: "Calibri", margin: 0
    });
  }

  const pinches = [
    {
      name: "Tip-to-Tip (Tip Pinch)", color: C.teal,
      lines: [
        "Thumb tip opposes index finger tip",
        "Highest precision; smallest contact area",
        "Requires full IP joint flexion of both digits",
        "Examples: picking up a pin, threading a needle",
        "Normal strength: 4–6 kg (Trombly)",
      ]
    },
    {
      name: "Palmar (3-Jaw Chuck) Pinch", color: C.navy,
      lines: [
        "Thumb pad opposes pads of index & middle fingers",
        "Most common pinch for writing and tool use",
        "Strong and stable; used for holding pens, keys",
        "Examples: writing, holding a fork, unscrewing caps",
        "Normal strength: 7–8 kg (Pedretti)",
      ]
    },
    {
      name: "Lateral (Key) Pinch", color: C.green,
      lines: [
        "Thumb pulp presses against lateral side of index finger",
        "Strongest pinch pattern (most kg of force)",
        "Does NOT require thumb opposition",
        "Examples: turning a key, holding a credit card",
        "Preserved in low median nerve palsy",
      ]
    },
  ];

  pinches.forEach((p, i) => {
    const y = 1.3 + i * 1.05;
    s.addShape(pres.ShapeType.roundRect, {
      x: 0.18, y, w: 5.15, h: 0.97,
      fill: { color: C.white }, line: { color: p.color, width: 1.5 }, rectRadius: 0.08
    });
    s.addShape(pres.ShapeType.roundRect, {
      x: 0.18, y, w: 5.15, h: 0.3,
      fill: { color: p.color }, line: { color: p.color }, rectRadius: 0.08
    });
    s.addText(p.name, {
      x: 0.28, y: y + 0.02, w: 4.95, h: 0.26,
      fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(p.lines.map((l, j) => ({
      text: l, options: { bullet: true, fontSize: 9, color: C.text, fontFace: "Calibri", breakLine: j < p.lines.length - 1 }
    })), { x: 0.28, y: y + 0.32, w: 4.95, h: 0.62, valign: "top", margin: [1, 2, 1, 8] });
  });

  // Norm data summary
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.18, y: 4.5, w: 5.15, h: 0.78,
    fill: { color: "F0F7FF" }, line: { color: C.teal, width: 1 }, rectRadius: 0.08
  });
  s.addText([
    { text: "Normative Pinch Values: ", options: { bold: true, color: C.navy, fontSize: 10 }},
    { text: "Tip pinch: 4–6 kg  |  Palmar pinch: 7–8 kg  |  Lateral pinch: 8–10 kg  (Mathiowetz et al., cited in Trombly)", options: { color: C.subtext, fontSize: 9.5 }}
  ], { x: 0.28, y: 4.53, w: 4.95, h: 0.72, valign: "middle", fontFace: "Calibri", margin: 4 });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — NON-PREHENSILE HAND FUNCTIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Non-Prehensile Hand Functions", "Hand use without grasping");
  addSlideFooter(s, "Trombly's OT for Physical Dysfunction 6th ed. | Pedretti's OT 8th ed.");

  // Left column
  const nonGrasps = [
    { name: "Pushing", color: C.navy, desc: "Applying force against object with extended fingers or palm. Requires wrist stability. E.g.: opening a door, pushing a wheelchair." },
    { name: "Hooking / Carrying", color: C.teal, desc: "Fingers serve as passive hooks without active grasp. E.g.: carrying a shopping bag over forearm." },
    { name: "Pressing / Squeezing", color: C.green, desc: "Applying pressure to surfaces without actual grasp formation. E.g.: pressing a button, kneading dough." },
    { name: "Tactile Exploration", color: "7B3F8E", desc: "Moving fingers across surface to gather sensory information. Critical for object identification in poor vision." },
    { name: "Gesturing / Signaling", color: C.gold, desc: "Purposeful non-prehensile hand movements for communication. E.g.: pointing, waving, thumbs up." },
  ];

  nonGrasps.forEach((item, i) => {
    const y = 1.28 + i * 0.81;
    s.addShape(pres.ShapeType.roundRect, {
      x: 0.18, y, w: 5.2, h: 0.72,
      fill: { color: C.white }, line: { color: item.color, width: 1.3 }, rectRadius: 0.07
    });
    s.addShape(pres.ShapeType.rect, {
      x: 0.18, y: y + 0.1, w: 0.07, h: 0.52,
      fill: { color: item.color }, line: { color: item.color }
    });
    s.addText(item.name, {
      x: 0.35, y: y + 0.02, w: 4.95, h: 0.3,
      fontSize: 10.5, bold: true, color: item.color, fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(item.desc, {
      x: 0.35, y: y + 0.32, w: 4.95, h: 0.38,
      fontSize: 9, color: C.text, fontFace: "Calibri", valign: "top", margin: 0
    });
  });

  // Right panel — In-hand manipulation
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.55, y: 1.25, w: 4.2, h: 3.85,
    fill: { color: C.navy }, line: { color: C.gold, width: 2 }, rectRadius: 0.12
  });
  s.addText("In-Hand Manipulation", {
    x: 5.65, y: 1.3, w: 4.0, h: 0.45,
    fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle", margin: 0
  });
  s.addText("(Exner, cited in Pedretti)", {
    x: 5.65, y: 1.72, w: 4.0, h: 0.3,
    fontSize: 9, color: "7AAED0", fontFace: "Calibri", italic: true, align: "center", margin: 0
  });
  const manipulation = [
    { type: "Translation", desc: "Moving object from palm to fingertips or fingertips to palm. E.g.: picking up coin from palm." },
    { type: "Shift", desc: "Small linear movement of object on finger surfaces. E.g.: adjusting pencil position." },
    { type: "Simple Rotation", desc: "Rotating object around long axis up to 90°. E.g.: turning a bolt." },
    { type: "Complex Rotation", desc: "Rotating > 180° (pencil flip). High-level fine motor skill." },
    { type: "Stabilization", desc: "Holding object in hand while using other fingers for another task." },
  ];
  manipulation.forEach((m, i) => {
    s.addText([
      { text: m.type + ": ", options: { bold: true, color: C.gold, fontSize: 9.5 }},
      { text: m.desc, options: { color: "D0E8FF", fontSize: 9 }}
    ], {
      x: 5.65, y: 2.1 + i * 0.58, w: 4.0, h: 0.55,
      fontFace: "Calibri", valign: "top", margin: 2
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — MUSCLE CONTROL & INNERVATION
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Muscle Control & Nerve Innervation", "Neuromuscular basis of hand prehension");
  addSlideFooter(s, "Pedretti's OT 8th ed. | Trombly's OT for Physical Dysfunction 6th ed. | Gray's Anatomy");

  const headers = ["Muscle / Group", "Nerve", "Action in Grasp"];
  const rows = [
    ["FDP (D2–D5)", "Median (D2–D3) / Ulnar (D4–D5)", "DIP flexion — power & precision grasps"],
    ["FDS", "Median nerve", "PIP flexion — all grasp patterns"],
    ["Flexor Pollicis Longus", "Anterior interosseous (Median)", "Thumb IP flexion — tip & palmar pinch"],
    ["Lumbricals (D2–D3)", "Median nerve", "MCP flex, IP ext — lumbrical grasp"],
    ["Lumbricals (D4–D5)", "Ulnar nerve", "MCP flex, IP ext — lumbrical grasp"],
    ["Dorsal Interossei", "Ulnar nerve", "Finger abduction, MCP flex — stabilization"],
    ["Thenar group (OpP, AbPB, FPB)", "Median nerve (recurrent branch)", "Thumb opposition — all precision grasps"],
    ["Adductor Pollicis", "Ulnar nerve (deep branch)", "Thumb adduction — lateral pinch, power"],
    ["Hypothenar group", "Ulnar nerve", "Stabilize grip on ulnar side"],
    ["Extensor Digitorum", "Posterior Interosseous (Radial)", "Finger extension — grasp release"],
  ];

  // Table
  const tblX = 0.18, tblY = 1.2, colW = [2.3, 3.1, 4.2];
  // Header
  let cx = tblX;
  headers.forEach((h, i) => {
    s.addShape(pres.ShapeType.rect, { x: cx, y: tblY, w: colW[i], h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
    s.addText(h, { x: cx + 0.05, y: tblY, w: colW[i] - 0.1, h: 0.38, fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
    cx += colW[i];
  });
  // Rows
  rows.forEach((row, ri) => {
    const ry = tblY + 0.38 + ri * 0.38;
    const bg = ri % 2 === 0 ? "EFF4FA" : C.white;
    cx = tblX;
    row.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, { x: cx, y: ry, w: colW[ci], h: 0.38, fill: { color: bg }, line: { color: "C5D5E8", width: 0.5 } });
      s.addText(cell, { x: cx + 0.05, y: ry, w: colW[ci] - 0.1, h: 0.38, fontSize: 8.5, color: C.text, fontFace: "Calibri", valign: "middle", margin: 0 });
      cx += colW[ci];
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — ASSESSMENT OF HAND FUNCTION
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Assessment of Hand Function in OT", "Evaluating prehension for treatment planning");
  addSlideFooter(s, "Pedretti's OT 8th ed., Chapter on Hand Evaluation | Trombly's OT for Physical Dysfunction 6th ed.");

  const assessments = [
    { name: "Range of Motion (ROM)", color: C.navy, tool: "Goniometer", points: [
      "Measure active (AROM) and passive (PROM) finger/wrist ROM",
      "Compare to normative values (e.g., MCP flex 0–90°, DIP flex 0–90°)",
      "Specific grasps require specific ROM — document deficits per grasp type",
    ]},
    { name: "Grip Strength", color: C.teal, tool: "Jamar Dynamometer", points: [
      "5-position test — measures cylindrical grasp strength",
      "Normative values: ~46 kg dominant hand (Mathiowetz, Trombly)",
      "Document position II or III for standard comparison",
    ]},
    { name: "Pinch Strength", color: C.green, tool: "B&L Pinch Gauge", points: [
      "Measure tip, palmar (3-jaw chuck), and lateral pinch separately",
      "Normal lateral pinch strongest; tip pinch weakest",
      "Use to monitor recovery and set functional goals",
    ]},
    { name: "Functional Hand Tests", color: "7B3F8E", tool: "JHFT / Jebsen-Taylor", points: [
      "Jebsen-Taylor: 7 subtests simulating ADL tasks",
      "Purdue Pegboard: fine dexterity and manipulation",
      "COPM: identifies occupation-based hand function goals",
    ]},
    { name: "Sensation Testing", color: C.gold, tool: "Semmes-Weinstein / 2-PT", points: [
      "Monofilament: threshold detection for protective sensation",
      "Two-point discrimination: fine sensory recovery",
      "Sensation critical for precision pinch accuracy",
    ]},
    { name: "Edema & Scar", color: C.red, tool: "Volumetry / Tape measure", points: [
      "Volumeter: water displacement for hand/wrist edema",
      "Circumferential measurement for fingers",
      "Scar management impacts grasp ROM and quality",
    ]},
  ];

  const perRow = 3;
  assessments.forEach((a, i) => {
    const col = i % perRow;
    const row = Math.floor(i / perRow);
    const x = 0.18 + col * 3.23;
    const y = 1.25 + row * 2.05;
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 3.1, h: 1.92,
      fill: { color: C.white }, line: { color: a.color, width: 1.5 }, rectRadius: 0.1
    });
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 3.1, h: 0.55,
      fill: { color: a.color }, line: { color: a.color }, rectRadius: 0.1
    });
    s.addText(a.name, {
      x: x + 0.08, y: y + 0.01, w: 2.94, h: 0.3,
      fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText("Tool: " + a.tool, {
      x: x + 0.08, y: y + 0.3, w: 2.94, h: 0.22,
      fontSize: 8.5, color: "D8EEFF", italic: true, fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(a.points.map((p, pi) => ({
      text: p, options: { bullet: true, fontSize: 8.5, color: C.text, fontFace: "Calibri", breakLine: pi < a.points.length - 1 }
    })), { x: x + 0.1, y: y + 0.59, w: 2.9, h: 1.28, valign: "top", margin: [2, 2, 2, 6] });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — CLINICAL APPLICATIONS IN OT
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Clinical Applications in Occupational Therapy", "Linking hand function to occupational performance");
  addSlideFooter(s, "Pedretti's OT 8th ed. | Trombly's OT for Physical Dysfunction 6th ed.");

  const img3 = imgData(3);
  if (img3) {
    s.addImage({ data: img3, x: 0.18, y: 1.2, w: 4.1, h: 3.2 });
    s.addText("Multi-modal grasp pattern assessment including pinch, cylindrical, and lumbrical grasps", {
      x: 0.18, y: 4.42, w: 4.1, h: 0.35,
      fontSize: 7.5, color: C.gray, italic: true, align: "center", fontFace: "Calibri", margin: 0
    });
  }

  const clinSections = [
    { title: "Conditions Affecting Prehension", color: C.red, lines: [
      "Stroke / hemiplegia — spasticity or weakness disrupts grasp",
      "SCI (C6–C8) — power vs. precision loss depends on level",
      "Peripheral nerve injury — specific grasp deficits by nerve",
      "RA / OA — pain, deformity limit force and precision",
      "Hand fractures / tendon injuries — ROM and strength loss",
    ]},
    { title: "OT Intervention Strategies", color: C.teal, lines: [
      "Therapeutic exercise: strengthen extrinsic & intrinsic muscles",
      "Splinting: support weak grasp; position for function",
      "Compensatory strategies: adaptive equipment, grip aids",
      "Task modification: change object size/weight for easier grasp",
      "Sensory re-education: improve tactile guidance of pinch",
    ]},
    { title: "Adaptive Equipment Examples", color: C.green, lines: [
      "Built-up handles — enable cylindrical grasp with weak grip",
      "Universal cuff — enables cylindrical/power grasp in C5–C6 SCI",
      "Key guard / rocker knife — lateral pinch substitution",
      "Dycem mat / suction cup — stabilize objects during one-hand use",
      "Tenodesis splint — enables functional grasp in C6 SCI",
    ]},
  ];

  clinSections.forEach((sec, i) => {
    const y = 1.2 + i * 1.45;
    contentCard(s, 4.55, y, 5.22, 1.38, sec.title, sec.color, sec.lines);
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — DEVELOPMENTAL GRASP PROGRESSION
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.light };
  addSlideHeader(s, "Developmental Progression of Grasp", "From reflexive to mature prehension (Pedretti)");
  addSlideFooter(s, "Pedretti's Occupational Therapy 8th ed. | Trombly's OT for Physical Dysfunction 6th ed.");

  const stages = [
    { age: "Birth–3 mo", name: "Reflexive Grasp", color: C.navy, desc: "Palmar grasp reflex — involuntary; mass flexion in response to tactile stimulation on palm." },
    { age: "3–4 mo", name: "Voluntary Grasping", color: "1B6CA8", desc: "Begins to reach and hold; ulnar-palmar grasp; whole hand closure, no thumb opposition." },
    { age: "5–6 mo", name: "Palmar Grasp", color: C.teal, desc: "Radial-palmar grasp; thumb begins to assist; object pressed into palm with all fingers." },
    { age: "7–8 mo", name: "Radial-Digital Grasp", color: C.green, desc: "Object held by thumb and index/middle fingers; palm not fully used; emerging precision." },
    { age: "9–10 mo", name: "Scissors Grasp", color: "E08020", desc: "Thumb adducts against lateral aspect of index finger; precursor to lateral pinch." },
    { age: "10–12 mo", name: "Inferior Pincer", color: C.gold, desc: "Thumb tip to near-tip of index; DIP flexion begins; crude pincer emerging." },
    { age: "12–14 mo", name: "Neat Pincer", color: C.red, desc: "True tip-to-tip opposition; distal finger pads only; highest precision pinch achieved." },
    { age: "2–6 yrs", name: "Mature Patterns", color: "7B3F8E", desc: "Full repertoire of power and precision grasps; in-hand manipulation develops." },
  ];

  stages.forEach((st, i) => {
    const col = i % 4;
    const row = Math.floor(i / 4);
    const x = 0.18 + col * 2.43;
    const y = 1.2 + row * 2.05;
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 2.32, h: 1.92,
      fill: { color: C.white }, line: { color: st.color, width: 1.5 }, rectRadius: 0.1
    });
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 2.32, h: 0.5,
      fill: { color: st.color }, line: { color: st.color }, rectRadius: 0.1
    });
    s.addText(st.age, {
      x: x + 0.06, y: y + 0.02, w: 2.2, h: 0.22,
      fontSize: 8, bold: true, color: "E8F4FF", fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(st.name, {
      x: x + 0.06, y: y + 0.22, w: 2.2, h: 0.26,
      fontSize: 9.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(st.desc, {
      x: x + 0.08, y: y + 0.54, w: 2.16, h: 1.34,
      fontSize: 8.5, color: C.text, fontFace: "Calibri", valign: "top", margin: 2
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — SUMMARY & KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.1, fill: { color: C.gold }, line: { color: C.gold } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.525, w: 10, h: 0.1, fill: { color: C.gold }, line: { color: C.gold } });

  s.addText("Summary & Key Takeaways", {
    x: 0.35, y: 0.15, w: 9.3, h: 0.65,
    fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", align: "center", margin: 0
  });
  s.addShape(pres.ShapeType.rect, { x: 3.5, y: 0.8, w: 3, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });

  const takeaways = [
    ["Power Grasps", "Cylindrical, spherical, hook, and lumbrical grasps — force application with whole-hand involvement", C.teal],
    ["Precision Grasps", "Tip, palmar (3-jaw chuck), and lateral (key) pinch — fingertip precision without full palm involvement", "2A8C5E"],
    ["Non-Prehensile", "Pushing, pressing, hooking, and in-hand manipulation — hand function beyond grasp", C.gold],
    ["Neuroanatomy", "Median nerve: thenar muscles & precision; Ulnar nerve: intrinsics & lateral pinch; Radial nerve: release", "7B3F8E"],
    ["Assessment", "ROM (goniometry), grip/pinch strength (Jamar/pinch gauge), functional tests (JHFT, COPM)", "C0392B"],
    ["OT Practice", "Link each deficit to specific grasp pattern → targeted intervention, adaptive equipment, splinting", "1B6CA8"],
  ];

  takeaways.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.25 : 5.15;
    const y = 1.0 + row * 1.42;
    s.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.7, h: 1.28,
      fill: { color: "1E3A5F" }, line: { color: t[2], width: 1.5 }, rectRadius: 0.1
    });
    s.addShape(pres.ShapeType.rect, { x, y, w: 0.12, h: 1.28, fill: { color: t[2] }, line: { color: t[2] } });
    s.addText(t[0], {
      x: x + 0.2, y: y + 0.08, w: 4.4, h: 0.35,
      fontSize: 13, bold: true, color: t[2], fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(t[1], {
      x: x + 0.2, y: y + 0.45, w: 4.4, h: 0.78,
      fontSize: 10, color: "C5DEFF", fontFace: "Calibri", valign: "top", margin: 2
    });
  });

  s.addText("Pedretti's Occupational Therapy 8th ed. (Pendleton & Schultz-Krohn)  |  Trombly's OT for Physical Dysfunction 6th ed. (Radomski & Trombly Latham)", {
    x: 0.25, y: 5.32, w: 9.5, h: 0.22,
    fontSize: 7.5, color: "5A7FAA", italic: true, fontFace: "Calibri", align: "center", valign: "middle", margin: 0
  });
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/hand-functions-ppt/Hand_Functions_Grasp_Prehension.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
  console.log("SUCCESS: " + outPath);
}).catch(err => {
  console.error("ERROR:", err);
});
Running Command

cd /home/daytona/workspace/hand-functions-ppt && node create_ppt.js 2>&1

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.