Give a note of adverse drug rxn in easy language by referencing in ppt expalin in easy

Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace && python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/465d54fb-bfdb-493e-a6c7-ca197b10e25e/DOC-20260515-WA0003..pdf' with pdfplumber.open(path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() print(f'--- Page {i+1} ---') print(text[:2000] if text else '[No text]') print() "

Running Command

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

Writing File

~/adr-ppt/create_adr_ppt.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.title = 'Adverse Drug Reactions - Easy Guide';

// ─── THEME COLORS ───────────────────────────────────────────────────────────
const C = {
  navy:    "1A2E4A",   // dominant dark background
  teal:    "0D7C8F",   // accent headers
  amber:   "F5A623",   // highlight / icons
  white:   "FFFFFF",
  lightBg: "EAF4F6",   // light slide bg
  darkText:"1A2E4A",
  soft:    "D9EEF3",   // card fill
  red:     "E8394A",
  green:   "27AE60",
  orange:  "E67E22",
};

// ─── HELPER: add a slide background rect ────────────────────────────────────
function darkSlide(slide) {
  slide.background = { color: C.navy };
}
function lightSlide(slide) {
  slide.background = { color: "F0F8FB" };
}

// ─── HELPER: section badge ───────────────────────────────────────────────────
function badge(slide, label, x, y, color) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w: 3.0, h: 0.38,
    fill: { color: color || C.teal },
    line: { color: color || C.teal },
    rectRadius: 0.06,
  });
  slide.addText(label.toUpperCase(), {
    x, y, w: 3.0, h: 0.38,
    fontSize: 9, bold: true, color: C.white,
    align: "center", valign: "middle", margin: 0,
  });
}

// ─── HELPER: bullet items ────────────────────────────────────────────────────
function bullets(slide, items, x, y, w, h, opts = {}) {
  const arr = items.map((t, i) => ({
    text: t,
    options: { bullet: { type: "bullet" }, breakLine: i < items.length - 1 },
  }));
  slide.addText(arr, {
    x, y, w, h,
    fontSize: opts.fontSize || 16,
    color: opts.color || C.darkText,
    fontFace: "Calibri",
    lineSpacingMultiple: 1.3,
    valign: "top",
    ...opts,
  });
}

// ─── HELPER: card box ────────────────────────────────────────────────────────
function card(slide, title, body, x, y, w, h, titleColor) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h,
    fill: { color: C.soft },
    line: { color: C.teal, pt: 1.5 },
    rectRadius: 0.1,
    shadow: { type: "outer", blur: 8, offset: 3, angle: 45, color: "AABBCC", opacity: 0.3 },
  });
  slide.addText(title, {
    x: x + 0.12, y: y + 0.1, w: w - 0.24, h: 0.42,
    fontSize: 13, bold: true, color: titleColor || C.teal,
    fontFace: "Calibri", align: "left",
  });
  slide.addText(body, {
    x: x + 0.12, y: y + 0.52, w: w - 0.24, h: h - 0.62,
    fontSize: 12, color: C.darkText,
    fontFace: "Calibri", valign: "top",
    lineSpacingMultiple: 1.25,
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 β€” TITLE
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  darkSlide(sl);

  // accent bar left
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal } });

  // big title
  sl.addText("Adverse Drug\nReactions", {
    x: 0.5, y: 0.8, w: 9, h: 2.5,
    fontSize: 54, bold: true, color: C.white,
    fontFace: "Calibri Light", align: "left",
    lineSpacingMultiple: 1.1,
  });

  // subtitle
  sl.addText("A Simple, Easy-to-Understand Guide", {
    x: 0.5, y: 3.4, w: 9, h: 0.6,
    fontSize: 22, color: C.amber, fontFace: "Calibri", align: "left", italic: true,
  });

  // bottom bar
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 5.1, w: 10, h: 0.525, fill: { color: C.teal } });
  sl.addText("Based on Clinical Pharmacology & Drug Therapy", {
    x: 0.3, y: 5.13, w: 9.4, h: 0.45,
    fontSize: 12, color: C.white, fontFace: "Calibri", align: "left",
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 β€” WHAT IS ADR?
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  // header stripe
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("πŸ’Š What is an Adverse Drug Reaction (ADR)?", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // WHO definition card
  sl.addShape(pres.ShapeType.roundRect, {
    x: 0.4, y: 1.2, w: 9.2, h: 1.5,
    fill: { color: C.amber }, line: { color: C.amber }, rectRadius: 0.1,
  });
  sl.addText([
    { text: "WHO Definition:  ", options: { bold: true, fontSize: 15 } },
    { text: '"Any response to a drug which is HARMFUL, UNINTENDED, and occurs at normal doses used in humans for prevention, diagnosis, or treatment."', options: { fontSize: 14, italic: true } },
  ], { x: 0.55, y: 1.25, w: 9.0, h: 1.4, color: C.navy, fontFace: "Calibri", valign: "middle" });

  // simple language box
  sl.addText("πŸ”‘ In simple words:", {
    x: 0.4, y: 2.9, w: 9.2, h: 0.4,
    fontSize: 16, bold: true, color: C.teal, fontFace: "Calibri",
  });
  bullets(sl, [
    "It is a BAD or UNWANTED effect caused by a medicine",
    "It happens even when the medicine is taken correctly (right dose, right way)",
    "It is NOT the same as an overdose or medication error",
  ], 0.4, 3.3, 9.2, 2.0, { fontSize: 15 });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 β€” HISTORICAL MILESTONES
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("πŸ“œ Why Does ADR Matter? β€” History Tells Us!", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  const events = [
    { year: "1922", text: "Jaundice linked to SALVARSAN (used for syphilis)" },
    { year: "1937", text: "107 people DIED from Elixir of Sulfanilamide β†’ FDA was born!" },
    { year: "1961", text: "THALIDOMIDE caused limb deformities in newborns β†’ worldwide regulations" },
  ];

  events.forEach((ev, i) => {
    const y = 1.2 + i * 1.35;
    sl.addShape(pres.ShapeType.roundRect, {
      x: 0.3, y, w: 9.4, h: 1.15,
      fill: { color: C.soft }, line: { color: C.teal, pt: 1 }, rectRadius: 0.08,
    });
    sl.addShape(pres.ShapeType.roundRect, {
      x: 0.3, y, w: 1.1, h: 1.15,
      fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.08,
    });
    sl.addText(ev.year, {
      x: 0.3, y: y + 0.28, w: 1.1, h: 0.55,
      fontSize: 20, bold: true, color: C.white,
      fontFace: "Calibri", align: "center",
    });
    sl.addText(ev.text, {
      x: 1.6, y: y + 0.2, w: 7.9, h: 0.75,
      fontSize: 15, color: C.darkText, fontFace: "Calibri", valign: "middle",
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 β€” HOW COMMON ARE ADRs?
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  darkSlide(sl);

  sl.addText("πŸ“Š How Common Are ADRs?", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.7,
    fontSize: 26, bold: true, color: C.amber, fontFace: "Calibri",
  });

  const stats = [
    { num: "10–20%", label: "Hospital patients get an ADR", icon: "πŸ₯" },
    { num: "0.24–2.9%", label: "Hospital deaths are caused by ADRs", icon: "⚠️" },
    { num: "0.3–5%", label: "Hospital admissions are due to ADRs", icon: "πŸš‘" },
  ];

  stats.forEach((s, i) => {
    const x = 0.4 + i * 3.15;
    sl.addShape(pres.ShapeType.roundRect, {
      x, y: 1.2, w: 2.9, h: 3.6,
      fill: { color: "0D4A5C" }, line: { color: C.teal, pt: 2 }, rectRadius: 0.15,
    });
    sl.addText(s.icon, { x, y: 1.4, w: 2.9, h: 0.7, fontSize: 32, align: "center" });
    sl.addText(s.num, {
      x, y: 2.2, w: 2.9, h: 0.8,
      fontSize: 26, bold: true, color: C.amber, fontFace: "Calibri", align: "center",
    });
    sl.addText(s.label, {
      x, y: 3.1, w: 2.9, h: 1.5,
      fontSize: 14, color: C.white, fontFace: "Calibri",
      align: "center", valign: "top", lineSpacingMultiple: 1.3,
    });
  });

  sl.addText("⚑ These numbers show that ADRs are a SERIOUS public health problem!", {
    x: 0.4, y: 4.95, w: 9.2, h: 0.45,
    fontSize: 13, color: C.amber, italic: true, fontFace: "Calibri", align: "center",
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 β€” CLASSIFICATION OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("πŸ—‚οΈ Types of ADRs β€” The Big Picture", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // TYPE A
  sl.addShape(pres.ShapeType.roundRect, {
    x: 0.3, y: 1.15, w: 4.45, h: 3.9,
    fill: { color: "E8F5E9" }, line: { color: C.green, pt: 2 }, rectRadius: 0.1,
  });
  sl.addShape(pres.ShapeType.roundRect, {
    x: 0.3, y: 1.15, w: 4.45, h: 0.55,
    fill: { color: C.green }, line: { color: C.green }, rectRadius: 0.1,
  });
  sl.addText("TYPE A β€” Predictable", {
    x: 0.4, y: 1.17, w: 4.25, h: 0.5,
    fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });
  bullets(sl, [
    "Related to the DOSE of the drug",
    "Common & expected",
    "Side effects (e.g. drowsiness from antihistamines)",
    "Toxic effects (too much drug)",
    "Secondary effects (indirect harm)",
    "Can be prevented by adjusting dose",
  ], 0.42, 1.85, 4.15, 3.1, { fontSize: 13, color: C.darkText });

  // TYPE B
  sl.addShape(pres.ShapeType.roundRect, {
    x: 5.25, y: 1.15, w: 4.45, h: 3.9,
    fill: { color: "FFF3E0" }, line: { color: C.orange, pt: 2 }, rectRadius: 0.1,
  });
  sl.addShape(pres.ShapeType.roundRect, {
    x: 5.25, y: 1.15, w: 4.45, h: 0.55,
    fill: { color: C.orange }, line: { color: C.orange }, rectRadius: 0.1,
  });
  sl.addText("TYPE B β€” Unpredictable", {
    x: 5.35, y: 1.17, w: 4.25, h: 0.5,
    fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });
  bullets(sl, [
    "NOT related to dose",
    "Rare & unexpected",
    "Allergic / immune reactions",
    "Genetic factors cause them",
    "Hard to predict before they happen",
    "Often require stopping the drug",
  ], 5.37, 1.85, 4.15, 3.1, { fontSize: 13, color: C.darkText });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 β€” THERAPEUTIC INDEX
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("βš–οΈ Therapeutic Index β€” Safety Margin of a Drug", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  sl.addText("Therapeutic Index = Toxic Dose Γ· Effective Dose", {
    x: 0.5, y: 1.15, w: 9.0, h: 0.6,
    fontSize: 18, bold: true, color: C.teal, fontFace: "Calibri", align: "center",
  });

  sl.addText("πŸ‘‰ The BIGGER the index β†’ the SAFER the drug!\nSmall index = drug needs careful monitoring!", {
    x: 0.5, y: 1.8, w: 9.0, h: 0.75,
    fontSize: 14, color: C.darkText, fontFace: "Calibri", align: "center", italic: true,
  });

  const narrowDrugs = [
    "Warfarin / Heparin (blood thinners)",
    "Insulin / Sulfonylureas (diabetes)",
    "Digoxin (heart)",
    "Aminoglycosides (antibiotics like Gentamicin)",
    "Antiepileptics (Phenytoin)",
    "Cytotoxic drugs (Methotrexate, Cyclosporine)",
    "Lithium (mood stabilizer)",
    "Antiarrhythmics (Lidocaine, Amiodarone)",
  ];

  sl.addShape(pres.ShapeType.roundRect, {
    x: 0.4, y: 2.7, w: 9.2, h: 2.65,
    fill: { color: "FEE8E8" }, line: { color: C.red, pt: 2 }, rectRadius: 0.1,
  });
  sl.addText("⚠️ Drugs with a NARROW Therapeutic Index (need careful monitoring):", {
    x: 0.55, y: 2.8, w: 9.0, h: 0.4,
    fontSize: 13, bold: true, color: C.red, fontFace: "Calibri",
  });

  const col1 = narrowDrugs.slice(0, 4);
  const col2 = narrowDrugs.slice(4);
  bullets(sl, col1, 0.55, 3.25, 4.5, 1.9, { fontSize: 12, color: C.darkText });
  bullets(sl, col2, 5.15, 3.25, 4.5, 1.9, { fontSize: 12, color: C.darkText });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 β€” PHARMACOKINETIC VARIATION
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("πŸ”¬ Why Do People React Differently to the Same Drug?", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 21, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  const reasons = [
    { icon: "πŸ’Š", title: "Pharmaceutical Variation", body: "Problem in the tablet/capsule itself\nE.g. Phenytoin toxicity when its capsule excipient changed from calcium sulfate β†’ lactose (more absorbed!)" },
    { icon: "🧬", title: "Pharmacogenetic Variation", body: "Genes affect how fast you break down drugs\nFast vs Slow acetylators of Isoniazid β†’ slow ones get nerve damage (neuropathy)" },
    { icon: "πŸ«€", title: "Organ Disease", body: "Liver disease β†’ drug not broken down β†’ toxicity\nKidney disease β†’ drug not excreted β†’ builds up\nHeart failure β†’ poor blood flow β†’ slow drug clearance" },
  ];

  reasons.forEach((r, i) => {
    const y = 1.2 + i * 1.38;
    sl.addShape(pres.ShapeType.roundRect, {
      x: 0.3, y, w: 9.4, h: 1.22,
      fill: { color: C.soft }, line: { color: C.teal, pt: 1 }, rectRadius: 0.08,
    });
    sl.addText(r.icon, { x: 0.4, y: y + 0.15, w: 0.9, h: 0.9, fontSize: 28, align: "center" });
    sl.addText(r.title, {
      x: 1.4, y: y + 0.08, w: 8.1, h: 0.38,
      fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri",
    });
    sl.addText(r.body, {
      x: 1.4, y: y + 0.48, w: 8.1, h: 0.7,
      fontSize: 12.5, color: C.darkText, fontFace: "Calibri", lineSpacingMultiple: 1.2,
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 β€” GENETIC VARIATION (ACETYLATION & OXIDATION)
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("🧬 Genetic Reasons for ADR", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Acetylation
  sl.addShape(pres.ShapeType.roundRect, {
    x: 0.3, y: 1.1, w: 4.5, h: 4.2,
    fill: { color: "E8F4FB" }, line: { color: C.teal, pt: 2 }, rectRadius: 0.1,
  });
  sl.addText("πŸ’Š Acetylation (NAT enzyme)", {
    x: 0.45, y: 1.2, w: 4.2, h: 0.45,
    fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri",
  });
  sl.addText("Some people are FAST, some are SLOW acetylators.\n\nSlow acetylators taking ISONIAZID (TB drug) β†’ get PERIPHERAL NEUROPATHY (nerve pain).\n\nOther drugs affected:\nIsoniazid β€’ Hydralazine β€’ Procainamide β€’ Dapsone", {
    x: 0.45, y: 1.72, w: 4.25, h: 3.4,
    fontSize: 13, color: C.darkText, fontFace: "Calibri", lineSpacingMultiple: 1.3, valign: "top",
  });

  // Succinylcholine
  sl.addShape(pres.ShapeType.roundRect, {
    x: 5.2, y: 1.1, w: 4.5, h: 4.2,
    fill: { color: "FFF8E1" }, line: { color: C.amber, pt: 2 }, rectRadius: 0.1,
  });
  sl.addText("πŸ’‰ Succinylcholine Apnoea", {
    x: 5.35, y: 1.2, w: 4.2, h: 0.45,
    fontSize: 14, bold: true, color: C.orange, fontFace: "Calibri",
  });
  sl.addText("Succinylcholine is a muscle relaxant used in surgery.\n\nNormally broken down by PSEUDOCHOLINESTERASE enzyme.\n\nIn some people this enzyme is ABNORMAL β†’ drug stays in body too long β†’ Prolonged muscle paralysis β†’ SCOLINE APNOEA (can't breathe!)\n\nInherited as autosomal recessive.", {
    x: 5.35, y: 1.72, w: 4.25, h: 3.4,
    fontSize: 12.5, color: C.darkText, fontFace: "Calibri", lineSpacingMultiple: 1.3, valign: "top",
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 β€” ALLERGIC / IMMUNE REACTIONS
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  darkSlide(sl);

  sl.addText("🀧 Allergic Drug Reactions β€” 4 Types", {
    x: 0.3, y: 0.15, w: 9.4, h: 0.7,
    fontSize: 24, bold: true, color: C.amber, fontFace: "Calibri",
  });

  const types = [
    {
      type: "Type I β€” Anaphylaxis",
      color: C.red,
      text: "IgE β†’ histamine release β†’ Urticaria, Asthma, Anaphylactic Shock\n⚠️ Drugs: Penicillin, Streptomycin, Local Anesthetics",
    },
    {
      type: "Type II β€” Cytotoxic",
      color: "8E44AD",
      text: "IgG/IgM antibodies destroy blood cells\n⚠️ Causes: Hemolytic Anemia, Thrombocytopenia",
    },
    {
      type: "Type III β€” Immune Complex",
      color: C.orange,
      text: "Antibody + antigen form complexes β†’ damage capillaries β†’ Serum Sickness\n⚠️ Drugs: Penicillin, Sulfonamides",
    },
    {
      type: "Type IV β€” Cell Mediated",
      color: C.teal,
      text: "T-lymphocytes react to drug β†’ Contact Dermatitis\n⚠️ Drugs: Topical antibiotics, antifungal creams",
    },
  ];

  types.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.05 + row * 2.1;
    sl.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.55, h: 1.9,
      fill: { color: "0D3B52" }, line: { color: t.color, pt: 2 }, rectRadius: 0.1,
    });
    sl.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.55, h: 0.45,
      fill: { color: t.color }, line: { color: t.color }, rectRadius: 0.1,
    });
    sl.addText(t.type, {
      x: x + 0.1, y: y + 0.02, w: 4.35, h: 0.42,
      fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
    });
    sl.addText(t.text, {
      x: x + 0.1, y: y + 0.5, w: 4.35, h: 1.35,
      fontSize: 12, color: "D0ECF5", fontFace: "Calibri", lineSpacingMultiple: 1.3, valign: "top",
    });
  });

  sl.addText("πŸ”Έ Pseudo-Allergic: Looks like allergy but NO immune mechanism found (e.g. Aspirin β†’ Asthma/Rash)", {
    x: 0.3, y: 5.25, w: 9.4, h: 0.28,
    fontSize: 11.5, color: C.amber, fontFace: "Calibri", italic: true,
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 β€” SKIN RASHES
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("🩺 Common Skin Reactions from Drugs", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  const rashes = [
    { name: "Erythema Multiforme", desc: "Target-like lesions on arms/legs", drugs: "Penicillin, Sulfonamides" },
    { name: "Erythema Nodosum", desc: "Tender red nodules on shins", drugs: "Phenobarbital, OCP" },
    { name: "Exfoliative Dermatitis", desc: "Red, scaly skin over large areas", drugs: "Carbamazepine, Gold salts" },
    { name: "Pemphigus", desc: "Widespread fluid-filled blisters", drugs: "Penicillamine, Rifampicin" },
    { name: "Urticaria (Hives)", desc: "Raised, red itchy patches", drugs: "Codeine, Penicillin, Dextrans" },
  ];

  rashes.forEach((r, i) => {
    const y = 1.15 + i * 0.85;
    sl.addShape(pres.ShapeType.roundRect, {
      x: 0.3, y, w: 9.4, h: 0.75,
      fill: { color: i % 2 === 0 ? C.soft : C.white }, line: { color: C.teal, pt: 1 }, rectRadius: 0.06,
    });
    sl.addText(r.name, {
      x: 0.45, y: y + 0.1, w: 2.8, h: 0.5,
      fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", valign: "middle",
    });
    sl.addText(r.desc, {
      x: 3.35, y: y + 0.1, w: 3.5, h: 0.5,
      fontSize: 12, color: C.darkText, fontFace: "Calibri", valign: "middle",
    });
    sl.addText("πŸ’Š " + r.drugs, {
      x: 6.9, y: y + 0.1, w: 2.7, h: 0.5,
      fontSize: 11.5, color: C.orange, fontFace: "Calibri", valign: "middle", italic: true,
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 β€” GENETIC / ENZYME DEFECTS
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("🧬 Genetic Enzyme Defects Causing ADR", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  const defs = [
    {
      title: "G6PD Deficiency", icon: "πŸ”΄",
      body: "G6PD enzyme is missing β†’ Red blood cells BURST (haemolysis) when exposed to oxidizing drugs\nMore common in Africans & Mediterranean people\nDrugs to avoid: Primaquine, Dapsone, Nitrofurantoin",
      color: C.red,
    },
    {
      title: "Glutathione Reductase Deficiency", icon: "🟠",
      body: "Without this enzyme, red cell defense against oxidants fails β†’ haemolysis\nAutosomal dominant inheritance",
      color: C.orange,
    },
    {
      title: "Methaemoglobin Reductase Deficiency", icon: "πŸ”΅",
      body: "Methaemoglobin builds up β†’ cannot carry oxygen β†’ HYPOXAEMIA (low blood oxygen)\nAutosomal recessive inheritance",
      color: C.teal,
    },
  ];

  defs.forEach((d, i) => {
    const y = 1.15 + i * 1.45;
    sl.addShape(pres.ShapeType.roundRect, {
      x: 0.3, y, w: 9.4, h: 1.3,
      fill: { color: C.soft }, line: { color: d.color, pt: 2 }, rectRadius: 0.08,
    });
    sl.addText(d.icon + "  " + d.title, {
      x: 0.45, y: y + 0.08, w: 9.0, h: 0.4,
      fontSize: 14, bold: true, color: d.color, fontFace: "Calibri",
    });
    sl.addText(d.body, {
      x: 0.45, y: y + 0.5, w: 9.0, h: 0.75,
      fontSize: 12.5, color: C.darkText, fontFace: "Calibri", lineSpacingMultiple: 1.2, valign: "top",
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 β€” PORPHYRIA & MALIGNANT HYPERTHERMIA
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("⚠️ Special Genetic Conditions & Drug Reactions", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Porphyria
  sl.addShape(pres.ShapeType.roundRect, {
    x: 0.3, y: 1.15, w: 4.5, h: 4.2,
    fill: { color: "F3E8FF" }, line: { color: "8E44AD", pt: 2 }, rectRadius: 0.1,
  });
  sl.addText("🟣 Porphyria", {
    x: 0.45, y: 1.25, w: 4.2, h: 0.45,
    fontSize: 16, bold: true, color: "8E44AD", fontFace: "Calibri",
  });
  sl.addText("Porphyrias = group of disorders in HAEM making pathway.\n\nCertain drugs trigger acute attacks.\n\nSymptoms: Abdominal pain, Neurological problems, Skin blistering.\n\n🚫 Avoid in Porphyria:\nBarbiturates β€’ Dapsone β€’ Chloramphenicol β€’ Diclofenac", {
    x: 0.45, y: 1.78, w: 4.2, h: 3.4,
    fontSize: 12.5, color: C.darkText, fontFace: "Calibri", lineSpacingMultiple: 1.3, valign: "top",
  });

  // Malignant Hyperthermia
  sl.addShape(pres.ShapeType.roundRect, {
    x: 5.2, y: 1.15, w: 4.5, h: 4.2,
    fill: { color: "FFF0F0" }, line: { color: C.red, pt: 2 }, rectRadius: 0.1,
  });
  sl.addText("πŸ”₯ Malignant Hyperthermia", {
    x: 5.35, y: 1.25, w: 4.2, h: 0.45,
    fontSize: 16, bold: true, color: C.red, fontFace: "Calibri",
  });
  sl.addText("Autosomal dominant genetic condition of SKELETAL MUSCLES.\n\nTriggered by: Inhaled anaesthetics (halogenated) + Succinylcholine during surgery.\n\nWhat happens: Uncontrolled calcium release β†’ Muscle spasms + Very HIGH body temperature (hyperthermia).\n\nβœ… Treatment: DANTROLENE (life-saving drug!)", {
    x: 5.35, y: 1.78, w: 4.2, h: 3.4,
    fontSize: 12.5, color: C.darkText, fontFace: "Calibri", lineSpacingMultiple: 1.3, valign: "top",
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 β€” LONG-TERM & WITHDRAWAL REACTIONS
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  darkSlide(sl);

  sl.addText("⏳ Long-Term Use & Withdrawal Reactions", {
    x: 0.3, y: 0.15, w: 9.4, h: 0.7,
    fontSize: 24, bold: true, color: C.amber, fontFace: "Calibri",
  });

  sl.addText("Using a drug for a LONG TIME or STOPPING it SUDDENLY can cause serious problems!", {
    x: 0.3, y: 0.92, w: 9.4, h: 0.45,
    fontSize: 14, color: "D0ECF5", fontFace: "Calibri", italic: true,
  });

  const items = [
    { icon: "πŸ”", title: "Tolerance", text: "Body gets used to drug β†’ needs MORE for same effect\nExample: Narcotic analgesics (morphine, codeine)" },
    { icon: "😡", title: "Tardive Dyskinesia", text: "Long-term antipsychotics (schizophrenia drugs) β†’ involuntary repetitive movements" },
    { icon: "πŸ’”", title: "Beta-Blocker Withdrawal", text: "Sudden stop β†’ REBOUND TACHYCARDIA β†’ can trigger heart attack (myocardial ischemia)" },
    { icon: "🧠", title: "Barbiturate Withdrawal", text: "Sudden stop β†’ Restlessness, Mental confusion, Convulsions" },
    { icon: "βš—οΈ", title: "Steroid Withdrawal", text: "Sudden stop β†’ ADRENAL INSUFFICIENCY (life-threatening!)" },
    { icon: "🍺", title: "Alcohol Withdrawal", text: "Sudden stop β†’ DELIRIUM TREMENS (hallucinations, seizures)" },
  ];

  items.forEach((it, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.5 + row * 1.35;
    sl.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.55, h: 1.2,
      fill: { color: "0D3B52" }, line: { color: C.teal, pt: 1 }, rectRadius: 0.08,
    });
    sl.addText(it.icon + "  " + it.title, {
      x: x + 0.1, y: y + 0.06, w: 4.35, h: 0.38,
      fontSize: 13, bold: true, color: C.amber, fontFace: "Calibri",
    });
    sl.addText(it.text, {
      x: x + 0.1, y: y + 0.46, w: 4.35, h: 0.7,
      fontSize: 11.5, color: "D0ECF5", fontFace: "Calibri", lineSpacingMultiple: 1.2, valign: "top",
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 14 β€” CARCINOGENESIS & REPRODUCTIVE EFFECTS
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  lightSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  sl.addText("πŸ§ͺ Delayed Adverse Effects β€” Cancer & Reproduction", {
    x: 0.3, y: 0.05, w: 9.4, h: 0.9,
    fontSize: 21, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Cancer section
  sl.addText("πŸ”΄ Drug-Induced Cancer (Carcinogenesis)", {
    x: 0.4, y: 1.12, w: 9.2, h: 0.4,
    fontSize: 15, bold: true, color: C.red, fontFace: "Calibri",
  });

  const cancers = [
    { mech: "Hormonal", example: "HRT > 5 years β†’ 50% higher breast cancer risk; Stilboestrol in pregnancy β†’ vaginal cancer in daughters" },
    { mech: "Gene Toxicity", example: "Cyclophosphamide β†’ Bladder cancer; Melphalan β†’ Leukemia; Phenacetin β†’ Renal pelvis cancer" },
    { mech: "Immune Suppression", example: "Azathioprine + Corticosteroids β†’ Lymphoma" },
  ];

  cancers.forEach((c, i) => {
    const y = 1.6 + i * 0.75;
    sl.addShape(pres.ShapeType.roundRect, {
      x: 0.35, y, w: 9.3, h: 0.65,
      fill: { color: "FEE8E8" }, line: { color: C.red, pt: 1 }, rectRadius: 0.06,
    });
    sl.addText("β–Ά " + c.mech + ": ", {
      x: 0.5, y: y + 0.1, w: 1.6, h: 0.45,
      fontSize: 12, bold: true, color: C.red, fontFace: "Calibri", valign: "middle",
    });
    sl.addText(c.example, {
      x: 2.1, y: y + 0.1, w: 7.4, h: 0.45,
      fontSize: 12, color: C.darkText, fontFace: "Calibri", valign: "middle",
    });
  });

  // Reproductive section
  sl.addText("🟣 Effects on Reproduction", {
    x: 0.4, y: 3.95, w: 9.2, h: 0.4,
    fontSize: 15, bold: true, color: "8E44AD", fontFace: "Calibri",
  });
  bullets(sl, [
    "Impaired Fertility: Cytotoxic drugs β†’ ovarian failure in women; Sulfasalazine β†’ reduced sperm in men",
    "Teratogenesis: Drug taken in early pregnancy β†’ birth defects in baby",
    "Most dangerous period: 18–55 days of pregnancy (organogenesis β€” when organs are forming)",
    "Key teratogenic drugs: Thalidomide, Warfarin, Phenytoin, Valproate, Methotrexate, Lithium",
  ], 0.4, 4.4, 9.2, 1.1, { fontSize: 12, color: C.darkText });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 15 β€” SUMMARY / KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════
{
  let sl = pres.addSlide();
  darkSlide(sl);

  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.teal } });
  sl.addText("βœ… Key Takeaways β€” ADR in a Nutshell", {
    x: 0.3, y: 0.1, w: 9.4, h: 0.82,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  const points = [
    "ADR = Harmful, unintended effect at NORMAL doses β€” not the patient's fault!",
    "Type A (Predictable) = Dose-related, common, preventable by adjusting dose",
    "Type B (Unpredictable) = Rare, immune/genetic, harder to prevent",
    "Narrow TI drugs (Warfarin, Digoxin, Insulin) need careful monitoring",
    "Genes matter β€” Fast/Slow acetylators and enzyme deficiencies cause different reactions",
    "Organ disease (liver, kidney, heart) significantly changes how drugs behave",
    "Allergy Types I–IV: from anaphylaxis to contact dermatitis",
    "Never stop long-term drugs suddenly β€” withdrawal can be life-threatening",
    "Certain drugs cause cancer or birth defects β€” especially in pregnancy",
    "If unsure, ALWAYS check drug history and inform your doctor / pharmacist",
  ];

  points.forEach((p, i) => {
    const col = i < 5 ? 0 : 1;
    const row = i < 5 ? i : i - 5;
    const x = 0.3 + col * 4.85;
    const y = 1.1 + row * 0.88;
    sl.addShape(pres.ShapeType.roundRect, {
      x, y, w: 4.55, h: 0.78,
      fill: { color: "0D3B52" }, line: { color: C.teal, pt: 1 }, rectRadius: 0.07,
    });
    sl.addText("βœ” " + p, {
      x: x + 0.1, y: y + 0.05, w: 4.35, h: 0.68,
      fontSize: 11.5, color: C.white, fontFace: "Calibri",
      lineSpacingMultiple: 1.2, valign: "middle",
    });
  });
}

// ─── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/adr-ppt/Adverse_Drug_Reactions.pptx" })
  .then(() => console.log("βœ… PPTX created successfully!"))
  .catch(err => console.error("❌ Error:", err));
Running Command

cd /home/daytona/workspace/adr-ppt && node create_adr_ppt.js

Running Command

ls -lh /home/daytona/workspace/adr-ppt/

Your PPT is ready! πŸŽ‰

Adverse Drug Reactions

Presentation Β· PPTX


Here's what's inside β€” 15 slides with a clean navy/teal/amber theme, all in easy plain language:
SlideTopic
1Title slide
2What is ADR? (WHO definition + simple words)
3History β€” Why ADRs matter (Sulfanilamide, Thalidomide)
4How common are ADRs? (stats with icons)
5Types A vs B β€” Predictable vs Unpredictable
6Therapeutic Index β€” safety margin with drug examples
7Why people react differently β€” pharmaceutical/pharmacokinetic/organ disease
8Genetic variation β€” Acetylation (Isoniazid), Succinylcholine Apnoea
9Allergic reactions β€” 4 types (I–IV) with examples
10Skin reactions table (Erythema multiforme, Urticaria, etc.)
11Enzyme defects β€” G6PD, Glutathione reductase, Methaemoglobin reductase
12Porphyria & Malignant Hyperthermia
13Long-term use & Withdrawal reactions
14Cancer & Reproductive effects (Teratogenesis)
15Key Takeaways β€” ADR in a nutshell
This is a shared conversation. Sign in to Orris to start your own chat.