Hey, make me a ppt in the topic of diabetic foot ulcer

Asking for Preferences
Reading File
Reading File
Reading File
Finding Sources
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/ 2>/dev/null || echo "workspace not found"

Running Command

mkdir -p /home/daytona/workspace/diabetic-foot-ulcer-ppt

Writing File

~/diabetic-foot-ulcer-ppt/generate.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Diabetic Foot Ulcer";
pres.author = "Orris Medical";

// ── COLOUR PALETTE ─────────────────────────────────────────────────────────────
const C = {
  dark:    "0D1B2A",   // deep navy – dominant dark background
  navy:    "1B3A5C",   // mid navy
  teal:    "1A6B74",   // supporting teal
  accent:  "E05C2A",   // warm amber-orange accent
  light:   "EFF4F8",   // near-white for content slides
  white:   "FFFFFF",
  muted:   "8FA8BF",   // muted blue for subtitles / labels
  red:     "C0392B",   // warning / severity red
  green:   "1E7A5C",   // healing / prevention green
  grey:    "64748B",
};

// ── HELPERS ────────────────────────────────────────────────────────────────────
function addSectionTitle(pres, label, color) {
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: color || C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 2.4, w: "100%", h: 0.08, fill: { color: C.accent } });
  sl.addText(label, {
    x: 0.8, y: 1.9, w: 8.4, h: 1.2,
    fontSize: 36, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", valign: "middle",
  });
  return sl;
}

function contentHeader(sl, title) {
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.navy } });
  sl.addText(title, {
    x: 0.3, y: 0, w: 9.4, h: 0.75,
    fontSize: 22, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", margin: 0,
  });
  return sl;
}

function bullet(text, indent) {
  return { text, options: { bullet: { type: "bullet" }, indentLevel: indent || 0, breakLine: true, fontSize: 14, color: C.dark, fontFace: "Calibri" } };
}

function bulletBold(text) {
  return { text, options: { bullet: { type: "bullet" }, bold: true, breakLine: true, fontSize: 14, color: C.navy, fontFace: "Calibri" } };
}

function tag(label, x, y, w, h, fillColor) {
  return { label, x, y, w, h, fill: fillColor || C.teal };
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  // Full dark bg
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.dark } });
  // Accent bar left
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: "100%", fill: { color: C.accent } });
  // Teal block right
  sl.addShape(pres.ShapeType.rect, { x: 7.0, y: 0, w: 3.0, h: "100%", fill: { color: C.teal, transparency: 30 } });

  sl.addText("DIABETIC FOOT ULCER", {
    x: 0.55, y: 1.0, w: 6.2, h: 1.4,
    fontSize: 38, bold: true, color: C.white,
    fontFace: "Calibri", charSpacing: 2,
  });
  sl.addText("Pathophysiology, Classification & Management", {
    x: 0.55, y: 2.5, w: 6.2, h: 0.55,
    fontSize: 18, color: C.muted, fontFace: "Calibri", italic: true,
  });
  sl.addShape(pres.ShapeType.rect, { x: 0.55, y: 3.15, w: 2.4, h: 0.06, fill: { color: C.accent } });
  sl.addText("A Clinical Guide for Specialists", {
    x: 0.55, y: 3.3, w: 6.2, h: 0.45,
    fontSize: 14, color: C.muted, fontFace: "Calibri",
  });
  sl.addText("Sources: Sabiston Surgery 2024 · Fischer's Mastery of Surgery 8e · Campbell's Orthopaedics 15e", {
    x: 0.55, y: 5.1, w: 8.8, h: 0.35,
    fontSize: 9, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – OUTLINE
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Presentation Overview");

  const topics = [
    "01   Epidemiology & Burden of Disease",
    "02   Pathophysiology – Neuropathy, Ischemia & Infection",
    "03   Clinical Assessment",
    "04   Wagner Classification of Foot Ulcers",
    "05   IWGDF / IDSA Infection Severity Classification",
    "06   Diagnostic Workup",
    "07   Principles of Management",
    "08   Wound Care & Debridement",
    "09   Offloading",
    "10   Antibiotic Therapy",
    "11   Surgical Management & Amputation",
    "12   Revascularisation",
    "13   Prevention & Foot Care",
    "14   Multidisciplinary Team Approach",
    "15   Key Takeaways",
  ];

  // Two columns
  const col1 = topics.slice(0, 8);
  const col2 = topics.slice(8);
  col1.forEach((t, i) => {
    sl.addText(t, {
      x: 0.4, y: 0.95 + i * 0.55, w: 4.5, h: 0.5,
      fontSize: 12.5, color: C.dark, fontFace: "Calibri",
    });
    sl.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.43 + i * 0.55, w: 4.5, h: 0.02, fill: { color: C.muted, transparency: 60 } });
  });
  col2.forEach((t, i) => {
    sl.addText(t, {
      x: 5.2, y: 0.95 + i * 0.55, w: 4.5, h: 0.5,
      fontSize: 12.5, color: C.dark, fontFace: "Calibri",
    });
    sl.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.43 + i * 0.55, w: 4.5, h: 0.02, fill: { color: C.muted, transparency: 60 } });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – EPIDEMIOLOGY
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Epidemiology & Burden of Disease");

  // Stat boxes
  const stats = [
    { val: "25%", label: "Lifetime incidence of foot\nulcers in diabetics" },
    { val: "50%", label: "DFUs that will become\ninfected" },
    { val: "15%", label: "DFUs progressing\nto osteomyelitis" },
    { val: "5-yr", label: "Survival drops 70% → 43%\nafter major amputation" },
  ];
  stats.forEach((s, i) => {
    const x = 0.35 + i * 2.35;
    sl.addShape(pres.ShapeType.rect, { x, y: 0.9, w: 2.1, h: 1.3, fill: { color: C.navy }, line: { color: C.accent, width: 2 } });
    sl.addText(s.val, { x, y: 0.92, w: 2.1, h: 0.75, fontSize: 30, bold: true, color: C.accent, fontFace: "Calibri", align: "center" });
    sl.addText(s.label, { x, y: 1.62, w: 2.1, h: 0.6, fontSize: 10.5, color: C.white, fontFace: "Calibri", align: "center" });
  });

  sl.addText([
    bullet("Diabetes is the leading cause of lower-extremity amputation worldwide – prevalence >30 million in the USA alone"),
    bullet("~80% of all lower-extremity amputations are secondary to foot ulcerations associated with diabetes or chronic limb-threatening ischemia (CLTI)"),
    bullet("Up to 1/3 of people with diabetes will develop a DFU in their lifetime; >50% of these become infected"),
    bullet("DFUs are an independent risk factor for premature death"),
    bullet("50% of healed DFUs recur within 1 year; >90% recur within 10 years"),
    bullet("Significant racial/socioeconomic disparity: rural, African American and Native American populations carry the highest amputation risk"),
  ], { x: 0.35, y: 2.4, w: 9.3, h: 2.9, valign: "top" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – PATHOPHYSIOLOGY
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Pathophysiology – The Triad of DFU");

  // Three pillars
  const pillars = [
    { title: "PERIPHERAL NEUROPATHY", color: C.teal, bullets: [
      "Sensory: loss of protective sensation → unrecognised trauma",
      "Motor: intrinsic muscle atrophy → foot deformity (claw toes, Charcot)",
      "Autonomic: dry, cracked skin; impaired sweating",
      "Poor vision (retinopathy) → delayed recognition",
    ]},
    { title: "PERIPHERAL ARTERIAL DISEASE", color: C.navy, bullets: [
      "Accelerated macrovascular atherosclerosis",
      "Microvascular shunting around capillary beds",
      "Reduced tissue oxygenation → impaired healing",
      "TcPO₂ <40 mmHg predicts failure to heal",
    ]},
    { title: "INFECTION", color: C.accent, bullets: [
      "Portal of entry: skin fissures, callus breakdown, trauma",
      "Polymicrobial: Staphylococcus, Streptococcus, Pseudomonas, anaerobes",
      "Gas-producing gram-negatives in deep infections",
      "Hyperglycaemia impairs neutrophil function",
    ]},
  ];

  pillars.forEach((p, i) => {
    const x = 0.2 + i * 3.27;
    sl.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 3.0, h: 0.55, fill: { color: p.color } });
    sl.addText(p.title, { x, y: 0.85, w: 3.0, h: 0.55, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x, y: 1.4, w: 3.0, h: 3.8, fill: { color: C.white }, line: { color: p.color, width: 1.5 } });
    p.bullets.forEach((b, j) => {
      sl.addText("• " + b, {
        x: x + 0.12, y: 1.5 + j * 0.88, w: 2.76, h: 0.85,
        fontSize: 12, color: C.dark, fontFace: "Calibri", valign: "top",
      });
    });
  });

  sl.addText("These three factors create a vicious cycle: neuropathy masks ischaemia and infection, which in turn worsen tissue viability.", {
    x: 0.2, y: 5.2, w: 9.6, h: 0.38,
    fontSize: 11, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – CLINICAL ASSESSMENT
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Clinical Assessment");

  sl.addText("History", { x: 0.3, y: 0.85, w: 4.4, h: 0.38, fontSize: 15, bold: true, color: C.navy, fontFace: "Calibri" });
  sl.addText([
    bullet("Duration of diabetes & glycaemic control (HbA1c)"),
    bullet("Previous foot ulcers, amputations"),
    bullet("History of neuropathy symptoms"),
    bullet("Peripheral vascular disease / claudication"),
    bullet("End-stage renal disease (impairs healing, life expectancy)"),
    bullet("Recent hospitalisation or immobility → pressure ulcer"),
    bullet("Fever, chills, difficulty controlling glucose (systemic sepsis)"),
  ], { x: 0.3, y: 1.25, w: 4.4, h: 3.6, valign: "top" });

  sl.addShape(pres.ShapeType.rect, { x: 5.0, y: 0.85, w: 0.04, h: 4.2, fill: { color: C.muted } });

  sl.addText("Examination", { x: 5.2, y: 0.85, w: 4.55, h: 0.38, fontSize: 15, bold: true, color: C.navy, fontFace: "Calibri" });
  sl.addText([
    bullet("Ulcer size, depth, location, undermining"),
    bullet("Probe-to-bone test (sensitivity 66%, specificity 85% for osteomyelitis)"),
    bullet("Periwound callus, necrosis, gangrene"),
    bullet("Erythema extent from wound margin"),
    bullet("Handheld Doppler, ABI (>0.9 normal; <0.4 severe ischaemia)"),
    bullet("Ankle-brachial index, toe pressures"),
    bullet("Neurological: 10-g monofilament, vibration, Semmes-Weinstein"),
  ], { x: 5.2, y: 1.25, w: 4.55, h: 3.6, valign: "top" });

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: "100%", h: 0.42, fill: { color: C.navy, transparency: 85 } });
  sl.addText("Functional status and capacity for independence guide amputation level decisions.", {
    x: 0.3, y: 5.2, w: 9.4, h: 0.42,
    fontSize: 11, italic: true, color: C.navy, fontFace: "Calibri", valign: "middle",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – WAGNER CLASSIFICATION
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Wagner Classification of Diabetic Foot Ulcers");

  const rows = [
    { grade: "0", desc: "Pre- or post-ulcerative lesion; intact skin with bony prominence", mgmt: "Preventive footwear, callus removal", col: C.green },
    { grade: "1", desc: "Superficial ulcer – full thickness skin; does not involve tendon, capsule or bone", mgmt: "Debridement, moist dressing, offloading", col: "#2E7D32" },
    { grade: "2", desc: "Deep ulcer penetrating to tendon, capsule or bone without abscess / osteomyelitis", mgmt: "Surgical debridement, antibiotics, offloading", col: C.teal },
    { grade: "3", desc: "Deep ulcer with abscess, osteomyelitis, or joint sepsis", mgmt: "IV antibiotics, surgical debridement, possible resection", col: C.navy },
    { grade: "4", desc: "Gangrene of forefoot or heel", mgmt: "Partial amputation / revascularisation if perfusion present", col: C.accent },
    { grade: "5", desc: "Gangrene of entire foot", mgmt: "Below-knee or above-knee amputation", col: C.red },
  ];

  // Column headers
  ["Grade", "Description", "Management Approach"].forEach((h, i) => {
    const xs = [0.2, 1.05, 5.7];
    const ws = [0.75, 4.55, 3.95];
    sl.addShape(pres.ShapeType.rect, { x: xs[i], y: 0.82, w: ws[i], h: 0.42, fill: { color: C.navy } });
    sl.addText(h, { x: xs[i], y: 0.82, w: ws[i], h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  rows.forEach((r, i) => {
    const y = 1.26 + i * 0.68;
    const bg = i % 2 === 0 ? C.white : "EFF4F8";
    sl.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 9.6, h: 0.66, fill: { color: bg } });
    sl.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 0.75, h: 0.66, fill: { color: r.col } });
    sl.addText(r.grade, { x: 0.2, y, w: 0.75, h: 0.66, fontSize: 20, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(r.desc, { x: 1.05, y: y + 0.04, w: 4.55, h: 0.58, fontSize: 11.5, color: C.dark, fontFace: "Calibri", valign: "middle" });
    sl.addText(r.mgmt, { x: 5.7, y: y + 0.04, w: 4.05, h: 0.58, fontSize: 11.5, color: C.dark, fontFace: "Calibri", valign: "middle" });
  });

  sl.addText("Limitation: Wagner does not account for peripheral neuropathy or vascular disease and cannot reliably distinguish ischaemic from infective lesions.", {
    x: 0.2, y: 5.38, w: 9.6, h: 0.32,
    fontSize: 9.5, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – IWGDF / IDSA CLASSIFICATION
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "IWGDF / IDSA Infection Severity Classification (2023)");

  const data = [
    { sev: "Uninfected", grade: "1", mani: "No purulence or inflammation; no systemic or local signs", action: "No antibiotics; optimise glycaemia, offload, debride", col: C.green },
    { sev: "Mild", grade: "2", mani: "≥2 signs of local inflammation; erythema ≤2 cm; no systemic involvement", action: "Oral antibiotics targeting gram-positive cocci (Staph/Strep)", col: "#2E7D32" },
    { sev: "Moderate", grade: "3", mani: "Cellulitis >2 cm, lymphangitis, deep abscess, fascia/tendon/joint/bone involvement; systemically well", action: "IV antibiotics; surgical debridement; osteomyelitis workup", col: C.accent },
    { sev: "Severe", grade: "4", mani: "Any DFI with systemic SIRS: fever, tachycardia, leukocytosis, metabolic instability, hypotension", action: "Hospital admission; broad-spectrum IV antibiotics; urgent surgery", col: C.red },
  ];

  data.forEach((r, i) => {
    const y = 0.9 + i * 1.1;
    sl.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 1.45, h: 1.0, fill: { color: r.col } });
    sl.addText(r.sev + "\nGrade " + r.grade, { x: 0.2, y, w: 1.45, h: 1.0, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x: 1.75, y, w: 4.6, h: 1.0, fill: { color: i % 2 === 0 ? C.white : "EEF3F7" }, line: { color: C.muted, width: 0.5 } });
    sl.addText(r.mani, { x: 1.82, y: y + 0.04, w: 4.45, h: 0.92, fontSize: 11.5, color: C.dark, fontFace: "Calibri", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x: 6.45, y, w: 3.3, h: 1.0, fill: { color: C.navy, transparency: i % 2 === 0 ? 85 : 75 }, line: { color: C.navy, width: 0.5 } });
    sl.addText(r.action, { x: 6.52, y: y + 0.04, w: 3.16, h: 0.92, fontSize: 11, color: C.dark, fontFace: "Calibri", valign: "middle", bold: false });
  });

  sl.addText("Modified from Senneville et al. IWGDF/IDSA Guidelines 2023. Clin Infect Dis.", {
    x: 0.2, y: 5.38, w: 9.6, h: 0.28,
    fontSize: 9, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – DIAGNOSTIC WORKUP
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Diagnostic Workup");

  const sections = [
    { label: "Laboratory", color: C.teal, items: [
      "FBC, CRP, ESR – elevated in infection but not diagnostic alone",
      "HbA1c – glycaemic optimisation",
      "Renal function – end-stage renal disease worsens prognosis",
      "Blood cultures if systemically unwell",
    ]},
    { label: "Microbiology", color: C.navy, items: [
      "Deep tissue / bone biopsy is gold standard",
      "Avoid superficial swabs – reflect colonisation, not infection",
      "Bone cultures: guide antibiotic selection in osteomyelitis",
      "Polymicrobial: Staph, Strep, Pseudomonas, anaerobes",
    ]},
    { label: "Imaging", color: C.accent, items: [
      "Plain X-ray: gas in tissue, foreign body, bone erosion (late)",
      "CT: deep abscesses, extent of bone involvement",
      "MRI: early osteomyelitis detection (preferred)",
      "Hyperspectral / infrared thermography: emerging, not routine",
    ]},
    { label: "Vascular", color: C.red, items: [
      "Handheld Doppler + ABI",
      "TcPO₂: <40 mmHg predicts failure to heal; guides HBO therapy",
      "Toe-brachial index (TBI): useful if calcified vessels",
      "CT/MR angiography: pre-revascularisation planning",
    ]},
  ];

  sections.forEach((sec, i) => {
    const col = i < 2 ? 0 : 1;
    const row = i % 2;
    const x = col === 0 ? 0.2 : 5.1;
    const y = 0.9 + row * 2.35;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.4, fill: { color: sec.color } });
    sl.addText(sec.label, { x, y, w: 4.6, h: 0.4, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x, y: y + 0.4, w: 4.6, h: 1.85, fill: { color: C.white }, line: { color: sec.color, width: 1 } });
    sec.items.forEach((item, j) => {
      sl.addText("• " + item, { x: x + 0.1, y: y + 0.45 + j * 0.44, w: 4.4, h: 0.42, fontSize: 11, color: C.dark, fontFace: "Calibri" });
    });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – PRINCIPLES OF MANAGEMENT
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.dark } });
  contentHeader(sl, "Principles of Management");

  const pillars = [
    { n: "1", t: "Glycaemic Control", d: "Maintain euglycaemia to optimise wound healing environment" },
    { n: "2", t: "Wound Care", d: "Moist wound environment; serial debridement of callus and necrotic tissue" },
    { n: "3", t: "Infection Control", d: "Systemic antibiotics targeting causative organisms; source control" },
    { n: "4", t: "Offloading", d: "Total contact cast (TCC) is gold standard; removes repetitive plantar pressure" },
    { n: "5", t: "Revascularisation", d: "Restore perfusion before wound closure in ischaemic limbs" },
    { n: "6", t: "Surgical Debridement", d: "Urgent for necrotising infections, deep abscess, compartment syndrome, gangrene" },
  ];

  pillars.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 0.85 + row * 1.55;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.4, fill: { color: C.navy }, line: { color: C.accent, width: 1.5 } });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h: 1.4, fill: { color: C.accent } });
    sl.addText(p.n, { x, y, w: 0.55, h: 1.4, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(p.t, { x: x + 0.65, y: y + 0.12, w: 3.8, h: 0.45, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri" });
    sl.addText(p.d, { x: x + 0.65, y: y + 0.55, w: 3.8, h: 0.75, fontSize: 11.5, color: C.muted, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – WOUND CARE & DEBRIDEMENT
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Wound Care & Debridement");

  sl.addText("Goals of Wound Bed Preparation", { x: 0.3, y: 0.85, w: 9.4, h: 0.4, fontSize: 15, bold: true, color: C.navy, fontFace: "Calibri" });
  sl.addText([
    bullet("Remove necrotic tissue, slough, and periwound callus that increases plantar pressure"),
    bullet("Thickened callus prevents inward epithelialisation; must be debrided at every visit"),
    bullet("Wet-to-dry gauze dressings (once or twice daily) for early wound management"),
    bullet("Negative pressure wound therapy (NPWT): augments tissue perfusion, decreases oedema and bacterial bioburden"),
    bullet("NPWT (with or without continuous irrigation): accelerates wound bed preparation for grafting or dermal matrix"),
  ], { x: 0.3, y: 1.3, w: 9.4, h: 2.2, valign: "top" });

  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.55, w: 4.5, h: 0.4, fill: { color: C.teal } });
  sl.addText("Surgical Debridement Indications", { x: 0.3, y: 3.55, w: 4.5, h: 0.4, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  sl.addText([
    bullet("Severe or necrotising infection"),
    bullet("Deep abscess formation"),
    bullet("Compartment syndrome"),
    bullet("Limb ischaemia with non-viable tissue"),
    bullet("All diseased soft tissue, muscle, bone resected to healthy margins"),
    bullet("Early debridement → lower major amputation rates + better healing"),
  ], { x: 0.3, y: 4.0, w: 4.5, h: 1.55, valign: "top" });

  sl.addShape(pres.ShapeType.rect, { x: 5.1, y: 3.55, w: 4.6, h: 0.4, fill: { color: C.navy } });
  sl.addText("Advanced Wound Therapies", { x: 5.1, y: 3.55, w: 4.6, h: 0.4, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  sl.addText([
    bullet("Hyperbaric oxygen (HBO): for TcPO₂ <40 mmHg; improves tissue oxygenation"),
    bullet("Growth factors (PDGF/becaplermin): for non-healing neuropathic ulcers"),
    bullet("Bioengineered skin substitutes: dermis/split-thickness for reconstruction"),
    bullet("Maggot therapy: selective debridement of necrotic tissue"),
  ], { x: 5.1, y: 4.0, w: 4.6, h: 1.55, valign: "top" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – OFFLOADING
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Offloading – Removing the Causative Mechanical Stress");

  sl.addText("Repetitive mechanical pressure is the most common cause of plantar ulcer formation.", {
    x: 0.3, y: 0.85, w: 9.4, h: 0.4,
    fontSize: 13, italic: true, color: C.teal, fontFace: "Calibri",
  });

  const methods = [
    { title: "Total Contact Cast (TCC)", sub: "Gold Standard", desc: "Distributes load over entire plantar surface; non-removable ensures compliance; heals 90% of plantar neuropathic ulcers", col: C.accent },
    { title: "Removable Cast Walker (RCW)", sub: "Irremovable Modification", desc: "When made irremovable (iTCC), outcomes equal TCC; removable RCW leads to poorer compliance and slower healing", col: C.teal },
    { title: "Therapeutic Footwear", sub: "Prevention & Low-Risk", desc: "Pressure-relieving insoles; Oxford leather lace-up shoes; replaced every 4–6 months based on risk category", col: C.navy },
    { title: "Surgical Offloading", sub: "Structural Correction", desc: "Achilles tendon lengthening, metatarsal head resection, digital fusion for fixed deformities driving plantar pressure", col: C.red },
  ];

  methods.forEach((m, i) => {
    const x = i < 2 ? 0.3 : 5.1;
    const y = i % 2 === 0 ? 1.4 : 3.45;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 1.8, fill: { color: C.white }, line: { color: m.col, width: 2 } });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 0.5, fill: { color: m.col } });
    sl.addText(m.title, { x: x + 0.1, y, w: 3.0, h: 0.5, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
    sl.addText(m.sub, { x: x + 3.1, y, w: 1.3, h: 0.5, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", align: "right" });
    sl.addText(m.desc, { x: x + 0.1, y: y + 0.55, w: 4.3, h: 1.15, fontSize: 11.5, color: C.dark, fontFace: "Calibri", valign: "top" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – ANTIBIOTIC THERAPY
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Antibiotic Therapy");

  sl.addText([
    bulletBold("Empirical therapy: target aerobic gram-positive organisms (β-haemolytic Streptococcus, Staphylococcus spp.)"),
    bullet("Mild/moderate infection: oral amoxicillin-clavulanate, clindamycin, or cefalexin"),
    bullet("MRSA risk factors: vancomycin, linezolid, or daptomycin"),
    bullet("Moderate–severe / systemic involvement: IV piperacillin-tazobactam or meropenem (Pseudomonas coverage)"),
    bullet("Tailor to culture data from deep tissue; superficial swabs must not guide therapy"),
  ], { x: 0.3, y: 0.9, w: 9.4, h: 2.2, valign: "top" });

  // Duration table
  const dRows = [
    { inf: "Mild soft tissue", dur: "1–2 weeks", route: "Oral" },
    { inf: "Moderate soft tissue", dur: "2–3 weeks", route: "IV → oral step-down" },
    { inf: "Severe / SIRS", dur: "2–4 weeks", route: "IV (consider step-down after clinical improvement)" },
    { inf: "Osteomyelitis (bone resected)", dur: "2–5 days post-op", route: "IV → oral" },
    { inf: "Osteomyelitis (no resection)", dur: "6 weeks", route: "IV → oral (OVIVA trial supports oral step-down)" },
  ];

  ["Infection Type", "Duration", "Route"].forEach((h, i) => {
    const xs = [0.3, 5.8, 7.6];
    const ws = [5.4, 1.7, 2.0];
    sl.addShape(pres.ShapeType.rect, { x: xs[i], y: 3.2, w: ws[i], h: 0.42, fill: { color: C.navy } });
    sl.addText(h, { x: xs[i], y: 3.2, w: ws[i], h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  dRows.forEach((r, i) => {
    const y = 3.64 + i * 0.38;
    const bg = i % 2 === 0 ? C.white : "EDF1F5";
    sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.3, h: 0.37, fill: { color: bg } });
    sl.addText(r.inf, { x: 0.35, y, w: 5.35, h: 0.37, fontSize: 11, color: C.dark, fontFace: "Calibri", valign: "middle" });
    sl.addText(r.dur, { x: 5.8, y, w: 1.7, h: 0.37, fontSize: 11, color: C.dark, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(r.route, { x: 7.6, y, w: 2.0, h: 0.37, fontSize: 11, color: C.dark, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  sl.addText("Impaired blood flow in DFIs may reduce antibiotic tissue penetration – extended courses often required. (Sabiston Surgery 2024)", {
    x: 0.3, y: 5.55, w: 9.4, h: 0.28, fontSize: 9, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – SURGICAL MANAGEMENT
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Surgical Management & Amputation");

  sl.addText([
    bulletBold("Deep space abscess: incision and drainage – minimise wound burden, probe for tracts or bone involvement"),
    bulletBold("Osteomyelitis: resect affected cortex; culture-directed antibiotics for 6 weeks if no resection"),
    bulletBold("Necrotising infection: all diseased soft tissue, muscle, bone resected back to bleeding healthy margins"),
  ], { x: 0.3, y: 0.88, w: 9.4, h: 1.35, valign: "top" });

  // Amputation levels
  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.35, w: 9.4, h: 0.42, fill: { color: C.navy } });
  sl.addText("Amputation Levels – Selection Principles", { x: 0.3, y: 2.35, w: 9.4, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });

  const ampRows = [
    { level: "Toe / Ray", indication: "Isolated digit gangrene or osteomyelitis; viable margins required", heal: "Best prognosis; preserves foot function" },
    { level: "Trans-metatarsal (TMA)", indication: "Forefoot gangrene; requires adequate perfusion at mid-foot level", heal: "Good ambulation; requires prosthesis-compatible shoe" },
    { level: "Below-knee (BKA)", indication: "Extensive forefoot/midfoot involvement; knee joint preserved", heal: "Good rehabilitation potential" },
    { level: "Above-knee (AKA)", indication: "Knee joint involvement or failed BKA; non-ambulatory risk", heal: "High energy cost; poor long-term survival (5-yr ~43%)" },
  ];

  ["Level", "Indication", "Outcomes / Notes"].forEach((h, i) => {
    const xs = [0.3, 2.0, 6.2]; const ws = [1.6, 4.1, 3.5];
    sl.addShape(pres.ShapeType.rect, { x: xs[i], y: 2.82, w: ws[i], h: 0.35, fill: { color: C.teal } });
    sl.addText(h, { x: xs[i], y: 2.82, w: ws[i], h: 0.35, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  ampRows.forEach((r, i) => {
    const y = 3.19 + i * 0.56;
    const bg = i % 2 === 0 ? C.white : "EDF1F5";
    sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.54, fill: { color: bg } });
    sl.addText(r.level, { x: 0.35, y, w: 1.55, h: 0.54, fontSize: 11.5, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle" });
    sl.addText(r.indication, { x: 2.0, y, w: 4.1, h: 0.54, fontSize: 11, color: C.dark, fontFace: "Calibri", valign: "middle" });
    sl.addText(r.heal, { x: 6.2, y, w: 3.45, h: 0.54, fontSize: 11, color: C.dark, fontFace: "Calibri", valign: "middle" });
  });

  sl.addText("Minor amputations are performed twice as frequently as major amputations and play a critical role in limb salvage. (Fischer's Mastery 8e)", {
    x: 0.3, y: 5.5, w: 9.4, h: 0.28, fontSize: 9, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – REVASCULARISATION
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.dark } });
  contentHeader(sl, "Revascularisation");

  sl.addText("Restoring Perfusion is the Prerequisite for Healing in Ischaemic DFU", {
    x: 0.3, y: 0.82, w: 9.4, h: 0.5,
    fontSize: 14, italic: true, color: C.muted, fontFace: "Calibri",
  });

  const cards = [
    { title: "When to Revascularise", col: C.teal, items: [
      "ABI <0.4 (severe ischaemia)",
      "TcPO₂ <40 mmHg",
      "Absence of palpable pedal pulses with non-healing wound",
      "Before any reconstruction or flap",
    ]},
    { title: "Endovascular Options", col: C.accent, items: [
      "Percutaneous transluminal angioplasty (PTA) with or without stent",
      "Drug-coated balloons (DCB): reduce restenosis",
      "Preferred for tibial / infrapopliteal disease",
    ]},
    { title: "Open Surgical Bypass", col: C.navy, items: [
      "Femoro-popliteal or tibial bypass with autologous vein",
      "Preferred when adequate conduit and life expectancy available",
      "Durability superior to endovascular for long occlusions",
    ]},
    { title: "Hybrid & Post-op Care", col: C.red, items: [
      "Combine endo + open for multi-level disease",
      "Post-revascularisation: reperfusion injury; monitor compartment pressures",
      "Aspirin + statin; glycaemic optimisation; smoking cessation",
    ]},
  ];

  cards.forEach((c, i) => {
    const x = i < 2 ? 0.3 : 5.1;
    const y = i % 2 === 0 ? 1.45 : 3.4;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 1.8, fill: { color: C.navy }, line: { color: c.col, width: 2 } });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 0.42, fill: { color: c.col } });
    sl.addText(c.title, { x: x + 0.1, y, w: 4.3, h: 0.42, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
    c.items.forEach((item, j) => {
      sl.addText("• " + item, { x: x + 0.12, y: y + 0.48 + j * 0.42, w: 4.26, h: 0.4, fontSize: 11.5, color: C.muted, fontFace: "Calibri" });
    });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – OSTEOMYELITIS
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Diabetic Foot Osteomyelitis (DFO)");

  sl.addText([
    bulletBold("Up to 15% of DFUs progress to osteomyelitis"),
    bullet("Probe-to-bone test: sensitivity ~66%, specificity ~85%; positive result warrants osteomyelitis workup"),
    bullet("MRI is the imaging modality of choice for early diagnosis"),
    bullet("X-ray: insensitive early; bone erosion appears 2–4 weeks after onset"),
    bullet("Bone biopsy culture is gold standard for diagnosis and antibiotic selection"),
  ], { x: 0.3, y: 0.88, w: 9.4, h: 2.0, valign: "top" });

  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.0, w: 4.5, h: 0.42, fill: { color: C.navy } });
  sl.addText("Conservative Management", { x: 0.3, y: 3.0, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  sl.addText([
    bullet("6-week IV → oral antibiotic course if no bone resection"),
    bullet("OVIVA trial: oral antibiotics non-inferior to IV for bone and joint infections"),
    bullet("Long-term follow-up ≥1 year to confirm remission"),
    bullet("Consider alternative diagnosis if no improvement after extended therapy"),
  ], { x: 0.3, y: 3.46, w: 4.5, h: 1.85, valign: "top" });

  sl.addShape(pres.ShapeType.rect, { x: 5.1, y: 3.0, w: 4.6, h: 0.42, fill: { color: C.red } });
  sl.addText("Surgical Management", { x: 5.1, y: 3.0, w: 4.6, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  sl.addText([
    bullet("Cortical resection of affected bone to healthy margins"),
    bullet("Post-resection: 2–5 days antibiotics only (short course)"),
    bullet("Re-infection risk remains if underlying factors not addressed"),
    bullet("Revascularise prior to definitive bone surgery if ischaemia present"),
  ], { x: 5.1, y: 3.46, w: 4.6, h: 1.85, valign: "top" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – PREVENTION & FOOT CARE
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "Prevention & Foot Care Stratification");

  sl.addText("Risk-stratified surveillance and footwear are the cornerstone of prevention (Campbell's Orthopaedics 15e)", {
    x: 0.3, y: 0.82, w: 9.4, h: 0.4, fontSize: 12, italic: true, color: C.teal, fontFace: "Calibri",
  });

  const riskRows = [
    { risk: "Low", criteria: "Normal sensation; no deformity; no previous ulcer", footwear: "Normal footwear; avoid undersized shoes", review: "Annual" },
    { risk: "Moderate", criteria: "Neuropathy or deformity; no previous ulcer", footwear: "Pressure-relieving insoles replaced every 6 months; Oxford lace-up shoes", review: "Every 6 months" },
    { risk: "High", criteria: "Neuropathy + deformity or PAD", footwear: "Pressure-relieving insoles every 4 months; lace-up shoes", review: "Every 4 months" },
    { risk: "Very High", criteria: "Previous ulcer/amputation + neuropathy + PAD", footwear: "Insoles every 4 months; consider custom orthotics", review: "Every 2 months + specialist referral" },
  ];

  const colors = [C.green, "#2E7D32", C.accent, C.red];
  ["Risk", "Criteria", "Footwear Prescription", "Review Frequency"].forEach((h, i) => {
    const xs = [0.3, 1.5, 5.0, 8.0]; const ws = [1.1, 3.4, 2.9, 1.7];
    sl.addShape(pres.ShapeType.rect, { x: xs[i], y: 1.3, w: ws[i], h: 0.42, fill: { color: C.navy } });
    sl.addText(h, { x: xs[i], y: 1.3, w: ws[i], h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  riskRows.forEach((r, i) => {
    const y = 1.74 + i * 0.82;
    const bg = i % 2 === 0 ? C.white : "EDF1F5";
    sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.8, fill: { color: bg } });
    sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.1, h: 0.8, fill: { color: colors[i] } });
    sl.addText(r.risk, { x: 0.3, y, w: 1.1, h: 0.8, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(r.criteria, { x: 1.5, y: y + 0.04, w: 3.4, h: 0.72, fontSize: 11, color: C.dark, fontFace: "Calibri", valign: "middle" });
    sl.addText(r.footwear, { x: 5.0, y: y + 0.04, w: 2.9, h: 0.72, fontSize: 11, color: C.dark, fontFace: "Calibri", valign: "middle" });
    sl.addText(r.review, { x: 8.0, y: y + 0.04, w: 1.7, h: 0.72, fontSize: 11, color: C.dark, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  sl.addText("Daily self-examination of feet is mandatory for moderate–very high risk patients. Glycaemic control, smoking cessation, and BP management are systemic priorities.", {
    x: 0.3, y: 5.1, w: 9.4, h: 0.45, fontSize: 11, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – MDT APPROACH
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.dark } });
  contentHeader(sl, "Multidisciplinary Team Approach");

  sl.addText("Optimal outcomes require coordinated care across specialties – centres with critical care, wound care,\nnutrition, and rehabilitation achieve the best long-term results.", {
    x: 0.3, y: 0.83, w: 9.4, h: 0.72,
    fontSize: 13, italic: true, color: C.muted, fontFace: "Calibri", align: "center",
  });

  const team = [
    { role: "Diabetologist / Endocrinologist", resp: "Glycaemic optimisation, systemic metabolic management" },
    { role: "Vascular Surgeon", resp: "Perfusion assessment, revascularisation, amputation level selection" },
    { role: "Orthopaedic / Podiatric Surgeon", resp: "Debridement, osteomyelitis surgery, foot reconstruction" },
    { role: "Infectious Disease Specialist", resp: "Antibiotic selection, osteomyelitis management, culture interpretation" },
    { role: "Wound Care Nurse / Podiatrist", resp: "Dressing protocols, callus management, offloading compliance" },
    { role: "Vascular / Orthotist", resp: "Casting, custom footwear, prosthetic planning post-amputation" },
    { role: "Dietitian & Nutritionist", resp: "Nutritional support for wound healing; protein, micronutrients" },
    { role: "Physiotherapy / Rehabilitation", resp: "Functional recovery, gait re-training, prosthesis adaptation" },
  ];

  team.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.68 + row * 0.96;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 0.88, fill: { color: C.navy }, line: { color: C.teal, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 0.25, h: 0.88, fill: { color: C.accent } });
    sl.addText(t.role, { x: x + 0.35, y: y + 0.04, w: 4.1, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri" });
    sl.addText(t.resp, { x: x + 0.35, y: y + 0.44, w: 4.1, h: 0.38, fontSize: 11, color: C.muted, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 – KEY TAKEAWAYS
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.dark } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: "100%", fill: { color: C.accent } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: "100%", h: 0.08, fill: { color: C.accent } });

  sl.addText("KEY TAKEAWAYS", {
    x: 0.4, y: 0.05, w: 9.2, h: 0.65,
    fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 4, align: "center",
  });

  const points = [
    { n: "1", text: "DFUs affect up to 25% of diabetics in their lifetime; infected ulcers carry significant morbidity and premature mortality." },
    { n: "2", text: "The triad of neuropathy, ischaemia, and infection drives ulcer progression – all three must be assessed and addressed simultaneously." },
    { n: "3", text: "Classify with Wagner (depth/necrosis) and IWGDF/IDSA (infection severity) to guide antibiotic, surgical, and offloading decisions." },
    { n: "4", text: "Deep tissue or bone cultures are essential – superficial swabs reflect colonisation and must not guide antibiotic therapy." },
    { n: "5", text: "Total contact casting is the gold standard for offloading neuropathic plantar ulcers; compliance determines outcomes." },
    { n: "6", text: "Revascularise before reconstruction in ischaemic limbs; TcPO₂ <40 mmHg is a threshold for HBO consideration." },
    { n: "7", text: "Early surgical debridement reduces major amputation rates; osteomyelitis requires 6-week antibiotics if bone is not resected." },
    { n: "8", text: "Multidisciplinary care – diabetologist, vascular surgeon, podiatrist, ID specialist, and rehabilitation – produces the best outcomes." },
  ];

  points.forEach((p, i) => {
    const col = i < 4 ? 0 : 1;
    const row = i % 4;
    const x = 0.4 + col * 4.85;
    const y = 0.9 + row * 1.12;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 0.5, h: 0.5, fill: { color: C.accent } });
    sl.addText(p.n, { x, y, w: 0.5, h: 0.5, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(p.text, { x: x + 0.58, y, w: 4.1, h: 0.9, fontSize: 11.5, color: C.white, fontFace: "Calibri", valign: "middle" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 – REFERENCES
// ══════════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
  contentHeader(sl, "References & Sources");

  const refs = [
    "1. Sabiston Textbook of Surgery: The Biological Basis of Modern Surgical Practice, 22nd ed. (2024). Chapter 35: Diabetic Foot Infections.",
    "2. Fischer's Mastery of Surgery, 8th edition. Chapter 246: Etiology and Pathophysiology of Diabetic Foot Ulcerations.",
    "3. Campbell's Operative Orthopaedics, 15th edition (2026). Chapter 91: Treatment of Foot Ulcers; Table 91.1 Wagner Classification.",
    "4. Textbook of Family Medicine, 9th ed. Section: Diabetic Foot Ulcer Infections.",
    "5. Senneville E, et al. IWGDF/IDSA Guidelines on the Diagnosis and Treatment of Diabetes-related Foot Infections (IWGDF/IDSA 2023). Clin Infect Dis. 2023;ciad527.",
    "6. OVIVA Trial: Oral vs Intravenous Antibiotic Therapy for Bone and Joint Infections. Lancet 2019.",
    "7. Harrison's Principles of Internal Medicine, 22nd edition (2025). Chapter on Foot Osteomyelitis.",
    "8. Bailey and Love's Short Practice of Surgery, 28th ed. Antibiotic therapy in DFI.",
  ];

  refs.forEach((r, i) => {
    sl.addText(r, {
      x: 0.35, y: 0.88 + i * 0.58, w: 9.3, h: 0.52,
      fontSize: 11.5, color: C.dark, fontFace: "Calibri", valign: "top",
    });
    if (i < refs.length - 1) {
      sl.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.88 + (i + 1) * 0.58 - 0.05, w: 9.3, h: 0.01, fill: { color: C.muted, transparency: 70 } });
    }
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/diabetic-foot-ulcer-ppt/Diabetic_Foot_Ulcer.pptx" })
  .then(() => console.log("DONE: /home/daytona/workspace/diabetic-foot-ulcer-ppt/Diabetic_Foot_Ulcer.pptx"))
  .catch(e => { console.error(e); process.exit(1); });
Running Command

cd /home/daytona/workspace/diabetic-foot-ulcer-ppt && node generate.js 2>&1

Running Command

ls -lh /home/daytona/workspace/diabetic-foot-ulcer-ppt/Diabetic_Foot_Ulcer.pptx

Your presentation is ready. Download it here:

Diabetic Foot Ulcer

Presentation · PPTX


What's inside (19 slides, clinician-level):
#Slide
1Title – deep navy/teal design with accent bar
2Presentation Overview (15-item outline, two columns)
3Epidemiology & Burden – 4 stat callout boxes + key facts
4Pathophysiology – three-pillar layout: Neuropathy / PAD / Infection
5Clinical Assessment – history vs. examination split-column
6Wagner Classification – colour-coded 6-grade table with management
7IWGDF/IDSA Infection Severity Classification 2023 – 4-tier table
8Diagnostic Workup – lab, microbiology, imaging, vascular quad-panel
9Principles of Management – 6-pillar dark-background layout
10Wound Care & Debridement – indications + advanced therapies
11Offloading – TCC, RCW, therapeutic footwear, surgical offloading
12Antibiotic Therapy – empirical targets + duration table
13Surgical Management & Amputation – levels with prognosis
14Revascularisation – when to revascularise + endo vs. open options
15Diabetic Foot Osteomyelitis – diagnosis, conservative vs. surgical
16Prevention & Foot Care – risk-stratified surveillance table
17Multidisciplinary Team – 8-specialty grid
18Key Takeaways – 8 numbered points
19References – 8 sources (Sabiston, Fischer's, Campbell's, IWGDF/IDSA 2023, etc.)
Design: Deep navy dominant background for title/dark slides, light slate for content slides, warm amber-orange accent, teal supporting colour - a palette suited to a clinical/surgical specialty presentation.
This is a shared conversation. Sign in to Orris to start your own chat.