Make a PPT on bipolar disorder using Kaplan & Sadock's Comprehensive Textbook of Psychiatry
mkdir -p /home/daytona/workspace/bipolar-ppt && ls /home/daytona/workspace/bipolar-ppt
~/bipolar-ppt/bipolar.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Bipolar Disorder";
pres.subject = "Kaplan & Sadock's Comprehensive Textbook of Psychiatry";
pres.author = "Orris Medical Education";
// ── Color Palette ──────────────────────────────────────────────────────────
const C = {
navy: "0D1B3E", // dominant dark
indigo: "1E3A5F", // mid-dark bg accent
teal: "2E86AB", // supporting tone
gold: "F0A500", // sharp accent / highlights
white: "FFFFFF",
light: "ECF0F7", // light slide backgrounds
muted: "7A8BA6", // muted body text on dark
dark: "1A2540", // body text on light
soft: "D6E4F0", // soft box fills
};
// ── Reusable helpers ─────────────────────────────────────────────────────
function addSlideHeader(slide, title, subtitle) {
// Top accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.08, fill: { color: C.gold } });
slide.addText(title, {
x: 0.5, y: 0.15, w: 9, h: 0.65,
fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.5, y: 0.78, w: 9, h: 0.35,
fontSize: 14, color: C.teal, fontFace: "Calibri", italic: true,
});
}
// Bottom divider
slide.addShape(pres.ShapeType.line, {
x: 0.5, y: 1.15, w: 9, h: 0,
line: { color: C.teal, width: 1.5 },
});
}
function addSource(slide, text) {
slide.addText(text || "Source: Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th Ed.", {
x: 0.2, y: 5.3, w: 9.6, h: 0.3,
fontSize: 8, color: C.muted, italic: true, align: "right",
});
}
function bulletItems(items, opts = {}) {
return items.map((item, i) => ({
text: item,
options: {
bullet: { type: "bullet" },
fontSize: opts.fontSize || 15,
color: opts.color || C.dark,
fontFace: "Calibri",
breakLine: i < items.length - 1,
paraSpaceAfter: 4,
indentLevel: opts.indent || 0,
},
}));
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 1 — Title
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full dark background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
// Decorative gold bar left
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: "100%", fill: { color: C.gold } });
// Teal accent bar
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0, w: 0.07, h: "100%", fill: { color: C.teal } });
s.addText("BIPOLAR DISORDER", {
x: 0.6, y: 1.2, w: 8.8, h: 1.4,
fontSize: 52, bold: true, color: C.white, fontFace: "Calibri",
charSpacing: 3,
});
s.addText("A Comprehensive Clinical Overview", {
x: 0.6, y: 2.65, w: 8.8, h: 0.5,
fontSize: 20, color: C.gold, fontFace: "Calibri", italic: true,
});
s.addShape(pres.ShapeType.line, {
x: 0.6, y: 3.25, w: 6, h: 0,
line: { color: C.teal, width: 1.5 },
});
s.addText("Based on Kaplan & Sadock's Comprehensive Textbook of Psychiatry", {
x: 0.6, y: 3.4, w: 9, h: 0.4,
fontSize: 13, color: C.muted, fontFace: "Calibri",
});
s.addText("Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th Ed.", {
x: 0.6, y: 4.0, w: 9, h: 0.35,
fontSize: 11, color: C.muted, fontFace: "Calibri", italic: true,
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 2 — Outline
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Presentation Outline");
const topics = [
"Historical Perspective",
"Classification & Types",
"Epidemiology",
"Clinical Features – Mania & Hypomania",
"Clinical Features – Depression & Mixed States",
"Etiology & Pathophysiology",
"Genetics of Bipolar Disorder",
"Diagnosis (DSM-5-TR Criteria)",
"Treatment: Acute Mania",
"Treatment: Bipolar Depression",
"Maintenance & Prophylaxis",
"Psychosocial Interventions",
"Comorbidities & Special Populations",
"Prognosis & Course",
];
// Two-column layout
const col1 = topics.slice(0, 7);
const col2 = topics.slice(7);
s.addText(col1.map((t, i) => ({ text: `${i + 1}. ${t}`, options: { bullet: false, breakLine: i < col1.length - 1, fontSize: 14, color: C.dark, fontFace: "Calibri", paraSpaceAfter: 6 } })), {
x: 0.5, y: 1.3, w: 4.3, h: 4,
});
s.addText(col2.map((t, i) => ({ text: `${i + 8}. ${t}`, options: { bullet: false, breakLine: i < col2.length - 1, fontSize: 14, color: C.dark, fontFace: "Calibri", paraSpaceAfter: 6 } })), {
x: 5.1, y: 1.3, w: 4.3, h: 4,
});
// Vertical divider
s.addShape(pres.ShapeType.line, {
x: 5.0, y: 1.3, w: 0, h: 3.8,
line: { color: C.teal, width: 1, dashType: "dash" },
});
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 3 — Historical Perspective
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Historical Perspective", "From Ancient Greece to Modern Psychiatry");
const timeline = [
{ era: "~150 CE", text: "Aretaeus of Cappadocia – first clear description of mania; recognized link with melancholia: \"Melancholy is the commencement and a part of mania\"" },
{ era: "Medieval", text: "Arabic scholars (Ishaq Ibn Imran, Ibn Sina) transmitted and expanded classical Greek concepts of mood disorders" },
{ era: "1899", text: "Emil Kraepelin unified the disorder as 'Manic-Depressive Insanity' — distinguishing it from dementia praecox (schizophrenia)" },
{ era: "1957", text: "Karl Leonhard coined the bipolar/unipolar distinction, later validated by Angst and Perris (1966)" },
{ era: "1980", text: "DSM-III formally introduced 'Bipolar Disorder' as a diagnostic category" },
{ era: "2013", text: "DSM-5 separated Bipolar and Related Disorders into its own chapter, recognizing the 'bridge' between psychosis and depression" },
];
timeline.forEach((item, i) => {
const y = 1.3 + i * 0.67;
// Era box
s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 1.1, h: 0.42, fill: { color: C.teal }, line: { type: "none" } });
s.addText(item.era, { x: 0.4, y, w: 1.1, h: 0.42, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(item.text, { x: 1.65, y: y + 0.03, w: 7.9, h: 0.42, fontSize: 12, color: C.dark, fontFace: "Calibri", valign: "middle" });
});
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 4 — Classification & Types
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Classification & Types", "DSM-5-TR Bipolar Spectrum");
const types = [
{ label: "Bipolar I", color: C.navy, items: ["≥1 manic episode (≥7 days or hospitalized)", "Depressive episodes common but not required", "May include psychotic features", "Most severe form of bipolar spectrum"] },
{ label: "Bipolar II", color: C.teal, items: ["≥1 hypomanic episode (≥4 days) + ≥1 MDE", "Never a full manic episode", "More prevalent than BP I in outpatient settings", "High burden of depression and suicide risk"] },
{ label: "Cyclothymia", color: C.indigo, items: ["≥2 years of hypomanic & depressive symptoms", "Never meets full criteria for MDE or mania", "Subthreshold cycling mood instability", "Prevalence ~0.4–1% in general population"] },
];
types.forEach((t, i) => {
const x = 0.25 + i * 3.25;
s.addShape(pres.ShapeType.rect, { x, y: 1.25, w: 3.0, h: 0.5, fill: { color: t.color }, line: { type: "none" } });
s.addText(t.label, { x, y: 1.25, w: 3.0, h: 0.5, fontSize: 17, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x, y: 1.75, w: 3.0, h: 3.2, fill: { color: C.white }, line: { color: t.color, width: 1.5 } });
s.addText(bulletItems(t.items, { fontSize: 13 }), { x: x + 0.1, y: 1.85, w: 2.8, h: 3.0 });
});
s.addText("Also: Substance/Medication-Induced Bipolar Disorder | Bipolar Disorder Due to Another Medical Condition | Other Specified / Unspecified Bipolar", {
x: 0.4, y: 5.05, w: 9.2, h: 0.35,
fontSize: 10, color: C.muted, italic: true, fontFace: "Calibri",
});
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 5 — Epidemiology
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Epidemiology", "WHO World Mental Health Surveys & NESARC Data");
// Stat boxes row
const stats = [
{ val: "~1%", label: "Lifetime Prevalence\nBipolar I (classic)" },
{ val: "3.3%", label: "NESARC Lifetime\nBipolar I (updated)" },
{ val: "2.4%", label: "Bipolar Spectrum\n(cross-national WMH)" },
{ val: "1.8%", label: "Pediatric/Adolescent\nBipolar (meta-analysis)" },
];
stats.forEach((st, i) => {
const x = 0.3 + i * 2.35;
s.addShape(pres.ShapeType.rect, { x, y: 1.3, w: 2.1, h: 1.35, fill: { color: C.navy }, line: { type: "none" } });
s.addText(st.val, { x, y: 1.3, w: 2.1, h: 0.75, fontSize: 32, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(st.label, { x, y: 2.0, w: 2.1, h: 0.65, fontSize: 11, color: C.white, align: "center", valign: "top", fontFace: "Calibri" });
});
s.addText(bulletItems([
"Bipolar II prevalence is ~1.1% lifetime (NESARC), though often underdiagnosed",
"12-month prevalence rates: BP I ~2.0%, BP II ~0.8%",
"BP disorder is enduring — longitudinal estimates converge at 1.4–2.1%",
"Equal prevalence in men and women; men more often have mania, women have more depressive episodes",
"Mean age of onset: late teens to mid-20s; often delayed 6–10 years before correct diagnosis",
"High comorbidity: anxiety disorders (~75%), substance use disorders (~60%), ADHD (~20%)",
], { fontSize: 13 }), { x: 0.5, y: 2.8, w: 9, h: 2.4 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 6 — Clinical Features: Mania
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Clinical Features: Mania & Hypomania", "Psychopathology of the Manic Syndrome");
// Left column — Mood
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 2.8, h: 0.38, fill: { color: C.navy }, line: { type: "none" } });
s.addText("MOOD DISTURBANCE", { x: 0.4, y: 1.25, w: 2.8, h: 0.38, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Elevated, expansive, or euphoric mood",
"Lability — bursting into tears, irritability",
"Hostility when crossed",
"Dysphoric mania (anxious-depressive)",
], { fontSize: 12 }), { x: 0.4, y: 1.65, w: 2.8, h: 1.6 });
// Middle column — Psychomotor
s.addShape(pres.ShapeType.rect, { x: 3.6, y: 1.25, w: 3.0, h: 0.38, fill: { color: C.teal }, line: { type: "none" } });
s.addText("PSYCHOMOTOR & COGNITION", { x: 3.6, y: 1.25, w: 3.0, h: 0.38, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Psychomotor acceleration; pressured speech",
"Flight of ideas; clang associations",
"Decreased need for sleep",
"Heightened sensory acuity",
"Grandiose beliefs; inflated self-esteem",
"Racing thoughts",
], { fontSize: 12 }), { x: 3.6, y: 1.65, w: 3.0, h: 2.0 });
// Right column — Behavior
s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.25, w: 2.6, h: 0.38, fill: { color: C.gold }, line: { type: "none" } });
s.addText("BEHAVIOR", { x: 6.9, y: 1.25, w: 2.6, h: 0.38, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Impulsivity; disinhibition",
"Pathologic overfamiliarity with strangers",
"Hypersexuality",
"Reckless spending",
"Poor judgment",
], { fontSize: 12 }), { x: 6.9, y: 1.65, w: 2.6, h: 1.6 });
// Hypomania distinction box
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 3.9, w: 9.1, h: 1.3, fill: { color: C.soft }, line: { color: C.teal, width: 1 } });
s.addText([
{ text: "Hypomania vs Mania:", options: { bold: true, fontSize: 13, color: C.navy, fontFace: "Calibri", breakLine: true } },
{ text: "Hypomania is a distinct period of at least a few days of mild mood elevation with sharpened thinking and increased energy — without the marked impairment or psychosis of mania. It is not merely a milder form of mania. Insight is relatively preserved. Antidepressants can sometimes mobilize hypomania.", options: { fontSize: 12, color: C.dark, fontFace: "Calibri" } },
], { x: 0.65, y: 3.95, w: 8.7, h: 1.2 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 7 — Clinical Features: Depression & Mixed States
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Clinical Features: Depression & Mixed States");
// Depression box
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.3, h: 0.42, fill: { color: C.indigo }, line: { type: "none" } });
s.addText("BIPOLAR DEPRESSION", { x: 0.4, y: 1.25, w: 4.3, h: 0.42, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Depressed mood; anhedonia; fatigue",
"Psychomotor retardation (more common than agitation)",
"Hypersomnia (vs insomnia in unipolar depression)",
"Increased appetite / weight gain",
"Leaden paralysis (heavy limb sensation)",
"Atypical features more common",
"Depressive mixed states: depressed mood + manic features (flight of ideas, increased drives, impulsivity) — present in ~60% of BP II",
"High suicide risk — especially in BP II with cyclothymia",
], { fontSize: 12 }), { x: 0.4, y: 1.7, w: 4.3, h: 3.3 });
// Mixed states box
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fill: { color: C.gold }, line: { type: "none" } });
s.addText("MIXED FEATURES / STATES", { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fontSize: 14, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Coexistence of manic and depressive features simultaneously",
"Soranus described mixed episodes as early as 1st century CE",
"DSM-5 introduced the 'with mixed features' specifier for both manic and depressive episodes",
"Escalating irritability, anger, agitation, insomnia",
"Dysphoric mania: Kraepelinian 'anxious-depressive mania'",
"Often refractory to antidepressants; mood stabilizers preferred",
"Increased suicide risk; careful monitoring required",
], { fontSize: 12 }), { x: 5.1, y: 1.7, w: 4.4, h: 3.3 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 8 — Etiology & Pathophysiology
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Etiology & Pathophysiology", "Immune, Neurobiological & Neuroprogressive Mechanisms");
const boxes = [
{
title: "Immune & Inflammatory", color: C.navy,
items: [
"Elevated circulating CRP, TNF, IL-6, IL-1RA, sIL-2R",
"Increased inflammatory Th1 / decreased anti-inflammatory Th2 responses",
"KYN (kynurenine) pathway activation — disrupts glutamate and dopamine signaling",
"Inflammatory gene expression precedes clinical relapse in BD",
],
},
{
title: "Neuroprogressive (Kindling)", color: C.teal,
items: [
"Each relapse increases risk and severity of subsequent episodes",
"Increasing cognitive/neurologic dysfunction over time",
"Allostatic load — chronic immune activation from recurrent stress",
"Innate immune factors central to neuroprogression",
],
},
{
title: "Neurotransmitter Systems", color: C.indigo,
items: [
"Dopamine excess in mania (dopamine hypothesis)",
"Serotonin dysregulation — related to depression phase",
"Glutamate & GABA imbalance — inflammation-linked",
"HPA axis dysregulation; cortisol hypersecretion",
],
},
];
boxes.forEach((b, i) => {
const x = 0.25 + i * 3.25;
s.addShape(pres.ShapeType.rect, { x, y: 1.25, w: 3.0, h: 0.42, fill: { color: b.color }, line: { type: "none" } });
s.addText(b.title, { x, y: 1.25, w: 3.0, h: 0.42, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x, y: 1.68, w: 3.0, h: 2.6, fill: { color: C.white }, line: { color: b.color, width: 1 } });
s.addText(bulletItems(b.items, { fontSize: 12 }), { x: x + 0.1, y: 1.75, w: 2.8, h: 2.5 });
});
// NAC / therapeutic note
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 4.45, w: 9.1, h: 0.85, fill: { color: C.soft }, line: { color: C.teal, width: 1 } });
s.addText([
{ text: "Immunotherapy Research: ", options: { bold: true, fontSize: 12, color: C.navy, fontFace: "Calibri" } },
{ text: "N-acetylcysteine (NAC) has shown positive results across all phases of BD by targeting oxidative stress. NAC + aspirin combination demonstrates better response than monotherapy. Infliximab showed subgroup effects in patients with early life stress and elevated CRP (>5 mg/L).", options: { fontSize: 12, color: C.dark, fontFace: "Calibri" } },
], { x: 0.6, y: 4.5, w: 8.8, h: 0.75 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 9 — Genetics
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Genetics of Bipolar Disorder", "Heritability, Twin Studies & Molecular Findings");
// Heritability stat boxes
const hstats = [
{ val: "65–100%", label: "MZ Twin\nConcordance" },
{ val: "10–30%", label: "DZ Twin\nConcordance" },
{ val: "60–80%", label: "Overall\nHeritability" },
{ val: "30–40%", label: "Unipolar MDD\nHeritability (compare)" },
];
hstats.forEach((h, i) => {
const x = 0.3 + i * 2.35;
s.addShape(pres.ShapeType.rect, { x, y: 1.25, w: 2.1, h: 1.2, fill: { color: C.navy }, line: { type: "none" } });
s.addText(h.val, { x, y: 1.25, w: 2.1, h: 0.7, fontSize: 24, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(h.label, { x, y: 1.9, w: 2.1, h: 0.55, fontSize: 11, color: C.white, align: "center", valign: "top", fontFace: "Calibri" });
});
s.addText(bulletItems([
"BD is substantially more heritable than unipolar major depression",
"Early single-gene linkage studies (chromosomes X and 11) produced false-positive findings — not replicated",
"Genome-wide association studies (GWAS) support polygenic model with multiple interacting loci",
"Suggestive linkage regions: chromosomes 18, 4p, 21q, 8q, 12q, 16p — but none unequivocally confirmed",
"Rapid decrease in recurrence risk from MZ twins to first-degree relatives argues against single-gene inheritance",
"Gene expression studies: inflammatory gene upregulation precedes relapse and normalizes during remission",
"Shared genetic risk between BD and schizophrenia: CACNA1C, ANK3, TENM4, TRANK1 among top candidates",
], { fontSize: 13 }), { x: 0.5, y: 2.6, w: 9, h: 2.7 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 10 — DSM-5-TR Diagnostic Criteria
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Diagnosis: DSM-5-TR Criteria", "Bipolar I & Bipolar II Disorder");
// BP I column
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.2, h: 0.42, fill: { color: C.navy }, line: { type: "none" } });
s.addText("BIPOLAR I DISORDER", { x: 0.4, y: 1.25, w: 4.2, h: 0.42, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Criterion A: Distinct period of abnormally elevated, expansive, or irritable mood + increased goal-directed activity/energy",
"Duration: ≥7 days (or any duration if hospitalization required)",
"Criterion B (≥3 of 7, or ≥4 if only irritable mood):",
" • Inflated self-esteem or grandiosity",
" • Decreased need for sleep (≥3 hrs less)",
" • More talkative / pressured speech",
" • Flight of ideas or racing thoughts",
" • Distractibility",
" • Increased goal-directed activity / psychomotor agitation",
" • Risky behavior (spending sprees, sexual indiscretion)",
"Criterion C: Marked impairment / hospitalization / psychotic features",
"Not due to substances or medical conditions",
], { fontSize: 11 }), { x: 0.4, y: 1.7, w: 4.2, h: 3.6 });
// BP II column
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fill: { color: C.teal }, line: { type: "none" } });
s.addText("BIPOLAR II DISORDER", { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Criterion A: ≥1 hypomanic episode + ≥1 major depressive episode",
"Never a full manic episode",
"Hypomania criteria:",
" • Same symptoms as mania",
" • Duration ≥4 consecutive days",
" • Observable change in behavior by others",
" • NOT severe enough for hospitalization",
" • No psychotic features",
"MDE criteria (≥5 of 9 symptoms ≥2 weeks):",
" • Depressed mood, anhedonia, weight changes, insomnia/hypersomnia, psychomotor changes, fatigue, worthlessness, poor concentration, suicidal ideation",
"Clinically significant distress or impairment",
"Not better explained by cyclothymia, schizoaffective, etc.",
], { fontSize: 11 }), { x: 5.1, y: 1.7, w: 4.4, h: 3.6 });
addSource(s, "DSM-5-TR, APA 2022 | Kaplan & Sadock's CTP, 11th Ed.");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 11 — Treatment: Acute Mania
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Treatment: Acute Mania", "Pharmacological Options — Evidence-Based Approach");
const drugs = [
{
name: "Lithium", color: C.navy,
points: [
"First-line; ~50% response rate in 3-week trials",
"Onset: 7 days; target serum level 0.8–1.2 mEq/L",
"Starting dose: 900 mg/day (lower in elderly: 0.4–0.8 mEq/L)",
"Toxicity >1.5 mEq/L: GI, neuro, cardiac — medical emergency",
],
},
{
name: "Divalproex / Valproate", color: C.teal,
points: [
"Efficacy equivalent to lithium in adult mania",
"Oral loading (20–30 mg/kg/day) → effect by day 5",
"Target serum level: 50–125 mcg/mL",
"Effective regardless of prior episodes, rapid cycling, psychosis",
],
},
{
name: "Carbamazepine", color: C.indigo,
points: [
"As effective as lithium and typical antipsychotics",
"Extended-release (Equetro): FDA-approved for acute mania",
"Response rates 40–60%; onset 7–10 days",
"Starting dose: 100–200 mg bid; target 400–800 mg/day",
],
},
{
name: "Atypical Antipsychotics", color: "4A4A8A",
points: [
"Olanzapine, risperidone, quetiapine, aripiprazole, asenapine",
"Asenapine: FDA-approved as mono- and adjunctive therapy",
"Faster onset than mood stabilizers in first 3 days",
"Useful for psychotic mania; combination with mood stabilizers",
],
},
];
drugs.forEach((d, i) => {
const x = i < 2 ? 0.3 + i * 4.6 : 0.3 + (i - 2) * 4.6;
const y = i < 2 ? 1.25 : 3.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.2, h: 0.4, fill: { color: d.color }, line: { type: "none" } });
s.addText(d.name, { x, y, w: 4.2, h: 0.4, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x, y: y + 0.4, w: 4.2, h: 1.5, fill: { color: C.white }, line: { color: d.color, width: 1 } });
s.addText(bulletItems(d.points, { fontSize: 11 }), { x: x + 0.1, y: y + 0.45, w: 4.0, h: 1.4 });
});
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 12 — Treatment: Bipolar Depression & Maintenance
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Treatment: Bipolar Depression & Maintenance");
// Bipolar Depression column
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.2, h: 0.42, fill: { color: C.indigo }, line: { type: "none" } });
s.addText("BIPOLAR DEPRESSION", { x: 0.4, y: 1.25, w: 4.2, h: 0.42, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Quetiapine (monotherapy): FDA-approved for BP I & II depression",
"Olanzapine-fluoxetine combination (Symbyax): FDA-approved for BP I depression",
"Lamotrigine: especially effective for depressive episodes; gradual titration to minimize rash",
"Lurasidone (mono or adjunctive with Li/VPA): FDA-approved",
"Lithium: antidepressant effects documented, especially with Li levels ≥0.8",
"Avoid antidepressant monotherapy — risk of manic switch and rapid cycling induction",
"Lamotrigine has special promise for patients with prominent depressive episodes",
], { fontSize: 12 }), { x: 0.4, y: 1.7, w: 4.2, h: 3.5 });
// Maintenance column
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fill: { color: C.teal }, line: { type: "none" } });
s.addText("MAINTENANCE & PROPHYLAXIS", { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Lithium: gold standard for long-term prophylaxis (both mania and depression)",
"Valproate: effective maintenance, particularly for rapid cycling",
"Lamotrigine: superior maintenance for depressive relapses",
"Aripiprazole, quetiapine, olanzapine: adjunctive maintenance",
"Serum level monitoring (lithium, valproate, carbamazepine) essential",
"Address medication adherence — key predictor of relapse",
"Monitor for metabolic side effects (weight, glucose, lipids) with SGAs",
"ECT: reserved for severe, refractory, or pregnant patients",
], { fontSize: 12 }), { x: 5.1, y: 1.7, w: 4.4, h: 3.5 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 13 — Psychosocial Interventions
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Psychosocial Interventions", "Adjunctive to Pharmacotherapy");
const therapies = [
{ name: "Psychoeducation", color: C.navy, text: "Group format (up to 50 participants + families). Focuses on risk factors, warning signs, coping strategies. Cost-effective; reduces relapse rates and improves medication adherence. Colom et al., Barcelona model." },
{ name: "CBT\n(Cognitive-Behavioral)", color: C.teal, text: "Identifies and modifies maladaptive thought patterns. Shown to increase 'well time' and reduce recurrence as adjunct to pharmacotherapy. Effect size comparable to divalproex or lamotrigine prophylaxis." },
{ name: "IPSRT\n(Interpersonal & Social Rhythm)", color: C.indigo, text: "Stabilizes social rhythms and sleep-wake cycles. Addresses interpersonal triggers of mood episodes. Effective for both depressive symptoms and social functioning in STEP-BD trial." },
{ name: "FFT\n(Family-Focused)", color: "2E6B3E", text: "Involves patient and family. Addresses communication, problem-solving, and psychoeducation for caregivers. Significant effects on depressive symptoms and functioning in STEP-BD." },
];
therapies.forEach((t, i) => {
const x = i < 2 ? 0.3 + i * 4.65 : 0.3 + (i - 2) * 4.65;
const y = i < 2 ? 1.25 : 3.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.3, h: 0.5, fill: { color: t.color }, line: { type: "none" } });
s.addText(t.name, { x, y, w: 4.3, h: 0.5, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x, y: y + 0.5, w: 4.3, h: 1.45, fill: { color: C.white }, line: { color: t.color, width: 1 } });
s.addText(t.text, { x: x + 0.12, y: y + 0.55, w: 4.1, h: 1.35, fontSize: 11.5, color: C.dark, fontFace: "Calibri", valign: "top" });
});
s.addText("Key finding: No psychotherapy as monotherapy has demonstrated efficacy for acute mania or mixed states. All benefit demonstrated as adjuncts to mood stabilizers.", {
x: 0.4, y: 5.1, w: 9.1, h: 0.3, fontSize: 10, color: C.muted, italic: true, fontFace: "Calibri",
});
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 14 — Comorbidities & Special Populations
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Comorbidities & Special Populations");
// Comorbidities
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.2, h: 0.42, fill: { color: C.navy }, line: { type: "none" } });
s.addText("COMMON COMORBIDITIES", { x: 0.4, y: 1.25, w: 4.2, h: 0.42, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Anxiety disorders: ~75% (most common comorbidity)",
"Substance use disorders: ~60% — bidirectional relationship",
"ADHD: ~20%; especially in BP II",
"Personality disorders: borderline PD often confused with BP II + cyclothymia",
"Metabolic syndrome: increased risk with SGAs and weight gain",
"Cardiovascular disease: higher prevalence and mortality",
"Migraine: ~35% of BD patients",
"Thyroid dysfunction: especially with lithium use (hypothyroidism)",
], { fontSize: 12 }), { x: 0.4, y: 1.7, w: 4.2, h: 3.4 });
// Special populations
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fill: { color: C.teal }, line: { type: "none" } });
s.addText("SPECIAL POPULATIONS", { x: 5.1, y: 1.25, w: 4.4, h: 0.42, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(bulletItems([
"Pediatric: Prevalence 1.8% (meta-analysis); often presents with mixed/irritable features rather than euphoria",
"Elderly: Lower lithium doses (level 0.4–0.8 mEq/L); more sensitive to side effects",
"Pregnancy: Valproate teratogenic; lithium — cardiac defects (Ebstein); lamotrigine relatively safer",
"HIV/AIDS: Lithium problematic; rapid level fluctuations; valproate preferred; low-dose SGAs",
"Rapid Cycling (≥4 episodes/year): Valproate, lamotrigine; avoid antidepressants",
"Elderly-onset mania: Suspect organic cause — vascular, pharmacologic",
], { fontSize: 12 }), { x: 5.1, y: 1.7, w: 4.4, h: 3.4 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 15 — Prognosis & Course
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.light } });
addSlideHeader(s, "Prognosis & Course of Illness");
s.addText(bulletItems([
"Bipolar disorder is a chronic, episodic illness — most patients experience multiple recurrences across a lifetime",
"Neuroprogressive model (kindling): each episode increases risk and severity of the next, with greater cognitive dysfunction",
"Mean age of first episode: late teens–20s; often 6–10 years before correct diagnosis",
"Functional impairment is common even between episodes — subsyndromal symptoms, cognitive deficits",
"Suicide risk: BD carries one of the highest suicide rates among psychiatric conditions (~15–20× general population); BP II especially high due to cycling depression",
"Rapid cycling (≥4 episodes/year): associated with poorer prognosis, often triggered by antidepressants or thyroid disease",
"Better prognosis associated with: later age of onset, shorter episode duration, good medication adherence, strong social support",
"Adherence is the single most important modifiable predictor of relapse — psychoeducation significantly improves adherence",
"Integrated care (pharmacotherapy + psychosocial interventions) provides superior outcomes vs pharmacotherapy alone",
], { fontSize: 13 }), { x: 0.5, y: 1.3, w: 9, h: 4.0 });
addSource(s);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 16 — Summary / Key Takeaways
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: "100%", fill: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.08, fill: { color: C.gold } });
s.addText("Key Takeaways", {
x: 0.5, y: 0.2, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.line, {
x: 0.5, y: 0.9, w: 9, h: 0,
line: { color: C.gold, width: 1.5 },
});
const takeaways = [
"Bipolar disorder is highly heritable (60–80%) with a polygenic basis; environmental factors (childhood adversity, stress) modulate expression",
"BP I requires ≥1 manic episode; BP II requires hypomanic + depressive episodes — never full mania",
"Lifetime prevalence: BP I ~1–3.3%; BP Spectrum ~2.4%; median onset late teens–20s",
"Mania triad: elevated/irritable mood + psychomotor acceleration + decreased sleep — recognize early to prevent disaster",
"Mixed features are common and underappreciated — associated with highest suicide risk",
"First-line acute mania: lithium, divalproex, carbamazepine, or atypical antipsychotics",
"Bipolar depression: quetiapine, lamotrigine, OFC (Symbyax); avoid antidepressant monotherapy",
"Psychosocial interventions (CBT, IPSRT, FFT, psychoeducation) significantly reduce relapse when added to mood stabilizers",
"Neuroprogression — treat early, maintain adherence, prevent recurrence",
];
s.addText(takeaways.map((t, i) => ({
text: `${i + 1}. ${t}`,
options: {
bullet: false,
breakLine: i < takeaways.length - 1,
fontSize: 13,
color: i % 2 === 0 ? C.white : C.soft,
fontFace: "Calibri",
paraSpaceAfter: 5,
},
})), { x: 0.5, y: 1.0, w: 9.1, h: 4.4 });
s.addText("Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th Ed. | Orris Medical Education", {
x: 0.5, y: 5.3, w: 9, h: 0.25,
fontSize: 9, color: C.muted, italic: true, fontFace: "Calibri", align: "right",
});
}
// ── Write file ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/bipolar-ppt/Bipolar_Disorder_KaplanSadock.pptx" })
.then(() => console.log("DONE: /home/daytona/workspace/bipolar-ppt/Bipolar_Disorder_KaplanSadock.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/bipolar-ppt && node bipolar.js
ls -lh /home/daytona/workspace/bipolar-ppt/Bipolar_Disorder_KaplanSadock.pptx
Bipolar Disorder KaplanSadock
Presentation · PPTX
| # | Slide | Key Content |
|---|---|---|
| 1 | Title | Dark navy/gold design |
| 2 | Outline | Full 14-topic roadmap |
| 3 | Historical Perspective | Aretaeus → Kraepelin → DSM-5 timeline |
| 4 | Classification & Types | BP I, BP II, Cyclothymia with criteria boxes |
| 5 | Epidemiology | WHO WMH + NESARC data; stat boxes (1–3.3% prevalence) |
| 6 | Clinical Features: Mania | Mood / Psychomotor / Behavior columns; hypomania distinction |
| 7 | Clinical Features: Depression & Mixed States | Atypical features, depressive mixed states, suicide risk |
| 8 | Etiology & Pathophysiology | Immune/inflammatory, kindling/neuroprogressive, neurotransmitter systems |
| 9 | Genetics | MZ 65–100% concordance; GWAS; chromosomal loci |
| 10 | DSM-5-TR Criteria | Side-by-side BP I and BP II full criteria |
| 11 | Treatment: Acute Mania | Lithium, Divalproex, Carbamazepine, Atypical antipsychotics with doses/levels |
| 12 | Treatment: Bipolar Depression & Maintenance | Quetiapine, OFC, Lamotrigine, Lurasidone; long-term prophylaxis |
| 13 | Psychosocial Interventions | CBT, IPSRT, FFT, Psychoeducation (STEP-BD evidence) |
| 14 | Comorbidities & Special Populations | Pediatric, elderly, pregnancy, HIV, rapid cycling |
| 15 | Prognosis & Course | Neuroprogression, suicide risk, adherence |
| 16 | Key Takeaways | Dark concluding slide with 9 core points |