1.Surgical infection. Necrosis, gangrene, trophic ulcer, fistula beds, their treatment. Purulent and inflammatory diseases, classification of surgical infection. The general reaction of the organism to infection. The general principles of treatment. Furuncle, carbuncle, hidradenitis, abscess, phlegmon. PodagraPurulent diseases of the fingers, mastitis, paraproctitis. Osteomyelitis. This my topics for presentation can u make 10 to 12 slides of presentation

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

mkdir -p /home/daytona/workspace/surgical-infection-ppt

Writing File

~/surgical-infection-ppt/build.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Surgical Infection";
pres.author = "Medical Presentation";

// ── PALETTE ──────────────────────────────────────────────────────────────────
const C = {
  navy:    "0D1B2A",  // dominant dark bg
  teal:    "1B4F72",  // section headers
  accent:  "1ABC9C",  // accent / highlight
  light:   "EAF4FB",  // content bg panels
  white:   "FFFFFF",
  text:    "1C2833",  // dark text on light bg
  subtext: "5D6D7E",  // secondary text
  red:     "E74C3C",  // danger callouts
  gold:    "F1C40F",  // warnings
};

// ── HELPER: accent bar left side ─────────────────────────────────────────────
function accentBar(slide, color) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: color || C.accent } });
}

// ── HELPER: full dark header bar ─────────────────────────────────────────────
function headerBar(slide, title, subtitle) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.1, fill: { color: C.teal } });
  slide.addText(title, { x: 0.25, y: 0.08, w: 9.5, h: 0.6, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
  if (subtitle) {
    slide.addText(subtitle, { x: 0.25, y: 0.68, w: 9.5, h: 0.35, fontSize: 12, color: C.accent, fontFace: "Calibri", margin: 0, italic: true });
  }
}

// ── HELPER: content box ───────────────────────────────────────────────────────
function contentBox(slide, items, opts) {
  const { x = 0.25, y = 1.2, w = 9.5, h = 4.0, fontSize = 13, color = C.text } = opts || {};
  const richText = items.map((item, i) => ({
    text: item,
    options: { bullet: { type: "bullet", code: "2022", color: C.accent }, breakLine: i < items.length - 1, fontSize, color, fontFace: "Calibri", paraSpaceAfter: 4 }
  }));
  slide.addText(richText, { x, y, w, h, valign: "top", fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 12, shadow: { type: "outer", blur: 4, offset: 2, angle: 45, color: "BBBBBB", opacity: 0.4 } });
}

// ── HELPER: two-column layout ─────────────────────────────────────────────────
function twoCol(slide, leftItems, rightItems, opts) {
  const { yStart = 1.2, h = 4.0 } = opts || {};
  const makeRich = (items, accent) => items.map((item, i) => ({
    text: item,
    options: { bullet: { type: "bullet", code: "2022", color: accent }, breakLine: i < items.length - 1, fontSize: 12, color: C.text, fontFace: "Calibri", paraSpaceAfter: 3 }
  }));
  slide.addText(makeRich(leftItems, C.accent), { x: 0.25, y: yStart, w: 4.55, h, valign: "top", fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 10, shadow: { type: "outer", blur: 4, offset: 2, angle: 45, color: "BBBBBB", opacity: 0.3 } });
  slide.addText(makeRich(rightItems, C.red), { x: 5.2, y: yStart, w: 4.55, h, valign: "top", fill: { color: C.light }, line: { color: C.red, width: 1 }, margin: 10, shadow: { type: "outer", blur: 4, offset: 2, angle: 45, color: "BBBBBB", opacity: 0.3 } });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  // Full dark bg
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  // Decorative accent shapes
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.5, h: 5.625, fill: { color: C.accent } });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 4.8, w: 9.5, h: 0.08, fill: { color: C.accent } });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 4.9, w: 9.5, h: 0.08, fill: { color: C.teal } });
  // Title
  s.addText("SURGICAL INFECTION", {
    x: 0.8, y: 1.0, w: 8.8, h: 1.0, fontSize: 40, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", charSpacing: 3
  });
  // Subtitle block
  s.addText([
    { text: "Necrosis · Gangrene · Trophic Ulcer · Fistula", options: { breakLine: true } },
    { text: "Purulent Diseases · Osteomyelitis · General Principles of Treatment", options: { breakLine: false } }
  ], {
    x: 0.8, y: 2.2, w: 8.8, h: 1.2, fontSize: 15, color: C.accent,
    fontFace: "Calibri", align: "center", italic: true
  });
  // Decorative tag line
  s.addText("Surgical Infections — Classification, Pathology & Management", {
    x: 0.8, y: 3.6, w: 8.8, h: 0.5, fontSize: 12, color: C.subtext,
    fontFace: "Calibri", align: "center"
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — CLASSIFICATION OF SURGICAL INFECTION
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Classification of Surgical Infection", "Basis: Causative agent, clinical course, tissue involvement");

  // Left column: by pathogen
  s.addText("By Causative Agent", { x: 0.25, y: 1.2, w: 4.55, h: 0.4, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri" });
  const leftItems = [
    "Aerobic (Staphylococcus, Streptococcus, E. coli, Pseudomonas)",
    "Anaerobic non-clostridial (Bacteroides, Peptostreptococcus)",
    "Clostridial — Gas Gangrene, Tetanus",
    "Specific: Tuberculosis, Actinomycosis, Syphilis",
    "Mixed / Polymicrobial"
  ];
  s.addText(leftItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.accent }, breakLine: i < leftItems.length - 1, fontSize: 12, color: C.text, fontFace: "Calibri", paraSpaceAfter: 3 } })),
    { x: 0.25, y: 1.65, w: 4.55, h: 2.4, fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 10, valign: "top" });

  // Right column: by course
  s.addText("By Clinical Course", { x: 5.2, y: 1.2, w: 4.55, h: 0.4, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri" });
  const rightItems = [
    "Acute vs. Chronic",
    "Local (abscess, cellulitis) vs. Systemic (sepsis)",
    "Non-specific (pyogenic) vs. Specific",
    "Endogenous vs. Exogenous source",
    "Superficial, Deep, Cavity, Visceral"
  ];
  s.addText(rightItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.red }, breakLine: i < rightItems.length - 1, fontSize: 12, color: C.text, fontFace: "Calibri", paraSpaceAfter: 3 } })),
    { x: 5.2, y: 1.65, w: 4.55, h: 2.4, fill: { color: C.light }, line: { color: C.red, width: 1 }, margin: 10, valign: "top" });

  // Bottom callout
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 4.15, w: 9.5, h: 0.7, fill: { color: C.teal } });
  s.addText("Key pathogens: S. aureus (most common), Streptococcus pyogenes, E. coli, Clostridium spp., Bacteroides fragilis", {
    x: 0.35, y: 4.18, w: 9.3, h: 0.65, fontSize: 11, color: C.white, fontFace: "Calibri", bold: true, valign: "middle"
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — NECROSIS & GANGRENE
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Necrosis & Gangrene", "Pathological death of tissue — types and surgical implications");

  // Necrosis box
  s.addText("NECROSIS", { x: 0.25, y: 1.2, w: 4.55, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.teal }, align: "center", valign: "middle" });
  const necItems = [
    "Coagulative — dry, firm; ischemic (heart, kidney)",
    "Liquefactive — wet, pus-like; brain/abscess",
    "Caseous — cheese-like; TB, fungal",
    "Fat Necrosis — saponification; breast, pancreas",
    "Gangrenous — advanced ischemic necrosis"
  ];
  s.addText(necItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.accent }, breakLine: i < necItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 3 } })),
    { x: 0.25, y: 1.62, w: 4.55, h: 2.6, fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 10, valign: "top" });

  // Gangrene box
  s.addText("GANGRENE", { x: 5.2, y: 1.2, w: 4.55, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.red }, align: "center", valign: "middle" });
  const gangItems = [
    "Dry Gangrene — arterial occlusion, no infection; mummification; Rx: debridement / amputation",
    "Wet Gangrene — venous + arterial block + infection; foul smell, spreading; EMERGENCY",
    "Gas Gangrene — Clostridium perfringens; crepitation, toxemia; IV Penicillin + surgery",
    "Diabetic Gangrene — peripheral arteriopathy + neuropathy + infection"
  ];
  s.addText(gangItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.red }, breakLine: i < gangItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 4 } })),
    { x: 5.2, y: 1.62, w: 4.55, h: 2.6, fill: { color: C.light }, line: { color: C.red, width: 1 }, margin: 10, valign: "top" });

  // Bottom bar
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 4.3, w: 9.5, h: 0.55, fill: { color: C.navy } });
  s.addText("Treatment Principles: Remove necrotic tissue (debridement/amputation), antibiotics, improve perfusion, treat underlying cause", {
    x: 0.35, y: 4.33, w: 9.3, h: 0.5, fontSize: 11, color: C.accent, fontFace: "Calibri", valign: "middle"
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — TROPHIC ULCERS & FISTULAS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Trophic Ulcers & Fistulas", "Chronic tissue defects — etiology, features and management");

  s.addText("TROPHIC ULCER", { x: 0.25, y: 1.2, w: 4.55, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.teal }, align: "center", valign: "middle" });
  const ulcerItems = [
    "Definition: Persistent defect due to impaired tissue nutrition",
    "Causes: Venous insufficiency (most common), arterial ischemia, DM neuropathy, pressure sores",
    "Features: Pale/cyanotic edges, sloughy base, painless (neuropathic), scarring",
    "Rx: Treat cause, debridement, compression therapy, skin grafting, HBO therapy"
  ];
  s.addText(ulcerItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.accent }, breakLine: i < ulcerItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 4 } })),
    { x: 0.25, y: 1.62, w: 4.55, h: 2.8, fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 10, valign: "top" });

  s.addText("FISTULA", { x: 5.2, y: 1.2, w: 4.55, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.teal }, align: "center", valign: "middle" });
  const fisItems = [
    "Definition: Abnormal tract connecting two epithelial surfaces",
    "Complete (external) vs. Internal fistula",
    "Causes: Infection, inflammation (Crohn's), foreign body, radiation, tumor",
    "FRIENDS mnemonic: Foreign body, Radiation, Inflammation, Epithelialization, Neoplasm, Distal obstruction, Specific infection",
    "Rx: Treat infection, excision of tract, eliminate distal obstruction"
  ];
  s.addText(fisItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.red }, breakLine: i < fisItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 4 } })),
    { x: 5.2, y: 1.62, w: 4.55, h: 2.8, fill: { color: C.light }, line: { color: C.red, width: 1 }, margin: 10, valign: "top" });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — GENERAL REACTION TO INFECTION / SEPSIS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "General Reaction of the Organism to Infection", "SIRS → Sepsis → Severe Sepsis → Septic Shock");

  // SIRS criteria callout box
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.2, w: 9.5, h: 0.55, fill: { color: C.accent } });
  s.addText("SIRS Criteria (≥2): Temp >38°C or <36°C | HR >90 | RR >20 or PaCO₂ <32 | WBC >12,000 or <4,000 or >10% bands", {
    x: 0.35, y: 1.23, w: 9.3, h: 0.5, fontSize: 11.5, color: C.navy, fontFace: "Calibri", bold: true, valign: "middle"
  });

  // Phases table-like display
  const phases = [
    { label: "Local Infection", desc: "Redness, swelling, heat, pain, loss of function — cardinal signs of inflammation" },
    { label: "SIRS", desc: "Systemic inflammatory response; fever/hypothermia, tachycardia, tachypnea, leukocytosis" },
    { label: "Sepsis", desc: "SIRS + confirmed/suspected infection source; organ dysfunction begins" },
    { label: "Severe Sepsis", desc: "Sepsis + acute organ dysfunction (renal, hepatic, coagulation, CNS)" },
    { label: "Septic Shock", desc: "Sepsis + refractory hypotension despite adequate fluid resuscitation; mortality >40%" },
  ];

  phases.forEach((p, i) => {
    const yPos = 1.88 + i * 0.65;
    const bgColor = i % 2 === 0 ? "EAF4FB" : "D4E6F1";
    s.addShape(pres.ShapeType.rect, { x: 0.25, y: yPos, w: 9.5, h: 0.6, fill: { color: bgColor } });
    s.addShape(pres.ShapeType.rect, { x: 0.25, y: yPos, w: 2.2, h: 0.6, fill: { color: C.teal } });
    s.addText(p.label, { x: 0.3, y: yPos + 0.04, w: 2.1, h: 0.52, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
    s.addText(p.desc, { x: 2.55, y: yPos + 0.04, w: 7.1, h: 0.52, fontSize: 11, color: C.text, fontFace: "Calibri", valign: "middle" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — GENERAL PRINCIPLES OF TREATMENT
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "General Principles of Treatment", "Local + Systemic approach — the cornerstone of surgical infection management");

  const principles = [
    { icon: "1", title: "Surgical Drainage", desc: 'Incision & drainage (I&D) of pus — "ubi pus, ibi evacua"' },
    { icon: "2", title: "Antibiotics", desc: "Culture-guided; empiric broad-spectrum first — cover Staph, Strep, Gram-negatives, anaerobes" },
    { icon: "3", title: "Debridement", desc: "Remove all necrotic tissue; repeated wound inspection; VAC therapy for large wounds" },
    { icon: "4", title: "Immobilization", desc: "Reduce local spread; splinting of affected limb; elevation to reduce edema" },
    { icon: "5", title: "Supportive Care", desc: "IV fluids, nutrition (enteral preferred), pain management, glycaemic control" },
    { icon: "6", title: "Immune Support", desc: "Tetanus prophylaxis, immunoglobulins if indicated; treat immunosuppression" },
  ];

  principles.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const xPos = col === 0 ? 0.25 : 5.2;
    const yPos = 1.25 + row * 1.35;
    s.addShape(pres.ShapeType.rect, { x: xPos, y: yPos, w: 4.55, h: 1.2, fill: { color: C.light }, line: { color: C.accent, width: 1 } });
    s.addShape(pres.ShapeType.rect, { x: xPos, y: yPos, w: 0.5, h: 1.2, fill: { color: C.accent } });
    s.addText(p.icon, { x: xPos, y: yPos + 0.35, w: 0.5, h: 0.5, fontSize: 16, bold: true, color: C.navy, fontFace: "Calibri", align: "center" });
    s.addText(p.title, { x: xPos + 0.55, y: yPos + 0.05, w: 3.9, h: 0.35, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri" });
    s.addText(p.desc, { x: xPos + 0.55, y: yPos + 0.42, w: 3.9, h: 0.7, fontSize: 11, color: C.text, fontFace: "Calibri" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — FURUNCLE, CARBUNCLE & HIDRADENITIS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Furuncle · Carbuncle · Hidradenitis", "Folliculitis spectrum and apocrine gland infections");

  const cards = [
    {
      title: "FURUNCLE (Boil)",
      color: C.teal,
      items: [
        "Acute purulent inflammation of hair follicle + surrounding tissue",
        "Organism: S. aureus",
        "Site: neck, face, axilla, buttocks",
        "Rx: Topical antiseptics; I&D if fluctuant; oral antibiotics (cloxacillin)"
      ]
    },
    {
      title: "CARBUNCLE",
      color: C.red,
      items: [
        "Multiple furuncles with interconnecting sinuses",
        "Common: nape of neck, back; diabetics at risk",
        "Systemic toxemia present; necrotic central plug",
        "Rx: Cruciate incision + debridement, IV antibiotics, glycaemic control"
      ]
    },
    {
      title: "HIDRADENITIS SUPPURATIVA",
      color: "8E44AD",
      items: [
        "Chronic inflammation of apocrine sweat glands",
        "Sites: axilla, groin, perineum, submammary",
        "Recurrent abscesses → sinus tracts → scarring",
        "Rx: Long-term antibiotics, anti-androgens, biologic (adalimumab); wide excision for severe"
      ]
    }
  ];

  cards.forEach((card, i) => {
    const xPos = 0.25 + i * 3.25;
    s.addShape(pres.ShapeType.rect, { x: xPos, y: 1.2, w: 3.1, h: 0.42, fill: { color: card.color } });
    s.addText(card.title, { x: xPos, y: 1.22, w: 3.1, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(card.items.map((t, j) => ({ text: t, options: { bullet: { code: "2022", color: card.color }, breakLine: j < card.items.length - 1, fontSize: 11, color: C.text, fontFace: "Calibri", paraSpaceAfter: 5 } })),
      { x: xPos, y: 1.65, w: 3.1, h: 3.6, fill: { color: C.light }, line: { color: card.color, width: 1 }, margin: 8, valign: "top" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — ABSCESS & PHLEGMON (CELLULITIS)
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Abscess & Phlegmon (Cellulitis)", "Localized vs. diffuse purulent infections");

  s.addText("ABSCESS", { x: 0.25, y: 1.2, w: 4.55, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.teal }, align: "center", valign: "middle" });
  const absItems = [
    "Collection of pus within a DEFINED cavity (pyogenic membrane)",
    "Signs: fluctuation, pointing, skin erythema",
    "Common: soft tissue, perianal, breast, liver (amoebic/pyogenic)",
    "Diagnosis: U/S (hypoechoic collection), aspiration",
    "Treatment: I&D — incision at most fluctuant point; packing; drain placement; antibiotics for cellulitis surround"
  ];
  s.addText(absItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.accent }, breakLine: i < absItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 4 } })),
    { x: 0.25, y: 1.62, w: 4.55, h: 3.3, fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 10, valign: "top" });

  s.addText("PHLEGMON / CELLULITIS", { x: 5.2, y: 1.2, w: 4.55, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.red }, align: "center", valign: "middle" });
  const phlItems = [
    "DIFFUSE, spreading inflammation without defined borders; pus infiltrates tissue planes",
    "Causes: streptococcal (spreading) + staphylococcal",
    "Presents: brawny edema, erythema, warmth, fever, lymphangitis",
    "Necrotizing fasciitis: deep rapidly spreading variant — EMERGENCY; finger test positive",
    "Treatment: broad IV antibiotics (vancomycin + piperacillin-tazobactam); aggressive surgical debridement for NF"
  ];
  s.addText(phlItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.red }, breakLine: i < phlItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 4 } })),
    { x: 5.2, y: 1.62, w: 4.55, h: 3.3, fill: { color: C.light }, line: { color: C.red, width: 1 }, margin: 10, valign: "top" });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — PURULENT FINGER DISEASES & MASTITIS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Purulent Diseases of Fingers (Panaritium) & Mastitis", "Common surgical infections requiring prompt diagnosis and drainage");

  // Finger infections left
  s.addText("PANARITIUM (Felon/Paronychia)", { x: 0.25, y: 1.2, w: 4.55, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.teal }, align: "center", valign: "middle" });
  const panItems = [
    "Skin panaritium — subcutaneous pus, minimal systemic features",
    "Subcutaneous panaritium — deep to skin; most common type",
    "Subungual — under nail plate; throbbing pain; nail removal",
    "Periungual (Paronychia) — around nail fold; S. aureus",
    "Tendinous (Tenosynovitis) — Kanavel signs: finger held flexed, uniform swelling, tenderness along sheath, pain on passive extension",
    "Bone panaritium — osteomyelitis of phalanx",
    "Treatment: I&D under digital block; appropriate antibiotic (cloxacillin / amoxicillin-clavulanate)"
  ];
  s.addText(panItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.accent }, breakLine: i < panItems.length - 1, fontSize: 10.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 3 } })),
    { x: 0.25, y: 1.62, w: 4.55, h: 3.7, fill: { color: C.light }, line: { color: C.accent, width: 1 }, margin: 10, valign: "top" });

  // Mastitis right
  s.addText("MASTITIS", { x: 5.2, y: 1.2, w: 4.55, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", fill: { color: C.red }, align: "center", valign: "middle" });
  const mastItems = [
    "Acute Puerperal Mastitis: lactation (1–4 weeks postpartum); S. aureus via cracked nipple",
    "Presents: engorgement → cellulitis → abscess",
    "Non-puerperal: duct ectasia, periductal mastitis, chronic granulomatous",
    "Treatment: Continue breastfeeding; oral dicloxacillin/flucloxacillin; aspiration or I&D if abscess forms",
    "Incision: radial (not circumareolar) to avoid lactiferous ducts",
    "Weaning not necessary; antibiotic-safe for infant (cloxacillin)"
  ];
  s.addText(mastItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.red }, breakLine: i < mastItems.length - 1, fontSize: 10.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 3 } })),
    { x: 5.2, y: 1.62, w: 4.55, h: 3.7, fill: { color: C.light }, line: { color: C.red, width: 1 }, margin: 10, valign: "top" });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — PARAPROCTITIS (ANORECTAL ABSCESS)
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Paraproctitis — Anorectal Abscesses & Fistula-in-Ano", "Infection of perirectal spaces; most arise from cryptoglandular source");

  // Classification diagram using shapes
  const spaces = [
    { label: "Perianal", x: 0.5, color: "2ECC71", desc: "Most common (60%); superficial; perianal pain + swelling" },
    { label: "Ischiorectal", x: 3.05, color: C.accent, desc: "Large; induration lateral to anus; may be bilateral (horseshoe)" },
    { label: "Intersphincteric", x: 5.6, color: "F39C12", desc: "Between internal & external sphincter; rectal pain without visible swelling" },
    { label: "Supralevator", x: 8.15, color: C.red, desc: "Above levator ani; pelvic pain; CT/MRI required; rare" },
  ];

  spaces.forEach((sp) => {
    s.addShape(pres.ShapeType.rect, { x: sp.x, y: 1.2, w: 2.2, h: 0.42, fill: { color: sp.color } });
    s.addText(sp.label, { x: sp.x, y: 1.22, w: 2.2, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(sp.desc, { x: sp.x, y: 1.65, w: 2.2, h: 1.2, fontSize: 10, color: C.text, fontFace: "Calibri", fill: { color: C.light }, line: { color: sp.color, width: 1 }, margin: 6, valign: "top" });
  });

  // Treatment section
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.0, w: 9.5, h: 0.38, fill: { color: C.teal } });
  s.addText("TREATMENT & COMPLICATIONS", { x: 0.3, y: 3.02, w: 9.4, h: 0.35, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });

  const rxItems = [
    "Definitive treatment: Surgical drainage (under anaesthesia) — never treat conservatively alone",
    "Fistula-in-ano develops in 50% after drainage — subsequent fistulotomy / seton placement",
    "Fournier's gangrene: Life-threatening necrotizing fasciitis of perineum — ICU + aggressive debridement + IV antibiotics"
  ];
  s.addText(rxItems.map((t, i) => ({ text: t, options: { bullet: { code: "2022", color: C.accent }, breakLine: i < rxItems.length - 1, fontSize: 11.5, color: C.text, fontFace: "Calibri", paraSpaceAfter: 5 } })),
    { x: 0.25, y: 3.42, w: 9.5, h: 1.8, fill: { color: C.light }, line: { color: C.teal, width: 1 }, margin: 10, valign: "top" });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — OSTEOMYELITIS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  accentBar(s);
  headerBar(s, "Osteomyelitis", "Bone infection — hematogenous, contiguous, or post-traumatic");

  // 3 column layout
  const cols = [
    {
      title: "Classification",
      color: C.teal,
      items: [
        "Acute Hematogenous: children; metaphysis; S. aureus",
        "Subacute: Brodie's abscess — walled-off; less toxic",
        "Chronic: sequestrum + involucrum + cloaca; adults",
        "Post-traumatic / Post-op",
        "Contiguous spread (pressure ulcers, DM foot)"
      ]
    },
    {
      title: "Clinical Features",
      color: C.red,
      items: [
        "Acute: Sudden fever, severe local bone pain, warmth, tenderness, refusal to bear weight",
        "Blood cultures + WBC + ESR + CRP elevated",
        "X-ray: Normal first 10–14 days; then periosteal elevation",
        "MRI: Investigation of choice (earliest, most sensitive)",
        "Bone scan (Tc-99m): sensitive; less specific"
      ]
    },
    {
      title: "Treatment",
      color: "8E44AD",
      items: [
        "Empiric IV antibiotics: Cloxacillin ± Gentamicin (Staph + Gram-neg)",
        "Duration: 4–6 weeks; switch to oral once improving",
        "MRSA: Vancomycin IV",
        "Surgical: sequestrectomy, saucerization, debridement",
        "Chronic: bone grafting, Ilizarov fixator, hyperbaric O₂"
      ]
    }
  ];

  cols.forEach((col, i) => {
    const xPos = 0.25 + i * 3.25;
    s.addShape(pres.ShapeType.rect, { x: xPos, y: 1.2, w: 3.1, h: 0.42, fill: { color: col.color } });
    s.addText(col.title, { x: xPos, y: 1.22, w: 3.1, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(col.items.map((t, j) => ({ text: t, options: { bullet: { code: "2022", color: col.color }, breakLine: j < col.items.length - 1, fontSize: 11, color: C.text, fontFace: "Calibri", paraSpaceAfter: 5 } })),
      { x: xPos, y: 1.65, w: 3.1, h: 3.6, fill: { color: C.light }, line: { color: col.color, width: 1 }, margin: 8, valign: "top" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — SUMMARY / CONCLUSION
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.1, fill: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.1, w: 10, h: 0.08, fill: { color: C.accent } });

  s.addText("KEY TAKEAWAYS", {
    x: 0.5, y: 0.15, w: 9, h: 0.75, fontSize: 26, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", charSpacing: 3
  });

  const takeaways = [
    ["Gangrene", "Dry = arterial, Wet = venous+infection (emergency), Gas = Clostridium (penicillin + surgery)"],
    ["Trophic Ulcer", "Treat the underlying cause (venous, arterial, DM); compression; skin graft if needed"],
    ["Fistula", "FRIENDS — eliminate cause; excise tract; fix distal obstruction"],
    ["Sepsis", "SIRS + infection source; escalate: Sepsis → Severe → Shock; early ABX + source control"],
    ["Abscess vs Phlegmon", "Abscess = localized (I&D); Phlegmon = diffuse (ABX ± surgery); NF = EMERGENCY"],
    ["Osteomyelitis", "MRI earliest; IV cloxacillin 4–6 weeks; sequestrectomy for chronic"],
    ["Paraproctitis", "Always drain surgically; 50% → fistula-in-ano; Fournier's = ICU emergency"],
  ];

  takeaways.forEach((row, i) => {
    const yPos = 1.25 + i * 0.57;
    const bgColor = i % 2 === 0 ? "1A2B3C" : "162534";
    s.addShape(pres.ShapeType.rect, { x: 0.25, y: yPos, w: 9.5, h: 0.53, fill: { color: bgColor } });
    s.addShape(pres.ShapeType.rect, { x: 0.25, y: yPos, w: 2.0, h: 0.53, fill: { color: C.accent } });
    s.addText(row[0], { x: 0.3, y: yPos + 0.04, w: 1.9, h: 0.46, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", align: "center" });
    s.addText(row[1], { x: 2.35, y: yPos + 0.04, w: 7.3, h: 0.46, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "middle" });
  });
}

// ── Write the file ────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/surgical-infection-ppt/Surgical_Infection.pptx" })
  .then(() => console.log("DONE: Surgical_Infection.pptx written successfully"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/surgical-infection-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/surgical-infection-ppt/Surgical_Infection.pptx

Your presentation is ready! Download it here:

Surgical Infection

Presentation · PPTX


Here's what's inside the 12-slide deck (navy/teal/green color scheme, professional medical design):
#Slide Title
1Title Slide — bold dark background with full topic list
2Classification of Surgical Infection — by causative agent + by clinical course (2-column)
3Necrosis & Gangrene — types of necrosis vs. dry/wet/gas/diabetic gangrene
4Trophic Ulcers & Fistulas — causes, features, FRIENDS mnemonic, treatment
5General Reaction to Infection / Sepsis — SIRS criteria + 5-stage progression table
6General Principles of Treatment — 6 numbered cards: drainage, antibiotics, debridement, immobilization, supportive care, immune support
7Furuncle · Carbuncle · Hidradenitis — 3-column card layout
8Abscess & Phlegmon — localized vs. diffuse; necrotizing fasciitis callout
9Purulent Finger Diseases & Mastitis — Kanavel signs, paronychia types; puerperal/non-puerperal mastitis
10Paraproctitis — 4 anorectal spaces + Fournier's gangrene warning
11Osteomyelitis — classification / clinical features / treatment (3-column)
12Key Takeaways — dark summary slide with 7 high-yield memory rows
This is a shared conversation. Sign in to Orris to start your own chat.