Major depressive disorder and bipolar disorder Resource: Kaplan 12th edition, DSM 5-TR The outline for the presentation for each disorder is as follows: o Introduction and Epidemiology o Clinical Features o Diagnostic Criteria (DSM 5-TR) o Management (Pharmacological and Non-pharmacological) o Prognosis
What format should the presentation be in?
mkdir -p /home/daytona/workspace/mood-disorders-pptx
~/mood-disorders-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Major Depressive Disorder & Bipolar Disorder";
pres.author = "Kaplan & Sadock 12th Ed | DSM-5-TR";
// ─── Palette ────────────────────────────────────────────────────────────────
// MDD section: deep navy bg (#0D1B2A), white text, teal accent (#2EC4B6)
// BD section: dark plum bg (#1A0D2B), white text, amber accent (#F4A261)
// Shared divider slides + title: deep charcoal (#121212) / white
const NAV = "0D1B2A";
const TEAL = "2EC4B6";
const PLUM = "1A0D2B";
const AMBER = "F4A261";
const WHITE = "FFFFFF";
const LGRAY = "D9E2EC";
const CHARCOAL = "121212";
const SILVER = "A8B2BE";
// ─── Helper functions ────────────────────────────────────────────────────────
function addSectionDivider(label, bg, accent, subtitle) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bg } });
// left accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: accent } });
s.addText(label, {
x: 0.4, y: 1.8, w: 9.2, h: 1.2,
fontSize: 44, bold: true, color: WHITE, fontFace: "Calibri Light", align: "left"
});
if (subtitle) {
s.addText(subtitle, {
x: 0.4, y: 3.1, w: 9.2, h: 0.6,
fontSize: 18, color: accent, fontFace: "Calibri", italic: true, align: "left"
});
}
}
function addContentSlide(bg, accent, title, bullets, notes) {
const s = pres.addSlide();
// background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bg } });
// top accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: accent } });
// title
s.addText(title, {
x: 0.4, y: 0.15, w: 9.2, h: 0.7,
fontSize: 22, bold: true, color: accent, fontFace: "Calibri", margin: 0
});
// divider line
s.addShape(pres.ShapeType.line, {
x: 0.4, y: 0.88, w: 9.2, h: 0,
line: { color: accent, width: 1.5, transparency: 50 }
});
// bullets
const items = bullets.map((b, i) => {
if (b.startsWith("##")) {
return { text: b.replace("## ", ""), options: { bold: true, color: accent, fontSize: 14, bullet: false, breakLine: true, paraSpaceBefore: 8 } };
}
return { text: b, options: { bullet: { type: "bullet", code: "25AA", color: accent }, color: LGRAY, fontSize: 13, breakLine: i < bullets.length - 1, paraSpaceAfter: 3 } };
});
s.addText(items, {
x: 0.4, y: 1.0, w: 9.2, h: 4.4,
fontFace: "Calibri", valign: "top", margin: [0, 4, 4, 4]
});
if (notes) s.addNotes(notes);
return s;
}
function addTwoColSlide(bg, accent, title, col1Title, col1Bullets, col2Title, col2Bullets) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: accent } });
s.addText(title, {
x: 0.4, y: 0.15, w: 9.2, h: 0.7,
fontSize: 22, bold: true, color: accent, fontFace: "Calibri", margin: 0
});
s.addShape(pres.ShapeType.line, { x: 0.4, y: 0.88, w: 9.2, h: 0, line: { color: accent, width: 1.5, transparency: 50 } });
// col1
s.addText(col1Title, { x: 0.4, y: 0.95, w: 4.4, h: 0.45, fontSize: 15, bold: true, color: accent, fontFace: "Calibri", margin: 0 });
const c1items = col1Bullets.map((b, i) => ({
text: b, options: { bullet: { code: "25AA", color: accent }, color: LGRAY, fontSize: 12.5, breakLine: i < col1Bullets.length - 1, paraSpaceAfter: 3 }
}));
s.addText(c1items, { x: 0.4, y: 1.45, w: 4.3, h: 3.9, fontFace: "Calibri", valign: "top" });
// divider
s.addShape(pres.ShapeType.line, { x: 5.0, y: 1.0, w: 0, h: 4.3, line: { color: accent, width: 1, transparency: 60 } });
// col2
s.addText(col2Title, { x: 5.2, y: 0.95, w: 4.4, h: 0.45, fontSize: 15, bold: true, color: accent, fontFace: "Calibri", margin: 0 });
const c2items = col2Bullets.map((b, i) => ({
text: b, options: { bullet: { code: "25AA", color: accent }, color: LGRAY, fontSize: 12.5, breakLine: i < col2Bullets.length - 1, paraSpaceAfter: 3 }
}));
s.addText(c2items, { x: 5.2, y: 1.45, w: 4.4, h: 3.9, fontFace: "Calibri", valign: "top" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — MASTER TITLE
// ════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: CHARCOAL } });
// gradient band: left half teal tint, right half amber tint
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5, h: 5.625, fill: { color: NAV } });
s.addShape(pres.ShapeType.rect, { x: 5, y: 0, w: 5, h: 5.625, fill: { color: PLUM } });
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0, w: 0.3, h: 5.625, fill: { color: CHARCOAL } });
// teal accent strip
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 5, h: 0.08, fill: { color: TEAL } });
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 4.8, w: 5, h: 0.08, fill: { color: AMBER } });
s.addText("MOOD DISORDERS", {
x: 0.5, y: 0.5, w: 9, h: 0.7,
fontSize: 16, color: SILVER, fontFace: "Calibri Light", charSpacing: 5, align: "center"
});
s.addText("Major Depressive Disorder", {
x: 0.2, y: 1.3, w: 4.6, h: 1.1,
fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri Light", align: "center"
});
s.addText("&", {
x: 4.5, y: 1.9, w: 1, h: 0.8,
fontSize: 28, bold: true, color: SILVER, fontFace: "Calibri Light", align: "center"
});
s.addText("Bipolar Disorder", {
x: 5.2, y: 1.3, w: 4.6, h: 1.1,
fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri Light", align: "center"
});
s.addText("Based on Kaplan & Sadock's Synopsis of Psychiatry, 12th Ed. | DSM-5-TR", {
x: 0.5, y: 4.9, w: 9, h: 0.4,
fontSize: 11, color: SILVER, fontFace: "Calibri", align: "center", italic: true
});
}
// ════════════════════════════════════════════════════════════════════════════
// ──── PART 1: MAJOR DEPRESSIVE DISORDER ─────────────────────────────────────
// ════════════════════════════════════════════════════════════════════════════
addSectionDivider("MAJOR DEPRESSIVE\nDISORDER", NAV, TEAL, "Part 1 of 2");
// ─── MDD 1: Introduction & Epidemiology ─────────────────────────────────────
addContentSlide(NAV, TEAL, "Introduction & Epidemiology", [
"## Definition",
"Presence of ≥1 major depressive episode; no history of mania or hypomania",
"Characterized by sustained low mood, anhedonia, and neurovegetative symptoms lasting ≥2 weeks",
"Among the most prevalent and disabling psychiatric disorders worldwide",
"## Global Prevalence",
"Point prevalence: ~12.9% | 1-year prevalence: ~7.2% | Lifetime prevalence: ~10.8% (meta-analysis, 90 studies, 30 countries)",
"US (SAMHSA/NSDUH data, DSM-5 criteria): 1-year prevalence of major depressive episode = 7.1%",
"## Sex",
"Women > Men universally (aggregate: 14.4% vs. 11.5%); US 1-year: 8.7% women vs. 5.3% men",
"Multifactorial: hormonal, psychological, sociocultural factors contribute",
"## Age",
"Mean age of onset ~40 years; 50% onset between ages 20–50",
"Incidence rising in younger persons; adolescent females: 1-year prevalence ~20%",
"## Other Risk Factors",
"Divorced/separated or without close interpersonal relationships; strong family history",
"Childhood-onset MDD: most severe form — associated with conduct disorder, substance use"
]);
// ─── MDD 2: Clinical Features ───────────────────────────────────────────────
addTwoColSlide(NAV, TEAL, "Clinical Features", "Core Symptoms", [
"Depressed mood (or irritable in children/adolescents) most of the day, nearly every day",
"Markedly diminished interest or pleasure in activities (anhedonia)",
"Significant weight loss/gain or appetite change",
"Insomnia or hypersomnia",
"Psychomotor agitation or retardation",
"Fatigue or loss of energy",
"Feelings of worthlessness or excessive/inappropriate guilt",
"Diminished concentration or indecisiveness",
"Recurrent thoughts of death or suicidal ideation"
], "Subtypes & Special Features", [
"With melancholic features: severe anhedonia, early morning awakening, weight loss, profound guilt; 'endogenous depression'",
"With atypical features: mood reactivity, hypersomnia, leaden paralysis, rejection sensitivity",
"With psychotic features: mood-congruent or mood-incongruent delusions/hallucinations; poor prognostic indicator",
"With peripartum onset: onset during pregnancy or within 4 weeks postpartum",
"With seasonal pattern (SAD): onset in fall/winter, remission in spring",
"With catatonia: psychomotor disturbance during depressive episode",
"Children: somatic complaints, psychomotor agitation, mood-congruent hallucinations",
"Adolescents: irritability, antisocial behavior, substance use, school failure"
]);
// ─── MDD 3: DSM-5-TR Diagnostic Criteria ────────────────────────────────────
addContentSlide(NAV, TEAL, "Diagnostic Criteria — DSM-5-TR", [
"## Criterion A — ≥5 symptoms during same 2-week period (≥1 must be #1 or #2):",
"1. Depressed mood most of the day, nearly every day (subjective or observed)",
"2. Markedly diminished interest or pleasure in activities (anhedonia)",
"3. Significant weight loss/gain (>5% in 1 month) or appetite change",
"4. Insomnia or hypersomnia nearly every day",
"5. Psychomotor agitation or retardation (observable by others)",
"6. Fatigue or loss of energy",
"7. Feelings of worthlessness or excessive guilt (not merely about being sick)",
"8. Diminished ability to think, concentrate, or indecisiveness",
"9. Recurrent thoughts of death, suicidal ideation, attempt, or specific plan",
"## Criteria B–E:",
"B. Symptoms cause clinically significant distress or functional impairment",
"C. Not attributable to substances or another medical condition",
"D. Not better explained by schizophrenia spectrum or other psychotic disorder",
"E. No prior manic or hypomanic episode (would indicate Bipolar I or II)"
]);
// ─── MDD 4: Management — Pharmacological ────────────────────────────────────
addTwoColSlide(NAV, TEAL, "Management — Pharmacological", "First-Line Agents", [
"SSRIs (fluoxetine, sertraline, escitalopram): first-line; best tolerability profile",
"SNRIs (venlafaxine, duloxetine): effective, especially with pain or anxiety comorbidity",
"Bupropion: useful when sedation/sexual SE are concerns; avoid in seizure risk",
"Mirtazapine: sedating; useful in insomnia/weight loss; works via NaSSA mechanism",
"TCAs (amitriptyline, imipramine): highly effective; limited by toxicity and narrow TI",
"MAOIs (phenelzine, tranylcypromine): reserved for atypical/refractory depression",
"Efficacy established in >500 RCTs; broadly similar across agents vs. placebo"
], "Special Situations", [
"Psychotic MDD: antidepressant + atypical antipsychotic (or ECT)",
"Melancholic MDD: TCAs or ECT often more effective than SSRIs",
"Atypical MDD: MAOIs show strong evidence",
"Duration: continue 4–9 months after remission (prevent relapse); prophylaxis for recurrent MDD",
"Withdrawal of antidepressants before 3 months → high relapse risk",
"Augmentation strategies: lithium, atypical antipsychotics, thyroid hormone, buspirone",
"Esketamine (Spravato): FDA-approved for TRD; rapid action via NMDA antagonism"
]);
// ─── MDD 5: Management — Non-Pharmacological ────────────────────────────────
addContentSlide(NAV, TEAL, "Management — Non-Pharmacological", [
"## Psychotherapy",
"Cognitive-Behavioral Therapy (CBT): equal efficacy to pharmacotherapy; fewer adverse effects; better follow-up; combination with pharmacotherapy often superior",
"Interpersonal Therapy (IPT): 12–16 weekly sessions; focuses on current interpersonal problems; most effective psychotherapy for severe MDD without medication",
"Behavioral Therapy: addresses maladaptive behavioral patterns and social reinforcement",
"Psychodynamic/Psychoanalytic Therapy: targets personality structure changes; longer-term",
"## Somatic Non-Drug Treatments",
"Electroconvulsive Therapy (ECT): most effective for severe/psychotic/melancholic MDD and TRD; first-line for psychotic depression; 3x/week, 6–12 sessions",
"Transcranial Magnetic Stimulation (TMS/rTMS): non-invasive; FDA-approved for TRD",
"Light Therapy (Phototherapy): first-line for seasonal affective disorder (SAD)",
"## Psychoeducation & Lifestyle",
"Exercise: moderate aerobic exercise shown to reduce depressive symptoms",
"Sleep hygiene, stress management, social support",
"Patient and family education about chronic nature of disorder and relapse prevention"
]);
// ─── MDD 6: Prognosis ───────────────────────────────────────────────────────
addTwoColSlide(NAV, TEAL, "Prognosis", "Course of Illness", [
"Not a benign disorder — tends to be chronic with high relapse rates",
"Untreated episode: lasts 6–13 months; treated: ~3 months",
"~50% of first-hospitalized patients recover within 1 year",
"25% relapse within 6 months of discharge",
"30–50% relapse within 2 years",
"50–75% will relapse within 5 years",
"Mean number of episodes over 20 years: 5–6",
"Each episode → more frequent and more severe subsequent episodes",
"~50% had significant depressive symptoms before first identified episode"
], "Prognostic Factors", [
"GOOD: mild severity, absence of psychosis, good premorbid functioning, short episode duration, strong social support",
"POOR: psychotic features, melancholic features, multiple prior episodes, comorbid substance use, early onset, family history",
"About 25% of patients have residual symptoms (not full remission)",
"Suicide: 15% lifetime risk in severe MDD; assess at every visit",
"Prophylactic pharmacotherapy reduces relapse incidence significantly",
"Childhood-onset MDD: most severe form; high risk of comorbidities (conduct disorder, substance use)"
]);
// ════════════════════════════════════════════════════════════════════════════
// ──── PART 2: BIPOLAR DISORDER ───────────────────────────────────────────────
// ════════════════════════════════════════════════════════════════════════════
addSectionDivider("BIPOLAR\nDISORDER", PLUM, AMBER, "Part 2 of 2");
// ─── BD 1: Introduction & Epidemiology ──────────────────────────────────────
addContentSlide(PLUM, AMBER, "Introduction & Epidemiology", [
"## Definition",
"Characterized by episodes of mania or hypomania, typically interspersed with depressive episodes",
"Bipolar I: full manic episodes (may include depression); Bipolar II: hypomania + MDD",
"Cyclothymia: chronic fluctuating mood with hypomania + subsyndromal depression for ≥2 years",
"## Prevalence",
"Bipolar I lifetime prevalence: ~1% of the general population (equal in males and females)",
"Bipolar II: ~0.5–1%; Bipolar spectrum (including cyclothymia): up to 3–6%",
"BD II more common in women; Rapid cycling more common in women",
"## Age of Onset",
"Mean age of onset for Bipolar I: ~30 years (range childhood to >50 years)",
"Earlier onset than MDD; earlier onset → worse prognosis (greater severity and recurrence)",
"Adolescent prevalence ~1% for bipolar I; earlier diagnosis increasingly recognized",
"## Genetics & Risk Factors",
"Strong genetic component: first-degree relatives have 8–10x increased risk",
"Concordance in monozygotic twins: ~40–70%",
"Kindling model: each episode lowers the threshold for future episodes (neuroprogression)"
]);
// ─── BD 2: Clinical Features ────────────────────────────────────────────────
addTwoColSlide(PLUM, AMBER, "Clinical Features", "Manic Episode", [
"Distinct period of abnormally elevated, expansive, or irritable mood + increased energy (≥1 week, or any duration if hospitalized)",
"Grandiosity or inflated self-esteem",
"Decreased need for sleep (feels rested after 3 hours)",
"More talkative / pressured speech",
"Flight of ideas or racing thoughts",
"Distractibility",
"Increased goal-directed activity or psychomotor agitation",
"Excessive involvement in activities with high potential for painful consequences (spending sprees, sexual indiscretions, reckless investments)",
"Severe: may include psychosis (mood-congruent or incongruent)"
], "Hypomanic & Depressive Episodes", [
"Hypomanic episode: same symptoms as mania but <7 days, less severe, no psychosis, no hospitalization required",
"Functional change observable by others; not severe enough to markedly impair functioning",
"Bipolar depression: indistinguishable from MDD by symptoms alone; history of mania/hypomania differentiates",
"Mixed features: simultaneous manic + depressive symptoms; high suicide risk",
"Rapid cycling: ≥4 mood episodes/year; more common in women; associated with antidepressant use",
"Dysphoric/irritable mania: agitation, dysphoria, suicidality — distinct from euphoric mania",
"Children: may present as irritability, prolonged tantrums, emotional lability"
]);
// ─── BD 3: DSM-5-TR Diagnostic Criteria ─────────────────────────────────────
addContentSlide(PLUM, AMBER, "Diagnostic Criteria — DSM-5-TR", [
"## Manic Episode (Criterion A): Abnormally elevated/expansive/irritable mood + increased energy, ≥1 week, most of the day, nearly every day",
"## Criterion B — ≥3 of (or ≥4 if mood is irritable only):",
"1. Grandiosity / inflated self-esteem",
"2. Decreased need for sleep",
"3. More talkative / pressured speech",
"4. Flight of ideas or racing thoughts",
"5. Distractibility (easily drawn to irrelevant stimuli)",
"6. Increased goal-directed activity or psychomotor agitation",
"7. Risky pleasurable activities (excessive spending, sexual indiscretions)",
"## Criterion C–D:",
"C. Episode severe enough to cause marked impairment or require hospitalization, OR with psychotic features",
"D. Not attributable to substances or medical condition",
"## Bipolar II: Hypomanic episode (≥4 days, not meeting full mania criteria) + MDD; no full manic episode ever",
"## Specifiers: with anxious distress, mixed features, rapid cycling, melancholic features, atypical features, psychotic features, catatonia, peripartum onset, seasonal pattern"
]);
// ─── BD 4: Management — Pharmacological ─────────────────────────────────────
addTwoColSlide(PLUM, AMBER, "Management — Pharmacological", "Mood Stabilizers", [
"Lithium: gold standard; proven antimanic and antidepressant; antisuicidal effect; therapeutic level 0.8–1.2 mEq/L (acute), 0.6–0.8 (maintenance)",
"Valproate (Depakote/Depakene): especially for mixed/dysphoric mania, rapid cycling; first-line",
"Lamotrigine: excellent for bipolar depression and maintenance; titrate slowly (Stevens-Johnson risk)",
"Carbamazepine: effective for lithium-non-responsive, dysphoric mania, rapid cycling; watch for SJS, aplastic anemia",
"## Atypical Antipsychotics (FDA-approved for BD)",
"Acute mania: olanzapine, risperidone, quetiapine, aripiprazole, ziprasidone, asenapine",
"Bipolar depression: quetiapine, olanzapine-fluoxetine combination (OFC), lurasidone",
"Maintenance: olanzapine, aripiprazole, quetiapine (as adjuncts to mood stabilizers)"
], "Special Considerations", [
"Acute mania: mood stabilizer ± atypical antipsychotic is first-line combination",
"Antidepressants: use with caution in BD — risk of triggering mania or rapid cycling; always combine with mood stabilizer",
"Rapid cycling: optimize mood stabilizer (lithium + valproate combination); avoid antidepressants",
"Bipolar depression: lamotrigine or quetiapine preferred; avoid antidepressant monotherapy",
"ECT: highly effective for severe manic or depressive episodes; treatment-resistant BD",
"Monitoring: lithium (renal, thyroid), valproate (LFTs, CBC), carbamazepine (CBC at 3, 6, 9, 12 months)",
"NAC + aspirin: emerging evidence for adjunctive use in all phases via anti-oxidative mechanism"
]);
// ─── BD 5: Management — Non-Pharmacological ─────────────────────────────────
addContentSlide(PLUM, AMBER, "Management — Non-Pharmacological", [
"## Psychotherapy",
"Psychoeducation: cornerstone of non-pharmacological management; improves medication adherence, relapse recognition, and illness awareness",
"Cognitive-Behavioral Therapy (CBT): adapted for bipolar disorder; reduces depressive episodes; trains early warning sign recognition",
"Interpersonal and Social Rhythm Therapy (IPSRT): regulates circadian rhythms; reduces episode triggers",
"Family-Focused Therapy (FFT): psychoeducation for families; reduces expressed emotion; improves outcomes",
"## Somatic Treatments",
"ECT: indicated for severe/refractory manic or depressive episodes; safe and highly effective",
"Transcranial Magnetic Stimulation (TMS): adjunctive role in bipolar depression; evidence emerging",
"## Lifestyle & Self-Management",
"Sleep regulation: irregular sleep is a major episode trigger; maintain consistent sleep schedule",
"Avoidance of alcohol and illicit substances: strongly exacerbate course of BD",
"Stress reduction and regular exercise",
"## Crisis Planning",
"Advance directives for high-risk periods; safety planning for suicidal ideation (mixed episodes carry highest suicide risk)"
]);
// ─── BD 6: Prognosis ─────────────────────────────────────────────────────────
addTwoColSlide(PLUM, AMBER, "Prognosis", "Course of Illness", [
"Chronic, lifelong condition with high relapse rates despite treatment",
"Kindling / neuroprogressive model: each episode lowers threshold for subsequent episodes",
"Cognitive decline with repeated episodes; executive dysfunction associated with elevated TNF",
"~15–20% of untreated patients die by suicide",
"Bipolar II has better overall prognosis than Bipolar I but greater duration of depressive episodes",
"Youth with MDD: 20–40% risk of subsequently developing bipolar disorder",
"Prepubertal MDD: high risk of conversion to BD; monitor closely",
"Cyclothymia: 15–20% risk of developing full BD"
], "Prognostic Factors", [
"GOOD: older age at onset, absence of rapid cycling, good medication adherence, strong social support, euthymic periods >5 years",
"POOR: early onset, rapid cycling, mixed features, comorbid substance use, comorbid anxiety, multiple prior episodes, psychotic features",
"Rapid cycling: defined as ≥4 episodes/year; associated with poorer response to lithium",
"Lithium maintenance significantly reduces suicide risk (antisuicidal effect independent of mood stabilization)",
"Antidepressant use without mood stabilizer worsens long-term course",
"Functional impairment persists in ~30–40% of patients even during euthymia (cognitive and occupational)"
]);
// ─── Final Comparison Slide ───────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: CHARCOAL } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5, h: 5.625, fill: { color: "0F2233" } });
s.addShape(pres.ShapeType.rect, { x: 5, y: 0, w: 5, h: 5.625, fill: { color: "1C0E30" } });
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0, w: 0.3, h: 5.625, fill: { color: CHARCOAL } });
s.addText("MDD vs. Bipolar Disorder — Key Distinctions", {
x: 0.3, y: 0.1, w: 9.4, h: 0.6, fontSize: 18, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
});
s.addShape(pres.ShapeType.line, { x: 0.3, y: 0.72, w: 9.4, h: 0, line: { color: SILVER, width: 1 } });
const mddRows = [
["Feature", "MDD"],
["Manic episodes", "Never"],
["Gender ratio", "F > M (2:1)"],
["1st-line Rx", "SSRI / SNRI"],
["Antidepressant", "Safe monotherapy"],
["Suicide risk", "15% lifetime"],
["Prognosis", "Good with Rx; chronic"],
];
const bdRows = [
["Feature", "BD"],
["Manic episodes", "Required (BD I)"],
["Gender ratio", "M = F (BD I)"],
["1st-line Rx", "Mood stabilizer"],
["Antidepressant", "Caution — can trigger mania"],
["Suicide risk", "15–20% lifetime"],
["Prognosis", "Chronic; neuroprogressive"],
];
// MDD table
mddRows.forEach((row, i) => {
const bg = i === 0 ? TEAL : (i % 2 === 0 ? "162840" : "0D1B2A");
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.8 + i * 0.64, w: 4.6, h: 0.62, fill: { color: bg } });
s.addText(`${row[0]}: ${row[1]}`, {
x: 0.25, y: 0.82 + i * 0.64, w: 4.5, h: 0.58,
fontSize: i === 0 ? 13 : 12, bold: i === 0, color: i === 0 ? CHARCOAL : LGRAY,
fontFace: "Calibri", valign: "middle", margin: [0, 4, 0, 4]
});
});
// BD table
bdRows.forEach((row, i) => {
const bg = i === 0 ? AMBER : (i % 2 === 0 ? "261030" : "1A0D2B");
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.8 + i * 0.64, w: 4.6, h: 0.62, fill: { color: bg } });
s.addText(`${row[0]}: ${row[1]}`, {
x: 5.25, y: 0.82 + i * 0.64, w: 4.5, h: 0.58,
fontSize: i === 0 ? 13 : 12, bold: i === 0, color: i === 0 ? CHARCOAL : LGRAY,
fontFace: "Calibri", valign: "middle", margin: [0, 4, 0, 4]
});
});
}
// ─── Thank You / References ──────────────────────────────────────────────────
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: CHARCOAL } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5, h: 5.625, fill: { color: NAV } });
s.addShape(pres.ShapeType.rect, { x: 5, y: 0, w: 5, h: 5.625, fill: { color: PLUM } });
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0, w: 0.3, h: 5.625, fill: { color: CHARCOAL } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 5, h: 0.08, fill: { color: TEAL } });
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 4.8, w: 5, h: 0.08, fill: { color: AMBER } });
s.addText("Thank You", {
x: 0.5, y: 1.5, w: 9, h: 1.0,
fontSize: 42, bold: true, color: WHITE, fontFace: "Calibri Light", align: "center"
});
s.addText("References", {
x: 0.5, y: 2.7, w: 9, h: 0.4,
fontSize: 14, bold: true, color: SILVER, fontFace: "Calibri", align: "center"
});
s.addText([
{ text: "1. Sadock BJ, Sadock VA, Ruiz P. ", options: { color: LGRAY } },
{ text: "Kaplan & Sadock's Synopsis of Psychiatry, 12th Ed.", options: { italic: true, color: LGRAY } },
{ text: " Wolters Kluwer; 2021.", options: { color: LGRAY } },
{ text: "\n2. American Psychiatric Association. ", options: { color: LGRAY } },
{ text: "Diagnostic and Statistical Manual of Mental Disorders, 5th Ed., Text Revision (DSM-5-TR).", options: { italic: true, color: LGRAY } },
{ text: " APA; 2022.", options: { color: LGRAY } },
], {
x: 1, y: 3.2, w: 8, h: 1.8,
fontSize: 12, fontFace: "Calibri", align: "center"
});
}
// ─── Save ────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/mood-disorders-pptx/MoodDisorders_MDD_BipolarDisorder.pptx" })
.then(() => console.log("DONE: /home/daytona/workspace/mood-disorders-pptx/MoodDisorders_MDD_BipolarDisorder.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cat > /home/daytona/workspace/mood-disorders-pptx/build.js << 'JSEOF' const pptxgen = require("pptxgenjs"); const pres = new pptxgen(); pres.layout = "LAYOUT_16x9"; pres.title = "Major Depressive Disorder & Bipolar Disorder"; const NAV = "0D1B2A"; const TEAL = "2EC4B6"; const PLUM = "1A0D2B"; const AMBER = "F4A261"; const WHITE = "FFFFFF"; const LGRAY = "D9E2EC"; const CHARCOAL = "121212"; const SILVER = "A8B2BE"; function addSectionDivider(label, bg, accent, subtitle) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bg } }); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: accent } }); s.addText(label, { x: 0.4, y: 1.6, w: 9.2, h: 1.5, fontSize: 44, bold: true, color: WHITE, fontFace: "Calibri Light", align: "left" }); if (subtitle) s.addText(subtitle, { x: 0.4, y: 3.3, w: 9.2, h: 0.6, fontSize: 18, color: accent, fontFace: "Calibri", italic: true, align: "left" }); } function addContentSlide(bg, accent, title, bullets) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bg } }); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: accent } }); s.addText(title, { x: 0.4, y: 0.15, w: 9.2, h: 0.7, fontSize: 22, bold: true, color: accent, fontFace: "Calibri", margin: 0 }); s.addShape(pres.ShapeType.line, { x: 0.4, y: 0.88, w: 9.2, h: 0, line: { color: accent, width: 1.5, transparency: 50 } }); const items = bullets.map((b, i) => { if (b.startsWith("##")) { return { text: b.replace("## ", ""), options: { bold: true, color: accent, fontSize: 14, bullet: false, breakLine: true, paraSpaceBefore: 6 } }; } return { text: b, options: { bullet: { type: "bullet", code: "25AA", color: accent }, color: LGRAY, fontSize: 12.5, breakLine: i < bullets.length - 1, paraSpaceAfter: 2 } }; }); s.addText(items, { x: 0.4, y: 1.0, w: 9.2, h: 4.4, fontFace: "Calibri", valign: "top", margin: [0, 4, 4, 4] }); } function addTwoColSlide(bg, accent, title, col1Title, col1Bullets, col2Title, col2Bullets) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bg } }); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: accent } }); s.addText(title, { x: 0.4, y: 0.15, w: 9.2, h: 0.7, fontSize: 22, bold: true, color: accent, fontFace: "Calibri", margin: 0 }); s.addShape(pres.ShapeType.line, { x: 0.4, y: 0.88, w: 9.2, h: 0, line: { color: accent, width: 1.5, transparency: 50 } }); s.addText(col1Title, { x: 0.4, y: 0.95, w: 4.4, h: 0.45, fontSize: 15, bold: true, color: accent, fontFace: "Calibri", margin: 0 }); const c1items = col1Bullets.map((b, i) => ({ text: b, options: { bullet: { code: "25AA", color: accent }, color: LGRAY, fontSize: 12, breakLine: i < col1Bullets.length - 1, paraSpaceAfter: 2 } })); s.addText(c1items, { x: 0.4, y: 1.45, w: 4.3, h: 3.9, fontFace: "Calibri", valign: "top" }); s.addShape(pres.ShapeType.line, { x: 5.0, y: 1.0, w: 0, h: 4.3, line: { color: accent, width: 1, transparency: 60 } }); s.addText(col2Title, { x: 5.2, y: 0.95, w: 4.4, h: 0.45, fontSize: 15, bold: true, color: accent, fontFace: "Calibri", margin: 0 }); const c2items = col2Bullets.map((b, i) => ({ text: b, options: { bullet: { code: "25AA", color: accent }, color: LGRAY, fontSize: 12, breakLine: i < col2Bullets.length - 1, paraSpaceAfter: 2 } })); s.addText(c2items, { x: 5.2, y: 1.45, w: 4.4, h: 3.9, fontFace: "Calibri", valign: "top" }); } // SLIDE 1 — TITLE { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5, h: 5.625, fill: { color: NAV } }); s.addShape(pres.ShapeType.rect, { x: 5, y: 0, w: 5, h: 5.625, fill: { color: PLUM } }); s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0, w: 0.3, h: 5.625, fill: { color: CHARCOAL } }); s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 5, h: 0.08, fill: { color: TEAL } }); s.addShape(pres.ShapeType.rect, { x: 5.15, y: 4.8, w: 5, h: 0.08, fill: { color: AMBER } }); s.addText("MOOD DISORDERS", { x: 0.5, y: 0.5, w: 9, h: 0.7, fontSize: 16, color: SILVER, fontFace: "Calibri Light", charSpacing: 5, align: "center" }); s.addText("Major Depressive\nDisorder", { x: 0.2, y: 1.3, w: 4.6, h: 1.4, fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri Light", align: "center" }); s.addText("&", { x: 4.5, y: 2.2, w: 1, h: 0.8, fontSize: 28, bold: true, color: SILVER, fontFace: "Calibri Light", align: "center" }); s.addText("Bipolar\nDisorder", { x: 5.2, y: 1.3, w: 4.6, h: 1.4, fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri Light", align: "center" }); s.addText("Based on Kaplan & Sadock's Synopsis of Psychiatry, 12th Ed. | DSM-5-TR", { x: 0.5, y: 4.9, w: 9, h: 0.4, fontSize: 11, color: SILVER, fontFace: "Calibri", align: "center", italic: true }); } // MDD SECTION DIVIDER addSectionDivider("MAJOR DEPRESSIVE\nDISORDER", NAV, TEAL, "Part 1 of 2"); // MDD 1: Intro & Epidemiology addContentSlide(NAV, TEAL, "Introduction & Epidemiology", [ "## Definition", "Presence of ≥1 major depressive episode with no history of mania or hypomania", "Characterized by sustained low mood, anhedonia, and neurovegetative symptoms lasting ≥2 weeks", "Among the most prevalent and disabling psychiatric disorders worldwide", "## Global Prevalence (meta-analysis, 90 studies, >1 million participants, 30 countries)", "Point prevalence: ~12.9% | 1-year prevalence: ~7.2% | Lifetime prevalence: ~10.8%", "US (SAMHSA/NSDUH, DSM-5 criteria): 1-year prevalence of major depressive episode = 7.1%", "## Sex Distribution", "Women consistently more affected than men: 14.4% vs. 11.5% (aggregate); US 1-year: 8.7% vs. 5.3%", "Multifactorial: hormonal, psychological, and sociocultural factors", "## Age of Onset", "Mean onset ~40 years; 50% onset between ages 20–50", "Incidence rising in younger persons; adolescent females 1-year prevalence ~20%", "## Other Risk Factors", "Divorced/separated or without close interpersonal ties; positive family history", "Childhood-onset MDD: most severe form — comorbid conduct disorder and substance use common" ]); // MDD 2: Clinical Features addTwoColSlide(NAV, TEAL, "Clinical Features", "Core Symptoms (SIG E CAPS)", [ "S — Sleep disturbance (insomnia or hypersomnia)", "I — Interest (loss): anhedonia", "G — Guilt / worthlessness (excessive or inappropriate)", "E — Energy (decreased, fatigue)", "C — Concentration (difficulty) / indecisiveness", "A — Appetite change (loss or gain >5%/month)", "P — Psychomotor disturbance (agitation or retardation)", "S — Suicidal ideation / thoughts of death", "Plus: Depressed mood (core anchor symptom)", "Duration: ≥2 weeks, most of the day, nearly every day" ], "Subtypes & Special Features", [ "Melancholic: severe anhedonia, early-AM awakening, weight loss, profound guilt; 'endogenous depression'", "Atypical: mood reactivity, hypersomnia, leaden paralysis, rejection sensitivity", "Psychotic: mood-congruent or incongruent delusions/hallucinations; poor prognosis indicator", "Peripartum onset: during pregnancy or within 4 weeks postpartum", "Seasonal (SAD): fall/winter onset, spring remission; responds to light therapy", "Catatonic: psychomotor disturbance predominates", "Children: somatic complaints, agitation, mood-congruent hallucinations", "Adolescents: irritability, antisocial behavior, substance use, school failure" ]); // MDD 3: DSM-5-TR Criteria addContentSlide(NAV, TEAL, "Diagnostic Criteria — DSM-5-TR", [ "## Criterion A — ≥5 of the following during a 2-week period (≥1 must be #1 or #2):", "1. Depressed mood most of the day, nearly every day (subjective or observed)", "2. Markedly diminished interest or pleasure in all/almost all activities (anhedonia)", "3. Significant weight loss/gain (>5% body weight in 1 month) or appetite change", "4. Insomnia or hypersomnia nearly every day", "5. Psychomotor agitation or retardation (observable by others, not merely subjective)", "6. Fatigue or loss of energy nearly every day", "7. Feelings of worthlessness or excessive/inappropriate guilt (not just about being sick)", "8. Diminished ability to think or concentrate, or indecisiveness", "9. Recurrent thoughts of death, suicidal ideation with or without plan, or suicide attempt", "## Criteria B–E (all must be met):", "B. Clinically significant distress or functional impairment (social, occupational, etc.)", "C. Not attributable to substances or another medical condition", "D. Not better explained by schizophrenia spectrum or other psychotic disorder", "E. No manic or hypomanic episode ever (rules out bipolar disorder)" ]); // MDD 4: Pharmacological Management addTwoColSlide(NAV, TEAL, "Management — Pharmacological", "First-Line & Second-Line Agents", [ "SSRIs (fluoxetine, sertraline, escitalopram, paroxetine): first-line; best tolerability", "SNRIs (venlafaxine, duloxetine): effective; preferred with pain/anxiety comorbidity", "Bupropion: activating; useful when sedation or sexual side effects are concerns", "Mirtazapine (NaSSA): sedating; useful in insomnia and weight loss; rapid onset", "TCAs (amitriptyline, imipramine, nortriptyline): highly effective; limited by toxicity", "MAOIs (phenelzine, tranylcypromine): reserved for atypical or refractory depression", "Efficacy established in >500 RCTs; broadly similar across classes vs. placebo" ], "Special Situations & Strategies", [ "Psychotic MDD: antidepressant + atypical antipsychotic; ECT is highly effective", "Melancholic MDD: TCAs or ECT often superior to SSRIs", "Atypical MDD: strong evidence for MAOIs", "Duration: treat 4–9 months after remission; prophylaxis for recurrent MDD", "Augmentation: lithium, atypical antipsychotics (aripiprazole, quetiapine), thyroid hormone", "Esketamine (Spravato): FDA-approved for TRD; rapid-acting NMDA antagonist", "Early withdrawal (<3 months) almost always results in symptom return" ]); // MDD 5: Non-Pharmacological addContentSlide(NAV, TEAL, "Management — Non-Pharmacological", [ "## Psychotherapy", "Cognitive-Behavioral Therapy (CBT): equal efficacy to pharmacotherapy; fewer adverse effects; better follow-up; combination with medication often superior", "Interpersonal Therapy (IPT): 12–16 weekly sessions; focuses on current interpersonal problems; most effective sole psychotherapy for severe MDD", "Behavioral Therapy: addresses maladaptive behavioral patterns; evidence growing", "Psychodynamic/Psychoanalytic Therapy: aims at personality structure change; longer-term approach", "## Somatic Treatments", "ECT (Electroconvulsive Therapy): most effective for severe/psychotic/melancholic MDD and TRD; 3x/week, 6–12 sessions", "rTMS (Repetitive Transcranial Magnetic Stimulation): non-invasive; FDA-approved for TRD", "Phototherapy (Light Therapy): first-line for seasonal affective disorder (SAD); 10,000 lux, 20–30 min/morning", "## Lifestyle & Adjuncts", "Aerobic exercise: RCT evidence for moderate antidepressant effect", "Sleep hygiene and regularity; stress reduction techniques", "Psychoeducation: educate patient and family about chronicity, relapse signs, and medication adherence" ]); // MDD 6: Prognosis addTwoColSlide(NAV, TEAL, "Prognosis", "Course of Illness", [ "Not a benign disorder — chronic with high relapse rates", "Untreated episode: 6–13 months; treated episode: ~3 months", "~50% of first-hospitalized patients recover within 1 year", "25% relapse within 6 months of discharge", "30–50% relapse within 2 years; 50–75% within 5 years", "Mean number of episodes over 20 years: 5–6", "Each subsequent episode tends to be more frequent and more severe", "~50% had significant depressive symptoms before first identified episode", "15% lifetime risk of suicide in severe MDD" ], "Prognostic Indicators", [ "GOOD: mild severity, no psychosis, good premorbid functioning, strong social support, short episode, older age at onset", "POOR: psychotic features, melancholic features, multiple prior episodes, comorbid substance use, early onset, positive family history", "~25% do not achieve full remission", "Prophylactic pharmacotherapy substantially reduces relapse rate", "Childhood-onset MDD: most severe — high comorbidity with conduct disorder and substance use", "Youth MDD converts to bipolar disorder in 20–40% of cases over time" ]); // BD SECTION DIVIDER addSectionDivider("BIPOLAR\nDISORDER", PLUM, AMBER, "Part 2 of 2"); // BD 1: Intro & Epidemiology addContentSlide(PLUM, AMBER, "Introduction & Epidemiology", [ "## Definition", "Characterized by episodes of mania or hypomania, typically interspersed with depressive episodes", "Bipolar I: ≥1 full manic episode; Bipolar II: hypomania + MDD (no full mania)", "Cyclothymia: chronic fluctuating mood (hypomania + subsyndromal depression) ≥2 years", "## Prevalence", "Bipolar I: lifetime prevalence ~1%; equal in males and females", "Bipolar II: ~0.5–1%; Bipolar spectrum (including cyclothymia): ~3–6%", "BD II and rapid cycling more common in women", "## Age of Onset", "Mean onset for Bipolar I: ~30 years (range: childhood to >50 years)", "Earlier onset than MDD; earlier onset associated with worse prognosis", "Adolescent prevalence ~1%; increasingly recognized in youth", "## Genetics & Risk Factors", "Strong genetic component: first-degree relatives have 8–10x increased risk", "Monozygotic twin concordance: ~40–70%", "Kindling/neuroprogressive model: each episode lowers threshold for the next (immune/inflammatory mechanisms)" ]); // BD 2: Clinical Features addTwoColSlide(PLUM, AMBER, "Clinical Features", "Manic Episode", [ "Abnormally elevated, expansive, or irritable mood + increased energy (≥1 week, or any duration if hospitalized)", "Grandiosity or inflated self-esteem", "Decreased need for sleep (feels rested after ~3 hours)", "More talkative / pressured speech", "Flight of ideas or subjective experience of racing thoughts", "Distractibility (attention easily drawn to irrelevant stimuli)", "Increased goal-directed activity or psychomotor agitation", "Risky pleasurable activities (spending sprees, sexual indiscretions, reckless investments)", "Severe mania may include psychosis (mood-congruent or incongruent)" ], "Hypomania, Depression & Specifiers", [ "Hypomania: same symptoms as mania, <7 days, no psychosis, no hospitalization; unequivocal functional change observable by others", "Bipolar depression: indistinguishable from MDD by symptoms; history of mania/hypomania differentiates", "Mixed features: simultaneous manic + depressive symptoms; highest suicide risk", "Rapid cycling: ≥4 mood episodes/year; more common in women; associated with antidepressant use", "Dysphoric/irritable mania: agitation, dysphoria, suicidality; distinct from euphoric mania", "Children: often presents as prolonged irritability, tantrums, emotional lability", "Cognitive impairment and executive dysfunction persist in ~30–40% during euthymia" ]); // BD 3: DSM-5-TR Criteria addContentSlide(PLUM, AMBER, "Diagnostic Criteria — DSM-5-TR", [ "## Manic Episode — Criterion A:", "Distinct period of abnormally elevated/expansive/irritable mood + persistently increased energy or goal-directed activity, ≥1 week, most of the day, nearly every day (or any duration if hospitalization required)", "## Criterion B — ≥3 symptoms (≥4 if mood is irritable only):", "1. Grandiosity or inflated self-esteem", "2. Decreased need for sleep (feels rested after only 3 hours)", "3. More talkative than usual or pressure to keep talking", "4. Flight of ideas or subjective racing thoughts", "5. Distractibility (attention too easily drawn to irrelevant external stimuli)", "6. Increase in goal-directed activity or psychomotor agitation", "7. Excessive involvement in high-risk pleasurable activities", "## Criteria C–D:", "C. Marked impairment, requires hospitalization, or psychotic features present", "D. Not attributable to substances or another medical condition", "## Bipolar II: Hypomanic episode (≥4 days; criteria B met; no marked impairment/psychosis) + ≥1 MDE; never a full manic episode", "## Key Specifiers: mixed features, rapid cycling, anxious distress, psychotic features, catatonia, peripartum onset, seasonal pattern" ]); // BD 4: Pharmacological Management addTwoColSlide(PLUM, AMBER, "Management — Pharmacological", "Mood Stabilizers", [ "Lithium: gold standard; proven antimanic + antidepressant + antisuicidal effects; level 0.8–1.2 mEq/L acute, 0.6–0.8 maintenance; monitor renal and thyroid", "Valproate (Depakote): first-line; especially for mixed/dysphoric mania, rapid cycling; monitor LFTs and CBC", "Lamotrigine: superior for bipolar depression and maintenance; titrate slowly (SJS risk); minimal antimanic effect", "Carbamazepine: effective for lithium-non-responsive, dysphoric mania, rapid cycling; monitor CBC for aplastic anemia/agranulocytosis", "## Atypical Antipsychotics (FDA-approved)", "Acute mania: olanzapine, risperidone, quetiapine, aripiprazole, ziprasidone, asenapine", "Bipolar depression: quetiapine, olanzapine-fluoxetine (OFC), lurasidone", "Maintenance: adjunct to mood stabilizer (aripiprazole, quetiapine, olanzapine)" ], "Special Considerations", [ "Acute mania: mood stabilizer ± atypical antipsychotic (combination) — first-line", "Antidepressants: use with caution — risk of triggering mania or rapid cycling; always combine with mood stabilizer", "Rapid cycling: optimize mood stabilizer (Li + VPA combination); strongly avoid antidepressant monotherapy", "Bipolar depression: lamotrigine or quetiapine preferred; antidepressant monotherapy contraindicated", "ECT: severe/refractory manic or depressive episodes; treatment-resistant BD", "Monitoring: lithium (renal, thyroid q6–12 mo), carbamazepine (CBC at 3, 6, 9, 12 months)", "N-acetylcysteine (NAC): emerging adjunctive evidence across all phases via anti-oxidative mechanism" ]); // BD 5: Non-Pharmacological addContentSlide(PLUM, AMBER, "Management — Non-Pharmacological", [ "## Psychotherapy", "Psychoeducation: cornerstone; improves medication adherence, relapse recognition, illness awareness — shown to reduce hospitalizations", "Cognitive-Behavioral Therapy (CBT): adapted for BD; reduces depressive episodes; trains early warning sign recognition and relapse prevention", "Interpersonal and Social Rhythm Therapy (IPSRT): regulates circadian rhythms and social zeitgebers; reduces episode triggers", "Family-Focused Therapy (FFT): psychoeducation for families; reduces expressed emotion; improves relapse rates and functional outcomes", "## Somatic Treatments", "ECT: indicated for severe/refractory mania or depression; highly effective; rapid onset", "TMS: adjunctive role in bipolar depression; emerging evidence base", "## Lifestyle & Self-Management", "Sleep regularity: critical — irregular sleep is a major episode trigger; consistent sleep-wake schedule", "Avoidance of alcohol and illicit substances: strongly worsen BD course", "Regular aerobic exercise; stress reduction", "## Crisis Planning", "Advance directives for high-risk periods; safety planning (mixed episodes carry highest suicide risk)" ]); // BD 6: Prognosis addTwoColSlide(PLUM, AMBER, "Prognosis", "Course of Illness", [ "Chronic, lifelong condition with high relapse rates despite treatment", "Neuroprogressive (kindling) model: each episode worsens subsequent episodes", "Immune mechanisms (CRP, TNF, IL-6) associated with cognitive decline and progression", "15–20% lifetime suicide risk (untreated patients); highest risk during mixed episodes", "Bipolar II: more depressive burden; BD I: more manic episodes and hospitalizations", "Youth with MDD: 20–40% risk of subsequently developing bipolar disorder", "Cyclothymia: 15–20% risk of conversion to full bipolar disorder", "Prepubertal MDD: high risk of conversion to BD — monitor closely for emerging manic symptoms" ], "Prognostic Factors", [ "GOOD: older age at onset, absence of rapid cycling, good adherence, strong social support, long euthymic periods", "POOR: early onset, rapid cycling, mixed features, comorbid substance use, comorbid anxiety, multiple prior episodes, psychotic features", "Rapid cycling: ≥4 episodes/year; poorer response to lithium monotherapy", "Lithium maintenance: significantly reduces suicide risk (independent antisuicidal effect)", "Antidepressant monotherapy without mood stabilizer worsens long-term course", "Functional impairment in ~30–40% of patients even during euthymia (cognitive, occupational)" ]); // COMPARISON SLIDE { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5, h: 5.625, fill: { color: "0F2233" } }); s.addShape(pres.ShapeType.rect, { x: 5, y: 0, w: 5, h: 5.625, fill: { color: "1C0E30" } }); s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0, w: 0.3, h: 5.625, fill: { color: CHARCOAL } }); s.addText("MDD vs. Bipolar Disorder — Key Distinctions", { x: 0.3, y: 0.1, w: 9.4, h: 0.6, fontSize: 18, bold: true, color: WHITE, fontFace: "Calibri", align: "center" }); s.addShape(pres.ShapeType.line, { x: 0.3, y: 0.72, w: 9.4, h: 0, line: { color: SILVER, width: 1 } }); const mddRows = [["Feature", "MDD"], ["Defining episode", "Major Depressive Episode"], ["Manic episodes", "Absent (never)"], ["Gender predominance", "Female > Male (2:1)"], ["1st-line pharmacotherapy", "SSRI / SNRI"], ["Antidepressant monotherapy", "Safe and standard"], ["ECT indication", "Psychotic / TRD"], ["Suicide risk", "~15% lifetime"]]; const bdRows = [["Feature", "Bipolar Disorder"], ["Defining episode", "Manic / Hypomanic Episode"], ["Manic episodes", "Required (BD I) / Hypomania (BD II)"], ["Gender predominance", "Equal (BD I); Female > Male (BD II)"], ["1st-line pharmacotherapy", "Mood stabilizer ± Atypical AP"], ["Antidepressant monotherapy", "Risk of mania/rapid cycling — avoid"], ["ECT indication", "Severe mania or refractory BD"], ["Suicide risk", "15–20% lifetime"]]; mddRows.forEach((row, i) => { const bg = i === 0 ? TEAL : (i % 2 === 0 ? "162840" : "0D1B2A"); s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.8 + i * 0.59, w: 4.6, h: 0.57, fill: { color: bg } }); s.addText(i === 0 ? row[1] : `${row[0]}: ${row[1]}`, { x: 0.25, y: 0.82 + i * 0.59, w: 4.5, h: 0.53, fontSize: i === 0 ? 13 : 11, bold: i === 0, color: i === 0 ? CHARCOAL : LGRAY, fontFace: "Calibri", valign: "middle", margin: [0, 4, 0, 4] }); }); bdRows.forEach((row, i) => { const bg = i === 0 ? AMBER : (i % 2 === 0 ? "261030" : "1A0D2B"); s.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.8 + i * 0.59, w: 4.6, h: 0.57, fill: { color: bg } }); s.addText(i === 0 ? row[1] : `${row[0]}: ${row[1]}`, { x: 5.25, y: 0.82 + i * 0.59, w: 4.5, h: 0.53, fontSize: i === 0 ? 13 : 11, bold: i === 0, color: i === 0 ? CHARCOAL : LGRAY, fontFace: "Calibri", valign: "middle", margin: [0, 4, 0, 4] }); }); } // THANK YOU SLIDE { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5, h: 5.625, fill: { color: NAV } }); s.addShape(pres.ShapeType.rect, { x: 5, y: 0, w: 5, h: 5.625, fill: { color: PLUM } }); s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0, w: 0.3, h: 5.625, fill: { color: CHARCOAL } }); s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 5, h: 0.08, fill: { color: TEAL } }); s.addShape(pres.ShapeType.rect, { x: 5.15, y: 4.8, w: 5, h: 0.08, fill: { color: AMBER } }); s.addText("Thank You", { x: 0.5, y: 1.5, w: 9, h: 1.0, fontSize: 42, bold: true, color: WHITE, fontFace: "Calibri Light", align: "center" }); s.addText("References", { x: 0.5, y: 2.8, w: 9, h: 0.4, fontSize: 14, bold: true, color: SILVER, fontFace: "Calibri", align: "center" }); s.addText([ { text: "1. Sadock BJ, Sadock VA, Ruiz P. ", options: { color: LGRAY } }, { text: "Kaplan & Sadock's Synopsis of Psychiatry, 12th Edition.", options: { italic: true, color: LGRAY } }, { text: " Wolters Kluwer; 2021.\n", options: { color: LGRAY } }, { text: "2. American Psychiatric Association. ", options: { color: LGRAY } }, { text: "Diagnostic and Statistical Manual of Mental Disorders, 5th Ed., Text Revision (DSM-5-TR).", options: { italic: true, color: LGRAY } }, { text: " APA; 2022.", options: { color: LGRAY } }, ], { x: 1, y: 3.3, w: 8, h: 1.8, fontSize: 12, fontFace: "Calibri", align: "center" }); } // SAVE pres.writeFile({ fileName: "/home/daytona/workspace/mood-disorders-pptx/MoodDisorders_MDD_BipolarDisorder.pptx" }) .then(() => console.log("DONE")) .catch(e => { console.error(e); process.exit(1); }); JSEOF echo "Written"
cd /home/daytona/workspace/mood-disorders-pptx && node build.js 2>&1
ls -lh /home/daytona/workspace/mood-disorders-pptx/MoodDisorders_MDD_BipolarDisorder.pptx
Where's my ppt
MoodDisorders MDD BipolarDisorder
Presentation · PPTX
I need at least of 35 sides and let the contents be simple no need to elaborate so much just include what to be known and use a different layout which is much inavative and looks good so as to present
cat > /home/daytona/workspace/mood-disorders-pptx/build2.js << 'JSEOF' const pptxgen = require("pptxgenjs"); const pres = new pptxgen(); pres.layout = "LAYOUT_16x9"; pres.title = "MDD & Bipolar Disorder"; // ── PALETTE ────────────────────────────────────────────────────────────────── const C = { bg: "0A0E1A", // near-black navy (global bg) card: "111827", // dark card bg card2: "0F172A", // alt card mdd1: "1D4ED8", // MDD royal blue mdd2: "3B82F6", // MDD light blue accent mddHL: "BFDBFE", // MDD highlight text bd1: "7C3AED", // BD purple bd2: "A78BFA", // BD light purple accent bdHL: "EDE9FE", // BD highlight text white: "FFFFFF", silver: "CBD5E1", dim: "64748B", gold: "F59E0B", green: "10B981", red: "EF4444", teal: "06B6D4", }; // ── HELPERS ─────────────────────────────────────────────────────────────────── // Numbered-card slide: accent panel left, content right function cardSlide(bg, accent, accentLight, num, tag, title, points) { const s = pres.addSlide(); // full bg s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.bg}}); // left colour panel s.addShape(pres.ShapeType.rect, {x:0, y:0, w:2.6, h:5.625, fill:{color:bg}}); // slide number bubble s.addShape(pres.ShapeType.ellipse, {x:0.55, y:0.4, w:1.0, h:1.0, fill:{color:accent}}); s.addText(String(num), {x:0.55, y:0.4, w:1.0, h:1.0, fontSize:22, bold:true, color:C.white, align:"center", valign:"middle"}); // tag label s.addText(tag, {x:0.15, y:1.6, w:2.3, h:0.45, fontSize:9, bold:true, color:accentLight, align:"center", charSpacing:3}); // vertical title on panel s.addText(title, {x:0.1, y:2.1, w:2.4, h:3.0, fontSize:15, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri Light"}); // right area s.addShape(pres.ShapeType.rect, {x:2.7, y:0, w:7.3, h:5.625, fill:{color:C.card}}); // title repeat (large, right side top) s.addText(title, {x:3.0, y:0.25, w:6.8, h:0.75, fontSize:22, bold:true, color:accentLight, fontFace:"Calibri", margin:0}); s.addShape(pres.ShapeType.line, {x:3.0, y:1.05, w:6.6, h:0, line:{color:accent, width:2}}); // bullet points const items = points.map((p,i) => ({ text: p, options: { bullet:{code:"25B6", color:accent}, color: C.silver, fontSize:13.5, breakLine: i<points.length-1, paraSpaceAfter:6, fontFace:"Calibri" } })); s.addText(items, {x:3.0, y:1.15, w:6.8, h:4.25, valign:"top", margin:[4,6,4,6]}); } // Icon-card strip: 3 cards across bottom half function iconCardSlide(bg, accent, accentLight, num, tag, title, cards) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.bg}}); // top header band s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:1.9, fill:{color:bg}}); s.addShape(pres.ShapeType.rect, {x:0, y:1.9, w:10, h:0.06, fill:{color:accent}}); s.addShape(pres.ShapeType.ellipse, {x:0.35, y:0.35, w:0.9, h:0.9, fill:{color:accent}}); s.addText(String(num), {x:0.35, y:0.35, w:0.9, h:0.9, fontSize:18, bold:true, color:C.white, align:"center", valign:"middle"}); s.addText(tag, {x:1.4, y:0.35, w:3, h:0.4, fontSize:9, bold:true, color:accentLight, charSpacing:3}); s.addText(title, {x:1.4, y:0.75, w:8.2, h:0.9, fontSize:24, bold:true, color:C.white, fontFace:"Calibri Light"}); // 3 cards const W=2.9, GAP=0.25, Y=2.1, H=3.2; cards.forEach((c, i) => { const X = 0.3 + i*(W+GAP); s.addShape(pres.ShapeType.rect, {x:X, y:Y, w:W, h:H, fill:{color:C.card2}, rectRadius:0.1}); s.addShape(pres.ShapeType.rect, {x:X, y:Y, w:W, h:0.07, fill:{color:accent}}); s.addText(c.head, {x:X+0.15, y:Y+0.15, w:W-0.3, h:0.55, fontSize:14, bold:true, color:accentLight, fontFace:"Calibri"}); const pts = c.pts.map((p,j) => ({text:p, options:{bullet:{code:"2022", color:accent}, color:C.silver, fontSize:12, breakLine:j<c.pts.length-1, paraSpaceAfter:4}})); s.addText(pts, {x:X+0.15, y:Y+0.78, w:W-0.3, h:H-1.0, valign:"top", fontFace:"Calibri"}); }); } // Split-half slide: left content, right coloured panel with key stat function splitSlide(bg, accent, accentLight, num, tag, title, points, statLabel, statValue) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.card}}); // right panel s.addShape(pres.ShapeType.rect, {x:6.3, y:0, w:3.7, h:5.625, fill:{color:bg}}); // accent top stripe s.addShape(pres.ShapeType.rect, {x:0, y:0, w:6.3, h:0.07, fill:{color:accent}}); // slide num s.addShape(pres.ShapeType.ellipse, {x:0.3, y:0.25, w:0.75, h:0.75, fill:{color:accent}}); s.addText(String(num), {x:0.3, y:0.25, w:0.75, h:0.75, fontSize:16, bold:true, color:C.white, align:"center", valign:"middle"}); s.addText(tag, {x:1.2, y:0.28, w:4.5, h:0.35, fontSize:9, bold:true, color:accentLight, charSpacing:3}); s.addText(title, {x:0.3, y:1.05, w:5.7, h:0.8, fontSize:21, bold:true, color:accentLight, fontFace:"Calibri"}); s.addShape(pres.ShapeType.line, {x:0.3, y:1.9, w:5.7, h:0, line:{color:accent, width:1.5}}); const items = points.map((p,i) => ({text:p, options:{bullet:{code:"25B6", color:accent}, color:C.silver, fontSize:13, breakLine:i<points.length-1, paraSpaceAfter:5}})); s.addText(items, {x:0.3, y:2.0, w:5.7, h:3.4, valign:"top", fontFace:"Calibri"}); // right panel content s.addText(statLabel, {x:6.45, y:1.5, w:3.4, h:0.7, fontSize:12, color:C.white, align:"center", bold:true, charSpacing:2}); s.addText(statValue, {x:6.45, y:2.3, w:3.4, h:1.5, fontSize:36, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri Light"}); s.addShape(pres.ShapeType.line, {x:6.8, y:4.1, w:2.6, h:0, line:{color:accentLight, width:1, transparency:50}}); } // Timeline row slide function timelineSlide(bg, accent, accentLight, num, tag, title, steps) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.bg}}); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:1.7, fill:{color:bg}}); s.addShape(pres.ShapeType.rect, {x:0, y:1.7, w:10, h:0.06, fill:{color:accent}}); s.addShape(pres.ShapeType.ellipse, {x:0.35, y:0.3, w:0.85, h:0.85, fill:{color:accent}}); s.addText(String(num), {x:0.35, y:0.3, w:0.85, h:0.85, fontSize:17, bold:true, color:C.white, align:"center", valign:"middle"}); s.addText(tag, {x:1.35, y:0.3, w:3, h:0.35, fontSize:9, bold:true, color:accentLight, charSpacing:3}); s.addText(title, {x:1.35, y:0.65, w:8.2, h:0.85, fontSize:24, bold:true, color:C.white, fontFace:"Calibri Light"}); // horizontal line s.addShape(pres.ShapeType.line, {x:0.5, y:3.1, w:9.0, h:0, line:{color:accent, width:2, transparency:40}}); // nodes const N = steps.length; const spacing = 9.0 / N; steps.forEach((st, i) => { const cx = 0.5 + spacing*i + spacing/2; s.addShape(pres.ShapeType.ellipse, {x:cx-0.3, y:2.9, w:0.6, h:0.6, fill:{color:accent}}); s.addText(String(i+1), {x:cx-0.3, y:2.9, w:0.6, h:0.6, fontSize:13, bold:true, color:C.white, align:"center", valign:"middle"}); s.addText(st.label, {x:cx-1.1, y:3.65, w:2.2, h:0.45, fontSize:11, bold:true, color:accentLight, align:"center"}); s.addText(st.desc, {x:cx-1.1, y:4.15, w:2.2, h:1.2, fontSize:10.5, color:C.silver, align:"center", fontFace:"Calibri"}); }); } // ── SLIDE COUNT TRACKER ─────────────────────────────────────────────────────── let n = 0; // ════════════════════════════════════════════════════════════════════════════ // SLIDE 1 — MASTER TITLE // ════════════════════════════════════════════════════════════════════════════ { n++; const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.bg}}); // two diagonal halves via thick slanted shape simulation using rects s.addShape(pres.ShapeType.rect, {x:0, y:0, w:5, h:5.625, fill:{color:"0D1F3C"}}); s.addShape(pres.ShapeType.rect, {x:5, y:0, w:5, h:5.625, fill:{color:"180D3A"}}); // divider strip s.addShape(pres.ShapeType.rect, {x:4.82, y:0, w:0.36, h:5.625, fill:{color:C.bg}}); // bottom accent lines s.addShape(pres.ShapeType.rect, {x:0, y:5.1, w:4.82, h:0.1, fill:{color:C.mdd2}}); s.addShape(pres.ShapeType.rect, {x:5.18, y:5.1, w:4.82, h:0.1, fill:{color:C.bd2}}); // labels s.addText("MOOD DISORDERS", {x:1, y:0.35, w:8, h:0.5, fontSize:13, color:C.dim, align:"center", charSpacing:6, bold:true}); s.addText("Major Depressive\nDisorder", {x:0.25, y:1.15, w:4.5, h:1.8, fontSize:28, bold:true, color:C.white, fontFace:"Calibri Light", align:"center"}); s.addText("Bipolar\nDisorder", {x:5.25, y:1.15, w:4.5, h:1.8, fontSize:28, bold:true, color:C.white, fontFace:"Calibri Light", align:"center"}); s.addText("DSM-5-TR | Kaplan & Sadock 12th Edition", {x:1, y:4.65, w:8, h:0.5, fontSize:11, color:C.dim, align:"center", italic:true}); // MDD badge s.addShape(pres.ShapeType.rect, {x:0.9, y:3.2, w:3.2, h:0.55, fill:{color:C.mdd1}, rectRadius:0.08}); s.addText("Major Depressive Disorder", {x:0.9, y:3.2, w:3.2, h:0.55, fontSize:11, color:C.white, align:"center", valign:"middle", bold:true}); // BD badge s.addShape(pres.ShapeType.rect, {x:5.9, y:3.2, w:3.2, h:0.55, fill:{color:C.bd1}, rectRadius:0.08}); s.addText("Bipolar Disorder", {x:5.9, y:3.2, w:3.2, h:0.55, fontSize:11, color:C.white, align:"center", valign:"middle", bold:true}); } // ════════════════════════════════════════════════════════════════════════════ // SLIDE 2 — MDD SECTION DIVIDER // ════════════════════════════════════════════════════════════════════════════ { n++; const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:"0D1F3C"}}); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:0.18, h:5.625, fill:{color:C.mdd2}}); s.addShape(pres.ShapeType.rect, {x:0, y:4.8, w:10, h:0.1, fill:{color:C.mdd1}}); s.addText("PART 01", {x:0.5, y:0.5, w:9, h:0.5, fontSize:12, color:C.mdd2, charSpacing:5, bold:true}); s.addText("Major\nDepressive\nDisorder", {x:0.5, y:1.1, w:8, h:3.0, fontSize:52, bold:true, color:C.white, fontFace:"Calibri Light"}); s.addText("Introduction • Clinical Features • DSM-5-TR • Management • Prognosis", {x:0.5, y:4.25, w:9, h:0.45, fontSize:12, color:C.mddHL, italic:true}); } // MDD SLIDES // ── 3: Definition n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · INTRODUCTION", "Definition", [ "Psychiatric condition with ≥1 Major Depressive Episode", "No history of mania or hypomania", "Persistent depressed mood + loss of interest lasting ≥2 weeks", "Causes significant distress or functional impairment", "One of the leading causes of disability worldwide (WHO)", ]); // ── 4: Epidemiology — Prevalence n++; splitSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · EPIDEMIOLOGY", "Global Prevalence", [ "Point prevalence: ~12.9%", "1-year prevalence: ~7.2% (US: 7.1% — SAMHSA data)", "Lifetime prevalence: ~10.8%", "Based on meta-analysis: 90 studies, 30 countries, >1 million participants", "Prevalence higher in low-to-middle income countries", ], "LIFETIME\nPREVALENCE", "10.8%"); // ── 5: Epidemiology — Sex & Age n++; iconCardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · EPIDEMIOLOGY", "Sex, Age & Risk Factors", [ {head:"Sex", pts:["Women > Men universally", "Women 8.7% vs Men 5.3% (US 1-yr)", "Hormonal, psychosocial factors"]}, {head:"Age of Onset", pts:["Mean onset: ~40 years", "50% onset between ages 20–50", "Rising incidence in adolescents"]}, {head:"Risk Factors", pts:["Family history of MDD", "Divorced/separated status", "Childhood adversity", "Comorbid anxiety/substance use"]}, ]); // ── 6: Aetiology n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · AETIOLOGY", "Aetiology", [ "Biogenic amine hypothesis: ↓ serotonin, norepinephrine, dopamine", "Neurotrophic: ↓ BDNF → hippocampal atrophy (CA3 region)", "HPA axis dysregulation: hypercortisolaemia", "Genetic: 40–50% heritability; polygenic risk", "Psychosocial: early trauma, stressful life events, loss", "Immune: elevated CRP, IL-6, TNF in depressed patients", ]); // ── 7: Clinical Features — Core n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · CLINICAL FEATURES", "Core Symptoms — SIG E CAPS", [ "S — Sleep disturbance (insomnia or hypersomnia)", "I — Interest loss / Anhedonia", "G — Guilt / Worthlessness (excessive)", "E — Energy (fatigue/loss of energy)", "C — Concentration difficulty / Indecisiveness", "A — Appetite change (↓ or ↑ >5% body weight/month)", "P — Psychomotor agitation or retardation", "S — Suicidal ideation / thoughts of death", "+ Depressed mood (core anchor — required as Criterion)", ]); // ── 8: Clinical Subtypes n++; iconCardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · CLINICAL FEATURES", "Key Subtypes", [ {head:"Melancholic", pts:["Severe anhedonia", "Early AM awakening", "Profound guilt", "Psychomotor retardation", "'Endogenous' depression"]}, {head:"Atypical", pts:["Mood reactivity", "Hypersomnia", "Leaden paralysis", "Rejection sensitivity", "↑ appetite/weight"]}, {head:"Psychotic", pts:["Delusions/hallucinations", "Mood-congruent or incongruent", "Poor prognostic sign", "Needs AP + AD combo"]}, ]); // ── 9: More Subtypes n++; iconCardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · CLINICAL FEATURES", "Specifiers", [ {head:"Peripartum Onset", pts:["During pregnancy", "Within 4 weeks postpartum", "Screen all postnatal women"]}, {head:"Seasonal (SAD)", pts:["Fall/winter onset", "Spring remission", "Responds to light therapy"]}, {head:"Catatonic", pts:["Psychomotor disturbance", "Stupor, rigidity, posturing", "May need ECT"]}, ]); // ── 10: Presentation in Special Populations n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · CLINICAL FEATURES", "Special Populations", [ "Children: somatic complaints, psychomotor agitation, school failure", "Adolescents: irritability, antisocial behaviour, substance use", "Elderly: cognitive complaints, somatic focus, underreported", "Women: peripartum onset; premenstrual exacerbation", "All ages: suicidal ideation must be actively assessed at every visit", ]); // ── 11: DSM-5-TR Criterion A n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · DSM-5-TR", "Criterion A — Symptoms", [ "≥5 of 9 symptoms in same 2-week period", "≥1 must be: (1) Depressed mood OR (2) Anhedonia", "1. Depressed mood — most of day, nearly every day", "2. Anhedonia — markedly diminished interest/pleasure", "3. Weight/appetite change (>5% body weight in 1 month)", "4. Insomnia or hypersomnia", "5. Psychomotor agitation or retardation (observable)", "6. Fatigue or loss of energy", "7. Worthlessness or excessive/inappropriate guilt", "8. Impaired concentration or indecisiveness", "9. Recurrent thoughts of death / suicidal ideation", ]); // ── 12: DSM-5-TR Criteria B–E n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · DSM-5-TR", "Criteria B–E", [ "B. Clinically significant distress OR functional impairment", "C. Not due to substances or a general medical condition", "D. Not better explained by a psychotic disorder", "E. No history of manic or hypomanic episode", "─────────────────────────────────────────", "Severity: Mild (2–3 sx) | Moderate (4+ sx) | Severe", "Course: Single episode vs. Recurrent (≥2 MDEs, ≥2 months apart)", "Partial remission: Some symptoms remain", "Full remission: No significant symptoms for ≥2 months", ]); // ── 13: Management Overview n++; timelineSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · MANAGEMENT", "Treatment Framework", [ {label:"Assess", desc:"Severity, suicide risk, specifiers"}, {label:"Educate", desc:"Psychoeducation, adherence"}, {label:"Pharmacotherapy", desc:"SSRI/SNRI first-line"}, {label:"Psychotherapy", desc:"CBT, IPT, behavioural"}, {label:"Somatic Rx", desc:"ECT, rTMS, light Rx"}, {label:"Maintain", desc:"Prophylaxis, relapse prevention"}, ]); // ── 14: Pharmacotherapy — First Line n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · PHARMACOTHERAPY", "First-Line Agents", [ "SSRIs — Fluoxetine, Sertraline, Escitalopram, Paroxetine", "SNRIs — Venlafaxine, Duloxetine (also useful for pain/anxiety)", "Bupropion — Activating; avoids sexual SE; avoid in seizure risk", "Mirtazapine — NaSSA; sedating; useful for insomnia & weight loss", "Efficacy proven in >500 RCTs; broadly similar across classes", "Response expected in 2–4 weeks; full remission in 4–8 weeks", ]); // ── 15: Pharmacotherapy — Second Line & Augmentation n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · PHARMACOTHERAPY", "Second-Line & Augmentation", [ "TCAs (Amitriptyline, Imipramine) — effective; narrow TI, cardiac risk", "MAOIs (Phenelzine) — atypical/refractory; tyramine diet required", "Augmentation: Lithium, Atypical antipsychotics (Aripiprazole, Quetiapine)", "Thyroid hormone (T3) augmentation — TRD", "Esketamine (Spravato) — FDA-approved TRD; rapid NMDA antagonism", "Duration: 4–9 months after remission; indefinite for ≥3 episodes", ]); // ── 16: Psychotherapy n++; iconCardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · NON-PHARMACOLOGICAL", "Psychotherapy", [ {head:"CBT", pts:["Identifies negative cognitions", "Equal efficacy to pharmacotherapy", "Fewer AEs; better follow-up", "Combination superior to either alone"]}, {head:"IPT", pts:["12–16 weekly sessions", "Focuses on current interpersonal problems", "Most effective sole psychotherapy for severe MDD"]}, {head:"Others", pts:["Behavioural therapy", "Psychodynamic therapy", "Mindfulness-Based CT (MBCT)", "Useful in maintenance/relapse prevention"]}, ]); // ── 17: Somatic Treatments n++; iconCardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · NON-PHARMACOLOGICAL", "Somatic Treatments", [ {head:"ECT", pts:["Most effective for severe MDD", "First-line: psychotic/melancholic/TRD", "3×/week, 6–12 sessions", "Rapid onset; safe"]}, {head:"rTMS", pts:["Non-invasive; FDA-approved TRD", "Prefrontal cortex stimulation", "Daily sessions ×4–6 weeks"]}, {head:"Light Therapy", pts:["First-line for SAD", "10,000 lux; 20–30 min/morning", "Visible benefit in 1–2 weeks"]}, ]); // ── 18: Lifestyle n++; cardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · NON-PHARMACOLOGICAL", "Lifestyle & Adjuncts", [ "Aerobic exercise — RCT evidence for moderate antidepressant effect", "Sleep hygiene — regular schedule; avoid naps and alcohol", "Social support — isolation worsens prognosis significantly", "Stress reduction — mindfulness, relaxation techniques", "Psychoeducation — explain chronic nature, relapse signs, importance of adherence", "Dietary: omega-3 fatty acids show observational benefit", ]); // ── 19: Prognosis — Course n++; splitSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · PROGNOSIS", "Course of Illness", [ "Untreated episode: 6–13 months", "Treated episode: ~3 months", "50% recover within 1 year after first hospitalisation", "25% relapse within 6 months post-discharge", "50–75% relapse within 5 years", "Mean episodes over 20 years: 5–6", "Each episode → more frequent & more severe next episode", ], "SUICIDE\nRISK", "~15%\nlifetime"); // ── 20: Prognostic Factors n++; iconCardSlide("0D1F3C", C.mdd1, C.mddHL, n, "MDD · PROGNOSIS", "Prognostic Factors", [ {head:"Good Prognosis", pts:["Mild severity", "No psychotic features", "Good premorbid function", "Strong social support", "Single episode", "Older age at onset"]}, {head:"Poor Prognosis", pts:["Psychotic features", "Multiple prior episodes", "Comorbid substance use", "Early onset", "Positive family history", "Melancholic features"]}, {head:"Key Stats", pts:["~25% never fully remit", "15% suicide risk (severe MDD)", "Youth MDD → BD in 20–40%", "Prophylaxis significantly ↓ relapse"]}, ]); // ════════════════════════════════════════════════════════════════════════════ // SLIDE 21 — BD SECTION DIVIDER // ════════════════════════════════════════════════════════════════════════════ { n++; const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:"180D3A"}}); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:0.18, h:5.625, fill:{color:C.bd2}}); s.addShape(pres.ShapeType.rect, {x:0, y:4.8, w:10, h:0.1, fill:{color:C.bd1}}); s.addText("PART 02", {x:0.5, y:0.5, w:9, h:0.5, fontSize:12, color:C.bd2, charSpacing:5, bold:true}); s.addText("Bipolar\nDisorder", {x:0.5, y:1.1, w:8, h:3.0, fontSize:52, bold:true, color:C.white, fontFace:"Calibri Light"}); s.addText("Introduction • Clinical Features • DSM-5-TR • Management • Prognosis", {x:0.5, y:4.25, w:9, h:0.45, fontSize:12, color:C.bdHL, italic:true}); } // BD SLIDES // ── 22: Definition & Types n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · INTRODUCTION", "Definition & Types", [ "Bipolar I: ≥1 full Manic Episode (depression common but not required)", "Bipolar II: Hypomanic episode + ≥1 MDE; never a full manic episode", "Cyclothymia: hypomanic + subsyndromal depressive sx for ≥2 years", "Characterised by episodic mood disturbance — manic, depressive, mixed", "Chronic, lifelong illness requiring long-term mood stabilisation", ]); // ── 23: Epidemiology — Prevalence n++; splitSlide("180D3A", C.bd1, C.bdHL, n, "BD · EPIDEMIOLOGY", "Global Prevalence", [ "Bipolar I: ~1% lifetime prevalence", "Bipolar II: ~0.5–1%", "Bipolar spectrum (incl. cyclothymia): ~3–6%", "Bipolar I: equal in males and females", "Bipolar II & rapid cycling: more common in women", "Cyclothymia: ~1% lifetime prevalence", ], "LIFETIME\nPREVALENCE\n(BD I)", "~1%"); // ── 24: Epidemiology — Demographics n++; iconCardSlide("180D3A", C.bd1, C.bdHL, n, "BD · EPIDEMIOLOGY", "Demographics & Risk Factors", [ {head:"Age of Onset", pts:["BD I mean onset: ~30 years", "Range: childhood to >50 years", "Earlier than MDD onset", "Earlier onset = worse prognosis"]}, {head:"Genetics", pts:["First-degree relatives: 8–10× risk", "MZ twin concordance: 40–70%", "Strong polygenic heritability", "No single causative gene"]}, {head:"Risk Factors", pts:["Family history (strongest)", "Stressful life events", "Substance use (trigger)", "Sleep disruption (trigger)", "Postpartum period"]}, ]); // ── 25: Aetiology n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · AETIOLOGY", "Aetiology", [ "Genetic: strongest psychiatric genetic link; polygenic", "Neurobiological: dysregulated dopamine, serotonin, glutamate systems", "Kindling model: each episode lowers threshold for the next (neuroprogression)", "Immune: elevated CRP, IL-6, TNF; persists through euthymia", "Circadian rhythm disruption: irregular sleep is a major episode trigger", "HPA axis: hypercortisolaemia; structural brain changes with progression", ]); // ── 26: Clinical Features — Manic Episode n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · CLINICAL FEATURES", "Manic Episode (DIG FAST)", [ "D — Distractibility", "I — Impulsivity / risky pleasurable activities", "G — Grandiosity / inflated self-esteem", "F — Flight of ideas / racing thoughts", "A — Activity ↑ (goal-directed) or psychomotor agitation", "S — Sleep decreased (feels rested after ~3 hours)", "T — Talkativeness / pressured speech", "+ Elevated, expansive or irritable mood + ↑ energy ≥1 week", "Severe: may include psychotic features (mood-congruent or incongruent)", ]); // ── 27: Hypomania n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · CLINICAL FEATURES", "Hypomanic Episode", [ "Same symptom profile as mania — BUT less severe", "Duration: ≥4 consecutive days (vs ≥7 for mania)", "No marked impairment; no psychosis; no hospitalisation required", "Unequivocal change in function observable by others", "Distinguishes Bipolar II from MDD", "Patients often enjoy hypomanic episodes → underreported", "Hypersomnia during depression is a clinical clue for BD II", ]); // ── 28: Bipolar Depression & Mixed Features n++; iconCardSlide("180D3A", C.bd1, C.bdHL, n, "BD · CLINICAL FEATURES", "Depression, Mixed States & Rapid Cycling", [ {head:"Bipolar Depression", pts:["Symptoms same as MDD", "History of mania/hypomania differentiates", "Hypersomnia common (vs insomnia in MDD)", "Often longer duration than mania"]}, {head:"Mixed Features", pts:["Simultaneous manic + depressive sx", "Highest suicide risk state", "Agitation, dysphoria, suicidality", "Common in women"]}, {head:"Rapid Cycling", pts:["≥4 mood episodes per year", "More common in women", "Associated with antidepressant use", "Poorer lithium response"]}, ]); // ── 29: DSM-5-TR — Manic Episode Criteria n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · DSM-5-TR", "Manic Episode — Criteria A & B", [ "A. Distinct period of abnormally elevated/expansive/irritable mood + ↑ energy, ≥1 week", "B. ≥3 symptoms (≥4 if mood is only irritable):", " 1. Grandiosity / inflated self-esteem", " 2. Decreased need for sleep", " 3. More talkative / pressured speech", " 4. Flight of ideas / racing thoughts", " 5. Distractibility", " 6. ↑ goal-directed activity or psychomotor agitation", " 7. Risky pleasurable activities (spending, sexual indiscretion)", ]); // ── 30: DSM-5-TR — Criteria C–D & BD II n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · DSM-5-TR", "Criteria C–D; Bipolar II", [ "C. Marked functional impairment OR requires hospitalisation OR psychotic features", "D. Not due to substances or a medical condition", "─────────────────────────────────────────", "Bipolar II Diagnosis Requires:", " • ≥1 Hypomanic episode (≥4 days; Criterion B met)", " • ≥1 Major Depressive Episode", " • NO full manic episode ever", "─────────────────────────────────────────", "Key Specifiers: Mixed features | Rapid cycling | Peripartum | Seasonal | Psychotic | Anxious distress", ]); // ── 31: Management Framework n++; timelineSlide("180D3A", C.bd1, C.bdHL, n, "BD · MANAGEMENT", "Treatment Framework", [ {label:"Acute Mania", desc:"Mood stabiliser ± Atypical AP"}, {label:"Acute\nDepression", desc:"Quetiapine, Lamotrigine, OFC"}, {label:"Maintenance", desc:"Lithium / Valproate + AP adjunct"}, {label:"Psychotherapy", desc:"Psychoeducation, CBT, IPSRT, FFT"}, {label:"Monitor", desc:"Levels, renal, thyroid, CBC"}, {label:"Prevent", desc:"Sleep, avoid triggers & alcohol"}, ]); // ── 32: Mood Stabilisers n++; cardSlide("180D3A", C.bd1, C.bdHL, n, "BD · PHARMACOTHERAPY", "Mood Stabilisers", [ "Lithium — gold standard; antimanic + antidepressant + antisuicidal", " Therapeutic level: 0.8–1.2 mEq/L (acute); 0.6–0.8 (maintenance)", " Monitor: renal function + thyroid every 6–12 months", "Valproate — first-line; dysphoric/mixed mania, rapid cycling", " Monitor: LFTs and CBC; teratogenic (spina bifida)", "Lamotrigine — best for bipolar depression and maintenance", " Titrate slowly; risk of Stevens-Johnson syndrome", "Carbamazepine — lithium-non-responsive cases; dysphoric mania", " Monitor: CBC at 3, 6, 9, 12 months (aplastic anaemia risk)", ]); // ── 33: Atypical Antipsychotics n++; iconCardSlide("180D3A", C.bd1, C.bdHL, n, "BD · PHARMACOTHERAPY", "Atypical Antipsychotics (FDA-Approved)", [ {head:"Acute Mania", pts:["Olanzapine", "Risperidone", "Quetiapine", "Aripiprazole", "Ziprasidone", "Asenapine"]}, {head:"Bipolar Depression", pts:["Quetiapine (monotherapy)", "Olanzapine-Fluoxetine (OFC)", "Lurasidone (+ mood stabiliser)", "Cariprazine"]}, {head:"Maintenance", pts:["Aripiprazole", "Quetiapine", "Olanzapine", "Used as adjuncts to mood stabiliser"]}, ]); // ── 34: Non-Pharmacological n++; iconCardSlide("180D3A", C.bd1, C.bdHL, n, "BD · NON-PHARMACOLOGICAL", "Psychotherapy & Somatic", [ {head:"Psychoeducation", pts:["Cornerstone of non-pharma care", "Improves adherence & relapse recognition", "Reduces hospitalisation rates"]}, {head:"CBT / IPSRT / FFT", pts:["CBT: relapse prevention, cognition", "IPSRT: regulates circadian rhythms", "FFT: family psychoeducation", "Reduces expressed emotion"]}, {head:"Somatic Rx", pts:["ECT: severe/refractory mania or depression", "TMS: adjunct in bipolar depression", "Sleep hygiene: critical trigger prevention", "Avoid alcohol & substances"]}, ]); // ── 35: Prognosis n++; splitSlide("180D3A", C.bd1, C.bdHL, n, "BD · PROGNOSIS", "Course & Prognosis", [ "Chronic, lifelong; neuroprogressive if untreated", "Each episode ↑ frequency and severity of subsequent episodes", "Cognitive decline with repeated episodes", "Functional impairment in ~30–40% even during euthymia", "Lithium reduces suicide risk independently of mood stabilisation", "Antidepressant monotherapy worsens long-term course", "Cyclothymia: 15–20% risk of converting to full BD", ], "SUICIDE\nRISK", "15–20%\nlifetime"); // ── 36: BD Prognostic Factors n++; iconCardSlide("180D3A", C.bd1, C.bdHL, n, "BD · PROGNOSIS", "Prognostic Factors", [ {head:"Good Prognosis", pts:["Older age at onset", "No rapid cycling", "Good medication adherence", "Strong social support", "Long euthymic intervals"]}, {head:"Poor Prognosis", pts:["Early onset", "Rapid cycling (≥4 eps/yr)", "Mixed features", "Comorbid substance use", "Multiple prior episodes", "Psychotic features"]}, {head:"Key Stats", pts:["15–20% lifetime suicide risk", "Youth MDD → BD: 20–40%", "Prepubertal MDD: high BD risk", "Rapid cycling: poor Li response"]}, ]); // ════════════════════════════════════════════════════════════════════════════ // SLIDE 37 — COMPARISON SLIDE // ════════════════════════════════════════════════════════════════════════════ { n++; const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.bg}}); s.addText("MDD vs. Bipolar Disorder — At a Glance", {x:0.5, y:0.15, w:9, h:0.65, fontSize:20, bold:true, color:C.white, fontFace:"Calibri", align:"center"}); s.addShape(pres.ShapeType.line, {x:0.5, y:0.82, w:9, h:0, line:{color:C.dim, width:1}}); const rows = [ ["Feature", "MDD", "Bipolar Disorder"], ["Defining feature", "Major depressive episode", "Manic/hypomanic episode"], ["Manic episodes", "Never", "Required (BD I) / hypomania (BD II)"], ["Sex predominance", "Female > Male", "Equal (BD I); F > M (BD II)"], ["1st-line drug", "SSRI / SNRI", "Mood stabiliser ± atypical AP"], ["Antidepressant alone", "Safe & effective", "Can trigger mania — avoid"], ["Suicide risk", "~15% lifetime", "15–20% lifetime"], ["ECT use", "Severe/psychotic/TRD", "Severe mania or refractory BD"], ["Prognosis", "Good with Rx; chronic", "Chronic; neuroprogressive"], ]; rows.forEach((row, i) => { const Y = 0.9 + i * 0.52; const isHeader = i === 0; // feature col s.addShape(pres.ShapeType.rect, {x:0.2, y:Y, w:2.6, h:0.5, fill:{color: isHeader ? C.dim : (i%2===0?"1A2740":"111827")}}); s.addText(row[0], {x:0.25, y:Y, w:2.5, h:0.5, fontSize:11.5, bold:isHeader, color: isHeader ? C.white : C.silver, valign:"middle", fontFace:"Calibri", margin:[0,4,0,4]}); // MDD col s.addShape(pres.ShapeType.rect, {x:2.9, y:Y, w:3.2, h:0.5, fill:{color: isHeader ? C.mdd1 : (i%2===0?"0D1F3C":"111D30")}}); s.addText(row[1], {x:2.95, y:Y, w:3.1, h:0.5, fontSize:11.5, bold:isHeader, color: isHeader ? C.white : C.mddHL, valign:"middle", fontFace:"Calibri", margin:[0,4,0,4]}); // BD col s.addShape(pres.ShapeType.rect, {x:6.2, y:Y, w:3.6, h:0.5, fill:{color: isHeader ? C.bd1 : (i%2===0?"180D3A":"1C0F38")}}); s.addText(row[2], {x:6.25, y:Y, w:3.5, h:0.5, fontSize:11.5, bold:isHeader, color: isHeader ? C.white : C.bdHL, valign:"middle", fontFace:"Calibri", margin:[0,4,0,4]}); }); } // ════════════════════════════════════════════════════════════════════════════ // SLIDE 38 — THANK YOU / REFERENCES // ════════════════════════════════════════════════════════════════════════════ { n++; const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:10, h:5.625, fill:{color:C.bg}}); s.addShape(pres.ShapeType.rect, {x:0, y:0, w:5, h:5.625, fill:{color:"0D1F3C"}}); s.addShape(pres.ShapeType.rect, {x:5, y:0, w:5, h:5.625, fill:{color:"180D3A"}}); s.addShape(pres.ShapeType.rect, {x:4.82, y:0, w:0.36, h:5.625, fill:{color:C.bg}}); s.addShape(pres.ShapeType.rect, {x:0, y:5.1, w:4.82, h:0.1, fill:{color:C.mdd2}}); s.addShape(pres.ShapeType.rect, {x:5.18, y:5.1, w:4.82, h:0.1, fill:{color:C.bd2}}); s.addText("Thank You", {x:0.5, y:1.4, w:9, h:1.1, fontSize:48, bold:true, color:C.white, fontFace:"Calibri Light", align:"center"}); s.addText("Questions & Discussion", {x:0.5, y:2.6, w:9, h:0.55, fontSize:16, color:C.dim, align:"center", italic:true}); s.addShape(pres.ShapeType.line, {x:2, y:3.4, w:6, h:0, line:{color:C.dim, width:1}}); s.addText("References", {x:0.5, y:3.55, w:9, h:0.4, fontSize:12, bold:true, color:C.silver, align:"center"}); s.addText([ {text:"1. Sadock BJ, Sadock VA, Ruiz P. ", options:{color:C.silver}}, {text:"Kaplan & Sadock's Synopsis of Psychiatry, 12th Ed.", options:{italic:true, color:C.silver}}, {text:" Wolters Kluwer; 2021.\n", options:{color:C.silver}}, {text:"2. American Psychiatric Association. ", options:{color:C.silver}}, {text:"DSM-5-TR.", options:{italic:true, color:C.silver}}, {text:" APA; 2022.", options:{color:C.silver}}, ], {x:1.5, y:4.0, w:7, h:1.0, fontSize:11, fontFace:"Calibri", align:"center"}); } console.log(`Total slides built: ${n}`); pres.writeFile({fileName:"/home/daytona/workspace/mood-disorders-pptx/MoodDisorders_v2.pptx"}) .then(() => console.log("DONE")) .catch(e => {console.error(e); process.exit(1);}); JSEOF echo "written"
cd /home/daytona/workspace/mood-disorders-pptx && node build2.js 2>&1
ls -lh /home/daytona/workspace/mood-disorders-pptx/MoodDisorders_v2.pptx
MoodDisorders v2
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Master title |
| 2 | MDD section divider |
| 3–20 | MDD: Definition, Epidemiology ×2, Aetiology, Clinical Features ×4, DSM-5-TR ×2, Management timeline, Pharmacotherapy ×2, Psychotherapy, Somatic Rx, Lifestyle, Prognosis ×2 |
| 21 | BD section divider |
| 22–36 | BD: Definition, Epidemiology ×2, Aetiology, Clinical Features ×3, DSM-5-TR ×2, Management timeline, Pharmacotherapy ×2, Non-pharmacological, Prognosis ×2 |
| 37 | MDD vs BD comparison table |
| 38 | Thank You + References |
Where's my ppt