Create a PowerPoint presentation to Explain the ways in which infectious diseases can be transmitted and discuss specific examples. Evaluate the factors which increase the risk of contracting infectious diseases, and how this risk can be reduced. Identify the advantages and dangers in the use of antibiotics. The presentation should include: Two examples of the way diseases can be transmitted. Brief evaluation of three factors that can increase the risk of contracting infectious diseases and how the risk can be reduced in care settings. The advantages and dangers in the use of antibiotics when treating infections

Checking Date & Time
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Running Command

mkdir -p /home/daytona/workspace/infectious-diseases-pptx && ls /home/daytona/workspace/

Writing File

~/infectious-diseases-pptx/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Infectious Diseases: Transmission, Risk & Antibiotics";

// ── COLOUR PALETTE ──────────────────────────────────────────────────────────
const DARK_BG   = "0D2137";   // deep navy  – dominant background
const MID_NAVY  = "163556";   // slightly lighter navy – panel/card fill
const ACCENT    = "2BB5C8";   // teal accent – headings, rule lines, bullets
const ACCENT2   = "F0A500";   // amber – used sparingly for danger/warning
const WHITE     = "FFFFFF";
const LIGHT_GREY = "D4E6EF";  // very pale blue-grey – body text
const RED_WARN  = "E84040";   // danger callouts

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

function addBackground(slide) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: DARK_BG }, line: { color: DARK_BG }
  });
}

function addSectionStripe(slide, label) {
  // thin teal stripe on left edge
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.08, h: 5.625,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
  // section label pill at bottom-right
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 8.2, y: 5.15, w: 1.7, h: 0.35,
    fill: { color: ACCENT }, line: { color: ACCENT }, rectRadius: 0.05
  });
  slide.addText(label, {
    x: 8.2, y: 5.15, w: 1.7, h: 0.35,
    fontSize: 8, color: DARK_BG, bold: true, align: "center", valign: "middle", margin: 0
  });
}

function slideTitle(slide, text, y = 0.28) {
  slide.addText(text, {
    x: 0.25, y, w: 9.5, h: 0.5,
    fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri",
    margin: 0
  });
  // rule line under title
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: y + 0.52, w: 9.5, h: 0.025,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
}

function card(slide, x, y, w, h, color = MID_NAVY) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x, y, w, h,
    fill: { color },
    line: { color: ACCENT, pt: 1 },
    shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 }
  });
}

function bulletList(slide, items, x, y, w, h, opts = {}) {
  const rows = items.map((item, i) => ({
    text: item,
    options: {
      bullet: { type: "bullet", code: "25B8" },
      color: opts.color || LIGHT_GREY,
      fontSize: opts.fontSize || 12,
      fontFace: "Calibri",
      bold: false,
      breakLine: i < items.length - 1
    }
  }));
  slide.addText(rows, { x, y, w, h, valign: "top", margin: 4 });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);

  // Large gradient-effect banner (two overlapping shapes)
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 1.5, w: 10, h: 2.7,
    fill: { color: MID_NAVY }, line: { color: MID_NAVY }
  });
  // teal accent bar on left
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 1.5, w: 0.2, h: 2.7,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });

  s.addText("Infectious Diseases", {
    x: 0.35, y: 1.65, w: 9.3, h: 0.75,
    fontSize: 38, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  s.addText("Transmission · Risk Factors · Antibiotics", {
    x: 0.35, y: 2.45, w: 9.3, h: 0.55,
    fontSize: 20, bold: false, color: ACCENT, fontFace: "Calibri",
    charSpacing: 2, margin: 0
  });
  s.addText("A comprehensive overview for care settings", {
    x: 0.35, y: 3.1, w: 9.3, h: 0.4,
    fontSize: 13, color: LIGHT_GREY, fontFace: "Calibri", italic: true, margin: 0
  });

  // decorative circles
  s.addShape(pres.shapes.OVAL, {
    x: 8.2, y: 0.1, w: 2.5, h: 2.5,
    fill: { color: ACCENT, transparency: 82 }, line: { color: ACCENT, transparency: 82 }
  });
  s.addShape(pres.shapes.OVAL, {
    x: -0.6, y: 3.8, w: 2, h: 2,
    fill: { color: ACCENT, transparency: 85 }, line: { color: ACCENT, transparency: 85 }
  });

  // footer
  s.addText("May 2026", {
    x: 0, y: 5.3, w: 10, h: 0.3,
    fontSize: 9, color: LIGHT_GREY, align: "center", italic: true, margin: 0
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Overview");
  slideTitle(s, "What We Will Cover");

  const sections = [
    { num: "01", label: "Disease Transmission", desc: "Two key routes: droplet & contact transmission" },
    { num: "02", label: "Risk Factors & Reduction", desc: "Three factors that raise infection risk in care settings" },
    { num: "03", label: "Antibiotics", desc: "Benefits, dangers, and antimicrobial resistance" },
  ];

  sections.forEach((sec, i) => {
    const x = 0.3 + i * 3.23;
    card(s, x, 1.1, 3.0, 3.9);

    // number badge
    s.addShape(pres.shapes.OVAL, {
      x: x + 0.1, y: 1.2, w: 0.7, h: 0.7,
      fill: { color: ACCENT }, line: { color: ACCENT }
    });
    s.addText(sec.num, {
      x: x + 0.1, y: 1.2, w: 0.7, h: 0.7,
      fontSize: 14, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
    });

    s.addText(sec.label, {
      x: x + 0.1, y: 2.05, w: 2.8, h: 0.55,
      fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4
    });
    s.addText(sec.desc, {
      x: x + 0.1, y: 2.65, w: 2.8, h: 1.5,
      fontSize: 11, color: LIGHT_GREY, fontFace: "Calibri", valign: "top", margin: 4
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — TRANSMISSION OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 01 — Transmission");
  slideTitle(s, "How Infectious Diseases Spread");

  s.addText(
    "Pathogens use a variety of mechanisms to move from one host to another. " +
    "Understanding transmission routes is fundamental to infection control.",
    {
      x: 0.25, y: 0.9, w: 9.5, h: 0.6,
      fontSize: 12, color: LIGHT_GREY, fontFace: "Calibri", italic: true, margin: 0
    }
  );

  // chain of infection diagram - simplified as labelled boxes
  const chain = ["Infectious\nAgent", "Reservoir", "Portal\nof Exit", "Mode of\nTransmission", "Portal\nof Entry", "Susceptible\nHost"];
  const startX = 0.25;
  const boxW = 1.45;
  const boxH = 1.2;
  const y = 1.7;
  const gap = 0.18;

  chain.forEach((label, i) => {
    const x = startX + i * (boxW + gap);
    // alternating shade
    const fillCol = i % 2 === 0 ? MID_NAVY : "1A3F5E";
    card(s, x, y, boxW, boxH, fillCol);
    s.addText(label, {
      x, y, w: boxW, h: boxH,
      fontSize: 10.5, bold: true, color: ACCENT, fontFace: "Calibri",
      align: "center", valign: "middle", margin: 4
    });
    // arrow between boxes
    if (i < chain.length - 1) {
      s.addShape(pres.shapes.RECTANGLE, {
        x: x + boxW, y: y + boxH / 2 - 0.025, w: gap, h: 0.05,
        fill: { color: ACCENT }, line: { color: ACCENT }
      });
      // arrowhead triangle approximation
      s.addShape(pres.shapes.RIGHT_TRIANGLE, {
        x: x + boxW + gap - 0.12, y: y + boxH / 2 - 0.1, w: 0.12, h: 0.2,
        fill: { color: ACCENT }, line: { color: ACCENT }
      });
    }
  });

  s.addText("Breaking any link in the chain interrupts transmission", {
    x: 0.25, y: 3.1, w: 9.5, h: 0.35,
    fontSize: 11, color: ACCENT2, bold: true, align: "center", margin: 0, italic: true
  });

  // two transmission categories
  const cats = [
    { title: "Direct Transmission", color: ACCENT, desc: "Pathogen passes directly between source and new host (e.g. droplet spread, direct contact)" },
    { title: "Indirect Transmission", color: ACCENT2, desc: "Pathogen passes via an intermediate vehicle: fomites, vectors, contaminated food/water, airborne particles" }
  ];
  cats.forEach((c, i) => {
    card(s, 0.25 + i * 4.85, 3.55, 4.6, 1.75);
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.25 + i * 4.85, y: 3.55, w: 4.6, h: 0.38,
      fill: { color: c.color }, line: { color: c.color }
    });
    s.addText(c.title, {
      x: 0.25 + i * 4.85, y: 3.55, w: 4.6, h: 0.38,
      fontSize: 12, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
    });
    s.addText(c.desc, {
      x: 0.25 + i * 4.85 + 0.1, y: 4.0, w: 4.4, h: 1.2,
      fontSize: 11, color: LIGHT_GREY, fontFace: "Calibri", valign: "top", margin: 4
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — EXAMPLE 1: DROPLET TRANSMISSION (Tuberculosis / Influenza)
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 01 — Transmission");
  slideTitle(s, "Example 1: Droplet / Airborne Transmission");

  // Header badge
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 0.25, y: 0.95, w: 2.6, h: 0.38,
    fill: { color: ACCENT }, line: { color: ACCENT }, rectRadius: 0.05
  });
  s.addText("Mycobacterium tuberculosis", {
    x: 0.25, y: 0.95, w: 2.6, h: 0.38,
    fontSize: 11, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
  });

  // Mechanism flow
  const steps = [
    { icon: "🫁", label: "Infected person coughs, sneezes, or speaks" },
    { icon: "💨", label: "Aerosolised droplet nuclei (<5 µm) remain suspended in air" },
    { icon: "😮", label: "Susceptible host inhales nuclei into alveoli" },
    { icon: "🦠", label: "M. tuberculosis evades macrophages and establishes infection" },
  ];
  steps.forEach((st, i) => {
    card(s, 0.25, 1.5 + i * 0.95, 4.35, 0.82);
    s.addText(st.icon, {
      x: 0.3, y: 1.5 + i * 0.95, w: 0.6, h: 0.82,
      fontSize: 18, align: "center", valign: "middle", margin: 0
    });
    s.addText(st.label, {
      x: 0.95, y: 1.5 + i * 0.95, w: 3.55, h: 0.82,
      fontSize: 11, color: LIGHT_GREY, valign: "middle", margin: 4
    });
    if (i < steps.length - 1) {
      s.addText("▼", { x: 0.5, y: 2.27 + i * 0.95, w: 0.5, h: 0.25, fontSize: 10, color: ACCENT, align: "center", margin: 0 });
    }
  });

  // Right panel – key facts
  card(s, 4.8, 0.95, 4.95, 4.42);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.8, y: 0.95, w: 4.95, h: 0.38,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
  s.addText("Key Facts", {
    x: 4.8, y: 0.95, w: 4.95, h: 0.38,
    fontSize: 12, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
  });
  bulletList(s, [
    "M. tuberculosis infects only humans; produces respiratory disease with cough and aerosol production, ensuring person-to-person spread.",
    "Droplet nuclei can remain airborne for hours in enclosed spaces.",
    "A single untreated patient may infect 10–15 contacts per year.",
    "Influenza also spreads via respiratory droplets (>5 µm) – landing on mucous membranes within ~1–2 metres of the source.",
    "Both pathogens can also settle on surfaces, enabling indirect contact transmission.",
    "Control: respiratory isolation, N95 masks (TB), surgical masks (influenza), negative-pressure rooms, ventilation."
  ], 4.9, 1.4, 4.7, 3.9, { fontSize: 11 });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — EXAMPLE 2: CONTACT TRANSMISSION (MRSA / C. difficile)
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 01 — Transmission");
  slideTitle(s, "Example 2: Contact Transmission");

  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 0.25, y: 0.95, w: 3.3, h: 0.38,
    fill: { color: ACCENT2 }, line: { color: ACCENT2 }, rectRadius: 0.05
  });
  s.addText("MRSA & Clostridium difficile", {
    x: 0.25, y: 0.95, w: 3.3, h: 0.38,
    fontSize: 11, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
  });

  // Two sub-columns: Direct vs Indirect
  const cols = [
    {
      heading: "Direct Contact",
      col: ACCENT,
      items: [
        "Physical touching: healthcare worker hands carry S. aureus from anterior nares to wounds or other patients.",
        "Colonised patients with skin lesions shed MRSA onto bedding and clothing.",
        "Handshaking or care activities (dressing changes, catheter insertion) transfer organisms directly."
      ]
    },
    {
      heading: "Indirect Contact (Fomite)",
      col: ACCENT2,
      items: [
        "C. difficile spores survive on hard surfaces for months.",
        "Contaminated stethoscopes, blood pressure cuffs, bed rails, and call buttons act as vectors.",
        "Spores are resistant to alcohol-based gels – soap-and-water handwashing is essential.",
        "Environmental decontamination with sporicidal agents (hypochlorite) is required."
      ]
    }
  ];

  cols.forEach((col, i) => {
    const x = 0.25 + i * 4.85;
    card(s, x, 1.5, 4.6, 3.85);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 1.5, w: 4.6, h: 0.38,
      fill: { color: col.col }, line: { color: col.col }
    });
    s.addText(col.heading, {
      x, y: 1.5, w: 4.6, h: 0.38,
      fontSize: 12, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
    });
    bulletList(s, col.items, x + 0.1, 1.95, 4.4, 3.3, { fontSize: 11 });
  });

  // Bottom callout
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 5.1, w: 9.5, h: 0.36,
    fill: { color: MID_NAVY }, line: { color: ACCENT }
  });
  s.addText("🖐  Hand hygiene is the single most effective measure to prevent contact transmission in healthcare settings.", {
    x: 0.3, y: 5.1, w: 9.4, h: 0.36,
    fontSize: 10.5, color: ACCENT, bold: true, valign: "middle", margin: 4
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — RISK FACTORS SECTION DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);

  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.35, h: 5.625,
    fill: { color: ACCENT2 }, line: { color: ACCENT2 }
  });

  s.addText("Section 02", {
    x: 0.55, y: 1.6, w: 9, h: 0.5,
    fontSize: 16, color: ACCENT2, charSpacing: 4, margin: 0
  });
  s.addText("Risk Factors &\nInfection Prevention", {
    x: 0.55, y: 2.15, w: 9, h: 1.8,
    fontSize: 36, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  s.addText("Evaluating factors that increase susceptibility and how to reduce them in care settings", {
    x: 0.55, y: 3.95, w: 8, h: 0.55,
    fontSize: 13, color: LIGHT_GREY, italic: true, margin: 0
  });

  // decorative element
  s.addShape(pres.shapes.OVAL, {
    x: 7.5, y: 0.2, w: 3.5, h: 3.5,
    fill: { color: ACCENT2, transparency: 88 }, line: { color: ACCENT2, transparency: 88 }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — RISK FACTOR 1: IMMUNOCOMPROMISE
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 02 — Risk Factors");
  slideTitle(s, "Risk Factor 1: Compromised Immune Status");

  // Risk badge
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 0.25, y: 0.93, w: 1.6, h: 0.3,
    fill: { color: RED_WARN }, line: { color: RED_WARN }, rectRadius: 0.05
  });
  s.addText("HIGH RISK", {
    x: 0.25, y: 0.93, w: 1.6, h: 0.3,
    fontSize: 9, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
  });

  // Left – The Problem
  card(s, 0.25, 1.32, 4.5, 4.0);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 1.32, w: 4.5, h: 0.38,
    fill: { color: RED_WARN }, line: { color: RED_WARN }
  });
  s.addText("Why It Increases Risk", {
    x: 0.25, y: 1.32, w: 4.5, h: 0.38,
    fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
  });
  bulletList(s, [
    "The immune system is the primary defence against invading pathogens. Any impairment significantly increases susceptibility.",
    "Causes: HIV/AIDS, cancer chemotherapy, corticosteroids, organ transplant immunosuppression, diabetes mellitus, malnutrition.",
    "Debilitated, malnourished, or immunocompromised patients face increased morbidity and mortality from infections that healthy individuals would clear.",
    "Opportunistic infections (e.g. PCP, CMV) arise from pathogens that rarely cause disease in immunocompetent hosts."
  ], 0.35, 1.77, 4.3, 3.48, { fontSize: 11 });

  // Right – Reducing Risk
  card(s, 4.95, 1.32, 4.8, 4.0);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.95, y: 1.32, w: 4.8, h: 0.38,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
  s.addText("Reducing Risk in Care Settings", {
    x: 4.95, y: 1.32, w: 4.8, h: 0.38,
    fontSize: 12, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
  });
  bulletList(s, [
    "Protective (reverse) isolation for severely immunocompromised patients (e.g. neutropaenic patients after chemotherapy).",
    "Strict hand hygiene protocols for all staff entering the room.",
    "HEPA-filtered air and positive-pressure rooms for highest-risk patients.",
    "Prophylactic antimicrobials where evidence-based (e.g. co-trimoxazole for PCP prophylaxis in HIV).",
    "Nutritional support to restore immune function in malnourished patients.",
    "Staff with active infections must not care for immunocompromised patients."
  ], 5.05, 1.77, 4.6, 3.48, { fontSize: 11 });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — RISK FACTOR 2: INVASIVE PROCEDURES & INDWELLING DEVICES
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 02 — Risk Factors");
  slideTitle(s, "Risk Factor 2: Invasive Procedures & Indwelling Devices");

  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 0.25, y: 0.93, w: 2.1, h: 0.3,
    fill: { color: ACCENT2 }, line: { color: ACCENT2 }, rectRadius: 0.05
  });
  s.addText("HEALTHCARE-ASSOCIATED", {
    x: 0.25, y: 0.93, w: 2.1, h: 0.3,
    fontSize: 9, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
  });

  // Three mini-cards for device types
  const devices = [
    { name: "Urinary Catheters", risk: "E. coli and Enterococcus tracking along catheter into bladder → catheter-associated UTI (CAUTI)", reduce: "Aseptic insertion, maintain closed drainage system, remove as soon as clinically possible." },
    { name: "IV / Central Lines", risk: "Skin flora (S. aureus, Staph. epidermidis, Candida) enter bloodstream → central-line-associated bloodstream infection (CLABSI).", reduce: "Full sterile barrier during insertion; chlorhexidine-impregnated dressings; daily review of line necessity." },
    { name: "Surgical Wounds", risk: "Breaks in skin allow environmental and commensal organisms to enter deep tissues. Post-op wound infections account for ~15% of healthcare-associated infections.", reduce: "Pre-op skin preparation, prophylactic antibiotics within 1 hr of incision, regular aseptic wound dressing changes." }
  ];

  devices.forEach((d, i) => {
    const x = 0.25 + i * 3.23;
    card(s, x, 1.32, 3.0, 4.06);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 1.32, w: 3.0, h: 0.38,
      fill: { color: ACCENT2 }, line: { color: ACCENT2 }
    });
    s.addText(d.name, {
      x, y: 1.32, w: 3.0, h: 0.38,
      fontSize: 11.5, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
    });

    s.addText("⚠  Risk", {
      x: x + 0.1, y: 1.75, w: 2.8, h: 0.32,
      fontSize: 10, bold: true, color: RED_WARN, margin: 0
    });
    s.addText(d.risk, {
      x: x + 0.1, y: 2.06, w: 2.8, h: 1.5,
      fontSize: 10, color: LIGHT_GREY, valign: "top", margin: 4
    });

    s.addText("✔  Reduce", {
      x: x + 0.1, y: 3.63, w: 2.8, h: 0.32,
      fontSize: 10, bold: true, color: ACCENT, margin: 0
    });
    s.addText(d.reduce, {
      x: x + 0.1, y: 3.93, w: 2.8, h: 1.35,
      fontSize: 10, color: LIGHT_GREY, valign: "top", margin: 4
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — RISK FACTOR 3: POOR INFECTION CONTROL PRACTICES
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 02 — Risk Factors");
  slideTitle(s, "Risk Factor 3: Poor Infection Prevention & Control Practices");

  // Left column – The risk
  card(s, 0.25, 0.95, 4.5, 4.45);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 0.95, w: 4.5, h: 0.38,
    fill: { color: RED_WARN }, line: { color: RED_WARN }
  });
  s.addText("What Increases Risk", {
    x: 0.25, y: 0.95, w: 4.5, h: 0.38,
    fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
  });
  bulletList(s, [
    "Inadequate or absent hand hygiene between patient contacts – hands remain the most common vehicle for nosocomial pathogen transfer.",
    "Failure to use appropriate Personal Protective Equipment (PPE): gloves, aprons, masks, eye protection.",
    "Improper handling and disposal of sharps and clinical waste.",
    "Overcrowding and high bed occupancy in wards – reduces time for thorough cleaning between patients.",
    "Inadequate environmental cleaning, especially in isolation rooms and high-touch surfaces.",
    "Poor management of colonised or infected patients (e.g. failure to cohort patients with C. difficile or MRSA).",
    "Non-compliance with standard and transmission-based precautions."
  ], 0.35, 1.4, 4.3, 3.85, { fontSize: 10.5 });

  // Right column – Reducing risk
  card(s, 4.95, 0.95, 4.8, 4.45);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.95, y: 0.95, w: 4.8, h: 0.38,
    fill: { color: ACCENT }, line: { color: ACCENT }
  });
  s.addText("Reduction Strategies in Care Settings", {
    x: 4.95, y: 0.95, w: 4.8, h: 0.38,
    fontSize: 12, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0
  });
  bulletList(s, [
    "Implement WHO 5 Moments of Hand Hygiene – before patient contact, before aseptic tasks, after body fluid exposure, after patient contact, after touching patient surroundings.",
    "Standard precautions for ALL patients regardless of diagnosis (gloves and apron for contact with body fluids).",
    "Transmission-based precautions (contact, droplet, airborne) for identified or suspected infection.",
    "Regular mandatory IPC training and competency assessment for all clinical staff.",
    "Surveillance and audit: monitor hand hygiene compliance, SSI rates, MRSA/C. diff rates.",
    "Adequate staffing ratios to allow time for correct procedures.",
    "Engage patients and visitors in hygiene practices."
  ], 5.05, 1.4, 4.6, 3.85, { fontSize: 10.5 });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 — ANTIBIOTICS SECTION DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);

  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.35, h: 5.625,
    fill: { color: "3DD68C" }, line: { color: "3DD68C" }
  });

  s.addText("Section 03", {
    x: 0.55, y: 1.6, w: 9, h: 0.5,
    fontSize: 16, color: "3DD68C", charSpacing: 4, margin: 0
  });
  s.addText("Antibiotics:\nAdvantages & Dangers", {
    x: 0.55, y: 2.15, w: 9, h: 1.8,
    fontSize: 36, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  s.addText("Balancing therapeutic benefit against antimicrobial resistance and adverse effects", {
    x: 0.55, y: 3.95, w: 8, h: 0.55,
    fontSize: 13, color: LIGHT_GREY, italic: true, margin: 0
  });

  s.addShape(pres.shapes.OVAL, {
    x: 7.2, y: 0.5, w: 3.8, h: 3.8,
    fill: { color: "3DD68C", transparency: 88 }, line: { color: "3DD68C", transparency: 88 }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 — ADVANTAGES OF ANTIBIOTICS
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 03 — Antibiotics");
  slideTitle(s, "Advantages of Antibiotic Therapy");

  const advantages = [
    {
      icon: "💊",
      heading: "Cure of Bacterial Infections",
      body: "Antibiotics remain the definitive treatment for serious bacterial infections such as pneumonia, meningitis, sepsis, and tuberculosis. Without them, many infections that are now routine to treat would be life-threatening."
    },
    {
      icon: "🛡️",
      heading: "Prophylaxis",
      body: "Prophylactic use is reserved for situations where benefits outweigh risks – e.g. surgical prophylaxis (reducing SSI rates), post-exposure prophylaxis (meningococcal disease contacts), and immunocompromised patients."
    },
    {
      icon: "📉",
      heading: "Reduced Transmission",
      body: "Effective treatment renders patients non-infectious faster (e.g. TB patients become non-infectious within weeks of starting therapy), thereby reducing onward transmission."
    },
    {
      icon: "🔬",
      heading: "Targeted Therapy",
      body: "Modern diagnostics allow culture and sensitivity testing to select the narrowest-spectrum agent, minimising collateral disruption to the microbiome and preserving antibiotic efficacy."
    }
  ];

  advantages.forEach((adv, i) => {
    const col = i < 2 ? 0 : 1;
    const row = i % 2;
    const x = 0.25 + col * 4.85;
    const y = 1.05 + row * 2.25;
    card(s, x, y, 4.6, 2.1);
    s.addText(adv.icon + "  " + adv.heading, {
      x: x + 0.15, y: y + 0.1, w: 4.3, h: 0.45,
      fontSize: 12.5, bold: true, color: "3DD68C", fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(adv.body, {
      x: x + 0.15, y: y + 0.58, w: 4.3, h: 1.45,
      fontSize: 10.5, color: LIGHT_GREY, fontFace: "Calibri", valign: "top", margin: 4
    });
  });

  // Callout bar
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 5.15, w: 9.5, h: 0.32,
    fill: { color: "163A30" }, line: { color: "3DD68C" }
  });
  s.addText("Antibiotic treatment of hospital-acquired pneumonia is associated with survival benefits and improved clinical cure rates (Murray & Nadel, 2022).", {
    x: 0.3, y: 5.15, w: 9.4, h: 0.32,
    fontSize: 9.5, color: "3DD68C", italic: true, valign: "middle", margin: 4
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 — DANGERS OF ANTIBIOTICS
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 03 — Antibiotics");
  slideTitle(s, "Dangers & Risks of Antibiotic Use");

  const dangers = [
    {
      heading: "Antimicrobial Resistance (AMR)",
      color: RED_WARN,
      body: "Overuse and inappropriate prescribing accelerate the development of resistant strains. MRSA resists the most effective antistaphylococcal agents; MDR-TB requires prolonged toxic regimens. Resistant organisms spread in healthcare settings, posing serious threats."
    },
    {
      heading: "Disruption of Normal Microbiome",
      color: ACCENT2,
      body: "Broad-spectrum antibiotics kill commensal flora, creating ecological niches. C. difficile overgrowth after antibiotic therapy causes pseudomembranous colitis – a potentially fatal complication, particularly in elderly patients."
    },
    {
      heading: "Adverse Drug Reactions",
      color: "A855F7",
      body: "Allergic reactions (penicillin anaphylaxis), nephrotoxicity (aminoglycosides), ototoxicity (gentamicin), QT prolongation (fluoroquinolones), hepatotoxicity, and drug interactions are well-recognised harms that can be life-threatening."
    },
    {
      heading: "Empirical Misuse",
      color: "5B9BD5",
      body: "Broad-spectrum empirical choices – necessary when susceptibilities are unknown – expose patients to side effects and drive resistance. Viral infections (COVID-19, influenza) are frequently and inappropriately treated with antibiotics, adding no benefit."
    }
  ];

  dangers.forEach((d, i) => {
    const col = i < 2 ? 0 : 1;
    const row = i % 2;
    const x = 0.25 + col * 4.85;
    const y = 1.05 + row * 2.25;
    card(s, x, y, 4.6, 2.1);

    // coloured accent top bar
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 4.6, h: 0.08,
      fill: { color: d.color }, line: { color: d.color }
    });

    s.addText(d.heading, {
      x: x + 0.15, y: y + 0.15, w: 4.3, h: 0.45,
      fontSize: 12.5, bold: true, color: d.color, fontFace: "Calibri", valign: "middle", margin: 0
    });
    s.addText(d.body, {
      x: x + 0.15, y: y + 0.62, w: 4.3, h: 1.4,
      fontSize: 10.5, color: LIGHT_GREY, fontFace: "Calibri", valign: "top", margin: 4
    });
  });

  // Warning banner
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 5.15, w: 9.5, h: 0.32,
    fill: { color: "3D1212" }, line: { color: RED_WARN }
  });
  s.addText("⚠  Antibiotic resistance is a global health emergency. Every unnecessary prescription contributes to the crisis.", {
    x: 0.3, y: 5.15, w: 9.4, h: 0.32,
    fontSize: 10, color: RED_WARN, bold: true, valign: "middle", margin: 4
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 — ANTIBIOTIC STEWARDSHIP
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Section 03 — Antibiotics");
  slideTitle(s, "Antibiotic Stewardship: Balancing Benefits & Risks");

  s.addText(
    "Antimicrobial Stewardship Programmes (ASPs) aim to optimise antibiotic use — " +
    "ensuring patients receive the right drug, at the right dose, for the right duration.",
    {
      x: 0.25, y: 0.9, w: 9.5, h: 0.6,
      fontSize: 11.5, color: LIGHT_GREY, italic: true, margin: 0
    }
  );

  const principles = [
    { label: "Right Drug", desc: "Culture & sensitivity before or shortly after starting; de-escalate to narrowest-spectrum agent once results known.", icon: "🎯" },
    { label: "Right Dose", desc: "Dose based on weight, renal/hepatic function, and PK/PD targets. Under-dosing promotes resistance; over-dosing increases toxicity.", icon: "⚖️" },
    { label: "Right Duration", desc: "Shortest effective course limits resistance development and microbiome disruption. Evidence now supports shorter courses for many infections.", icon: "⏱" },
    { label: "Review & Stop", desc: "Daily IV-to-oral switch reviews and routine 48-hour review of empirical prescriptions. Stop antibiotics promptly when no longer indicated.", icon: "✅" },
    { label: "Education", desc: "Prescriber education and patient counselling on completing courses correctly and not sharing antibiotics.", icon: "📚" },
    { label: "Surveillance", desc: "Monitor local resistance patterns to guide empirical prescribing. Report notifiable resistant organisms (MRSA, CPE) to public health authorities.", icon: "📊" }
  ];

  principles.forEach((p, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.25 + col * 3.23;
    const y = 1.6 + row * 1.9;
    card(s, x, y, 3.0, 1.75);

    s.addText(p.icon + "  " + p.label, {
      x: x + 0.1, y: y + 0.1, w: 2.8, h: 0.42,
      fontSize: 12, bold: true, color: "3DD68C", margin: 0
    });
    s.addText(p.desc, {
      x: x + 0.1, y: y + 0.55, w: 2.8, h: 1.1,
      fontSize: 10, color: LIGHT_GREY, valign: "top", margin: 4
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 14 — SUMMARY
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addBackground(s);
  addSectionStripe(s, "Summary");
  slideTitle(s, "Summary");

  const summaryRows = [
    {
      section: "Transmission",
      color: ACCENT,
      points: "Diseases spread via direct (droplet/airborne, contact) and indirect routes. M. tuberculosis exemplifies airborne spread; MRSA/C. difficile exemplify contact/fomite spread. Breaking the chain at any link prevents transmission."
    },
    {
      section: "Risk Factors",
      color: ACCENT2,
      points: "Immunocompromise, invasive devices, and poor IPC practices all amplify infection risk. Each is mitigated through targeted care strategies: protective isolation, aseptic technique, hand hygiene, and compliance with standard + transmission-based precautions."
    },
    {
      section: "Antibiotics",
      color: "3DD68C",
      points: "Antibiotics are life-saving when used correctly. Dangers include AMR, microbiome disruption, adverse reactions, and misuse in viral infections. Stewardship — right drug, dose, duration — is essential to preserve their effectiveness."
    }
  ];

  summaryRows.forEach((row, i) => {
    const y = 1.05 + i * 1.47;
    card(s, 0.25, y, 9.5, 1.32);
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.25, y, w: 1.6, h: 1.32,
      fill: { color: row.color }, line: { color: row.color }
    });
    s.addText(row.section, {
      x: 0.25, y, w: 1.6, h: 1.32,
      fontSize: 13, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 4
    });
    s.addText(row.points, {
      x: 2.0, y: y + 0.08, w: 7.6, h: 1.16,
      fontSize: 11, color: LIGHT_GREY, valign: "middle", margin: 6
    });
  });

  // final note
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 5.15, w: 9.5, h: 0.32,
    fill: { color: MID_NAVY }, line: { color: ACCENT }
  });
  s.addText("Effective infection control is a shared responsibility — every healthcare worker, every interaction, every day.", {
    x: 0.3, y: 5.15, w: 9.4, h: 0.32,
    fontSize: 10.5, color: ACCENT, italic: true, bold: true, valign: "middle", align: "center", margin: 4
  });
}

// ── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/infectious-diseases-pptx/Infectious_Diseases.pptx" })
  .then(() => console.log("DONE: /home/daytona/workspace/infectious-diseases-pptx/Infectious_Diseases.pptx"))
  .catch(e => { console.error(e); process.exit(1); });
You've run out of free credits. Sign up for a free account to continue using Orris.
This is a shared conversation. Sign in to Orris to start your own chat.