I want ppt of pharmacological and non pharmacological treatment of adhd..in detail..want to present in front of hod

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Searching Images

ADHD treatment dopamine norepinephrine prefrontal cortex mechanism

Searching Images

ADHD non-pharmacological behavioral therapy children

Reading File
Running Command

mkdir -p /home/daytona/workspace/adhd-ppt && ls /home/daytona/workspace/adhd-ppt…

Writing File

~/adhd-ppt/adhd_ppt.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "ADHD: Pharmacological and Non-Pharmacological Treatment";
pres.author = "Department of Psychiatry";

// ─── COLOR PALETTE ────────────────────────────────────────────────────────────
const C = {
  navy:    "1A2F5E",   // dominant dark
  blue:    "1E6FA5",   // mid accent
  teal:    "1A8A7B",   // secondary accent
  orange:  "E87A20",   // highlight / pop
  cream:   "F5F0E8",   // light bg
  white:   "FFFFFF",
  gray:    "6B7280",
  lgray:   "E8EDF2",
  red:     "C0392B",
  green:   "27AE60",
  purple:  "7B2D8B",
  gold:    "D4A017",
};

// ─── HELPER: Slide title bar ───────────────────────────────────────────────────
function addTitleBar(slide, title, subtitle = "") {
  // Top accent bar
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 0.9,
    fill: { color: C.navy }, line: { color: C.navy }
  });
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0.9, w: 10, h: 0.06,
    fill: { color: C.orange }, line: { color: C.orange }
  });
  slide.addText(title, {
    x: 0.3, y: 0.05, w: 9.4, h: 0.8,
    fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.3, y: 0.96, w: 9.4, h: 0.35,
      fontSize: 12, color: C.blue, italic: true, margin: 0
    });
  }
}

// ─── HELPER: Footer ────────────────────────────────────────────────────────────
function addFooter(slide, text = "ADHD: Management Strategies  |  Department of Psychiatry") {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 5.32, w: 10, h: 0.3,
    fill: { color: C.lgray }, line: { color: C.lgray }
  });
  slide.addText(text, {
    x: 0.2, y: 5.33, w: 9.6, h: 0.28,
    fontSize: 9, color: C.gray, italic: true, margin: 0
  });
}

// ─── HELPER: Section divider slide ────────────────────────────────────────────
function sectionSlide(title, subtitle, colorL = C.navy, colorR = C.blue) {
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 4.5, h: 5.625,
    fill: { color: colorL }, line: { color: colorL }
  });
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 4.5, y: 0, w: 5.5, h: 5.625,
    fill: { color: colorR }, line: { color: colorR }
  });
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 4.5, y: 0, w: 0.06, h: 5.625,
    fill: { color: C.orange }, line: { color: C.orange }
  });
  sl.addText(title, {
    x: 0.4, y: 1.8, w: 4.0, h: 2.0,
    fontSize: 32, bold: true, color: C.white, valign: "middle", align: "left", margin: 0
  });
  sl.addText(subtitle, {
    x: 4.8, y: 2.1, w: 4.8, h: 1.5,
    fontSize: 16, color: C.white, italic: true, valign: "middle", align: "left", margin: 0
  });
  return sl;
}

// ─── SLIDE 1: TITLE SLIDE ─────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.navy }, line: { color: C.navy }
  });
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 3.5, w: 10, h: 2.125,
    fill: { color: C.blue }, line: { color: C.blue }
  });
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 3.48, w: 10, h: 0.07,
    fill: { color: C.orange }, line: { color: C.orange }
  });
  sl.addText("ATTENTION DEFICIT\nHYPERACTIVITY DISORDER", {
    x: 0.6, y: 0.5, w: 8.8, h: 2.0,
    fontSize: 38, bold: true, color: C.white, align: "center", valign: "middle",
    charSpacing: 2, margin: 0
  });
  sl.addText("Pharmacological & Non-Pharmacological Treatment", {
    x: 0.6, y: 2.55, w: 8.8, h: 0.65,
    fontSize: 22, color: C.gold, align: "center", italic: true, margin: 0
  });
  sl.addText("A Comprehensive Review", {
    x: 0.6, y: 3.6, w: 8.8, h: 0.5,
    fontSize: 16, color: C.white, align: "center", margin: 0
  });
  sl.addText("Department of Psychiatry  |  2026", {
    x: 0.6, y: 4.2, w: 8.8, h: 0.4,
    fontSize: 13, color: C.lgray, align: "center", margin: 0
  });
}

// ─── SLIDE 2: OVERVIEW & DEFINITION ──────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "What is ADHD?");
  addFooter(sl);

  // Left column
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0.3, y: 1.2, w: 4.5, h: 3.9,
    fill: { color: C.white }, line: { color: C.lgray },
    shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.1 }
  });
  sl.addText("Definition", { x: 0.4, y: 1.25, w: 4.3, h: 0.4, fontSize: 14, bold: true, color: C.navy, margin: 0 });
  sl.addText([
    { text: "ADHD is a ", options: {} },
    { text: "neurodevelopmental disorder", options: { bold: true } },
    { text: " characterised by persistent patterns of:", options: {} }
  ], { x: 0.45, y: 1.65, w: 4.2, h: 0.6, fontSize: 11, color: C.navy, margin: 0 });
  const defItems = [
    "Inattention",
    "Hyperactivity",
    "Impulsivity",
  ];
  defItems.forEach((item, i) => {
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x: 0.5, y: 2.3 + i * 0.65, w: 4.0, h: 0.52,
      fill: { color: C.navy }, rectRadius: 0.05
    });
    sl.addText(item, {
      x: 0.55, y: 2.3 + i * 0.65, w: 3.9, h: 0.52,
      fontSize: 13, bold: true, color: C.white, valign: "middle", margin: 0
    });
  });
  sl.addText("Onset before age 12 | Persists into adulthood\nPrevalence: ~5% children, ~2.5% adults", {
    x: 0.45, y: 4.3, w: 4.2, h: 0.65, fontSize: 10, color: C.gray, italic: true, margin: 0
  });

  // Right column
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 5.1, y: 1.2, w: 4.6, h: 3.9,
    fill: { color: C.white }, line: { color: C.lgray },
    shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.1 }
  });
  sl.addText("DSM-5 Subtypes", { x: 5.2, y: 1.25, w: 4.3, h: 0.4, fontSize: 14, bold: true, color: C.navy, margin: 0 });
  const subtypes = [
    { label: "Predominantly Inattentive", color: C.blue },
    { label: "Predominantly Hyperactive-Impulsive", color: C.teal },
    { label: "Combined Presentation", color: C.orange },
  ];
  subtypes.forEach((s, i) => {
    sl.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 1.75 + i * 0.7, w: 0.12, h: 0.45, fill: { color: s.color }, line: { color: s.color } });
    sl.addText(s.label, { x: 5.4, y: 1.73 + i * 0.7, w: 4.1, h: 0.5, fontSize: 12, bold: true, color: s.color, valign: "middle", margin: 0 });
  });
  sl.addText("Key Facts", { x: 5.2, y: 3.95, w: 4.3, h: 0.35, fontSize: 12, bold: true, color: C.navy, margin: 0 });
  const facts = ["75% heritability", "Male:Female = 3–4:1 (children)", "Most common childhood psychiatric disorder", ">75% adults have ≥1 comorbidity"];
  facts.forEach((f, i) => {
    sl.addText("▸  " + f, { x: 5.2, y: 4.3 + i * 0.22, w: 4.2, h: 0.22, fontSize: 10, color: C.gray, margin: 0 });
  });
}

// ─── SLIDE 3: NEUROBIOLOGY ────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Neurobiology of ADHD", "Dopamine & Norepinephrine deficiency in the Prefrontal Cortex");
  addFooter(sl);

  // Brain image
  const brainUrls = ["https://cdn.orris.care/cdss_images/pmc_clinical_VQA_041385269e15da7ea7ce53d1b9ed6cdcece153a2cdebbd2439b4e49eefa256cf.jpg"];
  try {
    const imgData = JSON.parse(execSync(`node /home/daytona/skills/shared/scripts/fetch_images.js "${brainUrls[0]}"`).toString());
    if (imgData[0] && imgData[0].base64) {
      sl.addImage({ data: imgData[0].base64, x: 5.4, y: 1.05, w: 4.3, h: 4.0 });
    }
  } catch(e) {}

  const neuroPoints = [
    { title: "Dopamine (DA) Deficit", body: "Reduced DA in prefrontal cortex → impaired executive function, reward processing, motor control", color: C.blue },
    { title: "Norepinephrine (NE) Deficit", body: "Low NE in PFC → poor working memory, attention regulation, signal-to-noise ratio", color: C.teal },
    { title: "Delayed PFC Maturation", body: "Synaptic pruning in PFC occurs ~3 years late in ADHD; explains childhood onset", color: C.purple },
    { title: "Genetic Component", body: "~75% heritability; genes affecting DAT1, DRD4, DRD5, SNAP25 implicated", color: C.navy },
    { title: "Circuit Disruption", body: "Hypofunction in prefrontal-striatal circuits → symptoms of inattention, hyperactivity", color: C.orange },
  ];
  neuroPoints.forEach((p, i) => {
    sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.2 + i * 0.77, w: 4.9, h: 0.68, fill: { color: C.white }, line: { color: C.lgray } });
    sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.2 + i * 0.77, w: 0.12, h: 0.68, fill: { color: p.color }, line: { color: p.color } });
    sl.addText(p.title, { x: 0.5, y: 1.2 + i * 0.77, w: 4.6, h: 0.27, fontSize: 11, bold: true, color: p.color, valign: "bottom", margin: 0 });
    sl.addText(p.body, { x: 0.5, y: 1.48 + i * 0.77, w: 4.6, h: 0.38, fontSize: 9.5, color: C.gray, margin: 0 });
  });
}

// ─── SECTION DIVIDER: PHARMACOLOGICAL ─────────────────────────────────────────
sectionSlide("SECTION 1", "Pharmacological Treatment of ADHD", C.navy, C.blue);

// ─── SLIDE 4: TREATMENT OVERVIEW ─────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Pharmacological Treatment: Overview");
  addFooter(sl);

  const drugs = [
    { cat: "FIRST LINE\nStimulants", items: ["Methylphenidate (MPH)", "Amphetamine salts (AMP)", "Dextroamphetamine", "Lisdexamfetamine"], color: C.blue, icon: "1" },
    { cat: "SECOND LINE\nNon-Stimulants", items: ["Atomoxetine (ATX)", "Viloxazine", "Bupropion", "TCAs (desipramine)"], color: C.teal, icon: "2" },
    { cat: "THIRD LINE\nAlpha-Agonists", items: ["Clonidine (Kapvay)", "Guanfacine XR (Intuniv)", "Adjunct to stimulants"], color: C.purple, icon: "3" },
  ];

  drugs.forEach((d, i) => {
    const x = 0.3 + i * 3.25;
    sl.addShape(pres.shapes.RECTANGLE, {
      x, y: 1.2, w: 3.0, h: 4.1,
      fill: { color: C.white }, line: { color: d.color },
      shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.12 }
    });
    sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.2, w: 3.0, h: 0.75, fill: { color: d.color }, line: { color: d.color } });
    sl.addText(d.cat, { x: x + 0.05, y: 1.2, w: 2.9, h: 0.75, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
    d.items.forEach((item, j) => {
      sl.addShape(pres.shapes.ELLIPSE, { x: x + 0.18, y: 2.07 + j * 0.65, w: 0.22, h: 0.22, fill: { color: d.color }, line: { color: d.color } });
      sl.addText(item, { x: x + 0.45, y: 2.03 + j * 0.65, w: 2.4, h: 0.3, fontSize: 11, color: C.navy, valign: "middle", margin: 0 });
    });
  });

  sl.addText("Stimulants are first-line based on decades of proven safety and efficacy (FDA-approved for children and adults)", {
    x: 0.3, y: 5.03, w: 9.4, h: 0.25, fontSize: 9.5, italic: true, color: C.gray, margin: 0
  });
}

// ─── SLIDE 5: METHYLPHENIDATE ─────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Methylphenidate (MPH)", "The Gold Standard First-Line Stimulant");
  addFooter(sl);

  // Left side
  sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.15, w: 5.5, h: 4.0, fill: { color: C.white }, line: { color: C.lgray } });

  const mechSections = [
    { h: "Mechanism of Action", body: "Blocks dopamine transporter (DAT) and norepinephrine transporter (NET) → increases DA and NE in PFC synaptic cleft → improved signal-to-noise ratio in prefrontal circuits", color: C.blue },
    { h: "Formulations", body: "Short-acting (2–4h): Ritalin IR 5–20 mg BD/TDS\nIntermediate (8–12h): Ritalin LA, Metadate CD\nLong-acting (10–14h): Concerta (OROS) 18–54 mg OD\nTransdermal patch: Daytrana (onset 2h, wear 9h)", color: C.teal },
    { h: "Dosing", body: "Start low, titrate slowly. Children: 0.3–1 mg/kg/day.\nMax: 60 mg/day (children), 80 mg/day (adults)\nSingle daily dosing preferred for compliance", color: C.purple },
    { h: "Efficacy", body: "Effect size 0.8–1.0 (large). 70–80% response rate.\nReduces hyperactivity, impulsivity, inattention.", color: C.green },
  ];
  let yy = 1.25;
  mechSections.forEach((s) => {
    sl.addText(s.h, { x: 0.45, y: yy, w: 5.2, h: 0.28, fontSize: 11, bold: true, color: s.color, margin: 0 });
    sl.addText(s.body, { x: 0.45, y: yy + 0.27, w: 5.2, h: 0.65, fontSize: 9.5, color: C.navy, margin: 0 });
    yy += 0.97;
  });

  // Right side - Side effects
  sl.addShape(pres.shapes.RECTANGLE, { x: 6.0, y: 1.15, w: 3.7, h: 4.0, fill: { color: C.white }, line: { color: C.lgray } });
  sl.addText("Side Effects & Monitoring", { x: 6.1, y: 1.22, w: 3.5, h: 0.35, fontSize: 12, bold: true, color: C.red, margin: 0 });

  const sideEffects = [
    { cat: "Common", items: ["↓ Appetite, weight loss", "Insomnia", "Headache", "Abdominal pain", "Irritability/rebound"], color: C.orange },
    { cat: "Cardiovascular", items: ["↑ HR & BP (mild)", "Monitor with CHD", "ECG if indicated"], color: C.red },
    { cat: "Monitor", items: ["Height/weight 6-monthly", "BP & HR", "Tic surveillance", "Drug holidays (summer)"], color: C.blue },
    { cat: "Contraindications", items: ["Glaucoma, anxiety", "Tic disorders (relative)", "Substance abuse Hx"], color: C.purple },
  ];
  let yr = 1.65;
  sideEffects.forEach((s) => {
    sl.addText("▌ " + s.cat, { x: 6.1, y: yr, w: 3.5, h: 0.24, fontSize: 10, bold: true, color: s.color, margin: 0 });
    yr += 0.25;
    s.items.forEach((item) => {
      sl.addText("  • " + item, { x: 6.1, y: yr, w: 3.5, h: 0.22, fontSize: 9.5, color: C.navy, margin: 0 });
      yr += 0.21;
    });
    yr += 0.07;
  });
}

// ─── SLIDE 6: AMPHETAMINES ────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Amphetamines", "First-Line Stimulants (Schedule II)");
  addFooter(sl);

  const boxes = [
    {
      title: "Mechanism", color: C.blue,
      x: 0.3, y: 1.15, w: 3.0, h: 4.0,
      body: "• Blocks DAT & NET (like MPH)\n• Also acts as a FALSE SUBSTRATE — enters presynaptic terminal via DAT\n• Displaces DA from vesicles (VMAT inhibition)\n• Reverses DAT → massive DA/NE efflux into synapse\n→ Stronger & longer dopaminergic effect than MPH"
    },
    {
      title: "Key Agents & Doses", color: C.teal,
      x: 3.55, y: 1.15, w: 3.0, h: 4.0,
      body: "Adderall XR (mixed AMP salts)\n5–30 mg OD, max 40 mg/day\n\nDextroamphetamine\n2.5–10 mg BD, max 40 mg/day\n\nLisdexamfetamine (Vyvanse)\nPro-drug → cleaved to d-AMP in body\n20–70 mg OD — lower abuse potential\nAlso FDA-approved for binge-eating\n\nDexedrine (d-AMP)\n5–10 mg BD–TDS"
    },
    {
      title: "Clinical Notes", color: C.purple,
      x: 6.8, y: 1.15, w: 2.9, h: 4.0,
      body: "• May be more effective for some patients than MPH\n• Greater DA release in nucleus accumbens at high doses → higher abuse potential\n• Lisdexamfetamine: slow enzymatic activation reduces abuse\n• Similar side-effect profile to MPH\n• Monitor growth, HR, BP\n• Schedule II — DEA controlled"
    }
  ];

  boxes.forEach(b => {
    sl.addShape(pres.shapes.RECTANGLE, { x: b.x, y: b.y, w: b.w, h: b.h, fill: { color: C.white }, line: { color: b.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x: b.x, y: b.y, w: b.w, h: 0.5, fill: { color: b.color }, line: { color: b.color } });
    sl.addText(b.title, { x: b.x + 0.05, y: b.y, w: b.w - 0.1, h: 0.5, fontSize: 13, bold: true, color: C.white, valign: "middle", align: "center", margin: 0 });
    sl.addText(b.body, { x: b.x + 0.12, y: b.y + 0.6, w: b.w - 0.24, h: b.h - 0.7, fontSize: 10, color: C.navy, margin: 0 });
  });
}

// ─── SLIDE 7: ATOMOXETINE ─────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Atomoxetine (Strattera)", "Non-Stimulant — Selective Norepinephrine Reuptake Inhibitor (NRI)");
  addFooter(sl);

  // Mechanism image
  const atomImgUrl = "https://cdn.orris.care/cdss_images/6e251f2d6fef44be4f9d80788aac45bc548b6002745d6937971d8617336c2065.png";
  try {
    const imgData = JSON.parse(execSync(`node /home/daytona/skills/shared/scripts/fetch_images.js "${atomImgUrl}"`).toString());
    if (imgData[0] && imgData[0].base64) {
      sl.addImage({ data: imgData[0].base64, x: 6.2, y: 1.15, w: 3.5, h: 3.0 });
    }
  } catch(e) {}

  const atomSections = [
    { h: "Mechanism of Action", body: "Selective NET inhibitor — blocks NE reuptake in PFC\n→ ↑ NE and DA in prefrontal cortex (NETs also transport DA)\nNo action on nucleus accumbens DATs → minimal abuse potential\nNot a controlled substance (DEA schedule IV/unscheduled)", color: C.teal },
    { h: "Dosing", body: "Start: 0.5 mg/kg/day → increase after 3 weeks → target 1.2 mg/kg/day\nMax: 1.4 mg/kg/day or 100 mg/day (whichever lower)\nOnce or twice daily — full effect in 4–6 weeks", color: C.blue },
    { h: "Advantages", body: "• No abuse potential — safe in substance use history\n• Effective for ADHD + anxiety comorbidity\n• Once daily dosing; 24-hour coverage\n• No drug holidays needed", color: C.green },
    { h: "Side Effects", body: "• GI: nausea, decreased appetite, abdominal pain\n• Cardiovascular: ↑ HR, ↑ BP\n• Mood changes; rare: suicidal ideation (black box — monitor)\n• Hepatotoxicity (very rare)", color: C.red },
  ];
  let yas = 1.2;
  atomSections.forEach((s) => {
    sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: yas, w: 5.6, h: 0.06, fill: { color: s.color }, line: { color: s.color } });
    sl.addText(s.h, { x: 0.3, y: yas + 0.08, w: 5.6, h: 0.28, fontSize: 11, bold: true, color: s.color, margin: 0 });
    sl.addText(s.body, { x: 0.3, y: yas + 0.36, w: 5.6, h: 0.6, fontSize: 9.5, color: C.navy, margin: 0 });
    yas += 1.0;
  });

  sl.addText("Atomoxetine: preferred when stimulants are CI, comorbid anxiety, tic disorders, or history of substance abuse\n— Kaplan & Sadock's Comprehensive Textbook of Psychiatry", {
    x: 0.3, y: 5.05, w: 9.4, h: 0.3, fontSize: 9, italic: true, color: C.gray, margin: 0
  });
}

// ─── SLIDE 8: ALPHA-2 AGONISTS ────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "α₂-Adrenergic Agonists: Clonidine & Guanfacine", "Third-Line Monotherapy | Useful Adjuncts to Stimulants");
  addFooter(sl);

  const agData = [
    {
      drug: "Clonidine (Kapvay)", color: C.blue, x: 0.3,
      items: [
        "α₂A & α₂C agonist",
        "↑ NE in PFC → strengthens pyramidal neuron firing",
        "Available: IR & ER (extended release)",
        "Dose: 0.1–0.4 mg/day in divided doses",
        "Useful: ADHD + tics or aggressive behaviour",
        "SE: Sedation, ↓BP, dry mouth, rebound HTN on abrupt stop",
        "Monitor BP & HR; taper slowly on discontinuation",
      ]
    },
    {
      drug: "Guanfacine XR (Intuniv)", color: C.teal, x: 5.1,
      items: [
        "More selective α₂A agonist",
        "Directly stimulates post-synaptic α₂A receptors in PFC",
        "↑ PFC pyramidal neuron signal — improves working memory",
        "Dose: 1–4 mg/day OD (XR); 4–7 mg/day (adults)",
        "Less sedating than clonidine",
        "SE: Sedation, ↓BP, bradycardia",
        "Can be combined with stimulants for augmentation",
      ]
    }
  ];

  agData.forEach(d => {
    sl.addShape(pres.shapes.RECTANGLE, { x: d.x, y: 1.15, w: 4.5, h: 4.15, fill: { color: C.white }, line: { color: d.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x: d.x, y: 1.15, w: 4.5, h: 0.52, fill: { color: d.color }, line: { color: d.color } });
    sl.addText(d.drug, { x: d.x + 0.1, y: 1.15, w: 4.3, h: 0.52, fontSize: 14, bold: true, color: C.white, valign: "middle", margin: 0 });
    d.items.forEach((item, j) => {
      sl.addShape(pres.shapes.ELLIPSE, { x: d.x + 0.18, y: 1.82 + j * 0.48, w: 0.15, h: 0.15, fill: { color: d.color }, line: { color: d.color } });
      sl.addText(item, { x: d.x + 0.4, y: 1.78 + j * 0.48, w: 4.0, h: 0.42, fontSize: 10.5, color: C.navy, valign: "middle", margin: 0 });
    });
  });
}

// ─── SLIDE 9: OTHER PHARMACOLOGICAL ──────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Other Pharmacological Agents", "Viloxazine, Bupropion, TCAs & Emerging Therapies");
  addFooter(sl);

  const others = [
    {
      drug: "Viloxazine (Qelbree)", mech: "Selective NRI + 5-HT modulator",
      notes: "FDA-approved 2021 for children 6–17y\nOnce daily, no CV monitoring burden\nEffective for inattention and emotional dysregulation",
      dose: "100–400 mg/day OD",
      color: C.purple, x: 0.3, y: 1.18
    },
    {
      drug: "Bupropion (Wellbutrin)", mech: "Weak NRI + DAT inhibitor (NDRI)",
      notes: "Off-label for ADHD; particularly useful when comorbid depression\nLower efficacy than stimulants\nAvoid in eating disorders / seizure Hx",
      dose: "150–300 mg/day",
      color: C.blue, x: 0.3, y: 2.75
    },
    {
      drug: "TCAs (Desipramine, Nortriptyline)", mech: "Potent NRI action",
      notes: "Used when stimulants contraindicated; especially ADHD + enuresis\nRisk of QTc prolongation — ECG mandatory\nNot preferred in children",
      dose: "25–100 mg/day",
      color: C.red, x: 0.3, y: 4.28
    },
    {
      drug: "Modafinil", mech: "Wakefulness promoter, DA/NE modulation",
      notes: "Off-label; some evidence in ADHD\nUseful when stimulants not tolerated\nLess evidence than first-line agents",
      dose: "100–400 mg OD",
      color: C.teal, x: 5.4, y: 1.18
    },
    {
      drug: "Emerging: Mazindol CR", mech: "DAT/NET inhibitor, non-amphetamine",
      notes: "Under investigation for adult ADHD\nPhase II/III trials underway\nMay offer efficacy without abuse liability",
      dose: "Investigational",
      color: C.orange, x: 5.4, y: 2.75
    },
    {
      drug: "Antipsychotics (risperidone, aripiprazole)", mech: "D2/5-HT2A antagonism",
      notes: "NOT for ADHD core symptoms\nUsed only for severe aggression, ODD/CD comorbidity\nMonitor metabolic effects",
      dose: "Low doses adjunct",
      color: C.gray, x: 5.4, y: 4.28
    },
  ];

  others.forEach(o => {
    sl.addShape(pres.shapes.RECTANGLE, { x: o.x, y: o.y, w: 4.8, h: 1.37, fill: { color: C.white }, line: { color: o.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x: o.x, y: o.y, w: 0.12, h: 1.37, fill: { color: o.color }, line: { color: o.color } });
    sl.addText(o.drug, { x: o.x + 0.2, y: o.y + 0.04, w: 4.5, h: 0.28, fontSize: 11, bold: true, color: o.color, margin: 0 });
    sl.addText(o.mech, { x: o.x + 0.2, y: o.y + 0.33, w: 4.5, h: 0.22, fontSize: 9.5, italic: true, color: C.blue, margin: 0 });
    sl.addText(o.notes, { x: o.x + 0.2, y: o.y + 0.55, w: 4.5, h: 0.5, fontSize: 9, color: C.navy, margin: 0 });
    sl.addText("Dose: " + o.dose, { x: o.x + 0.2, y: o.y + 1.13, w: 4.5, h: 0.2, fontSize: 8.5, italic: true, color: C.gray, margin: 0 });
  });
}

// ─── SLIDE 10: MPH FORMULATIONS TABLE ────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Methylphenidate Formulations at a Glance");
  addFooter(sl);

  const rows = [
    ["Formulation", "Release Type", "Duration", "Dose Range", "Notes"],
    ["Ritalin IR", "Immediate", "2–4 h", "5–20 mg BD/TDS", "Classic; flexible dosing"],
    ["Ritalin LA", "Bi-modal (50/50)", "8–12 h", "10–60 mg OD", "Sprinkle capsule available"],
    ["OROS (Concerta)", "Osmotic (22/78%)", "10–12 h", "18–54 mg OD", "Once-daily; compliance"],
    ["Medikinet CR", "Bi-modal (50/50)", "8 h", "5–60 mg OD", "With food"],
    ["Jornay PM", "Delayed + ER", "~22 h", "20–100 mg at night", "Morning symptom control"],
    ["Daytrana Patch", "Transdermal", "Up to 12 h", "10–30 mg/day", "Remove at 9h; dermatitis risk"],
    ["Dexmethylphenidate (Focalin XR)", "Extended", "12–14 h", "5–40 mg OD", "d-isomer only; potent"],
  ];

  const colW = [2.2, 1.4, 1.0, 1.5, 2.7];
  const startX = 0.2;
  const startY = 1.2;
  const rowH = 0.55;
  const colX = [];
  let cx = startX;
  colW.forEach(w => { colX.push(cx); cx += w + 0.07; });

  rows.forEach((row, ri) => {
    const isHeader = ri === 0;
    const bg = isHeader ? C.navy : (ri % 2 === 0 ? C.white : C.lgray);
    const textColor = isHeader ? C.white : C.navy;
    row.forEach((cell, ci) => {
      sl.addShape(pres.shapes.RECTANGLE, {
        x: colX[ci], y: startY + ri * rowH, w: colW[ci], h: rowH,
        fill: { color: bg }, line: { color: C.lgray }
      });
      sl.addText(cell, {
        x: colX[ci] + 0.05, y: startY + ri * rowH, w: colW[ci] - 0.1, h: rowH,
        fontSize: isHeader ? 10 : 9.5, bold: isHeader, color: textColor, valign: "middle", margin: 0
      });
    });
  });
}

// ─── SECTION DIVIDER: NON-PHARMACOLOGICAL ─────────────────────────────────────
sectionSlide("SECTION 2", "Non-Pharmacological Treatment of ADHD", C.teal, "1A5F7A");

// ─── SLIDE 11: NON-PHARM OVERVIEW ────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Non-Pharmacological Treatment: Overview", "Evidence-based psychosocial interventions — essential adjuncts to medication");
  addFooter(sl);

  sl.addText("Key Principle: Medications treat core symptoms; non-pharmacological treatments address functional impairment, comorbidities, and skills deficits", {
    x: 0.3, y: 1.05, w: 9.4, h: 0.42,
    fontSize: 12, italic: true, color: C.teal, margin: 0
  });

  const categories = [
    { label: "Behavioural\nInterventions", icon: "🧠", color: C.blue },
    { label: "Cognitive\nBehavioural Therapy", icon: "💬", color: C.teal },
    { label: "Parent\nTraining", icon: "👨‍👩‍👧", color: C.purple },
    { label: "Educational\nInterventions", icon: "📚", color: C.orange },
    { label: "Dietary &\nLifestyle", icon: "🥗", color: C.green },
    { label: "Neurofeedback &\nDigital Tools", icon: "💻", color: C.navy },
  ];

  categories.forEach((c, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.2;
    const y = 1.6 + row * 1.7;
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y, w: 3.0, h: 1.5, fill: { color: c.color }, rectRadius: 0.1,
      shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.15 }
    });
    sl.addText(c.label, { x: x + 0.1, y: y + 0.25, w: 2.8, h: 1.0, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
  });
}

// ─── SLIDE 12: BEHAVIORAL INTERVENTIONS ──────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Behavioural Interventions", "Most Evidence-Based Non-Pharmacological Treatment");
  addFooter(sl);

  const behItems = [
    {
      title: "Behaviour Modification / Token Economy",
      body: "• Reward charts, point systems, token economies\n• Immediate contingency management — rewards given quickly\n• Most effective in classroom and home settings\n• Reduces disruptive behaviour; improves task completion",
      color: C.blue
    },
    {
      title: "Contingency Management",
      body: "• Positive reinforcement for desired behaviours\n• Response cost — loss of tokens for rule violations\n• Time-out used judiciously (not punitive)\n• Works best with structured, consistent implementation",
      color: C.teal
    },
    {
      title: "Parent-Implemented Behaviour Therapy",
      body: "• Daily report card linking school performance to home rewards\n• Structured routines, visual schedules\n• Clear, concise commands; praise immediately after compliance\n• Foundation: Barkley's Defiant Children programme",
      color: C.purple
    },
    {
      title: "Summer Treatment Programmes (STP)",
      body: "• Intensive 8-week behavioural intervention\n• Combines social skills, sports, academic tutoring\n• Evidence: MTA study (1999) — combined treatment superior\n• Especially beneficial for comorbid ODD/conduct disorder",
      color: C.orange
    },
  ];

  behItems.forEach((item, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.15 + row * 1.95;
    sl.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 4.6, h: 1.82,
      fill: { color: C.white }, line: { color: item.color }
    });
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.6, h: 0.4, fill: { color: item.color }, line: { color: item.color } });
    sl.addText(item.title, { x: x + 0.1, y, w: 4.4, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
    sl.addText(item.body, { x: x + 0.1, y: y + 0.45, w: 4.4, h: 1.32, fontSize: 9.5, color: C.navy, margin: 0 });
  });
}

// ─── SLIDE 13: CBT ────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Cognitive Behavioural Therapy (CBT)", "Particularly Effective for Adolescents & Adults with ADHD");
  addFooter(sl);

  const cbts = [
    { title: "Core Components", color: C.teal, items: ["Psychoeducation about ADHD", "Time management & planning skills", "Organisational strategies", "Cognitive restructuring (negative self-talk)", "Problem-solving training", "Emotion regulation techniques"] },
    { title: "Evidence Base", color: C.blue, items: ["RCTs show moderate effect size (0.4–0.6)", "Safren et al. protocol: gold standard for adult ADHD", "Particularly effective for residual symptoms after medication", "CBT + medication > medication alone", "Group CBT: cost-effective, adds peer support", "EMDR emerging for emotional dysregulation"] },
    { title: "Mindfulness-Based CBT", color: C.purple, items: ["Mindfulness-based cognitive therapy (MBCT)", "Improves attention regulation and impulse control", "Reduces emotional reactivity", "Growing evidence base in adult ADHD", "8-week programme (Zylowska et al.)", "Complements pharmacotherapy"] },
  ];

  cbts.forEach((c, i) => {
    const x = 0.3 + i * 3.2;
    sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.15, w: 3.0, h: 4.2, fill: { color: C.white }, line: { color: c.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.15, w: 3.0, h: 0.48, fill: { color: c.color }, line: { color: c.color } });
    sl.addText(c.title, { x: x + 0.1, y: 1.15, w: 2.8, h: 0.48, fontSize: 13, bold: true, color: C.white, valign: "middle", align: "center", margin: 0 });
    c.items.forEach((item, j) => {
      sl.addShape(pres.shapes.ELLIPSE, { x: x + 0.18, y: 1.77 + j * 0.57, w: 0.15, h: 0.15, fill: { color: c.color }, line: { color: c.color } });
      sl.addText(item, { x: x + 0.4, y: 1.73 + j * 0.57, w: 2.5, h: 0.5, fontSize: 10, color: C.navy, valign: "middle", margin: 0 });
    });
  });
}

// ─── SLIDE 14: PARENT TRAINING ────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Parent Training & Family Interventions", "Critical for Children — First-Line in Preschool ADHD");
  addFooter(sl);

  sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.15, w: 9.4, h: 0.5, fill: { color: C.purple }, line: { color: C.purple } });
  sl.addText("Parent Training in Behaviour Management (PTBM) is a FIRST-LINE intervention for preschool children (age 4–5) and recommended before stimulant medication", {
    x: 0.4, y: 1.18, w: 9.2, h: 0.44, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0
  });

  const ptData = [
    {
      title: "What Parents Learn", color: C.blue,
      items: ["Positive reinforcement techniques", "Setting clear, consistent expectations", "Planned ignoring of minor misbehaviour", "Effective use of time-out", "Praise and reward schedules", "Managing transitions and routines"]
    },
    {
      title: "Evidence-Based Programmes", color: C.teal,
      items: ["Barkley's Defiant Children (gold standard)", "The Incredible Years (Webster-Stratton)", "Triple P – Positive Parenting", "Parent-Child Interaction Therapy (PCIT)", "COPE (Community Parent Ed.)", "CHADD parent training curriculum"]
    },
    {
      title: "Family Therapy Goals", color: C.purple,
      items: ["Reduce family conflict and stress", "Improve parent-child relationship", "Parental psychoeducation about ADHD", "Sibling and family education", "Marital support for parents", "Crisis management skills"]
    }
  ];

  ptData.forEach((d, i) => {
    const x = 0.3 + i * 3.2;
    sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.75, w: 3.05, h: 3.4, fill: { color: C.white }, line: { color: d.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.75, w: 3.05, h: 0.42, fill: { color: d.color }, line: { color: d.color } });
    sl.addText(d.title, { x: x + 0.1, y: 1.75, w: 2.9, h: 0.42, fontSize: 11, bold: true, color: C.white, valign: "middle", align: "center", margin: 0 });
    d.items.forEach((item, j) => {
      sl.addText("✓  " + item, { x: x + 0.1, y: 2.27 + j * 0.47, w: 2.9, h: 0.42, fontSize: 10, color: C.navy, valign: "middle", margin: 0 });
    });
  });
}

// ─── SLIDE 15: EDUCATIONAL INTERVENTIONS ─────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Educational & School-Based Interventions", "Managing ADHD in the Academic Environment");
  addFooter(sl);

  const eduItems = [
    { cat: "Classroom Accommodations", color: C.orange, items: ["Preferential seating (front, away from distractions)", "Reduced workload / extended time on tests", "Frequent breaks; movement opportunities", "Chunking assignments into smaller tasks", "Visual schedules and checklists on desk"] },
    { cat: "Teacher Strategies", color: C.blue, items: ["Clear, brief, repeated instructions", "Non-verbal cueing (tap on desk, eye contact)", "Immediate and specific positive feedback", "Daily Report Card (DRC) linking to home", "Flexible seating options (fidget tools)"] },
    { cat: "Special Education Support", color: C.teal, items: ["IEP (Individualised Education Programme)", "504 Plan accommodations in US", "Resource room / learning support periods", "Educational psychologist assessment", "Psychoeducational programmes for study skills"] },
    { cat: "Social Skills Training", color: C.purple, items: ["Structured peer interaction groups", "Role-playing social scenarios", "Problem-solving and conflict resolution", "Anger management programmes", "ADHD-specific social skills curriculum"] },
  ];

  eduItems.forEach((e, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.15 + row * 1.95;
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.6, h: 1.82, fill: { color: C.white }, line: { color: e.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.6, h: 0.4, fill: { color: e.color }, line: { color: e.color } });
    sl.addText(e.cat, { x: x + 0.1, y, w: 4.4, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
    e.items.forEach((item, j) => {
      sl.addText("•  " + item, { x: x + 0.1, y: y + 0.45 + j * 0.26, w: 4.4, h: 0.26, fontSize: 9.5, color: C.navy, margin: 0 });
    });
  });
}

// ─── SLIDE 16: DIETARY & LIFESTYLE ───────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Dietary, Lifestyle & Complementary Interventions");
  addFooter(sl);

  const lifeItems = [
    {
      title: "Exercise & Physical Activity", color: C.green,
      body: "• Aerobic exercise ↑ DA and NE in PFC acutely\n• 30 min/day vigorous activity reduces ADHD symptoms\n• Improves executive function, working memory, attention\n• Evidence: effect size ~0.6 (moderate-large)\n• Recommended: swimming, running, team sports"
    },
    {
      title: "Sleep Hygiene", color: C.blue,
      body: "• ADHD highly comorbid with sleep disorders (>50%)\n• Consistent sleep/wake schedule; limit screens before bed\n• Melatonin (0.5–3 mg) for sleep onset difficulties\n• Adequate sleep essential — sleep deprivation worsens ADHD\n• Address restless leg syndrome if present"
    },
    {
      title: "Dietary Modifications", color: C.orange,
      body: "• Omega-3 supplementation: modest evidence (EPA+DHA)\n• Elimination diet: restricted for food additives/colorings\n• Iron supplementation if ferritin low (<30 ng/mL)\n• Avoid sugar excess — limited evidence but reduces reactivity\n• Zinc, magnesium supplementation under investigation"
    },
    {
      title: "Neurofeedback (EEG Biofeedback)", color: C.purple,
      body: "• Trains brain to produce more theta/alpha waves\n• Multiple sessions (30–40+) required\n• Effect size ~0.5 for attention outcomes\n• Not yet recommended as first-line — limited RCT data\n• Growing evidence — potentially blinded-therapist trials"
    },
    {
      title: "Digital & Technology-Based Interventions", color: C.teal,
      body: "• FDA-cleared: EndeavorRx (video game for ADHD 8–12y)\n• Cognitive training apps: Cogmed, Working Memory Training\n• Reminder apps, task management tools\n• Digital CBT platforms for adults\n• Wearable devices for focus monitoring"
    },
    {
      title: "Mindfulness & Yoga", color: C.navy,
      body: "• Mindfulness meditation improves attention regulation\n• Yoga reduces hyperactivity and improves impulse control\n• Growing RCT evidence in children and adolescents\n• Non-stigmatising and accessible\n• Often combined with CBT for maximum benefit"
    }
  ];

  lifeItems.forEach((item, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.25 + col * 3.25;
    const y = 1.15 + row * 2.0;
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 3.1, h: 1.85, fill: { color: C.white }, line: { color: item.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 3.1, h: 0.38, fill: { color: item.color }, line: { color: item.color } });
    sl.addText(item.title, { x: x + 0.1, y, w: 2.9, h: 0.38, fontSize: 10.5, bold: true, color: C.white, valign: "middle", margin: 0 });
    sl.addText(item.body, { x: x + 0.08, y: y + 0.42, w: 2.94, h: 1.4, fontSize: 9, color: C.navy, margin: 0 });
  });
}

// ─── SLIDE 17: MTA STUDY & EVIDENCE ──────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "MTA Study: Landmark Evidence", "Multimodal Treatment of ADHD (MTA) — N=579, Age 7–9.9 years");
  addFooter(sl);

  // MTA 4 arms
  const mtaArms = [
    { arm: "Medication Management Only", result: "Large improvement in core symptoms\n(Best for ADHD symptoms alone)", color: C.blue },
    { arm: "Intensive Behavioural Treatment Only", result: "Moderate improvement\n(Better for anxiety, academic & social skills)", color: C.teal },
    { arm: "Combined Treatment\n(Medication + Behaviour)", result: "Greatest overall improvement\nBest for comorbidities & functional outcomes", color: C.green },
    { arm: "Routine Community Care", result: "Least improvement\n(58% on medication — lower dose)", color: C.orange },
  ];

  mtaArms.forEach((arm, i) => {
    const x = 0.3 + (i % 2) * 4.85;
    const y = 1.15 + Math.floor(i / 2) * 1.55;
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.6, h: 1.42, fill: { color: C.white }, line: { color: arm.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.18, h: 1.42, fill: { color: arm.color }, line: { color: arm.color } });
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: x + 0.25, y: y + 0.08, w: 0.45, h: 0.45, fill: { color: arm.color }, rectRadius: 0.05 });
    sl.addText(`${i+1}`, { x: x + 0.25, y: y + 0.08, w: 0.45, h: 0.45, fontSize: 18, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
    sl.addText(arm.arm, { x: x + 0.8, y: y + 0.06, w: 3.7, h: 0.52, fontSize: 11, bold: true, color: arm.color, margin: 0 });
    sl.addText(arm.result, { x: x + 0.8, y: y + 0.6, w: 3.7, h: 0.75, fontSize: 10, color: C.navy, margin: 0 });
  });

  sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 4.38, w: 9.4, h: 0.7, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addText("Conclusion: Combined Treatment (medication + behavioural) is SUPERIOR for children with ADHD + comorbidities, and equivalent for those without comorbidities when only ADHD symptoms are measured. Medication alone had largest effect on core ADHD symptoms at 14 months.", {
    x: 0.5, y: 4.38, w: 9.0, h: 0.7, fontSize: 10, color: C.white, valign: "middle", margin: 0
  });
}

// ─── SECTION DIVIDER: TREATMENT ALGORITHM ─────────────────────────────────────
sectionSlide("SECTION 3", "Treatment Algorithm & Special Situations", C.purple, "6A1A7A");

// ─── SLIDE 18: TREATMENT ALGORITHM ────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Treatment Algorithm — ADHD Management");
  addFooter(sl);

  const steps = [
    { step: "STEP 1", title: "Assessment & Diagnosis", body: "DSM-5 criteria, rating scales (ADHD-RS, Conners), multi-informant assessment, rule out comorbidities, CGAS baseline", color: C.blue },
    { step: "STEP 2", title: "Psychoeducation", body: "Educate patient, family, school about ADHD; discuss treatment options; set realistic goals; address stigma", color: C.teal },
    { step: "STEP 3", title: "Non-Pharm Interventions (Start Always)", body: "Parent training, school accommodations, behavioural strategies, lifestyle modifications — implemented alongside or before medication", color: C.green },
    { step: "STEP 4", title: "First-Line Pharmacotherapy", body: "Stimulants (MPH or AMP): start low, titrate q1–2 weeks. ≥4 weeks trial at optimal dose before declaring failure. Consider lisdexamfetamine for abuse risk", color: C.orange },
    { step: "STEP 5", title: "If Stimulant Fails / Not Tolerated", body: "Switch stimulant class → atomoxetine → viloxazine → alpha-2 agonists → consider combination strategies", color: C.purple },
    { step: "STEP 6", title: "Address Comorbidities", body: "Treat anxiety (SSRI + CBT), depression (SSRI), tics (alpha-agonist), ODD/CD (behavioural therapy + parent training), SUD (specialist referral)", color: C.red },
  ];

  steps.forEach((s, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.25 + col * 4.9;
    const y = 1.15 + row * 1.4;
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.65, h: 1.3, fill: { color: C.white }, line: { color: s.color } });
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: x + 0.1, y: y + 0.07, w: 0.8, h: 0.55, fill: { color: s.color }, rectRadius: 0.06 });
    sl.addText(s.step, { x: x + 0.1, y: y + 0.07, w: 0.8, h: 0.55, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
    sl.addText(s.title, { x: x + 1.0, y: y + 0.07, w: 3.55, h: 0.38, fontSize: 11, bold: true, color: s.color, valign: "bottom", margin: 0 });
    sl.addText(s.body, { x: x + 1.0, y: y + 0.47, w: 3.55, h: 0.75, fontSize: 9.5, color: C.navy, margin: 0 });
  });
}

// ─── SLIDE 19: SPECIAL SITUATIONS ─────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Special Clinical Situations");
  addFooter(sl);

  const sps = [
    { title: "ADHD + Tics / Tourette's", body: "Alpha-agonists (guanfacine, clonidine) preferred\nAtomoxetine also effective\nStimulants not absolutely CI — reassess individually\nHabit Reversal Therapy (HRT) for tics", color: C.blue },
    { title: "ADHD + Anxiety", body: "Atomoxetine preferred over stimulants\nCBT for anxiety essential\nSSRI can be added if anxiety persists\nAvoid high-dose stimulants worsening anxiety", color: C.teal },
    { title: "ADHD + Depression", body: "Treat depression first if severe (SSRI)\nBupropion: dual benefit (ADHD + depression)\nCBT addresses both\nMonitor for mood effects of stimulants", color: C.purple },
    { title: "ADHD + Substance Use Disorder", body: "Atomoxetine / viloxazine preferred (non-controlled)\nLisdexamfetamine if stimulant needed (lower abuse)\nBehavioural therapy for SUD essential\nAvoid immediate-release stimulants", color: C.red },
    { title: "ADHD in Preschoolers (Age 4–5)", body: "Behaviour therapy FIRST-LINE (PTBM)\nMedication only if severe / insufficient response to PTBM\nMPH at lower doses if medication needed\nParent training is primary intervention", color: C.orange },
    { title: "Adult ADHD", body: "Stimulants remain first-line (MPH, AMP, lisdexamfetamine)\nCBT essential for time management, organisation\nAtomoxetine option if SUD concern\nComorbidity screening mandatory", color: C.navy },
  ];

  sps.forEach((s, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.25 + col * 3.25;
    const y = 1.15 + row * 2.0;
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 3.1, h: 1.85, fill: { color: C.white }, line: { color: s.color } });
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 3.1, h: 0.38, fill: { color: s.color }, line: { color: s.color } });
    sl.addText(s.title, { x: x + 0.08, y, w: 2.94, h: 0.38, fontSize: 10.5, bold: true, color: C.white, valign: "middle", margin: 0 });
    sl.addText(s.body, { x: x + 0.08, y: y + 0.42, w: 2.94, h: 1.4, fontSize: 9.5, color: C.navy, margin: 0 });
  });
}

// ─── SLIDE 20: MONITORING ─────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "Monitoring & Follow-Up in ADHD Treatment");
  addFooter(sl);

  sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.15, w: 9.4, h: 3.95, fill: { color: C.white }, line: { color: C.lgray } });

  const monData = [
    { param: "Height & Weight", freq: "Every 6 months", why: "Stimulants → appetite suppression, growth effects", action: "Drug holiday in summer if significant growth suppression" },
    { param: "Blood Pressure & HR", freq: "Every visit", why: "Stimulants and atomoxetine → CV effects", action: "Dose reduction / switch if persistent hypertension" },
    { param: "ADHD Symptoms", freq: "Every visit (rating scales)", why: "Assess efficacy of treatment", action: "Adjust dose / switch agent if inadequate response" },
    { param: "Sleep", freq: "Each visit", why: "Stimulants → insomnia; ADHD + sleep disorders common", action: "Timing adjustment, sleep hygiene, melatonin if needed" },
    { param: "Mood & Suicidality", freq: "Each visit", why: "Atomoxetine: black box warning for suicidal ideation", action: "Particularly in first weeks of ATX therapy; close monitoring" },
    { param: "Tics", freq: "Each visit", why: "Stimulants may worsen tics in some patients", action: "Switch to ATX or alpha-agonist if tics worsen" },
    { param: "Academic & Social Function", freq: "3–6 monthly", why: "Primary treatment goal: functional improvement", action: "CGAS, Vanderbilt teacher/parent rating scales" },
  ];

  const colHeaders = ["Parameter", "Frequency", "Rationale", "Action if Abnormal"];
  const colW = [1.8, 1.6, 3.3, 2.5];
  const startX = 0.35;
  const colXm = [];
  let cx2 = startX;
  colW.forEach(w => { colXm.push(cx2); cx2 += w + 0.05; });

  // Header
  colHeaders.forEach((h, ci) => {
    sl.addShape(pres.shapes.RECTANGLE, { x: colXm[ci], y: 1.22, w: colW[ci], h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
    sl.addText(h, { x: colXm[ci] + 0.05, y: 1.22, w: colW[ci] - 0.1, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
  });

  monData.forEach((row, ri) => {
    const bg = ri % 2 === 0 ? C.white : C.lgray;
    const rowY = 1.63 + ri * 0.44;
    [row.param, row.freq, row.why, row.action].forEach((cell, ci) => {
      sl.addShape(pres.shapes.RECTANGLE, { x: colXm[ci], y: rowY, w: colW[ci], h: 0.44, fill: { color: bg }, line: { color: C.lgray } });
      sl.addText(cell, { x: colXm[ci] + 0.05, y: rowY, w: colW[ci] - 0.1, h: 0.44, fontSize: 9, color: C.navy, valign: "middle", margin: 0 });
    });
  });
}

// ─── SLIDE 21: KEY TAKEAWAYS ──────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.orange }, line: { color: C.orange } });
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.55, w: 10, h: 0.07, fill: { color: C.orange }, line: { color: C.orange } });

  sl.addText("KEY TAKEAWAYS", {
    x: 0.5, y: 0.1, w: 9.0, h: 0.6, fontSize: 24, bold: true, color: C.gold, align: "center", charSpacing: 3, margin: 0
  });

  const takeaways = [
    { num: "01", text: "ADHD is a neurodevelopmental disorder with strong genetic basis (75%); delayed PFC maturation causes core symptoms of inattention, hyperactivity, and impulsivity" },
    { num: "02", text: "Stimulants (methylphenidate, amphetamines) are FIRST-LINE with large effect sizes (0.8–1.0); 70–80% response rate" },
    { num: "03", text: "Atomoxetine is first-line NON-STIMULANT (NRI); preferred with anxiety, tics, or SUD history; 4–6 week onset" },
    { num: "04", text: "Behavioural therapy and parent training are FIRST-LINE for preschoolers and essential adjuncts at all ages" },
    { num: "05", text: "COMBINED treatment (medication + behavioural) is SUPERIOR for children with comorbidities (MTA Study)" },
    { num: "06", text: "Monitor: height/weight, BP/HR, sleep, mood, and symptoms at every visit; address comorbidities early" },
  ];

  takeaways.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.9;
    const y = 0.85 + row * 1.45;
    sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.65, h: 1.32, fill: { color: "1E2D4A" }, line: { color: C.blue } });
    sl.addText(t.num, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fontSize: 20, bold: true, color: C.orange, align: "center", margin: 0 });
    sl.addText(t.text, { x: x + 0.75, y: y + 0.1, w: 3.8, h: 1.1, fontSize: 10.5, color: C.white, margin: 0 });
  });
}

// ─── SLIDE 22: REFERENCES & THANK YOU ─────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.cream }, line: { color: C.cream } });
  addTitleBar(sl, "References");
  addFooter(sl);

  const refs = [
    "1. Stahl SM. Stahl's Essential Psychopharmacology: Neuroscientific Basis and Practical Applications, 5th Ed. Cambridge University Press, 2021. (Chapter 11: ADHD)",
    "2. Sadock BJ, Sadock VA, Ruiz P. Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 10th Ed. Wolters Kluwer, 2017. (Chapter 44.1: ADHD)",
    "3. Taylor D, et al. The Maudsley Prescribing Guidelines in Psychiatry, 15th Ed. Wiley-Blackwell, 2023.",
    "4. Lippincott Illustrated Reviews: Pharmacology, 8th Ed. Wolters Kluwer, 2023. (Chapter 22: CNS Stimulants)",
    "5. MTA Cooperative Group. Arch Gen Psychiatry. 1999;56(12):1073–86. (Multimodal Treatment of ADHD)",
    "6. American Academy of Pediatrics. ADHD Clinical Practice Guidelines. Pediatrics. 2019;144(4):e20192528.",
    "7. NICE Guideline NG87. Attention deficit hyperactivity disorder: diagnosis and management. Updated 2019.",
    "8. Safren SA, et al. Cognitive-Behavioral Therapy for ADHD in Adults. Guilford Press, 2017.",
    "9. Biederman J, Faraone SV. Lancet 2005;366:237–248. (ADHD: Review)",
    "10. Faraone SV et al. Nat Rev Dis Primers 2021;7:6. (ADHD: Primer)",
  ];

  refs.forEach((ref, i) => {
    sl.addText(ref, {
      x: 0.35, y: 1.18 + i * 0.41, w: 9.3, h: 0.38,
      fontSize: 9.5, color: C.navy, margin: 0
    });
  });

  sl.addShape(pres.shapes.RECTANGLE, { x: 2.5, y: 4.25, w: 5.0, h: 1.1, fill: { color: C.navy }, line: { color: C.navy } });
  sl.addText("Thank You", { x: 2.5, y: 4.28, w: 5.0, h: 0.55, fontSize: 26, bold: true, color: C.gold, align: "center", margin: 0 });
  sl.addText("Questions & Discussion", { x: 2.5, y: 4.83, w: 5.0, h: 0.4, fontSize: 13, color: C.white, align: "center", italic: true, margin: 0 });
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/adhd-ppt/ADHD_Treatment_Presentation.pptx" })
  .then(() => console.log("✅ PPTX created successfully!"))
  .catch(err => console.error("❌ Error:", err));
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.