MARCH 28th: Aneuryms, clipping, coiling , awake brain surgery, mention Dr Saleem Abdul rauf April 11th: Epilepsy (anatomical and physiological abnormalities, neuropharmacology, surgery) May 23rd: visual and audtiory pathways, pituatary adenoma surgery. June 6th: Psychiatry, Basal gangilia pathway, Schizo, bi polar, bpd, depression, neuropharmacological approach. June 20th: Neurodegenerative disorders (HTD, Parkinsons, Wilsons), DBS July 4th ish: Spinal cord syndromes (Anatomy, tract physiology, pathological syndromes, 1-2 neuros
ls -la /home/daytona/workspace/ && ls /home/daytona/skills/docx/scripts/office/
mkdir -p /home/daytona/workspace/epilepsy-session
.docx for you, but before I produce it, here is a polished 2-hour structure you can use immediately:.docx immediately with:Okay let's do this, 4 people are gonna conduct it, so segregate topics per person, last person is doing game only.
~/epilepsy-session/generate.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, LevelFormat, WidthType, BorderStyle,
ShadingType, VerticalAlign, PageBreak, TableLayoutType
} = require('docx');
const fs = require('fs');
// ─── COLOUR PALETTE ────────────────────────────────────────────────────────
const TEAL = "1A6B72";
const NAVY = "1B2A4A";
const AMBER = "E8A020";
const LIGHT = "EAF4F5";
const WHITE = "FFFFFF";
const DARK = "1C1C1C";
// ─── HELPERS ───────────────────────────────────────────────────────────────
function h1(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_1,
children: [new TextRun({ text, bold: true, color: WHITE, size: 36, font: "Arial" })],
shading: { type: ShadingType.SOLID, color: TEAL, fill: TEAL },
spacing: { before: 320, after: 160 },
indent: { left: 200 },
});
}
function h2(text, color = NAVY) {
return new Paragraph({
heading: HeadingLevel.HEADING_2,
children: [new TextRun({ text, bold: true, color, size: 28, font: "Arial" })],
spacing: { before: 240, after: 100 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: TEAL } },
});
}
function h3(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_3,
children: [new TextRun({ text, bold: true, color: TEAL, size: 24, font: "Arial" })],
spacing: { before: 160, after: 60 },
});
}
function body(text, opts = {}) {
return new Paragraph({
children: [new TextRun({ text, size: 22, font: "Arial", color: DARK, ...opts })],
spacing: { before: 40, after: 40 },
});
}
function bullet(text, bold = false) {
return new Paragraph({
numbering: { reference: "bullets", level: 0 },
children: [new TextRun({ text, size: 22, font: "Arial", color: DARK, bold })],
spacing: { before: 30, after: 30 },
});
}
function subbullet(text) {
return new Paragraph({
numbering: { reference: "subbullets", level: 0 },
children: [new TextRun({ text, size: 20, font: "Arial", color: "444444" })],
spacing: { before: 20, after: 20 },
});
}
function numbered(text, bold = false) {
return new Paragraph({
numbering: { reference: "numbers", level: 0 },
children: [new TextRun({ text, size: 22, font: "Arial", color: DARK, bold })],
spacing: { before: 30, after: 30 },
});
}
function spacer(lines = 1) {
return new Paragraph({
children: [new TextRun({ text: "", size: 22 })],
spacing: { before: 80 * lines, after: 0 },
});
}
function pageBreak() {
return new Paragraph({ children: [new PageBreak()] });
}
function infoBox(label, text, bgColor = LIGHT, labelColor = TEAL) {
return new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({
children: [
new TableCell({
width: { size: 1400, type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color: labelColor, fill: labelColor },
verticalAlign: VerticalAlign.CENTER,
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: label, bold: true, color: WHITE, size: 20, font: "Arial" })]
})],
margins: { top: 80, bottom: 80, left: 100, right: 100 },
}),
new TableCell({
width: { size: 7626, type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color: bgColor, fill: bgColor },
children: [new Paragraph({
children: [new TextRun({ text, size: 21, font: "Arial", color: DARK })]
})],
margins: { top: 80, bottom: 80, left: 160, right: 100 },
}),
]
})
],
margins: { top: 100, bottom: 100 },
});
}
function presenterBanner(name, role, duration, color = NAVY) {
return new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({
children: [
new TableCell({
width: { size: 9026, type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color, fill: color },
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: name, bold: true, color: WHITE, size: 32, font: "Arial" })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: `${role} | ${duration}`, color: "CCDDFF", size: 22, font: "Arial" })]
}),
],
margins: { top: 140, bottom: 140, left: 200, right: 200 },
})
]
})
],
});
}
function twoColRow(left, right) {
return new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({
children: [
new TableCell({
width: { size: 4400, type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color: "F0F8FF", fill: "F0F8FF" },
children: left,
margins: { top: 80, bottom: 80, left: 160, right: 80 },
}),
new TableCell({
width: { size: 4626, type: WidthType.DXA },
shading: { type: ShadingType.SOLID, color: "FFF8F0", fill: "FFF8F0" },
children: right,
margins: { top: 80, bottom: 80, left: 160, right: 80 },
}),
]
})
],
margins: { top: 60, bottom: 60 },
});
}
// ─── DECISION TREE TABLE ───────────────────────────────────────────────────
function decisionTreeTable() {
const rows = [
["STEP", "QUESTION", "ACTION / BRANCH"],
["1", "Is the patient actively seizing?", "YES → ABCs, position, IV access, O2\nNO → Proceed to history"],
["2", "Duration > 5 min or 2nd seizure?", "YES → STATUS EPILEPTICUS protocol (Lorazepam IV → Fosphenytoin → Phenobarbital)\nNO → Continue workup"],
["3", "Is this provoked?\n(fever, drugs, metabolic, trauma)", "YES → Treat underlying cause. NOT epilepsy.\nNO → Likely unprovoked → screen for epilepsy"],
["4", "First ever unprovoked seizure?", "YES → MRI brain + EEG, consider risk of recurrence\nNO (recurrent) → Diagnose epilepsy → start ASM"],
["5", "What is the seizure type?", "Focal → Levetiracetam / Lamotrigine / Oxcarbazepine\nGeneralized → Valproate / Levetiracetam\nAbsence → Ethosuximide"],
["6", "Failed 2 appropriate ASMs?", "YES → Drug-resistant epilepsy → surgical evaluation\nNO → Optimise current therapy"],
["7", "Surgical candidate?", "MRI lesion + concordant EEG + functional mapping → Resection / Callosotomy / VNS / RNS"],
];
return new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: rows.map((row, i) =>
new TableRow({
tableHeader: i === 0,
children: row.map((cell, j) =>
new TableCell({
width: { size: j === 0 ? 700 : j === 1 ? 3200 : 5126, type: WidthType.DXA },
shading: {
type: ShadingType.SOLID,
color: i === 0 ? TEAL : (i % 2 === 0 ? LIGHT : WHITE),
fill: i === 0 ? TEAL : (i % 2 === 0 ? LIGHT : WHITE),
},
children: [new Paragraph({
children: [new TextRun({
text: cell,
bold: i === 0 || j === 0,
color: i === 0 ? WHITE : DARK,
size: i === 0 ? 20 : 19,
font: "Arial",
})]
})],
margins: { top: 80, bottom: 80, left: 120, right: 80 },
})
)
})
),
});
}
// ─── DRUG TABLE ────────────────────────────────────────────────────────────
function drugTable() {
const drugs = [
["Drug", "Mechanism", "Best For", "Avoid If"],
["Levetiracetam", "SV2A modulation → ↓ vesicle release", "Focal + Generalised", "Severe psychiatric hx (worsens mood)"],
["Lamotrigine", "Na+ channel blockade (slow inactivation)", "Focal; Generalised; Absence augmentation", "JME alone; rash risk"],
["Valproate", "Na+ channel + GABA ↑ + T-type Ca2+ block", "All generalised types; JME", "Women of childbearing age (teratogen)"],
["Ethosuximide", "T-type Ca2+ channel block in thalamus", "Absence ONLY", "Focal epilepsy"],
["Carbamazepine / Oxcarbazepine", "Na+ channel blockade", "Focal epilepsy", "Generalised (can worsen absence/myoclonic)"],
["Phenytoin / Fosphenytoin", "Na+ channel blockade", "Status epilepticus (acute)", "Chronic use (many interactions, toxicity)"],
["Clobazam", "GABA-A positive allosteric modulator", "Adjunct; Lennox-Gastaut", "Sedation issues"],
["Phenobarbital", "GABA-A Cl- channel duration ↑", "2nd/3rd line status; neonatal", "Sedation; cognitive effects"],
];
return new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: drugs.map((row, i) =>
new TableRow({
tableHeader: i === 0,
children: row.map((cell, j) =>
new TableCell({
shading: {
type: ShadingType.SOLID,
color: i === 0 ? NAVY : (i % 2 === 0 ? "F5F5F5" : WHITE),
fill: i === 0 ? NAVY : (i % 2 === 0 ? "F5F5F5" : WHITE),
},
children: [new Paragraph({
children: [new TextRun({
text: cell,
bold: i === 0,
color: i === 0 ? WHITE : DARK,
size: 19,
font: "Arial",
})]
})],
margins: { top: 70, bottom: 70, left: 120, right: 80 },
})
)
})
),
});
}
// ═══════════════════════════════════════════════════════════════════════════
// DOCUMENT ASSEMBLY
// ═══════════════════════════════════════════════════════════════════════════
const doc = new Document({
numbering: {
config: [
{
reference: "bullets",
levels: [{ level: 0, format: LevelFormat.BULLET, text: "\u2022", alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } } }]
},
{
reference: "subbullets",
levels: [{ level: 0, format: LevelFormat.BULLET, text: "\u25E6", alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 1080, hanging: 360 } } } }]
},
{
reference: "numbers",
levels: [{ level: 0, format: LevelFormat.DECIMAL, text: "%1.", alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } } }]
},
]
},
styles: {
default: { document: { run: { font: "Arial", size: 22, color: DARK } } },
paragraphStyles: [
{ id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 36, bold: true, font: "Arial", color: WHITE },
paragraph: { spacing: { before: 320, after: 160 }, outlineLevel: 0 } },
{ id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 28, bold: true, font: "Arial", color: NAVY },
paragraph: { spacing: { before: 240, after: 100 }, outlineLevel: 1 } },
{ id: "Heading3", name: "Heading 3", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 24, bold: true, font: "Arial", color: TEAL },
paragraph: { spacing: { before: 160, after: 60 }, outlineLevel: 2 } },
]
},
sections: [{
properties: {},
children: [
// ══════════════════════════════════════════════
// COVER
// ══════════════════════════════════════════════
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
spacing: { before: 400, after: 0 },
children: [new TextRun({ text: "", size: 6 })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
spacing: { before: 0, after: 0 },
children: [new TextRun({ text: "NEUROSCIENCE SERIES", bold: true, color: "88BBCC", size: 22, font: "Arial" })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
spacing: { before: 80, after: 0 },
children: [new TextRun({ text: "EPILEPSY", bold: true, color: WHITE, size: 72, font: "Arial" })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
spacing: { before: 40, after: 0 },
children: [new TextRun({ text: "Anatomy · Physiology · Pathology · Pharmacology · Surgery", color: "AACCDD", size: 24, font: "Arial" })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: TEAL, fill: TEAL },
spacing: { before: 120, after: 120 },
children: [new TextRun({ text: "April 11 | 2-Hour Session | Medical Students", bold: true, color: WHITE, size: 24, font: "Arial" })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
spacing: { before: 120, after: 400 },
children: [new TextRun({ text: "Session Design: 4 Presenters", color: "88BBCC", size: 22, font: "Arial" })]
}),
// ── PRESENTER OVERVIEW TABLE ──
spacer(),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "PRESENTER OVERVIEW", bold: true, size: 26, color: NAVY, font: "Arial" })]
}),
spacer(),
new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({
tableHeader: true,
children: ["Presenter", "Section", "Topics", "Time"].map(h =>
new TableCell({
shading: { type: ShadingType.SOLID, color: TEAL, fill: TEAL },
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, color: WHITE, size: 22, font: "Arial" })] })],
margins: { top: 80, bottom: 80, left: 100, right: 100 },
})
)
}),
...[
["Presenter 1", "Section A", "Introduction + What is Epilepsy + Neuroanatomy & Physiology", "~40 min"],
["Presenter 2", "Section B", "Pathology vs Normal Brain + Epilepsy Types", "~30 min"],
["Presenter 3", "Section C", "USMLE Decision Tree + Pharmacology + Surgery (Corpus Callosotomy)", "~35 min"],
["Presenter 4", "Section D", "End Game (Seizure Room Escape)", "~15 min"],
].map((row, i) =>
new TableRow({
children: row.map((cell, j) =>
new TableCell({
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT : WHITE, fill: i % 2 === 0 ? LIGHT : WHITE },
children: [new Paragraph({ children: [new TextRun({ text: cell, bold: j === 0, size: 21, font: "Arial", color: DARK })] })],
margins: { top: 80, bottom: 80, left: 120, right: 80 },
})
)
})
)
]
}),
pageBreak(),
// ══════════════════════════════════════════════
// SECTION A — PRESENTER 1
// ══════════════════════════════════════════════
presenterBanner("PRESENTER 1", "Introduction · What is Epilepsy · Neuroanatomy & Physiology", "~40 minutes", TEAL),
spacer(),
h2("A1 — Introduction & Session Overview (10 min)"),
infoBox("OBJECTIVE", "By the end of this session, students will define epilepsy, understand its neural basis, classify seizure types, navigate a treatment algorithm, and appreciate surgical options."),
spacer(),
body("Key talking points:"),
bullet("50 million people have epilepsy worldwide — 3rd most common neurological disorder"),
bullet("1 in 10 people will have a seizure in their lifetime; only some develop epilepsy"),
bullet("Epilepsy = NOT just one disease — it is a spectrum of conditions with different aetiologies"),
bullet("Massive stigma, employment & driving restrictions, mental health burden"),
bullet("70% are well-controlled with medication; 30% remain drug-resistant"),
spacer(),
infoBox("HOOK", "Open with: 'You are on call. A 22-year-old student is brought in shaking — what do you do first?' Let the room answer before diving in.", AMBER + "22", AMBER),
spacer(),
body("Session roadmap (show this visually):"),
numbered("What epilepsy is"),
numbered("Brain basics: why seizures happen"),
numbered("What goes wrong: pathology"),
numbered("Types of epilepsy"),
numbered("Clinical decision tree (USMLE-style)"),
numbered("Drugs + surgery"),
numbered("Game!"),
spacer(2),
h2("A2 — What is Epilepsy? (10 min)"),
h3("Core Definitions"),
bullet("Seizure: transient, abnormal, synchronised electrical discharge in the brain → motor/sensory/cognitive/autonomic symptoms"),
bullet("Epilepsy: enduring predisposition to recurrent unprovoked seizures (ILAE 2014 definition)"),
subbullet("Practically: 2+ unprovoked seizures > 24h apart, OR"),
subbullet("1 unprovoked seizure + ≥60% risk of recurrence over 10 years"),
bullet("Provoked seizure: caused by reversible insult (fever, drugs, metabolic, trauma) → NOT epilepsy"),
spacer(),
h3("Epidemiology Pearls"),
bullet("Peak onset: infancy and old age (bimodal distribution)"),
bullet("Paediatric causes: genetic syndromes, perinatal injury, febrile seizures (complex)"),
bullet("Adult causes: tumour, stroke, trauma, autoimmune, idiopathic"),
bullet("Elderly: stroke is #1 cause of new-onset epilepsy"),
spacer(),
infoBox("USMLE PEARL", "Febrile seizures (simple) do NOT cause epilepsy. Complex febrile seizures (focal, prolonged, or recurrent) carry a small increased risk — especially if mesial temporal sclerosis develops."),
spacer(2),
h2("A3 — Neuroanatomy & Physiology of Epilepsy (20 min)"),
h3("Normal Excitation/Inhibition Balance"),
bullet("Neurons fire when net depolarisation exceeds threshold"),
bullet("Excitatory neurotransmitter: Glutamate (AMPA, NMDA, kainate receptors)"),
bullet("Inhibitory neurotransmitter: GABA (GABA-A → Cl- influx; GABA-B → K+ efflux)"),
bullet("Seizure = pathological SYNCHRONISED, SUSTAINED, HIGH-FREQUENCY discharge"),
subbullet("Either: too much excitation (↑ glutamate / AMPA sensitivity)"),
subbullet("Or: too little inhibition (↓ GABA-A function, interneuron loss)"),
spacer(),
h3("Ion Channels — High Yield"),
bullet("Voltage-gated Na+ channels: rapid depolarisation → most drugs target inactivated state"),
bullet("T-type Ca2+ channels: thalamic pacemaker activity → key in absence seizures"),
bullet("GABA-A Cl- channel: fast inhibitory synapse — benzodiazepines, barbiturates act here"),
bullet("HCN channels (Ih): regulate excitability in temporal lobe — altered in TLE"),
spacer(),
h3("Network-Level Synchronisation"),
bullet("Single neuron burst → normally quenched by surrounding inhibitory interneurons"),
bullet("In epilepsy: interneuron loss or dysfunction → burst spreads"),
bullet("Focal onset: restricted to one area — patient may be aware"),
bullet("Generalised: both hemispheres involved from onset → via thalamocortical circuits"),
bullet("Propagation: focal → bilateral tonic-clonic = spread via corpus callosum and thalamocortical loops"),
spacer(),
h3("Key Anatomical Structures"),
twoColRow(
[
new Paragraph({ children: [new TextRun({ text: "Hippocampus / Mesial Temporal", bold: true, size: 22, font: "Arial", color: TEAL })] }),
new Paragraph({ children: [new TextRun({ text: "Most common focal epilepsy origin. Highly excitable pyramidal neurons in CA1/CA3. Vulnerable to sclerosis.", size: 20, font: "Arial", color: DARK })] }),
spacer(),
new Paragraph({ children: [new TextRun({ text: "Thalamocortical Circuit", bold: true, size: 22, font: "Arial", color: TEAL })] }),
new Paragraph({ children: [new TextRun({ text: "3 Hz spike-wave in absence epilepsy. Thalamus acts as pacemaker; cortex amplifies.", size: 20, font: "Arial", color: DARK })] }),
],
[
new Paragraph({ children: [new TextRun({ text: "Frontal Lobe", bold: true, size: 22, font: "Arial", color: NAVY })] }),
new Paragraph({ children: [new TextRun({ text: "Nocturnal seizures, hypermotor semiology. Rapid generalisation. Short, frequent events.", size: 20, font: "Arial", color: DARK })] }),
spacer(),
new Paragraph({ children: [new TextRun({ text: "Corpus Callosum", bold: true, size: 22, font: "Arial", color: NAVY })] }),
new Paragraph({ children: [new TextRun({ text: "Major interhemispheric highway. Surgical target (callosotomy) to block seizure spread.", size: 20, font: "Arial", color: DARK })] }),
]
),
spacer(),
infoBox("VISUAL CUE", "Draw the 'balance scale' on the board: Glutamate on one side, GABA on the other. Epilepsy = scale tips toward excitation. Drugs = restoring the balance."),
pageBreak(),
// ══════════════════════════════════════════════
// SECTION B — PRESENTER 2
// ══════════════════════════════════════════════
presenterBanner("PRESENTER 2", "Pathology vs Normal Brain · Types of Epilepsy", "~30 minutes", NAVY),
spacer(),
h2("B1 — Pathology vs Normal Brain Function (15 min)"),
h3("The Epileptogenic Focus"),
bullet("Defined region of cortex with intrinsic capacity to generate seizures"),
bullet("Not all lesions cause epilepsy — it depends on location, excitability, and network connections"),
bullet("Zone terminology (important for surgical planning):"),
subbullet("Seizure onset zone: where seizure starts (EEG)"),
subbullet("Irritative zone: interictal spikes (between seizures)"),
subbullet("Eloquent cortex: critical function (motor, language) — determines resectability"),
spacer(),
h3("Common Pathological Substrates"),
bullet("Mesial Temporal Sclerosis (MTS) — most common cause of drug-resistant focal epilepsy"),
subbullet("Selective loss of CA1 and CA3 hippocampal neurons + gliosis"),
subbullet("Chicken-and-egg debate: does TLE cause MTS or vice versa?"),
subbullet("Classic: prolonged febrile seizure in childhood → MTS → TLE in adolescence/adulthood"),
bullet("Focal Cortical Dysplasia (FCD) — malformation of cortical development"),
subbullet("Abnormal cortical layering, dysmorphic neurons, balloon cells (Type IIb)"),
subbullet("Often drug-resistant; can be subtle on MRI"),
bullet("Low-Grade Tumours — DNET, ganglioglioma — classic in young adults with TLE"),
bullet("Post-traumatic / Post-stroke scarring — gliotic scar = epileptogenic"),
bullet("Autoimmune encephalitis — NMDAR, LGI1, CASPR2 antibodies — new onset seizures + encephalopathy"),
spacer(),
h3("Why Some Epilepsies Are Drug-Resistant"),
bullet("Transporter hypothesis: overexpression of P-glycoprotein → pumps ASMs out of brain"),
bullet("Pharmacodynamic hypothesis: target (Na+ channel) undergoes mutation → drug can't bind"),
bullet("Intrinsic severity: highly epileptogenic lesions (MTS, FCD IIb) resist medical therapy"),
infoBox("BOARD FACT", "Drug-resistant epilepsy = failure to achieve sustained seizure freedom after adequate trials of 2 tolerated and appropriately chosen ASMs. ~30% of patients."),
spacer(2),
h2("B2 — Types of Epilepsy (15 min)"),
h3("ILAE Classification (Simplified for Students)"),
body("Step 1: Seizure Type"),
bullet("Focal (starts in one hemisphere network)"),
bullet("Generalised (starts in both hemispheres simultaneously)"),
bullet("Unknown onset"),
spacer(),
body("Step 2: Epilepsy Type"),
bullet("Focal epilepsy"),
bullet("Generalised epilepsy"),
bullet("Combined generalised + focal (e.g., Lennox-Gastaut)"),
bullet("Unknown"),
spacer(),
body("Step 3: Epilepsy Syndrome (if applicable)"),
spacer(),
h3("Key Seizure Types — Clinical Features"),
new Table({
layout: TableLayoutType.FIXED,
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({
tableHeader: true,
children: ["Seizure Type", "Consciousness", "Clinical Features", "Key Pearl"].map(h =>
new TableCell({
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
children: [new Paragraph({ children: [new TextRun({ text: h, bold: true, color: WHITE, size: 20, font: "Arial" })] })],
margins: { top: 80, bottom: 80, left: 100, right: 80 },
})
)
}),
...[
["Focal Aware", "Preserved", "Motor/sensory/autonomic aura; patient recalls it", "Previously called 'simple partial'"],
["Focal Impaired Awareness", "Impaired", "Automatisms (lip-smacking, hand-picking), post-ictal confusion", "Previously called 'complex partial'"],
["Focal to Bilateral Tonic-Clonic", "Lost", "Starts focal, spreads → full generalised convulsion", "Secondary generalisation — localisation-related"],
["Absence (typical)", "Brief loss", "3 Hz spike-wave on EEG, stare + blink, no post-ictal", "Activated by hyperventilation"],
["Myoclonic", "Preserved", "Sudden brief jerks, often morning, no post-ictal", "Juvenile Myoclonic Epilepsy (JME)"],
["Tonic-Clonic (primary)", "Lost", "Tonic stiffening → clonic jerks → post-ictal", "Generalised from onset — no aura"],
["Atonic (drop attack)", "Brief loss", "Sudden loss of tone → falls", "Lennox-Gastaut; corpus callosotomy candidate"],
].map((row, i) =>
new TableRow({
children: row.map(cell =>
new TableCell({
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT : WHITE, fill: i % 2 === 0 ? LIGHT : WHITE },
children: [new Paragraph({ children: [new TextRun({ text: cell, size: 19, font: "Arial", color: DARK })] })],
margins: { top: 70, bottom: 70, left: 120, right: 80 },
})
)
})
)
]
}),
spacer(),
h3("High-Yield Epilepsy Syndromes"),
bullet("Juvenile Myoclonic Epilepsy (JME) — most common generalised epilepsy syndrome"),
subbullet("Age 12–18, morning myoclonus, triggered by sleep deprivation/alcohol, EEG: 4–6 Hz poly-spike-wave"),
subbullet("Treatment: Valproate (first-line), Levetiracetam — NEVER carbamazepine (worsens myoclonus)"),
bullet("Childhood Absence Epilepsy (CAE) — 4–8 years old, multiple absences per day"),
subbullet("EEG: classic 3 Hz generalised spike-wave"),
subbullet("Treatment: Ethosuximide (absence only) or Valproate; remits by puberty in most"),
bullet("Temporal Lobe Epilepsy (TLE) — most common focal epilepsy in adults"),
subbullet("Aura: deja-vu, epigastric rising sensation, fear"),
subbullet("Often due to MTS; frequently drug-resistant; best surgical outcomes"),
bullet("Lennox-Gastaut Syndrome — severe childhood-onset encephalopathy"),
subbullet("Multiple seizure types, intellectual disability, EEG: slow spike-wave <2.5 Hz"),
subbullet("Corpus callosotomy for disabling drop attacks"),
infoBox("EXAM TRAP", "Carbamazepine/Oxcarbazepine can WORSEN absence seizures and myoclonus — always ID seizure type before prescribing."),
pageBreak(),
// ══════════════════════════════════════════════
// SECTION C — PRESENTER 3
// ══════════════════════════════════════════════
presenterBanner("PRESENTER 3", "USMLE Decision Tree · Pharmacology · Surgery (Corpus Callosotomy)", "~35 minutes", "2C5F6B"),
spacer(),
h2("C1 — USMLE Clinical Decision Tree (15 min)"),
body("Walk through this table step by step. Use the on-call scenario from the intro."),
spacer(),
decisionTreeTable(),
spacer(),
h3("Status Epilepticus — Emergency Protocol"),
bullet("Definition: seizure ≥ 5 min OR ≥ 2 seizures without recovery"),
bullet("0–5 min: ABCs, position lateral, O2, IV/IO access, glucose check"),
bullet("5–20 min: Lorazepam 0.1 mg/kg IV (or Midazolam IM if no IV access)"),
bullet("20–40 min: Fosphenytoin 20 PE/kg IV OR Levetiracetam 60 mg/kg IV OR Valproate 40 mg/kg IV"),
bullet("40–60 min: Phenobarbital OR repeat 2nd agent"),
bullet("> 60 min: Refractory SE → anaesthetic agents (propofol, midazolam infusion), ICU, EEG monitoring"),
infoBox("USMLE FAVORITE", "Non-convulsive status epilepticus (NCSE) = altered consciousness WITHOUT motor signs. Diagnosis REQUIRES EEG. Think of it in any unexplained encephalopathy."),
spacer(2),
h2("C2 — Pharmacology: Anti-Seizure Medications (10 min)"),
h3("Mechanism Classes — Teach the principle, then the drug"),
bullet("Na+ channel blockade (fast/slow inactivation) → Phenytoin, Carbamazepine, Lamotrigine, Oxcarbazepine, Lacosamide"),
bullet("GABA-A potentiation → Benzodiazepines (frequency ↑), Barbiturates (duration ↑), Clobazam"),
bullet("T-type Ca2+ channel block → Ethosuximide, Valproate"),
bullet("SV2A modulation (↓ vesicle priming) → Levetiracetam"),
bullet("HCN channel block → Lamotrigine (partial)"),
bullet("AMPA receptor antagonism → Perampanel"),
bullet("Carbonic anhydrase inhibition → Topiramate, Zonisamide (also Na+ and Ca2+)"),
spacer(),
drugTable(),
spacer(),
infoBox("MEMORY TIP", "For USMLE: Focal epilepsy → Levetiracetam or Lamotrigine first. Generalised → Valproate (if male/postmenopausal) or Levetiracetam. Absence ONLY → Ethosuximide."),
spacer(2),
h2("C3 — Surgical Treatment: Focus on Corpus Callosotomy (10 min)"),
h3("When Surgery Is Considered"),
bullet("Drug-resistant epilepsy (failed 2 adequate ASMs)"),
bullet("Comprehensive pre-surgical evaluation:"),
subbullet("MRI brain (3T, epilepsy protocol)"),
subbullet("Video-EEG monitoring"),
subbullet("Neuropsychological assessment"),
subbullet("Functional MRI (language/memory lateralisation)"),
subbullet("Wada test if needed"),
subbullet("Invasive EEG (SEEG or subdural grids) if non-invasive inconclusive"),
spacer(),
h3("Surgical Options Overview"),
bullet("Resective: temporal lobectomy (best outcomes, ~60–70% seizure-free), lesionectomy, multilobar resection"),
bullet("Disconnective: hemispherotomy (large hemisphere dysfunction)"),
bullet("Callosotomy: disconnects hemispheres (not curative, palliative)"),
bullet("Neuromodulation: VNS (vagus nerve stimulator), RNS (responsive neurostimulation), DBS (anterior thalamic nucleus)"),
spacer(),
h3("Deep Dive: Corpus Callosotomy"),
infoBox("INDICATION", "Refractory drop attacks (atonic/tonic seizures) causing severe injury. Also bilateral tonic-clonic with no focal onset. NOT a cure — prevents dangerous spread.", "FFF0E0", AMBER),
spacer(),
body("What is the corpus callosum?", { bold: true }),
bullet("Largest white matter commissure — 200–300 million axons"),
bullet("Connects homologous areas of left and right hemispheres"),
bullet("Key subdivisions: rostrum (frontal), genu, body, splenium (occipital/temporal)"),
spacer(),
body("The procedure:", { bold: true }),
numbered("Patient under general anaesthesia, supine, head in Mayfield clamp"),
numbered("Bicoronal skin incision, right-sided craniotomy straddling the midline"),
numbered("Interhemispheric approach between the two frontal lobes"),
numbered("Identify and protect bridging veins (risk: venous infarct)"),
numbered("Identify corpus callosum (white, avascular) between the cingulate gyri"),
numbered("Anterior 2/3 sectioned (genu + anterior body) — reduces generalisation of frontal/parietal seizures"),
numbered("Complete callosotomy (including splenium) if anterior section fails"),
numbered("Dura closed, bone flap replaced, wound closed"),
spacer(),
body("Outcomes & risks:", { bold: true }),
bullet("50–75% reduction in drop attacks in best cases"),
bullet("Complete seizure freedom is rare (~10%) — this is palliative"),
bullet("Disconnection syndrome: transient mutism, left hand apraxia, alien hand"),
bullet("Split-brain phenomenon (rare with staged/partial section): hemispheres act independently"),
bullet("Benefits often outweigh risks in patients with severe, injurious drop attacks"),
spacer(),
infoBox("vs. OTHER SURGERIES", "Temporal lobectomy has the BEST seizure-free rates (60–70%) but needs clear mesial temporal focus. Callosotomy is used when no clear resectable focus exists and drop attacks are disabling."),
pageBreak(),
// ══════════════════════════════════════════════
// SECTION D — PRESENTER 4
// ══════════════════════════════════════════════
presenterBanner("PRESENTER 4", "End Game — Seizure Room Escape", "~15 minutes", AMBER),
spacer(),
h2("D1 — Game: SEIZURE ROOM ESCAPE"),
infoBox("CONCEPT", "The room is locked. There are 5 'locks' — each is a clinical challenge. Teams solve them in sequence to 'escape'. First team to solve all 5 wins."),
spacer(),
body("Setup:", { bold: true }),
bullet("Divide audience into 2–4 teams"),
bullet("Each lock = 1 clinical puzzle (displayed on screen or printed cards)"),
bullet("Teams write answers on whiteboards or shout out — presenter decides winner of each lock"),
bullet("Bonus lock for a tiebreaker"),
spacer(),
h3("Lock 1 — Identify the Seizure Type"),
infoBox("SCENARIO", "A 7-year-old girl stares blankly for 10 seconds, blinks rapidly, then continues her sentence as if nothing happened. Her teacher reports this happens 20 times a day. EEG shows 3 Hz generalised spike-wave."),
bullet("Question: What seizure type is this? What is the diagnosis? What do you treat with?"),
bullet("Answer: Typical absence seizure / Childhood Absence Epilepsy / Ethosuximide"),
spacer(),
h3("Lock 2 — Drug or Death?"),
infoBox("SCENARIO", "A 19-year-old male with JME is started on carbamazepine by his GP after one tonic-clonic seizure. He returns 2 months later saying his seizures are WORSE. He now has frequent morning jerks."),
bullet("Question: What went wrong? What should he be on instead?"),
bullet("Answer: Carbamazepine worsens myoclonus in JME. Switch to Levetiracetam or Valproate."),
spacer(),
h3("Lock 3 — Status Epilepticus Clock"),
infoBox("SCENARIO", "A 25-year-old man is brought in convulsing. He has been seizing for 8 minutes. IV access is established. Glucose is normal."),
bullet("Question: What do you give RIGHT NOW? What is the next step if it fails after 20 minutes?"),
bullet("Answer: Lorazepam IV (0.1 mg/kg). If no response → Fosphenytoin / Levetiracetam / Valproate IV."),
spacer(),
h3("Lock 4 — Match the Mechanism"),
infoBox("CHALLENGE", "Match 4 drugs to their mechanisms: Ethosuximide / Levetiracetam / Phenobarbital / Lamotrigine\nMechanisms: Na+ channel blocker / T-type Ca2+ blocker / GABA-A duration ↑ / SV2A modulator"),
bullet("Answer: Ethosuximide → T-Ca2+ | Levetiracetam → SV2A | Phenobarbital → GABA-A duration | Lamotrigine → Na+"),
spacer(),
h3("Lock 5 — Surgical Slam Dunk"),
infoBox("SCENARIO", "A 32-year-old man has had epilepsy since age 15. He has tried 5 different medications. He has multiple daily drop attacks causing facial injuries. MRI shows no clear resectable lesion. His EEG is generalised."),
bullet("Question: What surgery would you offer? What are you trying to achieve? Name 2 risks."),
bullet("Answer: Corpus callosotomy. Goal: block seizure propagation across hemispheres, reduce drop attacks. Risks: disconnection syndrome, alien hand, venous injury intraoperatively."),
spacer(),
h3("TIEBREAKER BONUS LOCK"),
infoBox("LIGHTNING ROUND", "Name 3 things that can TRIGGER a seizure in someone with JME. (30 seconds, no conferring.)"),
bullet("Answers: Sleep deprivation, alcohol, flickering lights (photosensitivity), stress"),
spacer(2),
h2("Session Wrap-Up"),
bullet("Epilepsy = sustained imbalance of excitation > inhibition in susceptible networks"),
bullet("Classify seizure type FIRST before choosing a drug — wrong drug = worse seizures"),
bullet("30% are drug-resistant → think surgical early, not as a last resort"),
bullet("Corpus callosotomy = elegant palliative procedure for drop attacks — disconnect, don't resect"),
bullet("Status epilepticus = treat fast — time is neurons"),
spacer(),
infoBox("NEXT SESSION", "April 11 is LIVE — Next up: May 23 — Visual & Auditory Pathways + Pituitary Adenoma Surgery."),
spacer(),
new Paragraph({
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
spacing: { before: 200, after: 200 },
children: [new TextRun({ text: "END OF SESSION PLAN", bold: true, color: WHITE, size: 28, font: "Arial" })]
}),
]
}]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/epilepsy-session/Epilepsy_Session_April11.docx", buffer);
console.log("Done.");
});
cd /home/daytona/workspace/epilepsy-session && node generate.js 2>&1
~/epilepsy-session/generate.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/epilepsy-session/generate.js'
the game is now a case which is gonna be a simulation of an epileptic patient, well divide the audience into teams of differenet specialites to tackle the case. now the intro, what is epilepsy and the neuroanat and phsyio behind it, patho vs normal is gonn abe done by person 1, person 2 will do types of epilepsy, clinical presentaitions and usmle decision tree, person 3 will do treatment deep dive, pharma and surgery video explaination, person 4 will do the case game thing, approx 25 min per person, wdyt. and lastly draft a whatsapp message dividing allocating the tasks neatly