Acyclovir drug presentation

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

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"

Writing File

~/acyclovir-pptx/acyclovir.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Acyclovir Drug Presentation";

// ─── Color palette ───────────────────────────────────────────────
const C = {
  deepNavy:   "0A1628",   // dominant dark bg
  midNavy:    "122244",   // secondary dark
  accentBlue: "1E6FCF",   // vivid accent
  teal:       "0D9B8B",   // supporting teal
  white:      "FFFFFF",
  offWhite:   "F0F4FF",
  lightGray:  "C5D3E8",
  yellow:     "FFD166",
  red:        "E05C5C",
};

// ─── HELPERS ─────────────────────────────────────────────────────
function darkSlide(slide) {
  slide.background = { color: C.deepNavy };
}
function lightSlide(slide) {
  slide.background = { color: C.offWhite };
}

function addSectionHeader(slide, label) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.35, h: 5.625, fill: { color: C.accentBlue }
  });
  slide.addText(label.toUpperCase(), {
    x: 0.55, y: 0.2, w: 9.4, h: 0.45,
    fontSize: 10, bold: true, color: C.teal,
    fontFace: "Calibri", charSpacing: 3, margin: 0
  });
}

function sectionDivider(slide, titleLine1, titleLine2, icon) {
  darkSlide(slide);
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.midNavy }
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 2.3, w: 10, h: 1.05, fill: { color: C.accentBlue }
  });
  slide.addText(icon + "  " + titleLine1, {
    x: 1, y: 2.35, w: 8, h: 0.5,
    fontSize: 26, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", margin: 0
  });
  if (titleLine2) {
    slide.addText(titleLine2, {
      x: 1, y: 2.88, w: 8, h: 0.35,
      fontSize: 16, color: C.lightGray,
      fontFace: "Calibri", align: "center", margin: 0
    });
  }
}

// ════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  darkSlide(slide);

  // Large gradient-style background rectangle left
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 4.8, h: 5.625, fill: { color: C.accentBlue }
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 4.8, y: 0, w: 5.2, h: 5.625, fill: { color: C.deepNavy }
  });

  // Decorative accent bar top
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 0.12, fill: { color: C.yellow }
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 5.505, w: 10, h: 0.12, fill: { color: C.yellow }
  });

  // Drug name (left panel)
  slide.addText("ACYCLOVIR", {
    x: 0.3, y: 1.2, w: 4.2, h: 1.1,
    fontSize: 44, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", margin: 0
  });
  slide.addText("Antiviral Drug Presentation", {
    x: 0.3, y: 2.4, w: 4.2, h: 0.45,
    fontSize: 16, color: C.offWhite,
    fontFace: "Calibri", align: "center", margin: 0
  });
  slide.addText("Exam-Focused Key Points", {
    x: 0.3, y: 2.92, w: 4.2, h: 0.38,
    fontSize: 13, color: C.yellow,
    fontFace: "Calibri", align: "center", margin: 0, italic: true
  });

  // Classification box (right panel)
  slide.addShape(pres.ShapeType.roundRect, {
    x: 5.2, y: 1.0, w: 4.4, h: 3.4,
    fill: { color: C.midNavy },
    line: { color: C.teal, width: 1.5 },
    rectRadius: 0.1
  });
  slide.addText("Drug Class", {
    x: 5.4, y: 1.15, w: 4.0, h: 0.35,
    fontSize: 11, bold: true, color: C.teal,
    fontFace: "Calibri", align: "center", charSpacing: 2, margin: 0
  });
  slide.addText([
    { text: "Antiviral  |  Nucleoside Analog", options: { breakLine: true, bold: true, color: C.white } },
    { text: " ", options: { breakLine: true, fontSize: 6 } },
    { text: "Guanosine (deoxyguanosine) analogue", options: { breakLine: true, color: C.lightGray } },
    { text: " ", options: { breakLine: true, fontSize: 6 } },
    { text: "Generic name: Acyclovir", options: { breakLine: true, color: C.lightGray } },
    { text: "Brand name: Zovirax®", options: { breakLine: true, color: C.lightGray } },
    { text: " ", options: { breakLine: true, fontSize: 6 } },
    { text: "FDA approved: 1982", options: { color: C.yellow } },
  ], {
    x: 5.4, y: 1.55, w: 4.0, h: 2.6,
    fontSize: 13, fontFace: "Calibri",
    valign: "top", margin: 4
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW & SPECTRUM
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  lightSlide(slide);
  addSectionHeader(slide, "Overview");

  slide.addText("What is Acyclovir?", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.deepNavy,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.accentBlue, width: 1.5 }
  });

  // Three info boxes
  const boxes = [
    { label: "Prototype", text: "First and prototypical antiherpetic agent\nDeveloped by Gertrude Elion (Nobel Prize 1988)", color: C.accentBlue },
    { label: "Virus Targets", text: "HSV-1 & HSV-2\nVZV (Varicella-Zoster)\nEpstein-Barr Virus (EBV)\nCMV — limited activity", color: C.teal },
    { label: "Key Uses", text: "Cold sores · Genital herpes\nChickenpox · Shingles\nHSV encephalitis (IV)\nHerpes prophylaxis (immunocompromised)", color: C.midNavy },
  ];

  boxes.forEach((b, i) => {
    const x = 0.55 + i * 3.1;
    slide.addShape(pres.ShapeType.rect, {
      x, y: 1.45, w: 2.9, h: 3.7,
      fill: { color: b.color },
      line: { color: b.color, width: 0 }
    });
    slide.addText(b.label, {
      x: x + 0.1, y: 1.55, w: 2.7, h: 0.4,
      fontSize: 11, bold: true, color: C.yellow,
      fontFace: "Calibri", align: "center", charSpacing: 2, margin: 0
    });
    slide.addText(b.text, {
      x: x + 0.1, y: 2.0, w: 2.7, h: 3.0,
      fontSize: 12, color: C.white,
      fontFace: "Calibri", valign: "top", margin: 5
    });
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 3 – MECHANISM OF ACTION
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  lightSlide(slide);
  addSectionHeader(slide, "Mechanism of Action");

  slide.addText("How Does Acyclovir Work?", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.deepNavy,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.accentBlue, width: 1.5 }
  });

  // Step flow boxes
  const steps = [
    { n: "1", title: "Entry into Infected Cell", desc: "Acyclovir enters the herpes-infected host cell (selectivity key)" },
    { n: "2", title: "Viral Thymidine Kinase (TK)", desc: "Viral TK phosphorylates acyclovir → acyclovir monophosphate (ACV-MP)\nNOT activated in uninfected cells" },
    { n: "3", title: "Host Cell Kinases", desc: "Cellular kinases convert ACV-MP → ACV-DP → ACV-TP (triphosphate)" },
    { n: "4", title: "DNA Polymerase Inhibition", desc: "ACV-TP competes with deoxyguanosine triphosphate (dGTP)\nInhibits viral DNA polymerase" },
    { n: "5", title: "Chain Termination", desc: "ACV-TP incorporates into viral DNA → premature chain termination → viral replication stops" },
  ];

  steps.forEach((s, i) => {
    const y = 1.45 + i * 0.8;
    // Number circle
    slide.addShape(pres.ShapeType.ellipse, {
      x: 0.55, y: y + 0.05, w: 0.5, h: 0.5,
      fill: { color: C.accentBlue },
      line: { color: C.accentBlue }
    });
    slide.addText(s.n, {
      x: 0.55, y: y + 0.05, w: 0.5, h: 0.5,
      fontSize: 14, bold: true, color: C.white,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0
    });
    // Title + desc
    slide.addText(s.title + " — ", {
      x: 1.15, y, w: 2.2, h: 0.75,
      fontSize: 11, bold: true, color: C.deepNavy,
      fontFace: "Calibri", valign: "middle", margin: 0
    });
    slide.addText(s.desc, {
      x: 3.3, y, w: 6.3, h: 0.75,
      fontSize: 11, color: C.midNavy,
      fontFace: "Calibri", valign: "middle", margin: 0
    });
    // Connector line (not on last)
    if (i < steps.length - 1) {
      slide.addShape(pres.ShapeType.line, {
        x: 0.78, y: y + 0.55, w: 0, h: 0.25,
        line: { color: C.accentBlue, width: 1.5 }
      });
    }
  });

  // Key insight box
  slide.addShape(pres.ShapeType.roundRect, {
    x: 0.55, y: 5.1, w: 8.9, h: 0.38,
    fill: { color: C.yellow }, rectRadius: 0.08,
    line: { color: C.yellow }
  });
  slide.addText("KEY: Selectivity is due to viral TK — drug is only activated in virus-infected cells, sparing healthy cells", {
    x: 0.65, y: 5.1, w: 8.7, h: 0.38,
    fontSize: 11, bold: true, color: C.deepNavy,
    fontFace: "Calibri", align: "center", valign: "middle", margin: 0
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 4 – PHARMACOKINETICS
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  darkSlide(slide);
  addSectionHeader(slide, "Pharmacokinetics");

  slide.addText("Pharmacokinetics (PK)", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.teal, width: 1.5 }
  });

  // PK table
  const rows = [
    ["Parameter", "Acyclovir", "Valacyclovir (Prodrug)"],
    ["Route", "IV, Oral, Topical", "Oral only"],
    ["Oral Bioavailability", "15–30%", "~55% (converts to ACV)"],
    ["Plasma Levels", "Baseline", "~4× higher than oral ACV"],
    ["CSF Penetration", "Good (50% of plasma)", "Good (via ACV)"],
    ["Metabolism", "Partial (inactive metabolite)", "Rapidly hydrolyzed → ACV (liver/intestine)"],
    ["Excretion", "Renal (GFR + tubular secretion)", "Renal (as ACV)"],
    ["Dose Adjustment", "Required in renal failure", "Required in renal failure"],
  ];

  const colW = [2.3, 3.1, 3.3];
  const colX = [0.45, 2.75, 5.85];
  const rowH = 0.52;
  const startY = 1.38;

  rows.forEach((row, ri) => {
    const isHeader = ri === 0;
    row.forEach((cell, ci) => {
      slide.addShape(pres.ShapeType.rect, {
        x: colX[ci], y: startY + ri * rowH, w: colW[ci], h: rowH,
        fill: { color: isHeader ? C.accentBlue : (ri % 2 === 0 ? C.midNavy : C.deepNavy) },
        line: { color: C.accentBlue, width: 0.5 }
      });
      slide.addText(cell, {
        x: colX[ci] + 0.08, y: startY + ri * rowH, w: colW[ci] - 0.16, h: rowH,
        fontSize: isHeader ? 11 : 10,
        bold: isHeader,
        color: isHeader ? C.white : (ci === 0 ? C.yellow : C.offWhite),
        fontFace: "Calibri", valign: "middle", margin: 0
      });
    });
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 5 – CLINICAL USES
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  lightSlide(slide);
  addSectionHeader(slide, "Clinical Uses");

  slide.addText("Clinical Uses & Indications", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.deepNavy,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.accentBlue, width: 1.5 }
  });

  const uses = [
    {
      title: "Genital Herpes (HSV-2)",
      color: C.accentBlue,
      points: ["Initial episode: 200 mg 5×/day × 10 days OR 400 mg TID × 7–10 days", "Recurrent: 800 mg TID × 2 days or 400 mg TID × 5 days", "Suppressive therapy: 400 mg BID (long-term)"],
    },
    {
      title: "Herpes Labialis (Cold Sores / HSV-1)",
      color: C.teal,
      points: ["Oral acyclovir speeds healing", "Topical application much less effective than oral", "Valacyclovir preferred for cold sores (better bioavailability)"],
    },
    {
      title: "Varicella (Chickenpox) & Zoster (Shingles)",
      color: C.midNavy,
      points: ["Higher doses needed (VZV less susceptible than HSV)", "Zoster: 800 mg 5×/day × 7–10 days", "Reduces duration and severity if started within 72 h"],
    },
    {
      title: "HSV Encephalitis (IV)",
      color: C.red,
      points: ["Drug of CHOICE for HSV encephalitis", "IV acyclovir 10 mg/kg q8h × 14–21 days", "Must start early — mortality reduced from 70% → ~25%"],
    },
    {
      title: "Prophylaxis in Immunocompromised",
      color: C.accentBlue,
      points: ["Pre-bone marrow / heart transplant: prevents HSV reactivation", "Used in HIV patients with frequent herpes recurrences", "Long-term suppressive dosing"],
    },
    {
      title: "Neonatal Herpes (IV)",
      color: C.teal,
      points: ["IV acyclovir for neonatal HSV infections", "Disseminated or CNS disease: 20 mg/kg q8h × 21 days", "Mucocutaneous only: 14 days"],
    },
  ];

  uses.forEach((u, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.5 + col * 4.75;
    const y = 1.4 + row * 1.4;

    slide.addShape(pres.ShapeType.rect, {
      x, y, w: 4.55, h: 1.3,
      fill: { color: u.color },
      line: { color: u.color }
    });
    slide.addText(u.title, {
      x: x + 0.1, y: y + 0.05, w: 4.35, h: 0.32,
      fontSize: 10, bold: true, color: C.yellow,
      fontFace: "Calibri", margin: 0
    });
    slide.addText(u.points.map(p => "• " + p).join("\n"), {
      x: x + 0.1, y: y + 0.38, w: 4.35, h: 0.85,
      fontSize: 9.5, color: C.white,
      fontFace: "Calibri", valign: "top", margin: 0
    });
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 6 – ADVERSE EFFECTS
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  darkSlide(slide);
  addSectionHeader(slide, "Adverse Effects");

  slide.addText("Adverse Effects & Safety", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.teal, width: 1.5 }
  });

  const routes = [
    {
      route: "Oral",
      icon: "💊",
      effects: ["Nausea, vomiting", "Diarrhea", "Headache", "Generally well tolerated"],
      color: C.teal,
    },
    {
      route: "Intravenous (IV)",
      icon: "💉",
      effects: ["Transient renal dysfunction (nephrotoxicity)", "Crystalline nephropathy if dehydrated", "Neurotoxicity (tremors, confusion — rare)", "Phlebitis at injection site", "Ensure adequate hydration during IV infusion"],
      color: C.accentBlue,
    },
    {
      route: "Topical",
      icon: "🧴",
      effects: ["Local irritation / burning", "Mild pruritus", "Questionable efficacy vs. oral"],
      color: C.midNavy,
    },
  ];

  routes.forEach((r, i) => {
    const x = 0.5 + i * 3.1;
    slide.addShape(pres.ShapeType.rect, {
      x, y: 1.45, w: 2.9, h: 3.7,
      fill: { color: r.color }
    });
    slide.addText(r.icon + "  " + r.route, {
      x: x + 0.1, y: 1.5, w: 2.7, h: 0.45,
      fontSize: 13, bold: true, color: C.yellow,
      fontFace: "Calibri", align: "center", margin: 0
    });
    slide.addText(r.effects.map(e => "• " + e).join("\n"), {
      x: x + 0.1, y: 2.0, w: 2.7, h: 2.9,
      fontSize: 11, color: C.white,
      fontFace: "Calibri", valign: "top", margin: 4
    });
  });

  // Special populations
  slide.addShape(pres.ShapeType.roundRect, {
    x: 0.5, y: 5.1, w: 8.9, h: 0.42,
    fill: { color: C.red }, rectRadius: 0.08,
    line: { color: C.red }
  });
  slide.addText("⚠  Pregnancy: FDA Category B — traditionally drug of choice for genital herpes in pregnancy (longest safety record).   Renal failure: dose reduce.", {
    x: 0.6, y: 5.1, w: 8.7, h: 0.42,
    fontSize: 10.5, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", align: "center", margin: 0
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 7 – RESISTANCE
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  lightSlide(slide);
  addSectionHeader(slide, "Resistance");

  slide.addText("Drug Resistance", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.deepNavy,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.red, width: 1.5 }
  });

  const mechanisms = [
    { mech: "Altered / Deficient Thymidine Kinase (TK)", detail: "Most common mechanism. TK mutation → drug not phosphorylated → no activation. Most common in immunocompromised patients.", color: C.red },
    { mech: "Altered DNA Polymerase", detail: "Mutations in viral DNA polymerase reduce drug binding. Less common than TK mutations.", color: C.accentBlue },
    { mech: "TK Deletion", detail: "Complete loss of viral TK — complete resistance. Seen in HSV strains from immunocompromised patients on long-term therapy.", color: C.midNavy },
  ];

  mechanisms.forEach((m, i) => {
    const y = 1.45 + i * 1.2;
    slide.addShape(pres.ShapeType.rect, {
      x: 0.5, y, w: 0.18, h: 1.05, fill: { color: m.color }
    });
    slide.addShape(pres.ShapeType.roundRect, {
      x: 0.75, y, w: 8.7, h: 1.05,
      fill: { color: "EEF3FF" },
      line: { color: m.color, width: 1 }, rectRadius: 0.08
    });
    slide.addText(m.mech, {
      x: 0.9, y: y + 0.08, w: 8.4, h: 0.35,
      fontSize: 12, bold: true, color: m.color,
      fontFace: "Calibri", margin: 0
    });
    slide.addText(m.detail, {
      x: 0.9, y: y + 0.45, w: 8.4, h: 0.5,
      fontSize: 11, color: C.deepNavy,
      fontFace: "Calibri", margin: 0
    });
  });

  // Management box
  slide.addShape(pres.ShapeType.roundRect, {
    x: 0.5, y: 4.8, w: 8.9, h: 0.65,
    fill: { color: C.deepNavy }, rectRadius: 0.1,
    line: { color: C.yellow, width: 1 }
  });
  slide.addText("Management of Resistance: Switch to Foscarnet (pyrophosphate analogue, does NOT require TK for activation) or Cidofovir", {
    x: 0.65, y: 4.8, w: 8.6, h: 0.65,
    fontSize: 11.5, color: C.yellow,
    fontFace: "Calibri", valign: "middle", margin: 4
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 8 – DRUG INTERACTIONS
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  darkSlide(slide);
  addSectionHeader(slide, "Drug Interactions");

  slide.addText("Drug Interactions", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.teal, width: 1.5 }
  });

  const interactions = [
    { drug: "Probenecid", effect: "Blocks tubular secretion of acyclovir → increases plasma levels of acyclovir (and valacyclovir)", risk: "Monitor" },
    { drug: "Nephrotoxic drugs\n(e.g. Cisplatin, Cyclosporine)", effect: "Acyclovir + nephrotoxins → increased risk of nephrotoxicity and renal failure", risk: "Caution" },
    { drug: "Theophylline", effect: "Acyclovir causes increased theophylline levels → monitor theophylline", risk: "Monitor" },
    { drug: "Zidovudine (AZT)", effect: "Combination may increase CNS toxicity (drowsiness, lethargy)", risk: "Caution" },
    { drug: "Mycophenolate Mofetil", effect: "Both compete for renal secretion → levels of both may rise", risk: "Monitor" },
  ];

  const colW2 = [2.4, 4.8, 1.4];
  const colX2 = [0.4, 2.85, 7.7];
  const rowH2 = 0.72;
  const startY2 = 1.4;

  // Header
  ["Drug / Agent", "Interaction Effect", "Action"].forEach((h, ci) => {
    slide.addShape(pres.ShapeType.rect, {
      x: colX2[ci], y: startY2, w: colW2[ci], h: 0.42,
      fill: { color: C.accentBlue }, line: { color: C.accentBlue }
    });
    slide.addText(h, {
      x: colX2[ci] + 0.06, y: startY2, w: colW2[ci] - 0.12, h: 0.42,
      fontSize: 11, bold: true, color: C.white,
      fontFace: "Calibri", valign: "middle", margin: 0
    });
  });

  interactions.forEach((row, ri) => {
    const y = startY2 + 0.42 + ri * rowH2;
    const bg = ri % 2 === 0 ? C.midNavy : C.deepNavy;
    const cells = [row.drug, row.effect, row.risk];
    cells.forEach((cell, ci) => {
      slide.addShape(pres.ShapeType.rect, {
        x: colX2[ci], y, w: colW2[ci], h: rowH2,
        fill: { color: bg }, line: { color: C.accentBlue, width: 0.5 }
      });
      const isRisk = ci === 2;
      slide.addText(cell, {
        x: colX2[ci] + 0.06, y, w: colW2[ci] - 0.12, h: rowH2,
        fontSize: 10.5,
        bold: isRisk,
        color: isRisk ? (cell === "Caution" ? C.red : C.yellow) : C.offWhite,
        fontFace: "Calibri", valign: "middle", margin: 0
      });
    });
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 9 – KEY EXAM POINTS
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  lightSlide(slide);
  addSectionHeader(slide, "Exam Points");

  slide.addText("Exam Key Points", {
    x: 0.55, y: 0.7, w: 8.9, h: 0.55,
    fontSize: 24, bold: true, color: C.deepNavy,
    fontFace: "Calibri", margin: 0
  });
  slide.addShape(pres.ShapeType.line, {
    x: 0.55, y: 1.28, w: 8.5, h: 0,
    line: { color: C.yellow, width: 2 }
  });

  const points = [
    { num: "1", text: "Mechanism: Viral TK phosphorylates → host kinases → ACV-TP → inhibits viral DNA polymerase → chain termination", tag: "MOA" },
    { num: "2", text: "Selectivity: ONLY activated in virus-infected cells (viral TK required) — low toxicity to host cells", tag: "SELECT." },
    { num: "3", text: "DOC for HSV encephalitis (IV), neonatal herpes (IV), genital herpes (oral), herpes in pregnancy", tag: "DOC" },
    { num: "4", text: "Valacyclovir = prodrug of acyclovir with 4× higher plasma levels after oral dosing", tag: "PRODRUG" },
    { num: "5", text: "Resistance: most common = thymidine kinase mutation/deletion → treat with Foscarnet", tag: "RESIST." },
    { num: "6", text: "Renal excretion (GFR + tubular secretion) — dose reduction needed in renal failure", tag: "RENAL" },
    { num: "7", text: "IV adverse effect: nephrotoxicity (crystalline nephropathy) — prevent with good hydration", tag: "ADR" },
    { num: "8", text: "Does NOT eradicate latent virus — only suppresses active replication; reactivation occurs when stopped", tag: "LATENCY" },
  ];

  points.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.45 + col * 4.75;
    const y = 1.4 + row * 1.0;

    slide.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.6, h: 0.9,
      fill: { color: "EEF3FF" },
      line: { color: C.accentBlue, width: 0.8 }, rectRadius: 0.08
    });
    slide.addShape(pres.ShapeType.ellipse, {
      x: x + 0.1, y: y + 0.2, w: 0.38, h: 0.38,
      fill: { color: C.accentBlue }, line: { color: C.accentBlue }
    });
    slide.addText(p.num, {
      x: x + 0.1, y: y + 0.2, w: 0.38, h: 0.38,
      fontSize: 11, bold: true, color: C.white,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0
    });
    // Tag badge
    slide.addShape(pres.ShapeType.roundRect, {
      x: x + 3.85, y: y + 0.15, w: 0.65, h: 0.28,
      fill: { color: C.yellow }, rectRadius: 0.05,
      line: { color: C.yellow }
    });
    slide.addText(p.tag, {
      x: x + 3.85, y: y + 0.15, w: 0.65, h: 0.28,
      fontSize: 7.5, bold: true, color: C.deepNavy,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0
    });
    // Main text
    slide.addText(p.text, {
      x: x + 0.58, y: y + 0.08, w: 3.9, h: 0.72,
      fontSize: 10, color: C.deepNavy,
      fontFace: "Calibri", valign: "middle", margin: 0
    });
  });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 10 – SUMMARY / THANK YOU
// ════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  darkSlide(slide);

  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.deepNavy }
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 0.12, fill: { color: C.yellow }
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 5.505, w: 10, h: 0.12, fill: { color: C.yellow }
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 1.8, w: 10, h: 2.1, fill: { color: C.midNavy }
  });

  slide.addText("ACYCLOVIR", {
    x: 0.5, y: 0.25, w: 9, h: 0.55,
    fontSize: 13, bold: true, color: C.teal,
    fontFace: "Calibri", align: "center", charSpacing: 5, margin: 0
  });
  slide.addText("Summary", {
    x: 0.5, y: 0.8, w: 9, h: 0.85,
    fontSize: 36, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", margin: 0
  });

  const summary = [
    "Antiviral — Nucleoside (guanosine) analogue",
    "Activated selectively by viral thymidine kinase → chain termination",
    "Effective against HSV-1, HSV-2, VZV, EBV",
    "DOC: HSV encephalitis (IV) · Genital herpes · Herpes in pregnancy",
    "Prodrug: Valacyclovir (4× oral bioavailability)",
    "Resistance → thymidine kinase mutation → use Foscarnet",
    "Well tolerated; renal toxicity risk with IV (ensure hydration)",
  ];

  slide.addText(summary.map(s => "✓  " + s).join("\n"), {
    x: 1.0, y: 1.88, w: 8, h: 1.95,
    fontSize: 11.5, color: C.offWhite,
    fontFace: "Calibri", valign: "middle", margin: 8
  });

  slide.addText("References: Harrison's Principles of Internal Medicine 22E | Lippincott Illustrated Reviews: Pharmacology | Goldman-Cecil Medicine | Dermatology 2-Volume Set 5E", {
    x: 0.5, y: 4.05, w: 9, h: 0.5,
    fontSize: 8.5, color: C.lightGray,
    fontFace: "Calibri", align: "center", italic: true, margin: 0
  });

  slide.addText("Thank You", {
    x: 0.5, y: 4.6, w: 9, h: 0.65,
    fontSize: 28, bold: true, color: C.yellow,
    fontFace: "Calibri", align: "center", margin: 0
  });
}

// ─── WRITE FILE ─────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/acyclovir-pptx/Acyclovir_Drug_Presentation.pptx" })
  .then(() => console.log("Done: Acyclovir_Drug_Presentation.pptx"))
  .catch(err => { console.error(err); process.exit(1); });
Running Command

cd /home/daytona/workspace/acyclovir-pptx && node acyclovir.js

Running Command

ls -lh /home/daytona/workspace/acyclovir-pptx/Acyclovir_Drug_Presentation.pptx

Your presentation is ready - 265 KB, 10 slides.

Acyclovir Drug Presentation

Presentation · PPTX


What's inside (10 slides):
SlideContent
1Title slide - drug class, generic/brand names, FDA approval year
2Overview - spectrum of activity, key virus targets
3Mechanism of action - 5-step flow (TK activation → chain termination)
4Pharmacokinetics table - acyclovir vs. valacyclovir comparison
5Clinical uses - 6 indication boxes (genital herpes, encephalitis, VZV, prophylaxis, neonatal)
6Adverse effects by route - oral / IV / topical + pregnancy note
7Resistance mechanisms - TK mutation/deletion, DNA polymerase mutation + Foscarnet as fallback
8Drug interactions table (probenecid, nephrotoxins, theophylline, AZT)
98 exam key points with color-coded badges (MOA, DOC, PRODRUG, RESIST., etc.)
10Summary + references from Harrison's, Lippincott, Goldman-Cecil
Design: Navy/blue/teal color palette with yellow accent highlights, dark title/summary slides, light content slides for readability.
This is a shared conversation. Sign in to Orris to start your own chat.