Parkinson's Plus
"Parkinson-plus" OR "atypical parkinsonian" syndromes
| Molecular Basis | Disorders |
|---|---|
| Tauopathies | Progressive Supranuclear Palsy (PSP), Corticobasal Degeneration (CBD) |
| Synucleinopathies | Multiple System Atrophy (MSA), Dementia with Lewy Bodies (DLB) |
Note: DLB is sometimes listed separately as it overlaps heavily with PD pathology; some classifications also include Frontotemporal Dementia with Parkinsonism.
| Circuit Affected | Clinical Manifestation |
|---|---|
| Striatonigral | Parkinsonism (MSA-P) |
| Olivopontocerebellar | Cerebellar ataxia (MSA-C) |
| Autonomic nervous system | Orthostatic hypotension, bladder/bowel/sexual dysfunction |
| Feature | PD | PSP | CBD | MSA | DLB |
|---|---|---|---|---|---|
| Levodopa response | Good | Poor | Poor | Poor | Poor |
| Tremor | Rest tremor (classic) | Rare | Rare | Rare | Rest tremor (variable) |
| Falls | Late | Early (year 1) | Late | Moderate | Early-moderate |
| Eye movements | Mild impairment | Downward gaze palsy | Variable | Oculomotor abnormalities | Variable |
| Asymmetry | Asymmetric | Symmetric | Very asymmetric | Variable | Variable |
| Dementia | Late | Mid-late | Mid-late | Rare/red flag | Early, prominent |
| Autonomic | Mild-moderate | Mild | Mild | Severe | Moderate |
| Hallucinations | Drug-induced | Rare | Rare | Rare | Prominent (core feature) |
| Molecular | α-synuclein (Lewy bodies, neuronal) | Tau (globular tangles) | Tau (astrocytic plaques) | α-synuclein (glial GCIs) | α-synuclein (Lewy bodies, cortical) |
Create a diagnostic flowchart document comparing Parkinson-plus syndromes
ls /home/daytona/workspace/ 2>/dev/null && ls /home/daytona/skills/docx/scripts/…
mkdir -p /home/daytona/workspace/parkinson-plus && node -e "require('docx'); con…
~/parkinson-plus/generate.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
AlignmentType, HeadingLevel, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageOrientation, Header, Footer, PageNumber,
NumberFormat
} = require('docx');
const fs = require('fs');
// ── Colour palette ──────────────────────────────────────────────────────────
const COLORS = {
headerBg: '1B3A6B', // deep navy
headerText: 'FFFFFF',
subheaderBg: '2E6DA4', // medium blue
psp: 'D6EAF8', // light blue
cbd: 'D5F5E3', // light green
msa: 'FEF9E7', // light yellow
dlb: 'FDEDEC', // light red/pink
pspDark: '2980B9',
cbdDark: '27AE60',
msaDark: 'F39C12',
dlbDark: 'E74C3C',
flowBg: 'EBF5FB',
redFlag: 'FADBD8',
neutral: 'F2F3F4',
border: 'BDC3C7',
textDark: '1A1A2E',
accent: 'E8F4FD',
};
// ── Helpers ─────────────────────────────────────────────────────────────────
const noBorder = { style: BorderStyle.NONE, size: 0, color: 'FFFFFF' };
const thinBorder = (color) => ({ style: BorderStyle.SINGLE, size: 4, color: color || COLORS.border });
function cell(text, { bg, bold, color, align, vAlign, colSpan, width, size, italic } = {}) {
return new TableCell({
columnSpan: colSpan || 1,
width: width ? { size: width, type: WidthType.DXA } : undefined,
verticalAlign: vAlign || VerticalAlign.CENTER,
shading: bg ? { type: ShadingType.SOLID, color: bg } : undefined,
borders: {
top: thinBorder(COLORS.border),
bottom: thinBorder(COLORS.border),
left: thinBorder(COLORS.border),
right: thinBorder(COLORS.border),
},
children: [
new Paragraph({
alignment: align || AlignmentType.LEFT,
spacing: { before: 60, after: 60 },
children: [
new TextRun({
text: text,
bold: bold || false,
color: color || COLORS.textDark,
size: size || 18,
font: 'Calibri',
italics: italic || false,
}),
],
}),
],
});
}
function headerCell(text, colSpan, bg) {
return cell(text, {
bg: bg || COLORS.headerBg,
bold: true,
color: COLORS.headerText,
align: AlignmentType.CENTER,
colSpan: colSpan || 1,
size: 20,
});
}
function sectionTitle(text, level, color) {
return new Paragraph({
heading: level || HeadingLevel.HEADING_1,
spacing: { before: 240, after: 100 },
children: [
new TextRun({
text,
bold: true,
color: color || COLORS.headerBg,
size: level === HeadingLevel.HEADING_2 ? 26 : 32,
font: 'Calibri',
}),
],
});
}
function bodyPara(text, opts = {}) {
return new Paragraph({
spacing: { before: 40, after: 40 },
alignment: opts.align || AlignmentType.LEFT,
children: [
new TextRun({
text,
size: opts.size || 18,
font: 'Calibri',
color: opts.color || COLORS.textDark,
bold: opts.bold || false,
italics: opts.italic || false,
}),
],
});
}
function blankLine() {
return new Paragraph({ children: [new TextRun({ text: '', size: 14 })] });
}
function flowBox(label, subtext, bg, borderColor) {
return new Table({
width: { size: 8000, type: WidthType.DXA },
borders: {
top: thinBorder(borderColor), bottom: thinBorder(borderColor),
left: thinBorder(borderColor), right: thinBorder(borderColor),
insideH: noBorder, insideV: noBorder,
},
rows: [
new TableRow({
children: [
new TableCell({
shading: { type: ShadingType.SOLID, color: bg },
borders: {
top: thinBorder(borderColor), bottom: thinBorder(borderColor),
left: thinBorder(borderColor), right: thinBorder(borderColor),
},
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 40 },
children: [new TextRun({ text: label, bold: true, size: 20, font: 'Calibri', color: COLORS.textDark })],
}),
...(subtext ? [new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 80 },
children: [new TextRun({ text: subtext, size: 16, font: 'Calibri', color: '555555', italics: true })],
})] : []),
],
}),
],
}),
],
});
}
function arrowPara() {
return new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 40, after: 40 },
children: [new TextRun({ text: '▼', size: 24, color: COLORS.subheaderBg, font: 'Calibri' })],
});
}
function diamondBox(question, bg) {
return new Table({
width: { size: 8000, type: WidthType.DXA },
rows: [
new TableRow({
children: [
new TableCell({
shading: { type: ShadingType.SOLID, color: bg || 'EBF5FB' },
borders: {
top: thinBorder('2980B9'), bottom: thinBorder('2980B9'),
left: thinBorder('2980B9'), right: thinBorder('2980B9'),
},
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 80 },
children: [
new TextRun({ text: '◆ ', size: 20, bold: true, color: COLORS.subheaderBg, font: 'Calibri' }),
new TextRun({ text: question, size: 19, bold: true, color: COLORS.textDark, font: 'Calibri' }),
],
}),
],
}),
],
}),
],
});
}
// ── SECTION 1: Cover / Title ─────────────────────────────────────────────────
const titleSection = [
blankLine(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 80 },
children: [
new TextRun({
text: "PARKINSON'S PLUS SYNDROMES",
bold: true, size: 52, color: COLORS.headerBg, font: 'Calibri',
}),
],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 60 },
children: [
new TextRun({
text: 'Diagnostic Flowchart & Clinical Comparison',
size: 30, color: COLORS.subheaderBg, font: 'Calibri', italics: true,
}),
],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 240 },
children: [
new TextRun({
text: 'Based on Bradley & Daroff\'s Neurology | Robbins & Cotran | Goldman-Cecil Medicine',
size: 18, color: '888888', font: 'Calibri',
}),
],
}),
];
// ── SECTION 2: Flowchart (simulated with tables) ─────────────────────────────
const flowchartSection = [
sectionTitle('SECTION 1 — DIAGNOSTIC FLOWCHART', HeadingLevel.HEADING_1),
bodyPara('Use this step-by-step algorithm to differentiate Parkinson\'s Plus syndromes from idiopathic Parkinson\'s Disease (PD).', { size: 18, italic: true }),
blankLine(),
// Step 1
flowBox('STEP 1 — Confirm Parkinsonism', 'Bradykinesia + ≥1 of: rigidity, rest tremor, postural instability', 'D6EAF8', '2980B9'),
arrowPara(),
// Decision: Red flags?
diamondBox('Are RED FLAGS present? (early falls, vertical gaze palsy, alien limb, early severe autonomic failure, poor levodopa response, early dementia)'),
blankLine(),
// Red flag table
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({
children: [
headerCell('RED FLAG', 1, COLORS.pspDark),
headerCell('Suggests', 1, COLORS.pspDark),
],
}),
new TableRow({ children: [cell('Vertical (downward) gaze palsy'), cell('PSP ★')] }),
new TableRow({ children: [cell('Early falls within year 1, axial rigidity'), cell('PSP')] }),
new TableRow({ children: [cell('Alien limb phenomenon + apraxia'), cell('CBD ★')] }),
new TableRow({ children: [cell('Very asymmetric motor signs'), cell('CBD')] }),
new TableRow({ children: [cell('Severe autonomic failure (orthostasis, stridor)'), cell('MSA ★')] }),
new TableRow({ children: [cell('Cerebellar ataxia + parkinsonism'), cell('MSA-C')] }),
new TableRow({ children: [cell('Early fluctuating cognition + vivid hallucinations'), cell('DLB ★')] }),
new TableRow({ children: [cell('REM sleep behaviour disorder (early)'), cell('DLB / MSA')] }),
new TableRow({ children: [cell('Severe neuroleptic sensitivity'), cell('DLB')] }),
new TableRow({ children: [cell('Poor / absent levodopa response'), cell('All P+ syndromes')] }),
],
}),
blankLine(),
arrowPara(),
// Step 3
flowBox('STEP 2 — Levodopa Trial', 'Assess levodopa responsiveness over 3–6 months', 'FEF9E7', COLORS.msaDark),
blankLine(),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({
children: [
headerCell('Levodopa Response', 1, COLORS.subheaderBg),
headerCell('Interpretation', 1, COLORS.subheaderBg),
],
}),
new TableRow({ children: [cell('Good, sustained (>30% improvement)'), cell('Favours idiopathic PD')] }),
new TableRow({ children: [cell('Transient or modest response'), cell('PSP (some), DLB')] }),
new TableRow({ children: [cell('None / worsening'), cell('MSA, CBD, advanced PSP')] }),
],
}),
blankLine(),
arrowPara(),
// Step 4 — Neuroimaging
flowBox('STEP 3 — Neuroimaging (MRI Brain)', 'Key structural and signal abnormalities', COLORS.flowBg, COLORS.subheaderBg),
blankLine(),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({
children: [
headerCell('Finding', 1, COLORS.subheaderBg),
headerCell('Diagnosis Suggested', 1, COLORS.subheaderBg),
],
}),
new TableRow({ children: [cell('"Hummingbird / Penguin" sign — midbrain atrophy on sagittal MRI'), cell('PSP')] }),
new TableRow({ children: [cell('"Hot cross bun" sign — cruciform T2 pons hyperintensity'), cell('MSA-C')] }),
new TableRow({ children: [cell('Lateral putaminal rim T2 hyperintensity; posterior putamen hypointensity'), cell('MSA-P')] }),
new TableRow({ children: [cell('Asymmetric frontoparietal/perirolandic atrophy'), cell('CBD')] }),
new TableRow({ children: [cell('Posterior cortical atrophy, diffuse cortical Lewy changes'), cell('DLB')] }),
new TableRow({ children: [cell('DaT-SPECT: reduced uptake bilateral basal ganglia'), cell('DLB, PD, PSP')] }),
new TableRow({ children: [cell('¹²³I-MIBG: low myocardial uptake'), cell('DLB (highly specific)')] }),
],
}),
];
// ── SECTION 3: Comparison Table ─────────────────────────────────────────────
const comparisonSection = [
blankLine(),
sectionTitle('SECTION 2 — CLINICAL COMPARISON TABLE', HeadingLevel.HEADING_1),
bodyPara('Comparative clinical, pathological, and investigative features across the four main Parkinson\'s Plus syndromes.', { size: 18, italic: true }),
blankLine(),
new Table({
width: { size: 9500, type: WidthType.DXA },
rows: [
// Header row
new TableRow({
children: [
headerCell('Feature', 1, COLORS.headerBg),
headerCell('PSP', 1, COLORS.pspDark),
headerCell('CBD', 1, COLORS.cbdDark),
headerCell('MSA', 1, COLORS.msaDark),
headerCell('DLB', 1, COLORS.dlbDark),
],
}),
// Pathology row
new TableRow({
children: [
cell('Molecular basis', { bg: COLORS.neutral, bold: true }),
cell('Tauopathy (4R tau)', { bg: COLORS.psp }),
cell('Tauopathy (4R tau)', { bg: COLORS.cbd }),
cell('α-Synucleinopathy (glial)', { bg: COLORS.msa }),
cell('α-Synucleinopathy (neuronal)', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Pathological hallmark', { bg: COLORS.neutral, bold: true }),
cell('Globular tau tangles; tufted astrocytes', { bg: COLORS.psp }),
cell('Astrocytic plaques; ballooned neurons', { bg: COLORS.cbd }),
cell('Glial cytoplasmic inclusions (GCIs) in oligodendrocytes', { bg: COLORS.msa }),
cell('Cortical & limbic Lewy bodies', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Main regions affected', { bg: COLORS.neutral, bold: true }),
cell('Brainstem, deep grey matter, basal ganglia', { bg: COLORS.psp }),
cell('Motor/premotor cortex, anterior parietal, SN', { bg: COLORS.cbd }),
cell('Striatonigral, olivopontocerebellar, autonomic circuits', { bg: COLORS.msa }),
cell('Limbic, neocortical, SN', { bg: COLORS.dlb }),
],
}),
// Clinical
new TableRow({
children: [
cell('Onset age', { bg: COLORS.neutral, bold: true }),
cell('5th–7th decade', { bg: COLORS.psp }),
cell('6th–7th decade', { bg: COLORS.cbd }),
cell('~54 years (mean)', { bg: COLORS.msa }),
cell('7th–8th decade', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Sex predominance', { bg: COLORS.neutral, bold: true }),
cell('Male 2:1', { bg: COLORS.psp }),
cell('Equal', { bg: COLORS.cbd }),
cell('Equal', { bg: COLORS.msa }),
cell('Slight male', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Motor asymmetry', { bg: COLORS.neutral, bold: true }),
cell('Symmetric (axial)', { bg: COLORS.psp }),
cell('Very asymmetric ★', { bg: COLORS.cbd, bold: true }),
cell('Variable', { bg: COLORS.msa }),
cell('Variable', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Rest tremor', { bg: COLORS.neutral, bold: true }),
cell('Rare', { bg: COLORS.psp }),
cell('Rare / myoclonus', { bg: COLORS.cbd }),
cell('Rare', { bg: COLORS.msa }),
cell('Present (variable)', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Early falls', { bg: COLORS.neutral, bold: true }),
cell('Yes — Year 1 ★', { bg: COLORS.psp, bold: true }),
cell('Later in course', { bg: COLORS.cbd }),
cell('Moderate', { bg: COLORS.msa }),
cell('Early-moderate', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Eye movement abnormality', { bg: COLORS.neutral, bold: true }),
cell('Vertical (downgaze) palsy ★', { bg: COLORS.psp, bold: true }),
cell('Variable oculomotor', { bg: COLORS.cbd }),
cell('Oculomotor abnormalities', { bg: COLORS.msa }),
cell('Variable', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Characteristic motor sign', { bg: COLORS.neutral, bold: true }),
cell('Retrocollis; axial > limb rigidity', { bg: COLORS.psp }),
cell('Alien limb ★; apraxia', { bg: COLORS.cbd }),
cell('Stridor; orofacial dystonia', { bg: COLORS.msa }),
cell('Parkinsonism (often mild)', { bg: COLORS.dlb }),
],
}),
// Autonomic
new TableRow({
children: [
cell('Autonomic dysfunction', { bg: COLORS.neutral, bold: true }),
cell('Mild', { bg: COLORS.psp }),
cell('Mild', { bg: COLORS.cbd }),
cell('Severe ★ (orthostasis, bladder, erectile)', { bg: COLORS.msa, bold: true }),
cell('Moderate', { bg: COLORS.dlb }),
],
}),
// Cognitive / Psychiatric
new TableRow({
children: [
cell('Dementia', { bg: COLORS.neutral, bold: true }),
cell('Frontotemporal, mid-late', { bg: COLORS.psp }),
cell('Parietal/apraxia, mid-late', { bg: COLORS.cbd }),
cell('Rare; red flag if present', { bg: COLORS.msa }),
cell('Early, prominent ★', { bg: COLORS.dlb, bold: true }),
],
}),
new TableRow({
children: [
cell('Visual hallucinations', { bg: COLORS.neutral, bold: true }),
cell('Rare', { bg: COLORS.psp }),
cell('Rare', { bg: COLORS.cbd }),
cell('Rare', { bg: COLORS.msa }),
cell('Core feature ★ (well-formed)', { bg: COLORS.dlb, bold: true }),
],
}),
new TableRow({
children: [
cell('Cognitive fluctuations', { bg: COLORS.neutral, bold: true }),
cell('Absent', { bg: COLORS.psp }),
cell('Absent', { bg: COLORS.cbd }),
cell('Absent', { bg: COLORS.msa }),
cell('Core feature ★', { bg: COLORS.dlb, bold: true }),
],
}),
new TableRow({
children: [
cell('REM sleep behaviour disorder', { bg: COLORS.neutral, bold: true }),
cell('Absent', { bg: COLORS.psp }),
cell('Absent', { bg: COLORS.cbd }),
cell('Strongly associated', { bg: COLORS.msa }),
cell('Core feature ★', { bg: COLORS.dlb, bold: true }),
],
}),
// Treatment
new TableRow({
children: [
cell('Levodopa response', { bg: COLORS.neutral, bold: true }),
cell('Poor (some transient benefit)', { bg: COLORS.psp }),
cell('Poor', { bg: COLORS.cbd }),
cell('None (MSA-P) / None (MSA-C)', { bg: COLORS.msa }),
cell('Partial; may worsen psychosis', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('Neuroleptic sensitivity', { bg: COLORS.neutral, bold: true }),
cell('Moderate', { bg: COLORS.psp }),
cell('Moderate', { bg: COLORS.cbd }),
cell('Moderate', { bg: COLORS.msa }),
cell('SEVERE ★ (catastrophic)', { bg: COLORS.dlb, bold: true }),
],
}),
// Imaging
new TableRow({
children: [
cell('Key MRI finding', { bg: COLORS.neutral, bold: true }),
cell('Hummingbird / penguin sign (midbrain atrophy)', { bg: COLORS.psp }),
cell('Asymmetric frontoparietal atrophy', { bg: COLORS.cbd }),
cell('Hot cross bun sign (MSA-C); putaminal changes (MSA-P)', { bg: COLORS.msa }),
cell('Posterior cortical atrophy; normal/mild changes', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('DaT-SPECT', { bg: COLORS.neutral, bold: true }),
cell('Reduced', { bg: COLORS.psp }),
cell('Reduced', { bg: COLORS.cbd }),
cell('Reduced', { bg: COLORS.msa }),
cell('Reduced ★ (indicative biomarker)', { bg: COLORS.dlb }),
],
}),
new TableRow({
children: [
cell('MIBG scintigraphy', { bg: COLORS.neutral, bold: true }),
cell('Normal', { bg: COLORS.psp }),
cell('Normal', { bg: COLORS.cbd }),
cell('Normal', { bg: COLORS.msa }),
cell('Low uptake ★ (indicative biomarker)', { bg: COLORS.dlb, bold: true }),
],
}),
// Prognosis
new TableRow({
children: [
cell('Mean survival from onset', { bg: COLORS.neutral, bold: true }),
cell('5–7 years', { bg: COLORS.psp }),
cell('6–8 years', { bg: COLORS.cbd }),
cell('~5.7 years', { bg: COLORS.msa }),
cell('Variable (5–8 years from dementia)', { bg: COLORS.dlb }),
],
}),
],
}),
];
// ── SECTION 4: Individual Syndrome Summaries ─────────────────────────────────
const summarySection = [
blankLine(),
sectionTitle('SECTION 3 — INDIVIDUAL SYNDROME PROFILES', HeadingLevel.HEADING_1),
// PSP
sectionTitle('Progressive Supranuclear Palsy (PSP)', HeadingLevel.HEADING_2, COLORS.pspDark),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({ children: [
cell('Pathology', { bg: COLORS.neutral, bold: true, width: 2200 }),
cell('4R tauopathy. Globular tangles in brainstem/deep grey matter. Tufted astrocytes, coiled bodies. Classified as FTLD-tau.', { bg: COLORS.psp }),
]}),
new TableRow({ children: [
cell('Core clinical triad', { bg: COLORS.neutral, bold: true }),
cell('(1) Supranuclear vertical gaze palsy (2) Axial rigidity with retrocollis (3) Early falls (year 1)', { bg: COLORS.psp }),
]}),
new TableRow({ children: [
cell('Other features', { bg: COLORS.neutral, bold: true }),
cell('Pseudobulbar palsy (dysarthria, dysphagia), frontal dementia, apraxia of eyelid opening, monotone/nasal voice, hypophonia, palilalia', { bg: COLORS.psp }),
]}),
new TableRow({ children: [
cell('Epidemiology', { bg: COLORS.neutral, bold: true }),
cell('5th–7th decade onset; males 2× more than females; fatal within 5–7 years', { bg: COLORS.psp }),
]}),
new TableRow({ children: [
cell('Management', { bg: COLORS.neutral, bold: true }),
cell('No disease-modifying therapy. Levodopa trial (partial/transient benefit in ~30%). Fall prevention critical. Speech/swallowing therapy.', { bg: COLORS.psp }),
]}),
],
}),
blankLine(),
// CBD
sectionTitle('Corticobasal Degeneration (CBD)', HeadingLevel.HEADING_2, COLORS.cbdDark),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({ children: [
cell('Pathology', { bg: COLORS.neutral, bold: true, width: 2200 }),
cell('4R tauopathy (same tau gene variants as PSP). Tau inclusions predominantly in cortex. Astrocytic plaques, ballooned neurons (chromatolytic). Classified as FTLD-tau.', { bg: COLORS.cbd }),
]}),
new TableRow({ children: [
cell('Core clinical triad', { bg: COLORS.neutral, bold: true }),
cell('(1) Alien limb phenomenon (2) Asymmetric extrapyramidal rigidity + apraxia (3) Cortical sensory loss / myoclonus', { bg: COLORS.cbd }),
]}),
new TableRow({ children: [
cell('Other features', { bg: COLORS.neutral, bold: true }),
cell('Stimulus-sensitive myoclonus, limb dystonia, action tremor, parietal neglect, later frontal dementia. Very asymmetric onset is key.', { bg: COLORS.cbd }),
]}),
new TableRow({ children: [
cell('Key distinction from PSP', { bg: COLORS.neutral, bold: true }),
cell('CBD is more asymmetric and cortical (apraxia prominent); PSP is more axial and brainstem (downgaze palsy)', { bg: COLORS.cbd }),
]}),
new TableRow({ children: [
cell('Management', { bg: COLORS.neutral, bold: true }),
cell('No disease-modifying therapy. Levodopa rarely helpful. Clonazepam for myoclonus. OT/PT for apraxia.', { bg: COLORS.cbd }),
]}),
],
}),
blankLine(),
// MSA
sectionTitle('Multiple System Atrophy (MSA)', HeadingLevel.HEADING_2, COLORS.msaDark),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({ children: [
cell('Pathology', { bg: COLORS.neutral, bold: true, width: 2200 }),
cell('α-Synucleinopathy. Glial cytoplasmic inclusions (GCIs) in oligodendrocytes. Primarily white matter/glial changes. Three circuits: striatonigral (MSA-P), olivopontocerebellar (MSA-C), autonomic.', { bg: COLORS.msa }),
]}),
new TableRow({ children: [
cell('Subtypes', { bg: COLORS.neutral, bold: true }),
cell('MSA-P (parkinsonian, formerly striatonigral degeneration) — 58% in Europeans\nMSA-C (cerebellar, formerly OPCA) — 84% in Japanese\nShy-Drager syndrome = autonomic-predominant (historical term)', { bg: COLORS.msa }),
]}),
new TableRow({ children: [
cell('Core clinical features', { bg: COLORS.neutral, bold: true }),
cell('Autonomic failure (orthostatic hypotension ≥30/15 mmHg, erectile dysfunction, bladder/bowel) + Parkinsonism (MSA-P) OR Cerebellar ataxia (MSA-C)', { bg: COLORS.msa }),
]}),
new TableRow({ children: [
cell('Other features', { bg: COLORS.neutral, bold: true }),
cell('RBD, pyramidal signs, stridor (inspiratory — hallmark of respiratory dysfunction), orofacial dystonia, high-pitched whiny voice, no classic rest tremor, no dementia (red flag if present)', { bg: COLORS.msa }),
]}),
new TableRow({ children: [
cell('Evaluation', { bg: COLORS.neutral, bold: true }),
cell('Lying/standing BP. Autonomic reflex screen. Thermoregulatory sweat test (anhidrosis). Elevated post-void residual. MRI (hot cross bun sign / putaminal changes).', { bg: COLORS.msa }),
]}),
new TableRow({ children: [
cell('Management', { bg: COLORS.neutral, bold: true }),
cell('Fludrocortisone/midodrine for orthostasis. Levodopa trial (rarely useful in MSA-P). Fall prevention. Speech/swallow therapy. CPAP for sleep-disordered breathing.', { bg: COLORS.msa }),
]}),
new TableRow({ children: [
cell('Prognosis', { bg: COLORS.neutral, bold: true }),
cell('Mean onset age 54; mean survival ~5.7 years. Incidence 3/100,000 person-years.', { bg: COLORS.msa }),
]}),
],
}),
blankLine(),
// DLB
sectionTitle('Dementia with Lewy Bodies (DLB)', HeadingLevel.HEADING_2, COLORS.dlbDark),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({ children: [
cell('Pathology', { bg: COLORS.neutral, bold: true, width: 2200 }),
cell('α-Synucleinopathy (same fold as PD). Lewy bodies in limbic/cortical structures. ~80% also have AD pathology co-existing.', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Core clinical features\n(2017 DLB Consortium)', { bg: COLORS.neutral, bold: true }),
cell('1. Fluctuating cognition (attention/alertness)\n2. Recurrent vivid visual hallucinations\n3. REM sleep behaviour disorder (may precede dementia by years)\n4. Spontaneous parkinsonism (bradykinesia, rigidity, rest tremor)', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Supportive features', { bg: COLORS.neutral, bold: true }),
cell('Severe neuroleptic sensitivity (AVOID typical/atypical antipsychotics), postural instability, syncope, autonomic dysfunction, hyposmia, hypersomnia, depression, anxiety', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Indicative biomarkers', { bg: COLORS.neutral, bold: true }),
cell('↓ DaT-SPECT uptake (basal ganglia)\n↓ ¹²³I-MIBG myocardial scintigraphy uptake\nPolysomnography: REM sleep without atonia', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('DLB vs PD Dementia', { bg: COLORS.neutral, bold: true }),
cell('Motor symptoms precede dementia by >1 year → PD Dementia (PDD)\nDementia precedes or is simultaneous with motor symptoms → DLB\n(The "1-year rule")', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Management', { bg: COLORS.neutral, bold: true }),
cell('AChEIs (rivastigmine — FDA approved for PDD; used off-label in DLB). Melatonin/clonazepam for RBD. AVOID conventional antipsychotics. Low-dose quetiapine or clozapine if psychosis must be treated.', { bg: COLORS.dlb }),
]}),
],
}),
];
// ── SECTION 5: Red Flags Summary ─────────────────────────────────────────────
const redFlagsSection = [
blankLine(),
sectionTitle('SECTION 4 — RED FLAGS AGAINST IDIOPATHIC PD', HeadingLevel.HEADING_1),
bodyPara('The following features at presentation should prompt consideration of a Parkinson\'s Plus syndrome:', { italic: true }),
blankLine(),
new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [
new TableRow({ children: [headerCell('Red Flag', 1, COLORS.dlbDark), headerCell('Clinical Significance', 1, COLORS.dlbDark)] }),
...([
['Early falls within 1 year of onset', 'Suggests PSP; atypical for early PD'],
['Vertical (especially downward) gaze palsy', 'Virtually diagnostic of PSP'],
['Alien limb phenomenon', 'Hallmark of CBS/CBD'],
['Apraxia (limb-kinetic or ideomotor)', 'Suggests CBD'],
['Severe orthostatic hypotension at presentation', 'Suggests MSA (or pure autonomic failure)'],
['Inspiratory stridor', 'Highly suggestive of MSA'],
['Ataxia + parkinsonism combination', 'Suggests MSA-C'],
['Early prominent dementia or hallucinations', 'Suggests DLB'],
['REM sleep behaviour disorder (early, prodromal)', 'Suggests DLB or MSA'],
['Fluctuating consciousness / attention', 'Suggests DLB'],
['Symmetric onset', 'Atypical for PD; suggests P+ syndrome'],
['Absent rest tremor', 'Less likely idiopathic PD'],
['No levodopa response after adequate trial', 'All P+ syndromes; strongly against PD'],
['Severe neuroleptic sensitivity', 'Suggests DLB (potentially life-threatening)'],
]).map(([flag, sig]) => new TableRow({ children: [cell(flag, { bg: COLORS.redFlag }), cell(sig, { bg: COLORS.neutral })] })),
],
}),
];
// ── SECTION 6: Treatment Summary ─────────────────────────────────────────────
const treatmentSection = [
blankLine(),
sectionTitle('SECTION 5 — TREATMENT OVERVIEW', HeadingLevel.HEADING_1),
blankLine(),
new Table({
width: { size: 9500, type: WidthType.DXA },
rows: [
new TableRow({ children: [
headerCell('Treatment', 1, COLORS.headerBg),
headerCell('PSP', 1, COLORS.pspDark),
headerCell('CBD', 1, COLORS.cbdDark),
headerCell('MSA', 1, COLORS.msaDark),
headerCell('DLB', 1, COLORS.dlbDark),
]}),
new TableRow({ children: [
cell('Levodopa', { bg: COLORS.neutral, bold: true }),
cell('Partial/transient benefit in ~30%', { bg: COLORS.psp }),
cell('Rarely helpful', { bg: COLORS.cbd }),
cell('MSA-P: minimal; MSA-C: none', { bg: COLORS.msa }),
cell('Partial; may worsen psychosis', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Cholinesterase inhibitor', { bg: COLORS.neutral, bold: true }),
cell('Not indicated', { bg: COLORS.psp }),
cell('Not indicated', { bg: COLORS.cbd }),
cell('Not indicated', { bg: COLORS.msa }),
cell('Rivastigmine (FDA-approved for PDD; off-label DLB)', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Autonomic management', { bg: COLORS.neutral, bold: true }),
cell('Mild measures', { bg: COLORS.psp }),
cell('Mild measures', { bg: COLORS.cbd }),
cell('Fludrocortisone, midodrine, compression stockings', { bg: COLORS.msa }),
cell('Compression stockings, fluids', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Psychosis management', { bg: COLORS.neutral, bold: true }),
cell('Careful; avoid haloperidol', { bg: COLORS.psp }),
cell('Careful', { bg: COLORS.cbd }),
cell('Careful', { bg: COLORS.msa }),
cell('AVOID conventional antipsychotics!\nQuetiapine / clozapine only if essential', { bg: COLORS.dlb, bold: true }),
]}),
new TableRow({ children: [
cell('RBD management', { bg: COLORS.neutral, bold: true }),
cell('N/A', { bg: COLORS.psp }),
cell('N/A', { bg: COLORS.cbd }),
cell('Clonazepam / melatonin', { bg: COLORS.msa }),
cell('Clonazepam / melatonin', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Myoclonus', { bg: COLORS.neutral, bold: true }),
cell('Clonazepam', { bg: COLORS.psp }),
cell('Clonazepam (common in CBD)', { bg: COLORS.cbd }),
cell('N/A', { bg: COLORS.msa }),
cell('N/A', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Supportive care', { bg: COLORS.neutral, bold: true }),
cell('Fall prevention, feeding support, speech therapy', { bg: COLORS.psp }),
cell('PT/OT for apraxia, speech therapy', { bg: COLORS.cbd }),
cell('CPAP/BiPAP for stridor, bladder catheterisation', { bg: COLORS.msa }),
cell('Structured environment, caregiver support', { bg: COLORS.dlb }),
]}),
new TableRow({ children: [
cell('Disease-modifying therapy', { bg: COLORS.neutral, bold: true }),
cell('None available', { bg: COLORS.psp, italic: true }),
cell('None available', { bg: COLORS.cbd, italic: true }),
cell('None available', { bg: COLORS.msa, italic: true }),
cell('None available', { bg: COLORS.dlb, italic: true }),
]}),
],
}),
];
// ── SECTION 7: References ─────────────────────────────────────────────────────
const referencesSection = [
blankLine(),
sectionTitle('REFERENCES', HeadingLevel.HEADING_1),
bodyPara('1. Bradley WG, Daroff RB. Bradley and Daroff\'s Neurology in Clinical Practice, 8th ed. Elsevier, 2022.'),
bodyPara('2. Kumar V, Abbas AK, Aster JC. Robbins & Cotran Pathologic Basis of Disease, 10th ed. Elsevier, 2023.'),
bodyPara('3. Goldman L, Schafer AI. Goldman-Cecil Medicine, International Edition, 2-Volume Set. Elsevier, 2022.'),
bodyPara('4. McKeith IG et al. Diagnosis and management of dementia with Lewy bodies: fourth consensus report of the DLB Consortium. Neurology. 2017;89:88-100.'),
bodyPara('5. Gilman S et al. Second consensus statement on the diagnosis of multiple system atrophy. Neurology. 2008;71(9):670-676.'),
bodyPara('6. Bruno MK et al. A General Neurologist\'s Practical Diagnostic Algorithm for Atypical Parkinsonian Disorders. Neurol Clin Pract. 2024 Dec. PMID: 39185098.'),
bodyPara('7. Keir G et al. Atypical Parkinsonian Syndromes: Structural, Functional, and Molecular Imaging Features. AJNR. 2024 Dec. PMID: 39209485.'),
];
// ── Assemble Document ─────────────────────────────────────────────────────────
const doc = new Document({
styles: {
default: {
document: {
run: { font: 'Calibri', size: 18 },
},
},
},
sections: [
{
properties: {
page: {
margin: { top: 720, bottom: 720, left: 900, right: 900 },
},
},
headers: {
default: new Header({
children: [
new Paragraph({
alignment: AlignmentType.RIGHT,
children: [
new TextRun({
text: "Parkinson's Plus Syndromes — Diagnostic Reference",
size: 16, color: '888888', font: 'Calibri',
}),
],
}),
],
}),
},
footers: {
default: new Footer({
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [
new TextRun({ text: 'Page ', size: 16, color: '888888', font: 'Calibri' }),
new PageNumber(),
new TextRun({ text: ' | Orris Medical Reference', size: 16, color: '888888', font: 'Calibri' }),
],
}),
],
}),
},
children: [
...titleSection,
...flowchartSection,
...comparisonSection,
...summarySection,
...redFlagsSection,
...treatmentSection,
...referencesSection,
],
},
],
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync('/home/daytona/workspace/parkinson-plus/Parkinsons_Plus_Diagnostic_Flowchart.docx', buffer);
console.log('Done.');
});
cd /home/daytona/workspace/parkinson-plus && node generate.js 2>&1
~/parkinson-plus/generate.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/parkinson-plus/generate.js'
cd /home/daytona/workspace/parkinson-plus && node generate.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…
ls -lh /home/daytona/workspace/parkinson-plus/Parkinsons_Plus_Diagnostic_Flowcha…
Parkinsons Plus Diagnostic Flowchart
Word Document · DOCX