Can u make ppts

Asking for Preferences

Dvt

Asking for Preferences
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Running Command

mkdir -p /home/daytona/workspace/dvt-ppt && ls /home/daytona/workspace/dvt-ppt

Writing File

~/dvt-ppt/dvt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Deep Vein Thrombosis (DVT) - Clinical Overview";
pres.author = "Clinical Presentation";

// ─── COLOR PALETTE ───────────────────────────────────────────────
const NAVY    = "0D2B55";   // dominant dark
const STEEL   = "1A4A7A";   // secondary
const ACCENT  = "E8A020";   // amber accent
const WHITE   = "FFFFFF";
const OFFWHITE= "F4F7FB";
const GRAY    = "6B7A8D";
const LGRAY   = "CBD5E0";
const DARKTEXT= "1C2833";
const LIGHTBG = "EAF1FA";

// ─── HELPER: Dark slide header ────────────────────────────────────
function addDarkSlide(slide, title, subtitle) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY } });
  // Accent bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.7, w: 10, h: 0.15, fill: { color: ACCENT } });
  slide.addText(title, {
    x: 0.6, y: 1.6, w: 8.8, h: 1.4,
    fontSize: 44, bold: true, color: WHITE, align: "center", fontFace: "Calibri"
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.6, y: 3.2, w: 8.8, h: 0.7,
      fontSize: 18, color: LGRAY, align: "center", fontFace: "Calibri", italic: true
    });
  }
}

// ─── HELPER: Section header (dark strip top) ──────────────────────
function addSectionHeader(slide, sectionTitle) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: NAVY } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 10, h: 0.06, fill: { color: ACCENT } });
  slide.addText(sectionTitle, {
    x: 0.3, y: 0.1, w: 9.4, h: 0.55,
    fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
  });
}

// ─── HELPER: bullet list ─────────────────────────────────────────
function makeBullets(items, opts = {}) {
  return items.map((item, i) => ({
    text: item,
    options: {
      bullet: { type: "bullet", characterCode: "25A0", color: ACCENT },
      fontSize: opts.fontSize || 15,
      color: opts.color || DARKTEXT,
      fontFace: "Calibri",
      breakLine: i < items.length - 1
    }
  }));
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addDarkSlide(s,
    "Deep Vein Thrombosis",
    "Clinical Assessment, Diagnosis & Management"
  );
  s.addText("A clinical reference for physicians & hospitalists", {
    x: 0.6, y: 4.1, w: 8.8, h: 0.4,
    fontSize: 13, color: LGRAY, align: "center", fontFace: "Calibri"
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 2 – DEFINITION & EPIDEMIOLOGY
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Definition & Epidemiology");

  // Left panel – definition box
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.0, w: 4.5, h: 4.2, fill: { color: NAVY }, line: { color: NAVY } });
  s.addText("What is DVT?", {
    x: 0.3, y: 1.05, w: 4.5, h: 0.5,
    fontSize: 16, bold: true, color: ACCENT, fontFace: "Calibri", align: "center"
  });
  s.addText([
    { text: "Formation of a blood clot (thrombus) within the deep venous system, most commonly the lower extremities.", options: { breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "Part of the spectrum of Venous Thromboembolism (VTE) — which also includes Pulmonary Embolism (PE).", options: { breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "Proximal DVT (femoral, popliteal, iliac) carries higher PE risk than isolated distal (calf) DVT.", options: {} }
  ], {
    x: 0.4, y: 1.65, w: 4.3, h: 3.3,
    fontSize: 13, color: WHITE, fontFace: "Calibri", valign: "top"
  });

  // Right panel – epidemiology stats
  s.addText("Epidemiology", {
    x: 5.1, y: 1.05, w: 4.5, h: 0.4,
    fontSize: 16, bold: true, color: NAVY, fontFace: "Calibri"
  });

  const stats = [
    ["~1–2", "cases per 1,000 persons/year"],
    [">50%", "of untreated proximal DVT leads to PE"],
    ["<10%", "of ED DVT cases are bilateral"],
    ["~25%", "of suspected DVTs confirmed on imaging"],
  ];

  stats.forEach(([num, label], i) => {
    const y = 1.55 + i * 0.95;
    s.addShape(pres.ShapeType.rect, { x: 5.1, y, w: 4.4, h: 0.8, fill: { color: LIGHTBG }, line: { color: LGRAY, pt: 1 } });
    s.addText(num, { x: 5.15, y: y + 0.05, w: 1.1, h: 0.7, fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(label, { x: 6.35, y: y + 0.12, w: 3.1, h: 0.55, fontSize: 12, color: DARKTEXT, fontFace: "Calibri", valign: "middle" });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 3 – PATHOPHYSIOLOGY (VIRCHOW'S TRIAD)
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Pathophysiology – Virchow's Triad");

  const triad = [
    {
      label: "Venous Stasis",
      icon: "S",
      color: NAVY,
      points: ["Immobility, bed rest", "Long-haul travel (>4 hrs)", "Heart failure", "Pregnancy"]
    },
    {
      label: "Endothelial Injury",
      icon: "E",
      color: STEEL,
      points: ["Surgery / trauma", "Central venous catheters", "Prior DVT", "Inflammation"]
    },
    {
      label: "Hypercoagulability",
      icon: "H",
      color: "1A6B5A",
      points: ["Active malignancy", "Thrombophilia (Factor V Leiden, Protein C/S deficiency)", "Oral contraceptives / HRT", "Pregnancy / postpartum"]
    }
  ];

  triad.forEach((t, i) => {
    const x = 0.25 + i * 3.25;
    // Card background
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 3.05, h: 4.25, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    // Top color bar
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 3.05, h: 0.55, fill: { color: t.color } });
    s.addText(t.label, { x, y: 1.02, w: 3.05, h: 0.5, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
    // Icon circle
    s.addShape(pres.ShapeType.ellipse, { x: x + 1.15, y: 1.45, w: 0.75, h: 0.75, fill: { color: ACCENT } });
    s.addText(t.icon, { x: x + 1.15, y: 1.47, w: 0.75, h: 0.72, fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });

    s.addText(makeBullets(t.points, { fontSize: 12, color: DARKTEXT }), {
      x: x + 0.1, y: 2.3, w: 2.85, h: 2.8, fontFace: "Calibri"
    });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 4 – RISK FACTORS
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Risk Factors");

  const categories = [
    {
      title: "Patient Factors",
      items: ["Age >60 years", "Prior VTE history", "Obesity (BMI >30)", "Thrombophilia", "Pregnancy / postpartum", "Varicose veins"]
    },
    {
      title: "Acquired / Situational",
      items: ["Major surgery (esp. orthopaedic)", "Active malignancy", "Trauma / fractures", "Prolonged immobility", "Long-haul travel", "Central venous catheter"]
    },
    {
      title: "Drug / Hormonal",
      items: ["Combined oral contraceptives", "Hormone replacement therapy", "Antipsychotics (clozapine)", "Tamoxifen / chemotherapy", "Erythropoiesis-stimulating agents"]
    }
  ];

  categories.forEach((cat, i) => {
    const x = 0.25 + i * 3.25;
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 3.05, h: 4.25, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 3.05, h: 0.5, fill: { color: STEEL } });
    s.addText(cat.title, { x, y: 1.02, w: 3.05, h: 0.45, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
    s.addText(makeBullets(cat.items, { fontSize: 12 }), { x: x + 0.1, y: 1.6, w: 2.85, h: 3.4 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 5 – CLINICAL PRESENTATION
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Clinical Presentation");

  // Left column – symptoms & signs
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.95, w: 4.4, h: 4.3, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.95, w: 4.4, h: 0.45, fill: { color: NAVY } });
  s.addText("Symptoms & Signs", { x: 0.3, y: 0.97, w: 4.4, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
  s.addText(makeBullets([
    "Unilateral limb pain and swelling",
    "Calf pain / cramping or sense of fullness",
    "Erythema, warmth, tenderness along deep veins",
    "Dilation of superficial collateral veins",
    "Palpable venous cord (rare)",
    "Homans' sign - calf pain on dorsiflexion (neither sensitive nor specific)",
    "Majority have no / subtle physical signs"
  ], { fontSize: 12 }), { x: 0.4, y: 1.5, w: 4.2, h: 3.5 });

  // Right column – special populations + upper limb
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 0.95, w: 4.6, h: 4.3, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 0.95, w: 4.6, h: 0.45, fill: { color: STEEL } });
  s.addText("Special Considerations", { x: 5.0, y: 0.97, w: 4.6, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });

  s.addText("Upper Extremity DVT", { x: 5.1, y: 1.5, w: 4.3, h: 0.35, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri" });
  s.addText(makeBullets([
    ">90% associated with indwelling catheter / pacemaker wire",
    "Paget-Schroetter syndrome: dominant arm in young athletes (effort-induced thoracic outlet syndrome)"
  ], { fontSize: 11 }), { x: 5.1, y: 1.9, w: 4.3, h: 1.0 });

  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.95, w: 4.3, h: 0.04, fill: { color: ACCENT } });

  s.addText("Left Leg Predominance", { x: 5.1, y: 3.05, w: 4.3, h: 0.35, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri" });
  s.addText("May-Thurner Syndrome: left iliac vein compression by left iliac artery increases left-sided DVT frequency.", {
    x: 5.1, y: 3.45, w: 4.3, h: 0.65, fontSize: 11, color: DARKTEXT, fontFace: "Calibri"
  });

  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 4.15, w: 4.3, h: 0.04, fill: { color: ACCENT } });
  s.addText("Bilateral DVT in <10% of ED patients with DVT", {
    x: 5.1, y: 4.25, w: 4.3, h: 0.5, fontSize: 11, color: DARKTEXT, fontFace: "Calibri", italic: true
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 6 – DIFFERENTIAL DIAGNOSIS
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Differential Diagnosis");

  const ddx = [
    { title: "Venous Insufficiency", body: "Congestion & inflammation; common in older patients. Note: venous insufficiency itself increases DVT risk." },
    { title: "Cellulitis", body: "Localised skin infection. Concurrent DVT in only ~3% of cellulitis patients. Fever favours cellulitis." },
    { title: "Baker Cyst / Rupture", body: "Popliteal mass or ruptured cyst causing calf inflammation - clinically indistinguishable from DVT." },
    { title: "Muscle / Tendon Injury", body: "Gastrocnemius tear or Achilles tendon injury - pain/swelling; distinguished by mechanism of injury." },
    { title: "Spontaneous Calf Hematoma", body: "Especially in anticoagulated patients; inflammatory changes mimic DVT." },
    { title: "Systemic Edema", body: "CHF, liver disease, hypoalbuminaemia - may cause asymmetrical swelling raising DVT concern." }
  ];

  ddx.forEach((item, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.0 + row * 1.55;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 1.4, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y, w: 0.12, h: 1.4, fill: { color: ACCENT } });
    s.addText(item.title, { x: x + 0.2, y: y + 0.08, w: 4.3, h: 0.35, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri" });
    s.addText(item.body, { x: x + 0.2, y: y + 0.45, w: 4.3, h: 0.85, fontSize: 11, color: DARKTEXT, fontFace: "Calibri" });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 7 – WELLS SCORE
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Pre-test Probability – Wells DVT Score");

  const wellsRows = [
    ["Active cancer (treatment within 6 months or palliative)", "+1"],
    ["Paralysis, paresis, or recent lower extremity plaster immobilisation", "+1"],
    ["Bedridden ≥3 days OR major surgery within 12 weeks (GA/RA)", "+1"],
    ["Localised tenderness along deep venous system distribution", "+1"],
    ["Entire leg swollen", "+1"],
    ["Calf swelling ≥3 cm more than asymptomatic side (10 cm below tibial tuberosity)", "+1"],
    ["Pitting oedema confined to symptomatic leg", "+1"],
    ["Collateral superficial veins (non-varicose)", "+1"],
    ["Previously documented DVT", "+1"],
    ["Alternative diagnosis at least as likely as DVT", "−2"],
  ];

  // Table header
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.0, w: 7.8, h: 0.38, fill: { color: NAVY } });
  s.addText("Clinical Feature", { x: 0.35, y: 1.03, w: 6.8, h: 0.32, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri" });
  s.addText("Score", { x: 7.4, y: 1.03, w: 0.7, h: 0.32, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });

  wellsRows.forEach((row, i) => {
    const y = 1.38 + i * 0.36;
    const bg = i % 2 === 0 ? WHITE : LIGHTBG;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 7.8, h: 0.35, fill: { color: bg } });
    const scoreColor = row[1] === "−2" ? "C0392B" : "1A6B5A";
    s.addText(row[0], { x: 0.4, y: y + 0.03, w: 6.7, h: 0.28, fontSize: 10.5, color: DARKTEXT, fontFace: "Calibri" });
    s.addText(row[1], { x: 7.4, y: y + 0.03, w: 0.7, h: 0.28, fontSize: 12, bold: true, color: scoreColor, fontFace: "Calibri", align: "center" });
  });

  // Interpretation box
  s.addShape(pres.ShapeType.rect, { x: 8.25, y: 1.0, w: 1.45, h: 4.3, fill: { color: NAVY } });
  s.addText("Interpretation", { x: 8.28, y: 1.05, w: 1.4, h: 0.4, fontSize: 10, bold: true, color: ACCENT, fontFace: "Calibri", align: "center" });
  s.addText([
    { text: "Score <2", options: { bold: true, breakLine: true, color: ACCENT } },
    { text: "Low probability", options: { breakLine: true, color: WHITE } },
    { text: " ", options: { breakLine: true } },
    { text: "Score ≥2", options: { bold: true, breakLine: true, color: ACCENT } },
    { text: "High probability", options: { breakLine: true, color: WHITE } },
    { text: " ", options: { breakLine: true } },
    { text: "Combine with D-dimer for low PTP; proceed to USS for high PTP", options: { color: LGRAY, italic: true } }
  ], { x: 8.28, y: 1.5, w: 1.4, h: 3.6, fontSize: 10, fontFace: "Calibri" });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 8 – DIAGNOSTIC WORK-UP
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Diagnostic Work-Up");

  // D-dimer box
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.95, w: 4.5, h: 2.25, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.95, w: 4.5, h: 0.45, fill: { color: NAVY } });
  s.addText("D-Dimer", { x: 0.3, y: 0.97, w: 4.5, h: 0.4, fontSize: 15, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
  s.addText(makeBullets([
    "Measures enzymatic breakdown of cross-linked fibrin",
    "Sensitivity ~92%, Specificity ~45% (cutoff >500 ng/mL)",
    "Age-adjusted threshold: age × 10 ng/mL (e.g. 80 yrs → 800 ng/mL)",
    "FALSE POSITIVE: malignancy, pregnancy, surgery, infection, age",
    "FALSE NEGATIVE: warfarin use"
  ], { fontSize: 11 }), { x: 0.4, y: 1.5, w: 4.3, h: 1.6 });

  // USS box
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.95, w: 4.5, h: 2.25, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.95, w: 4.5, h: 0.45, fill: { color: STEEL } });
  s.addText("Compression Ultrasonography (USS)", { x: 5.1, y: 0.97, w: 4.5, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
  s.addText(makeBullets([
    "Most widely used non-invasive test for proximal DVT",
    "Non-compressibility of vein = diagnostic criterion",
    "High accuracy for proximal DVT; less accurate for distal",
    "3-point scan: common femoral, femoral, popliteal veins",
    "Whole-leg scan adds posterior tibial, peroneal, saphenous"
  ], { fontSize: 11 }), { x: 5.2, y: 1.5, w: 4.3, h: 1.6 });

  // Diagnostic algorithm
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.35, w: 9.4, h: 1.95, fill: { color: LIGHTBG }, line: { color: LGRAY, pt: 1 } });
  s.addText("Diagnostic Algorithm", { x: 0.4, y: 3.42, w: 4.0, h: 0.35, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri" });

  const steps = [
    { label: "Low PTP\n(Wells <2)", action: "D-Dimer\n→ If negative: DVT excluded\n→ If positive: USS" },
    { label: "High PTP\n(Wells ≥2)", action: "USS\n→ If positive: treat\n→ If negative: D-dimer + follow-up USS at 1 week" }
  ];

  steps.forEach((step, i) => {
    const x = 0.4 + i * 4.7;
    s.addShape(pres.ShapeType.rect, { x, y: 3.85, w: 2.2, h: 1.25, fill: { color: NAVY }, line: { color: NAVY } });
    s.addText(step.label, { x, y: 3.88, w: 2.2, h: 1.2, fontSize: 11, bold: true, color: ACCENT, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addShape(pres.ShapeType.rect, { x: x + 2.25, y: 3.85, w: 2.2, h: 1.25, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    s.addText(step.action, { x: x + 2.3, y: 3.88, w: 2.1, h: 1.2, fontSize: 10, color: DARKTEXT, fontFace: "Calibri", valign: "middle" });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 9 – TREATMENT: ANTICOAGULATION
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Treatment – Anticoagulation");

  // Title note
  s.addText("Anticoagulation should be initiated at time of diagnosis (or when imaging is delayed) unless contraindicated.", {
    x: 0.3, y: 0.88, w: 9.4, h: 0.4, fontSize: 11, italic: true, color: GRAY, fontFace: "Calibri"
  });

  const drugs = [
    {
      drug: "Rivaroxaban (Xarelto)",
      class: "DOAC – Direct Xa inhibitor",
      dose: "15 mg BD x 21 days → 20 mg OD",
      notes: "No LMWH bridging required. First-choice for most patients.",
      highlight: true
    },
    {
      drug: "Apixaban (Eliquis)",
      class: "DOAC – Direct Xa inhibitor",
      dose: "10 mg BD x 7 days → 5 mg BD",
      notes: "No bridging required. First-choice; preferred in renal impairment.",
      highlight: true
    },
    {
      drug: "Dabigatran (Pradaxa)",
      class: "DOAC – Direct thrombin inhibitor",
      dose: "5–10 days LMWH first → 150 mg BD",
      notes: "Requires initial parenteral bridging.",
      highlight: false
    },
    {
      drug: "LMWH (e.g. Enoxaparin)",
      class: "Low Molecular Weight Heparin",
      dose: "1 mg/kg SC BD or 1.5 mg/kg OD",
      notes: "Preferred in cancer (lower recurrence than warfarin). Also use in pregnancy.",
      highlight: false
    },
    {
      drug: "Warfarin",
      class: "Vitamin K Antagonist",
      dose: "Target INR 2.0–3.0 (bridge with LMWH)",
      notes: "Requires regular INR monitoring. Second-line to DOACs.",
      highlight: false
    }
  ];

  drugs.forEach((d, i) => {
    const col = i < 3 ? 0 : 1;
    const row = i < 3 ? i : i - 3;
    const x = 0.25 + col * 5.0;
    const y = 1.45 + row * 1.35;
    const h = 1.2;
    const bgColor = d.highlight ? "E8F4E8" : WHITE;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h, fill: { color: bgColor }, line: { color: LGRAY, pt: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y, w: 0.1, h, fill: { color: d.highlight ? "1A6B5A" : GRAY } });
    s.addText(d.drug, { x: x + 0.18, y: y + 0.07, w: 4.3, h: 0.3, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri" });
    s.addText(d.class, { x: x + 0.18, y: y + 0.37, w: 4.3, h: 0.22, fontSize: 10, color: GRAY, fontFace: "Calibri", italic: true });
    s.addText("Dose: " + d.dose, { x: x + 0.18, y: y + 0.6, w: 4.3, h: 0.22, fontSize: 10, color: DARKTEXT, fontFace: "Calibri" });
    s.addText(d.notes, { x: x + 0.18, y: y + 0.85, w: 4.3, h: 0.28, fontSize: 10, color: STEEL, fontFace: "Calibri", italic: true });
  });

  // Contraindications note
  s.addShape(pres.ShapeType.rect, { x: 5.25, y: 4.15, w: 4.45, h: 1.2, fill: { color: "FFF3CD" }, line: { color: ACCENT, pt: 1 } });
  s.addText("DOACs are contraindicated / not studied in:", { x: 5.35, y: 4.22, w: 4.2, h: 0.3, fontSize: 11, bold: true, color: "7D4E00", fontFace: "Calibri" });
  s.addText("Pregnancy • Severe renal/hepatic failure • Antiphospholipid syndrome • High-risk PE", {
    x: 5.35, y: 4.52, w: 4.2, h: 0.6, fontSize: 10, color: "7D4E00", fontFace: "Calibri"
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 10 – DURATION OF TREATMENT
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Duration of Anticoagulation");

  const durations = [
    {
      category: "Provoked DVT",
      subtitle: "(Transient risk factor – surgery, immobility, trauma)",
      duration: "3 Months",
      color: "1A6B5A",
      notes: "Lower recurrence risk after provoking factor resolves. Minimum 3 months for proximal DVT."
    },
    {
      category: "Unprovoked DVT",
      subtitle: "(No identifiable cause)",
      duration: "3–6 Months\n+/- Extended",
      color: STEEL,
      notes: "Consider extended therapy based on bleeding risk vs. recurrence risk. Annual recurrence ~10% without anticoagulation."
    },
    {
      category: "Cancer-Associated DVT",
      subtitle: "(Active malignancy)",
      duration: "Until cancer\nresolved / inactive",
      color: "8B2020",
      notes: "LMWH or DOAC (edoxaban, rivaroxaban). Duration guided by ongoing cancer activity and bleeding risk."
    },
    {
      category: "Isolated Distal DVT",
      subtitle: "(Below-knee calf veins only)",
      duration: "3 Months\nor Surveillance",
      color: NAVY,
      notes: "Anticoagulate if symptomatic, high recurrence risk, or clot >5 cm. Otherwise serial USS at 1 week to check propagation."
    }
  ];

  durations.forEach((d, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.25 + col * 4.9;
    const y = 1.0 + row * 2.25;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 2.1, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.5, fill: { color: d.color } });
    s.addText(d.category, { x, y: y + 0.05, w: 4.6, h: 0.4, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
    s.addText(d.subtitle, { x: x + 0.2, y: y + 0.55, w: 4.2, h: 0.3, fontSize: 10, color: GRAY, fontFace: "Calibri", italic: true });
    s.addShape(pres.ShapeType.rect, { x: x + 1.2, y: y + 0.9, w: 2.2, h: 0.55, fill: { color: ACCENT } });
    s.addText(d.duration, { x: x + 1.2, y: y + 0.92, w: 2.2, h: 0.52, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(d.notes, { x: x + 0.15, y: y + 1.55, w: 4.3, h: 0.5, fontSize: 10, color: DARKTEXT, fontFace: "Calibri" });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 11 – COMPLICATIONS
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "Complications");

  const comps = [
    {
      title: "Pulmonary Embolism (PE)",
      severity: "LIFE-THREATENING",
      sevColor: "C0392B",
      points: [
        ">50% of untreated proximal DVT → PE",
        "Symptoms: pleuritic chest pain, dyspnoea, haemoptysis, hypotension",
        "Right ventricular strain, hypoxaemia, death in massive PE",
        "CTPA is diagnostic gold standard"
      ]
    },
    {
      title: "Post-Thrombotic Syndrome (PTS)",
      severity: "CHRONIC MORBIDITY",
      sevColor: "E8A020",
      points: [
        "20–50% of patients with proximal DVT",
        "Chronic venous hypertension from valve damage",
        "Symptoms: leg pain, swelling, hyperpigmentation, venous ulcers",
        "Risk factors: iliofemoral DVT, recurrent ipsilateral DVT, subtherapeutic anticoagulation"
      ]
    },
    {
      title: "Recurrent DVT / VTE",
      severity: "SIGNIFICANT RISK",
      sevColor: STEEL,
      points: [
        "~10% annual risk after unprovoked DVT without anticoagulation",
        "Higher with thrombophilia, malignancy, antiphospholipid syndrome",
        "Consider extended anticoagulation in unprovoked cases",
        "Thrombophilia screening after first unprovoked VTE"
      ]
    }
  ];

  comps.forEach((c, i) => {
    const x = 0.25 + i * 3.25;
    s.addShape(pres.ShapeType.rect, { x, y: 0.95, w: 3.05, h: 4.35, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y: 0.95, w: 3.05, h: 0.5, fill: { color: NAVY } });
    s.addText(c.title, { x: x + 0.05, y: 0.97, w: 2.95, h: 0.45, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
    // Severity badge
    s.addShape(pres.ShapeType.rect, { x: x + 0.4, y: 1.52, w: 2.25, h: 0.3, fill: { color: c.sevColor } });
    s.addText(c.severity, { x: x + 0.4, y: 1.53, w: 2.25, h: 0.28, fontSize: 9, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
    s.addText(makeBullets(c.points, { fontSize: 11 }), { x: x + 0.1, y: 1.9, w: 2.85, h: 3.15 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 12 – PROPHYLAXIS
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "DVT Prophylaxis");

  // Subheading
  s.addText("Risk stratification and prophylaxis should be assessed within 24 hours of hospital admission and reviewed when clinical status changes.", {
    x: 0.3, y: 0.87, w: 9.4, h: 0.4, fontSize: 10.5, italic: true, color: GRAY, fontFace: "Calibri"
  });

  // Risk table
  const riskRows = [
    { risk: "Low", example: "Maxillofacial, neurosurgery, cardiothoracic", measure: "Early mobilisation" },
    { risk: "Medium", example: "Inguinal hernia, abdominal, gynaecological, urological surgery", measure: "Compression stockings + LMWH" },
    { risk: "High", example: "Pelvic surgery, total hip/knee replacement, major trauma", measure: "LMWH + mechanical compression devices" }
  ];

  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.38, w: 9.4, h: 0.38, fill: { color: NAVY } });
  s.addText("Risk Level", { x: 0.35, y: 1.41, w: 2.0, h: 0.32, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri" });
  s.addText("Surgical Examples", { x: 2.4, y: 1.41, w: 4.5, h: 0.32, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri" });
  s.addText("Prophylaxis", { x: 6.95, y: 1.41, w: 2.7, h: 0.32, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri" });

  const rowColors = [LIGHTBG, WHITE, LIGHTBG];
  riskRows.forEach((row, i) => {
    const y = 1.76 + i * 0.5;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.48, fill: { color: rowColors[i] } });
    const riskColor = row.risk === "High" ? "C0392B" : row.risk === "Medium" ? STEEL : "1A6B5A";
    s.addText(row.risk, { x: 0.35, y: y + 0.08, w: 2.0, h: 0.32, fontSize: 12, bold: true, color: riskColor, fontFace: "Calibri" });
    s.addText(row.example, { x: 2.4, y: y + 0.08, w: 4.5, h: 0.32, fontSize: 10.5, color: DARKTEXT, fontFace: "Calibri" });
    s.addText(row.measure, { x: 6.95, y: y + 0.08, w: 2.7, h: 0.32, fontSize: 10.5, color: DARKTEXT, fontFace: "Calibri", bold: true });
  });

  // Mechanical & pharmacological notes
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.1, w: 4.5, h: 2.2, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.1, w: 4.5, h: 0.4, fill: { color: STEEL } });
  s.addText("Mechanical Methods", { x: 0.3, y: 3.12, w: 4.5, h: 0.35, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
  s.addText(makeBullets([
    "Graduated compression stockings (GCS) - avoid in suspected/known PAD, neuropathy, severe leg oedema",
    "Pneumatic calf compression devices (IPC)",
    "Early mobilisation post-surgery"
  ], { fontSize: 11 }), { x: 0.4, y: 3.58, w: 4.3, h: 1.6 });

  s.addShape(pres.ShapeType.rect, { x: 5.15, y: 3.1, w: 4.55, h: 2.2, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 5.15, y: 3.1, w: 4.55, h: 0.4, fill: { color: NAVY } });
  s.addText("Pharmacological Prophylaxis", { x: 5.15, y: 3.12, w: 4.55, h: 0.35, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
  s.addText(makeBullets([
    "LMWH (e.g. enoxaparin 40 mg SC OD) - most widely used",
    "Fondaparinux - alternative in HIT",
    "DOACs post-arthroplasty (rivaroxaban 10 mg OD x 35 days)",
    "Aspirin 81 mg BD for selected orthopaedic patients"
  ], { fontSize: 11 }), { x: 5.25, y: 3.58, w: 4.35, h: 1.6 });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 13 – SPECIAL POPULATIONS
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: OFFWHITE } });
  addSectionHeader(s, "DVT in Special Populations");

  const pops = [
    {
      title: "Pregnancy",
      points: [
        "Wells score not validated – use LEFt score (Left leg, Edema, first Trimester)",
        "DOACs are contraindicated – use LMWH throughout pregnancy",
        "Avoid warfarin in first trimester (teratogenic)",
        "USS is first imaging test; MRI for pelvic vein DVT"
      ]
    },
    {
      title: "Malignancy",
      points: [
        "Cancer is major prothrombotic state – Trousseau syndrome",
        "LMWH preferred (lower VTE recurrence than warfarin)",
        "DOACs (edoxaban, rivaroxaban) are alternative in low GI bleed risk",
        "Duration: until cancer resolved or patient no longer benefits"
      ]
    },
    {
      title: "Upper Extremity DVT",
      points: [
        ">90% catheter-related; anticoagulate for 3 months",
        "If catheter functioning and needed, keep in situ – anticoagulate while catheter in place",
        "Paget-Schroetter: consider thrombolysis + surgical decompression",
        "Same anticoagulation agents as lower limb DVT"
      ]
    },
    {
      title: "Renal / Hepatic Impairment",
      points: [
        "Severe CKD (eGFR <30): avoid rivaroxaban, edoxaban; apixaban may be used cautiously",
        "LMWH requires dose adjustment or switch to UFH in severe renal failure",
        "Hepatic impairment: avoid DOACs; LMWH is preferred",
        "Monitor anti-Xa levels if LMWH used in renal impairment"
      ]
    }
  ];

  pops.forEach((pop, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.25 + col * 4.9;
    const y = 0.95 + row * 2.3;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 2.15, fill: { color: WHITE }, line: { color: LGRAY, pt: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.45, fill: { color: NAVY } });
    s.addText(pop.title, { x, y: y + 0.03, w: 4.6, h: 0.38, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
    s.addText(makeBullets(pop.points, { fontSize: 11 }), { x: x + 0.1, y: y + 0.55, w: 4.4, h: 1.5 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 14 – KEY TAKE-AWAYS
// ═══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 10, h: 0.08, fill: { color: ACCENT } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.08, fill: { color: ACCENT } });

  s.addText("Key Clinical Take-Aways", {
    x: 0.5, y: 0.12, w: 9, h: 0.55,
    fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
  });

  const points = [
    "Clinical diagnosis is unreliable — always use pretest probability (Wells Score) + D-dimer and/or USS.",
    "DOACs (rivaroxaban, apixaban) are first-line for most DVT — no bridging, no INR monitoring, less intracranial bleeding than warfarin.",
    "D-dimer is highly sensitive but non-specific; age-adjust the threshold (age × 10 ng/mL) to reduce unnecessary imaging.",
    "Minimum anticoagulation duration is 3 months for provoked DVT; consider extended therapy for unprovoked DVT.",
    "Cancer-associated DVT: use LMWH or DOAC; anticoagulate until cancer resolves.",
    "Prevent PE and Post-Thrombotic Syndrome — the two major complications of untreated/undertreated DVT.",
    "Prophylaxis must be assessed in ALL admitted surgical patients within 24 hours of admission."
  ];

  points.forEach((pt, i) => {
    const y = 0.95 + i * 0.67;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.35, h: 0.35, fill: { color: ACCENT } });
    s.addText(`${i + 1}`, { x: 0.3, y, w: 0.35, h: 0.35, fontSize: 12, bold: true, color: NAVY, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(pt, { x: 0.8, y: y + 0.02, w: 8.9, h: 0.35, fontSize: 12, color: WHITE, fontFace: "Calibri" });
  });
}

// ═══════════════════════════════════════════════════════════════
// SAVE
// ═══════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/dvt-ppt/DVT_Clinical_Presentation.pptx" })
  .then(() => console.log("SUCCESS: /home/daytona/workspace/dvt-ppt/DVT_Clinical_Presentation.pptx"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/dvt-ppt && node dvt.js

Your DVT presentation is ready! Here's the download link:

DVT Clinical Presentation

Presentation · PPTX


What's inside - 14 slides:
SlideContent
1Title Slide
2Definition & Epidemiology (with key stats)
3Pathophysiology - Virchow's Triad (3-column card layout)
4Risk Factors (Patient / Acquired / Drug-Hormonal)
5Clinical Presentation + Special Considerations (May-Thurner, Paget-Schroetter)
6Differential Diagnosis (6 conditions, card layout)
7Wells DVT Score (full table with interpretation panel)
8Diagnostic Work-Up (D-dimer, USS, algorithm)
9Treatment - Anticoagulation (DOACs, LMWH, Warfarin + dosing)
10Duration of Anticoagulation (provoked / unprovoked / cancer / distal)
11Complications (PE, Post-Thrombotic Syndrome, Recurrence)
12DVT Prophylaxis (risk table + mechanical/pharmacological methods)
13Special Populations (Pregnancy, Malignancy, Upper limb, Renal/Hepatic)
14Key Clinical Take-Aways (dark closing slide)
Design: Navy/amber professional palette, dark title/close slides, light content slides, accent color-coded severity, full Wells score table, treatment dosing details. Content sourced from Rosen's Emergency Medicine, Goldman-Cecil Medicine, Bailey & Love's Surgery, and other authoritative references.
This is a shared conversation. Sign in to Orris to start your own chat.