Major depressive disorder: * Introduction * Epidemiology * Clinical features * DSM criterion * Management (pharmacological and non pharmacological) * Prognosis Bipolar disorder: * Introduction * Epidemiology * Clinical features * DSM criterion * Management (pharmacological and non pharmacological) * Prognosis
| Common | Occasionally Present |
|---|---|
| Fatigue, low energy | Decreased libido |
| Insomnia (especially early morning awakening) | Psychomotor retardation or agitation |
| Poor appetite and weight loss | Constipation |
| Inattention/concentration difficulty | Diurnal variation (worse in the AM) |
| Class | Agents | Notes |
|---|---|---|
| SSRIs | Fluoxetine, Sertraline, Escitalopram, Paroxetine, Citalopram | First choice; well-tolerated; safest in overdose |
| SNRIs | Venlafaxine, Duloxetine, Desvenlafaxine | Useful if anxiety or pain comorbidity |
| NDRIs | Bupropion | No sexual side effects; avoid in seizure history |
| TCAs | Amitriptyline, Imipramine, Nortriptyline | Effective but narrow therapeutic index; dangerous in overdose |
| MAOIs | Phenelzine, Tranylcypromine | Reserved for atypical/treatment-resistant; dietary tyramine restrictions |
| Drug | Key Uses | Notes |
|---|---|---|
| Lithium | Acute mania, maintenance, bipolar depression, suicide prevention | Gold standard; narrow therapeutic index (0.6-1.2 mEq/L); monitor renal/thyroid; superior for classic euphoric mania |
| Valproate (Divalproex) | Acute mania (especially mixed/rapid cycling), maintenance | Faster onset than lithium; better for dysphoric mania; teratogenic (neural tube defects) |
| Carbamazepine | Acute mania, prophylaxis (especially dysphoric mania, rapid cycling) | Autoinduction; blood dyscrasias risk (aplastic anemia 1:125,000); drug interactions; useful when lithium fails |
| Lamotrigine | Bipolar depression prevention, maintenance (BP-II especially) | Slow titration required to avoid Stevens-Johnson syndrome; less effective for acute mania |
Key Distinction: MDD and Bipolar Disorder share depressive episodes that are clinically indistinguishable at presentation. Distinguishing features pointing toward Bipolar Disorder include: personal or family history of mania/hypomania, early age of onset, multiple brief depressive episodes, psychomotor retardation, hypersomnia/hyperphagia, psychotic features in depression, and poor or paradoxical response to antidepressants (mood switching or increased cycling). This distinction is clinically critical as antidepressant monotherapy can destabilize bipolar disorder.
Cut short the contents and make a ppt for presentation
mkdir -p /tmp/workspace/mood-disorders-ppt && ls /tmp/workspace/
~/mood-disorders-ppt/build_ppt.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
# ── Color Palette ────────────────────────────────────────────────
MDD_DARK = RGBColor(0x1A, 0x3A, 0x5C) # deep navy (MDD header)
MDD_MED = RGBColor(0x26, 0x6B, 0xA1) # medium blue
MDD_LIGHT = RGBColor(0xD6, 0xE8, 0xF7) # pale blue (MDD accent)
BD_DARK = RGBColor(0x4A, 0x1A, 0x6B) # deep purple (BD header)
BD_MED = RGBColor(0x7B, 0x3F, 0xBF) # medium purple
BD_LIGHT = RGBColor(0xE8, 0xD6, 0xF7) # pale purple (BD accent)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT = RGBColor(0x1E, 0x1E, 0x2E)
GRAY_BG = RGBColor(0xF4, 0xF6, 0xF9)
ACCENT_RED = RGBColor(0xC0, 0x39, 0x2B)
GOLD = RGBColor(0xE6, 0xAC, 0x00)
blank = prs.slide_layouts[6]
# ────────────────────────────────────────────────────────────────
# HELPERS
# ────────────────────────────────────────────────────────────────
def bg(slide, color):
"""Solid background rectangle covering the whole slide."""
shape = slide.shapes.add_shape(1, 0, 0,
prs.slide_width, prs.slide_height)
shape.fill.solid()
shape.fill.fore_color.rgb = color
shape.line.fill.background()
def rect(slide, x, y, w, h, fill, line_color=None, line_w=None):
shape = slide.shapes.add_shape(1,
Inches(x), Inches(y), Inches(w), Inches(h))
shape.fill.solid()
shape.fill.fore_color.rgb = fill
if line_color:
shape.line.color.rgb = line_color
shape.line.width = Pt(line_w or 1)
else:
shape.line.fill.background()
return shape
def textbox(slide, x, y, w, h, text, size, bold=False, color=DARK_TEXT,
align=PP_ALIGN.LEFT, wrap=True, italic=False, font="Calibri"):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.margin_left = 0; tf.margin_right = 0
tf.margin_top = Pt(2); tf.margin_bottom = 0
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = font
run.font.size = Pt(size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
return tf
def add_bullets(slide, x, y, w, h, items, size=13, color=DARK_TEXT,
bold_first=False, indent=False, font="Calibri", line_space=None):
"""Add a text box with bullet items (using dash prefix)."""
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Inches(0.05)
tf.margin_right = 0
tf.margin_top = Pt(2)
tf.margin_bottom = 0
first = True
for item in items:
if first:
p = tf.paragraphs[0]
first = False
else:
p = tf.add_paragraph()
if line_space:
from pptx.oxml.ns import qn
from lxml import etree
pPr = p._p.get_or_add_pPr()
lnSpc = etree.SubElement(pPr, qn('a:lnSpc'))
spcPct = etree.SubElement(lnSpc, qn('a:spcPct'))
spcPct.set('val', str(int(line_space * 1000)))
r = p.add_run()
prefix = " " if indent else ""
r.text = prefix + ("• " if not indent else " - ") + item
r.font.name = font
r.font.size = Pt(size)
r.font.bold = bold_first and (item == items[0])
r.font.color.rgb = color
return tf
def section_header(slide, title, subtitle, dark, med, light):
"""Full-width colored header bar with section title."""
bg(slide, GRAY_BG)
# big color bar left
rect(slide, 0, 0, 4.8, 7.5, dark)
# right panel light
rect(slide, 4.8, 0, 8.533, 7.5, GRAY_BG)
# accent stripe
rect(slide, 4.78, 0, 0.05, 7.5, med)
# title on left
textbox(slide, 0.4, 2.5, 4.0, 2.5, title, 40, bold=True,
color=WHITE, align=PP_ALIGN.LEFT, font="Calibri")
textbox(slide, 0.4, 4.8, 4.0, 0.8, subtitle, 16,
color=light, align=PP_ALIGN.LEFT, font="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 1 – COVER
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, DARK_TEXT)
# left panel MDD blue
rect(slide, 0, 0, 6.667, 7.5, MDD_DARK)
# right panel BD purple
rect(slide, 6.667, 0, 6.666, 7.5, BD_DARK)
# center divider accent
rect(slide, 6.5, 1.0, 0.15, 5.5, GOLD)
# Title
textbox(slide, 0.5, 1.5, 6.0, 1.5, "MOOD DISORDERS", 44, bold=True,
color=WHITE, align=PP_ALIGN.LEFT, font="Calibri")
textbox(slide, 0.5, 3.2, 5.8, 1.2,
"Major Depressive Disorder", 24, color=MDD_LIGHT, font="Calibri")
textbox(slide, 0.5, 4.0, 5.8, 1.2,
"Bipolar Disorder", 24, color=BD_LIGHT, font="Calibri")
textbox(slide, 7.0, 1.5, 5.8, 1.0,
"A Comparative Overview", 20, italic=True, color=WHITE, font="Calibri")
textbox(slide, 7.0, 5.8, 5.8, 0.7,
"Psychiatry — Clinical Presentation", 14,
color=RGBColor(0xAA, 0xAA, 0xCC), font="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 2 – MDD Section Header
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
section_header(slide, "Major\nDepressive\nDisorder", "DSM-5 | Epidemiology | Management | Prognosis",
MDD_DARK, MDD_MED, MDD_LIGHT)
textbox(slide, 5.1, 2.8, 7.5, 0.8,
"Part 1 of 2", 18, italic=True, color=MDD_MED, font="Calibri")
textbox(slide, 5.1, 3.6, 7.5, 2.5,
"A primary mood disorder defined by persistent\ndepressive episodes causing significant impairment\nin daily functioning.", 15,
color=DARK_TEXT, font="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 3 – MDD Introduction & Epidemiology
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, MDD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, MDD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "MDD — Introduction & Epidemiology",
22, bold=True, color=WHITE, font="Calibri")
# LEFT column – Intro
rect(slide, 0.3, 0.95, 6.1, 6.3, WHITE)
textbox(slide, 0.5, 1.0, 5.8, 0.5, "Introduction", 16, bold=True, color=MDD_DARK, font="Calibri")
intro_pts = [
"Primary mood disorder with ≥1 major depressive episode",
"Episodes last ≥ 2 weeks with significant functional impairment",
"Involves monoamine dysregulation (5-HT, NE, DA)",
"HPA axis dysfunction & reduced BDNF/hippocampal atrophy",
"Distinct from normal sadness — patients feel genuinely ill",
"Must rule out bipolar disorder, dysthymia, medical causes",
]
add_bullets(slide, 0.5, 1.55, 5.7, 5.5, intro_pts, size=12.5, color=DARK_TEXT)
# RIGHT column – Epidemiology
rect(slide, 6.8, 0.95, 6.2, 6.3, WHITE)
textbox(slide, 7.0, 1.0, 5.8, 0.5, "Epidemiology", 16, bold=True, color=MDD_DARK, font="Calibri")
epi_pts = [
"Lifetime prevalence: ~13–15% (high-income countries)",
"12-month prevalence: ~5–6% globally",
"2–3× more common in females (onset at puberty)",
"Mean age of onset: mid-20s; can occur at any age",
"More common in divorced, widowed, unemployed",
"Highly comorbid with anxiety & substance use disorders",
"MDD found in 10–15% of cancer patients",
"Recurrence: 20–60% within 2 yrs; 70% by 5 yrs",
]
add_bullets(slide, 7.0, 1.55, 5.8, 5.5, epi_pts, size=12.5, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 4 – MDD Clinical Features
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, MDD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, MDD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "MDD — Clinical Features",
22, bold=True, color=WHITE, font="Calibri")
# 3 columns
cols = [
("Mood & Affect", [
"Persistent sadness / emptiness",
"Dysphoria or anhedonia (core features)",
"Emotional blunting / numbness",
"Anxiety (majority of patients)",
"Irritability (esp. in children)",
"Hopelessness & helplessness",
], 0.3),
("Cognitive Symptoms", [
"Negative views of self, world, future",
"Ruminations on guilt, death, loss",
"Difficulty concentrating",
"Slowed thinking / poverty of thought",
"Suicidal ideation (passive or active)",
"Delusions (psychotic depression ~10%)",
], 4.6),
("Neurovegetative Sx", [
"Insomnia / early morning awakening",
"Fatigue and low energy",
"Poor appetite → weight loss",
"Psychomotor retardation or agitation",
"Decreased libido",
"Diurnal variation (worse in AM)",
], 8.9),
]
for title, pts, x in cols:
rect(slide, x, 0.9, 3.9, 6.3, WHITE)
textbox(slide, x+0.15, 0.95, 3.7, 0.5, title, 14, bold=True, color=MDD_DARK, font="Calibri")
add_bullets(slide, x+0.15, 1.5, 3.6, 5.6, pts, size=12, color=DARK_TEXT)
# bottom note
rect(slide, 0.3, 7.1, 12.7, 0.3, MDD_LIGHT)
textbox(slide, 0.5, 7.1, 12.3, 0.3,
"Atypical: hypersomnia, hyperphagia, leaden paralysis | Melancholic: severe anhedonia, early AM awakening, worse in AM | Psychotic: mood-congruent delusions/hallucinations",
9.5, color=MDD_DARK, font="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 5 – MDD DSM-5 Criteria
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, MDD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, MDD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "MDD — DSM-5 Diagnostic Criteria",
22, bold=True, color=WHITE, font="Calibri")
rect(slide, 0.3, 0.85, 8.0, 6.4, WHITE)
textbox(slide, 0.5, 0.9, 7.6, 0.45,
"Criterion A — ≥5 symptoms in same 2-week period; must include (1) or (2):",
13, bold=True, color=MDD_DARK, font="Calibri")
criteria = [
"(1) Depressed mood most of the day, nearly every day",
"(2) Markedly diminished interest/pleasure (anhedonia)",
"(3) Significant weight loss/gain (>5%/month) or appetite change",
"(4) Insomnia or hypersomnia",
"(5) Psychomotor agitation or retardation (observable)",
"(6) Fatigue or loss of energy",
"(7) Feelings of worthlessness or excessive guilt",
"(8) Diminished concentration or indecisiveness",
"(9) Recurrent thoughts of death / suicidal ideation",
]
add_bullets(slide, 0.5, 1.4, 7.6, 5.2, criteria, size=12.5, color=DARK_TEXT)
# Right panel – B/C/D/E + Specifiers
rect(slide, 8.7, 0.85, 4.3, 3.0, WHITE)
textbox(slide, 8.85, 0.9, 4.1, 0.45, "Further Criteria", 13, bold=True, color=MDD_DARK, font="Calibri")
others = [
"B: Significant distress or impairment",
"C: Not due to substance or medical condition",
"D: Not better explained by psychosis",
"E: No prior manic/hypomanic episode",
]
add_bullets(slide, 8.85, 1.4, 4.1, 2.3, others, size=12, color=DARK_TEXT)
rect(slide, 8.7, 4.0, 4.3, 3.25, WHITE)
textbox(slide, 8.85, 4.05, 4.1, 0.45, "Key Specifiers", 13, bold=True, color=MDD_DARK, font="Calibri")
specs = [
"With anxious distress",
"With melancholic features",
"With atypical features",
"With psychotic features",
"With peripartum onset",
"With seasonal pattern (SAD)",
"Severity: Mild / Moderate / Severe",
]
add_bullets(slide, 8.85, 4.55, 4.1, 2.6, specs, size=11.5, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 6 – MDD Management
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, MDD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, MDD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "MDD — Management",
22, bold=True, color=WHITE, font="Calibri")
# Pharmacological
rect(slide, 0.3, 0.85, 6.5, 6.4, WHITE)
textbox(slide, 0.5, 0.9, 6.1, 0.45, "Pharmacological", 15, bold=True, color=MDD_DARK, font="Calibri")
pharma = [
"SSRIs — 1st line: Fluoxetine, Sertraline, Escitalopram",
"SNRIs — Venlafaxine, Duloxetine (pain/anxiety comorbidity)",
"NDRIs — Bupropion (no sexual SE; avoid in seizures)",
"TCAs — Amitriptyline (effective; dangerous in OD)",
"MAOIs — Reserved for atypical/treatment-resistant MDD",
"Onset: 10–20 days; full response: 4–6 weeks",
"Continue 6–12 months after remission",
"3+ episodes → consider indefinite maintenance",
"Augmentation: Lithium / atypical antipsychotic / T3",
"Psychotic MDD: Antidepressant + antipsychotic or ECT",
"Novel: Esketamine (intranasal) for treatment-resistant MDD",
]
add_bullets(slide, 0.5, 1.4, 6.1, 5.7, pharma, size=12, color=DARK_TEXT)
# Non-Pharmacological
rect(slide, 7.1, 0.85, 5.9, 6.4, WHITE)
textbox(slide, 7.3, 0.9, 5.5, 0.45, "Non-Pharmacological", 15, bold=True, color=MDD_DARK, font="Calibri")
non_pharma = [
"CBT — Most evidence-based psychotherapy",
"IPT — Targets grief, role disputes, interpersonal issues",
"ECT — Severe / psychotic / treatment-resistant MDD",
"TMS — FDA-approved for treatment-resistant MDD",
"Light therapy — 10,000 lux daily for SAD",
"Exercise — 30+ min aerobic, 3–5×/week",
"Psychoeducation for patient and family",
"Sleep hygiene",
"Omega-3 fatty acids (adjunctive benefit)",
"Paeds guideline (AACAP): Mild → psychoeducation;",
" Moderate → CBT/IPT alone; Severe → Fluoxetine + CBT",
]
add_bullets(slide, 7.3, 1.4, 5.5, 5.7, non_pharma, size=12, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 7 – MDD Prognosis
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, MDD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, MDD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "MDD — Prognosis",
22, bold=True, color=WHITE, font="Calibri")
rect(slide, 0.3, 0.85, 5.8, 6.35, WHITE)
textbox(slide, 0.5, 0.9, 5.5, 0.45, "Course & Outcomes", 15, bold=True, color=MDD_DARK, font="Calibri")
prognosis = [
"~90% recover from 1st episode within 1–2 years",
"Mean untreated episode: 8–12 months",
"Recurrence: 20–60% in 2 yrs; 70% by 5 yrs",
"After 3rd episode: recurrence risk approaches 90%",
"~15% develop chronic depression (>2 years)",
"Suicide: ~15% with severe, chronic MDD",
"Adolescent suicide: MDD accounts for ~12% of deaths",
"20–40% of depressed youth → bipolar disorder",
]
add_bullets(slide, 0.5, 1.4, 5.5, 5.6, prognosis, size=12.5, color=DARK_TEXT)
rect(slide, 6.5, 0.85, 3.1, 6.35, WHITE)
textbox(slide, 6.65, 0.9, 2.9, 0.45, "Poor Prognosis", 14, bold=True, color=ACCENT_RED, font="Calibri")
poor = [
"Early age of onset",
"Multiple prior episodes",
"Psychotic features",
"Comorbid illness",
"Poor social support",
"Ongoing stressors",
"Non-adherence",
]
add_bullets(slide, 6.65, 1.4, 2.9, 5.5, poor, size=12.5, color=DARK_TEXT)
rect(slide, 9.9, 0.85, 3.1, 6.35, WHITE)
textbox(slide, 10.05, 0.9, 2.9, 0.45, "Good Prognosis", 14, bold=True, color=RGBColor(0x1A, 0x7A, 0x3C), font="Calibri")
good = [
"Prompt treatment",
"Strong social support",
"Acute onset",
"No comorbidity",
"Good medication response",
"Absence of psychosis",
"Family support",
]
add_bullets(slide, 10.05, 1.4, 2.9, 5.5, good, size=12.5, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 8 – BD Section Header
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
section_header(slide, "Bipolar\nDisorder", "DSM-5 | Epidemiology | Management | Prognosis",
BD_DARK, BD_MED, BD_LIGHT)
textbox(slide, 5.1, 2.8, 7.5, 0.8,
"Part 2 of 2", 18, italic=True, color=BD_MED, font="Calibri")
textbox(slide, 5.1, 3.6, 7.5, 2.5,
"A chronic, episodic mood disorder defined by\nmanic, hypomanic, and/or depressive episodes\nwith profound impact on functioning.", 15,
color=DARK_TEXT, font="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 9 – BD Introduction & Epidemiology
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, BD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, BD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "Bipolar Disorder — Introduction & Epidemiology",
22, bold=True, color=WHITE, font="Calibri")
rect(slide, 0.3, 0.85, 6.1, 6.35, WHITE)
textbox(slide, 0.5, 0.9, 5.8, 0.45, "Introduction & Subtypes", 15, bold=True, color=BD_DARK, font="Calibri")
intro = [
"Bipolar I (BP-I): ≥1 manic episode (most severe)",
"Bipolar II (BP-II): Hypomanic + major depressive episodes",
"Cyclothymic Disorder: Subthreshold hypo/depressive symptoms",
"Bipolar Spectrum: Broader subthreshold presentations",
"Highly heritable (70–80%) — major genetic component",
"Pathophysiology: Immune dysregulation (TNF, IL-6, CRP)",
"Mitochondrial dysfunction & oxidative stress",
"Circadian rhythm disruption is central",
"Kindling model: each episode worsens prognosis",
]
add_bullets(slide, 0.5, 1.4, 5.7, 5.6, intro, size=12.5, color=DARK_TEXT)
rect(slide, 6.8, 0.85, 6.2, 6.35, WHITE)
textbox(slide, 7.0, 0.9, 5.8, 0.45, "Epidemiology", 15, bold=True, color=BD_DARK, font="Calibri")
epi = [
"BP-I lifetime prevalence: ~1% worldwide (up to 3.3%)",
"BP-II lifetime prevalence: ~0.5–1.1%",
"Bipolar spectrum: ~2.4% (cross-national WMH)",
"Annual incidence: <1%; varies 0.3–1.2% by country",
"Sex: Equal in BP-I; women have more depressive & mixed episodes",
"Rapid cycling more common in women",
"Age of onset: childhood to age 50; mean ~30 yrs",
"Earlier onset than MDD",
"1st-degree relatives: ~10-fold increased risk",
"MZ twin concordance: 65–100%",
]
add_bullets(slide, 7.0, 1.4, 5.8, 5.6, epi, size=12.5, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 10 – BD Clinical Features
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, BD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, BD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "Bipolar Disorder — Clinical Features",
22, bold=True, color=WHITE, font="Calibri")
# 3 panels
panels = [
("Manic Episode", [
"Elevated, expansive, or irritable mood",
"Inflated self-esteem / grandiosity",
"Decreased need for sleep (3 hrs, feels rested)",
"Pressured speech / more talkative",
"Flight of ideas / racing thoughts",
"Distractibility",
"Increased goal-directed activity",
"Impulsive/reckless behavior (spending, sex)",
"Psychosis in severe mania (delusions/hallucinations)",
], 0.3),
("Depressive Episode in BD", [
"Clinically similar to unipolar MDD",
"More hypersomnia & hyperphagia",
"Psychomotor retardation prominent",
"Higher likelihood of psychotic features",
"Mixed features common (manic + depressive)",
"Often misdiagnosed as unipolar MDD",
"Misdiagnosis delays correct Dx by ~7–10 years",
"",
"Hypomanic: Same as manic but ≥4 days, less impairment, no psychosis, no hospitalization",
], 4.65),
("Subtypes / Specifiers", [
"Mixed features / Dysphoric mania:",
" Simultaneous manic + depressive sx",
" More common in women",
" Higher suicide risk",
" Less responsive to lithium",
"",
"Rapid cycling:",
" ≥4 episodes/year",
" More common in women & BP-II",
" Poorer prognosis",
" Reduced lithium response",
], 8.9),
]
for title, pts, x in panels:
rect(slide, x, 0.9, 3.95, 6.35, WHITE)
textbox(slide, x+0.15, 0.95, 3.7, 0.45, title, 13.5, bold=True, color=BD_DARK, font="Calibri")
add_bullets(slide, x+0.15, 1.45, 3.7, 5.7, pts, size=11.5, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 11 – BD DSM-5 Criteria
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, BD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, BD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "Bipolar Disorder — DSM-5 Diagnostic Criteria",
22, bold=True, color=WHITE, font="Calibri")
# Manic Episode panel
rect(slide, 0.3, 0.85, 6.2, 6.35, WHITE)
textbox(slide, 0.5, 0.9, 5.9, 0.45,
"Manic Episode (required for BP-I)", 14, bold=True, color=BD_DARK, font="Calibri")
manic_crit = [
"A: Abnormally elevated/expansive/irritable mood + increased",
" energy, most of day, nearly every day, ≥1 week",
" (or any duration if hospitalization required)",
"B: ≥3 of the following (≥4 if mood only irritable):",
" 1. Inflated self-esteem / grandiosity",
" 2. Decreased need for sleep",
" 3. More talkative / pressured speech",
" 4. Flight of ideas / racing thoughts",
" 5. Distractibility",
" 6. Increased goal-directed activity / agitation",
" 7. Reckless behavior (spending, sexual, business)",
"C: Marked impairment / hospitalization / psychosis",
"D: Not due to substances or medical condition",
]
add_bullets(slide, 0.5, 1.4, 5.9, 5.6, manic_crit, size=11.5, color=DARK_TEXT)
# Right: Hypomanic + BP-I / BP-II / Cyclothymia
rect(slide, 6.85, 0.85, 6.15, 3.05, WHITE)
textbox(slide, 7.0, 0.9, 5.8, 0.45,
"Hypomanic Episode (BP-II)", 14, bold=True, color=BD_DARK, font="Calibri")
hypo = [
"Same criteria as mania but ≥4 consecutive days",
"No marked impairment; no hospitalization; no psychosis",
]
add_bullets(slide, 7.0, 1.4, 5.8, 1.8, hypo, size=12, color=DARK_TEXT)
rect(slide, 6.85, 4.15, 6.15, 3.05, WHITE)
textbox(slide, 7.0, 4.2, 5.8, 0.45,
"Subtypes & Cyclothymia", 14, bold=True, color=BD_DARK, font="Calibri")
subs = [
"BP-I: ≥1 manic episode (with/without depression)",
"BP-II: ≥1 hypomanic + ≥1 major depressive; NO mania",
"Cyclothymia: ≥2 years of hypo + depressive sx (sub-threshold)",
]
add_bullets(slide, 7.0, 4.7, 5.8, 2.3, subs, size=12, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 12 – BD Management
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, BD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, BD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "Bipolar Disorder — Management",
22, bold=True, color=WHITE, font="Calibri")
rect(slide, 0.3, 0.85, 6.5, 6.35, WHITE)
textbox(slide, 0.5, 0.9, 6.1, 0.45, "Pharmacological", 15, bold=True, color=BD_DARK, font="Calibri")
pharma_bd = [
"MOOD STABILIZERS (backbone):",
" Lithium — gold standard; acute mania + maintenance;",
" anti-suicidal; levels 0.6–1.2 mEq/L",
" Valproate — dysphoric/mixed mania; rapid cycling",
" Carbamazepine — dysphoric mania; when lithium fails",
" Lamotrigine — bipolar depression prevention; slow titration",
"ATYPICAL ANTIPSYCHOTICS:",
" Olanzapine, Quetiapine, Risperidone, Aripiprazole,",
" Lurasidone (BP depression), Cariprazine",
"ACUTE MANIA: Lithium or valproate ± atypical antipsychotic",
"BP DEPRESSION: Quetiapine / Lurasidone / Lamotrigine",
"AVOID antidepressant monotherapy (risk of switching/cycling)",
"RAPID CYCLING: Valproate preferred; rule out hypothyroidism",
"PREGNANCY: Avoid valproate; prefer lamotrigine",
]
add_bullets(slide, 0.5, 1.4, 6.1, 5.6, pharma_bd, size=11.5, color=DARK_TEXT)
rect(slide, 7.1, 0.85, 5.9, 6.35, WHITE)
textbox(slide, 7.3, 0.9, 5.5, 0.45, "Non-Pharmacological", 15, bold=True, color=BD_DARK, font="Calibri")
non_pharma_bd = [
"Psychoeducation — most important; recognize early warning signs",
"CBT for Bipolar — relapse prevention, sleep regulation",
"IPSRT — stabilize circadian rhythms & social routines",
"Family-Focused Therapy (FFT) — reduces expressed emotion",
"DBT — emotional dysregulation, borderline comorbidity",
"ECT — severe/refractory mania; bipolar depression; pregnancy",
"Sleep regulation — maintaining routine prevents episodes",
"Avoid alcohol & stimulants (major episode triggers)",
"Aerobic exercise (adjunctive mood stabilization)",
"Hospitalization for psychosis, agitation, safety risk",
"Psychotherapy as ADJUNCT only — not monotherapy",
]
add_bullets(slide, 7.3, 1.4, 5.5, 5.6, non_pharma_bd, size=12, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 13 – BD Prognosis
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
rect(slide, 0, 0, 13.333, 0.75, BD_DARK)
rect(slide, 0, 0.72, 13.333, 0.05, BD_MED)
textbox(slide, 0.3, 0.1, 12.5, 0.6, "Bipolar Disorder — Prognosis",
22, bold=True, color=WHITE, font="Calibri")
rect(slide, 0.3, 0.85, 5.8, 6.35, WHITE)
textbox(slide, 0.5, 0.9, 5.5, 0.45, "Course & Outcomes", 15, bold=True, color=BD_DARK, font="Calibri")
prognosis_bd = [
"Highly recurrent & chronic: ~60% of time symptomatic",
"Median manic episode: 3–6 months; mixed: ~1 year",
"≥80% achieve recovery (8+ weeks with minimal symptoms)",
"Recurrence: 27–70% at 2–4 year follow-up",
"Kindling: each episode worsens severity & remission",
"Suicide risk: ~15–20× higher than general population",
"Lithium maintenance reduces suicidal risk",
"Significant cognitive/functional impairment even between episodes",
"BP-II: Stable diagnosis; depressive episodes predominate",
]
add_bullets(slide, 0.5, 1.4, 5.5, 5.6, prognosis_bd, size=12.5, color=DARK_TEXT)
rect(slide, 6.5, 0.85, 3.1, 6.35, WHITE)
textbox(slide, 6.65, 0.9, 2.9, 0.45, "Poor Prognosis", 14, bold=True, color=ACCENT_RED, font="Calibri")
poor_bd = [
"Rapid cycling",
"Mixed features",
"Early age of onset",
"Psychotic features",
"Medication non-adherence",
"Comorbid substance abuse",
"Low socioeconomic status",
"Antidepressant without mood stabilizer",
]
add_bullets(slide, 6.65, 1.4, 2.9, 5.6, poor_bd, size=12, color=DARK_TEXT)
rect(slide, 9.9, 0.85, 3.1, 6.35, WHITE)
textbox(slide, 10.05, 0.9, 2.9, 0.45, "Good Prognosis", 14, bold=True, color=RGBColor(0x1A, 0x7A, 0x3C), font="Calibri")
good_bd = [
"Later age of onset",
"Euphoric (classic) mania",
"Lithium treatment",
"Good adherence",
"Psychotherapy involvement",
"Intact family / social support",
"No comorbid substance use",
]
add_bullets(slide, 10.05, 1.4, 2.9, 5.6, good_bd, size=12, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════
# SLIDE 14 – MDD vs BD Comparison
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, GRAY_BG)
# Split header
rect(slide, 0, 0, 6.667, 0.75, MDD_DARK)
rect(slide, 6.667, 0, 6.666, 0.75, BD_DARK)
textbox(slide, 0.3, 0.1, 6.2, 0.6, "MDD vs Bipolar Disorder — Key Comparisons",
22, bold=True, color=WHITE, font="Calibri")
headers = ["Feature", "MDD", "Bipolar Disorder"]
rows = [
["Prevalence", "13–15% lifetime", "~1–3% (spectrum 2.4%)"],
["Sex ratio", "F > M (2–3:1)", "Equal (BP-I); F more depression"],
["Age of onset", "Mid-20s", "Childhood to ~30 yrs (earlier)"],
["Heritability", "30–40%", "70–80%"],
["Core feature", "Depressed mood / anhedonia", "Mania / hypomania required"],
["Suicide risk", "~15% (severe, chronic)", "15–20× general population"],
["1st-line drug", "SSRI", "Lithium / Valproate"],
["Antidepressant use", "Monotherapy OK", "Avoid without mood stabilizer"],
["ECT role", "Severe / psychotic MDD", "Severe / refractory mania"],
["Psychotherapy", "CBT / IPT (standalone OK)", "Adjunct only (IPSRT, FFT, CBT)"],
]
# Draw table
col_widths = [2.8, 4.6, 4.6]
col_x = [0.25, 3.25, 7.95]
row_height = 0.48
table_y = 0.85
row_colors = [MDD_DARK, WHITE, GRAY_BG] # header, odd, even
for ri, row in enumerate([headers] + rows):
y = table_y + ri * row_height
for ci, (cell, cx, cw) in enumerate(zip(row, col_x, col_widths)):
if ri == 0:
fill = MDD_DARK
fc = WHITE
fb = True
else:
fill = WHITE if ri % 2 == 1 else GRAY_BG
fc = DARK_TEXT
fb = (ci == 0)
r = rect(slide, cx, y, cw, row_height - 0.03, fill)
textbox(slide, cx + 0.08, y + 0.06, cw - 0.15, row_height - 0.1,
cell, 11, bold=fb, color=fc, font="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 15 – CLOSING
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
bg(slide, DARK_TEXT)
rect(slide, 0, 0, 6.667, 7.5, MDD_DARK)
rect(slide, 6.667, 0, 6.666, 7.5, BD_DARK)
rect(slide, 6.5, 1.0, 0.15, 5.5, GOLD)
textbox(slide, 0.5, 2.0, 5.8, 1.0, "Major Depressive Disorder", 24, bold=True,
color=MDD_LIGHT, font="Calibri")
key_mdd = [
"Dysphoria / anhedonia ≥ 2 weeks",
"5 of 9 DSM-5 criteria",
"SSRI first-line; CBT equally effective (mild-mod)",
"70% recurrence by 5 years",
]
add_bullets(slide, 0.5, 3.1, 5.8, 3.5, key_mdd, size=13, color=WHITE)
textbox(slide, 7.1, 2.0, 5.8, 1.0, "Bipolar Disorder", 24, bold=True,
color=BD_LIGHT, font="Calibri")
key_bd = [
"Mania/hypomania + depression",
"Lithium: gold standard mood stabilizer",
"Avoid antidepressant monotherapy",
"Highly heritable; kindling worsens prognosis",
]
add_bullets(slide, 7.1, 3.1, 5.8, 3.5, key_bd, size=13, color=WHITE)
textbox(slide, 2.0, 6.7, 9.0, 0.6,
"Source: Kaplan & Sadock's Synopsis and Comprehensive Textbook of Psychiatry",
11, italic=True, color=RGBColor(0xAA, 0xAA, 0xAA), align=PP_ALIGN.CENTER, font="Calibri")
# ── Save ──────────────────────────────────────────────────────
from io import BytesIO
buf = BytesIO()
prs.save(buf)
with open("/tmp/workspace/mood-disorders-ppt/Mood_Disorders_MDD_Bipolar.pptx", "wb") as f:
f.write(buf.getvalue())
print("Saved successfully.")
cd /tmp/workspace/mood-disorders-ppt && python build_ppt.py 2>&1
ls -lh /tmp/workspace/mood-disorders-ppt/
Mood Disorders MDD Bipolar
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Cover — Mood Disorders |
| 2 | MDD Section Divider |
| 3 | MDD — Introduction & Epidemiology |
| 4 | MDD — Clinical Features (3-column layout) |
| 5 | MDD — DSM-5 Criteria + Specifiers |
| 6 | MDD — Management (Pharmacological & Non-Pharmacological) |
| 7 | MDD — Prognosis (course + good/poor factors) |
| 8 | Bipolar Disorder Section Divider |
| 9 | BD — Introduction & Epidemiology |
| 10 | BD — Clinical Features (Mania / Depression / Subtypes) |
| 11 | BD — DSM-5 Criteria (BP-I, BP-II, Cyclothymia) |
| 12 | BD — Management (Pharmacological & Non-Pharmacological) |
| 13 | BD — Prognosis (course + good/poor factors) |
| 14 | MDD vs Bipolar — Side-by-side comparison table |
| 15 | Summary / Closing key points |