Hello, Rish. So, I want you to explain me about central nervous system pathology because I have my exams, and I am a student in Georgia currently, and it's MCQ-based exam. So, I want, like, the high-heeled, uh, mnemonic type, so I can finish the chapter as soon as I can. So, uh, I... Because... And also, if possible, endocrine with mnemonics or some digital charts, so I can memorize it, or flowcharts, so that I will ace my exams and make sure that... Next semester, I'm doing internals.
| Feature | Key Fact |
|---|---|
| Age | Young women (20-40) |
| Pathology | Demyelination of white matter (oligodendrocytes destroyed) |
| Location | Periventricular plaques (hallmark) |
| Key finding | Internuclear ophthalmoplegia (MLF lesion) |
| CSF | Oligoclonal IgG bands |
| MRI | Dawson's fingers (periventricular lesions perpendicular to ventricles) |
| Feature | Key Fact |
|---|---|
| Trigger | Post-infection (Campylobacter jejuni #1) |
| Pathology | Demyelination of peripheral nerves (Schwann cells) |
| Presentation | Ascending flaccid paralysis, areflexia |
| CSF | Albuminocytologic dissociation (high protein, normal cells) |
| Risk | Respiratory failure |
| Treatment | IVIG or Plasmapheresis |
| Feature | Key Fact |
|---|---|
| Grade | WHO Grade IV (most malignant) |
| Location | Cerebral hemisphere (crosses corpus callosum = "butterfly glioma") |
| Histology | Pseudopalisading necrosis around blood vessels |
| Marker | GFAP positive |
| Prognosis | 15 months median survival |
| Tumor | Location | Age | Key MCQ Fact |
|---|---|---|---|
| Pilocytic astrocytoma | Cerebellum | Child | Rosenthal fibers, BENIGN (grade I) |
| Medulloblastoma | Cerebellum (4th ventricle) | Child | Homer-Wright rosettes, radiosensitive |
| Ependymoma | 4th ventricle | Child | Perivascular pseudorosettes |
| Meningioma | Parasagittal/sphenoid | Adult F | Psammoma bodies, whorled pattern |
| Schwannoma | CN VIII (acoustic) | Adult | S100+, bilateral = NF2 |
| Oligodendroglioma | Frontal lobe | Adult | Fried egg cells, 1p/19q deletion |
| Craniopharyngioma | Suprasellar | Child | Calcification, cholesterol crystals |
| GBM | Temporal/frontal | Elderly | Butterfly pattern, pseudopalisading necrosis |
STROKE
/ \
ISCHEMIC HEMORRHAGIC
(87%) (13%)
/ \ / \
Thrombotic Embolic Intracerebral Subarachnoid
(plaque) (from hemorrhage hemorrhage
heart) (HTN #1) (aneurysm #1)
| Feature | Epidural | Subdural |
|---|---|---|
| Vessel | Middle meningeal artery | Bridging veins |
| Blood | Lens-shaped (biconvex) | Crescent-shaped |
| Lucid interval | YES (classic) | Sometimes |
| Cause | Temporal bone fracture | Elderly, alcoholics, trauma |
| Feature | Alzheimer's | Vascular Dementia | Lewy Body | Frontotemporal |
|---|---|---|---|---|
| Onset | Gradual | Stepwise | Gradual | Gradual |
| Memory | Early loss | Variable | Variable | Preserved early |
| Hallucinations | Late | Rare | EARLY, visual | Rare |
| Parkinsonism | Late | Possible | YES, early | No |
| Key path | Plaques/tangles | Infarcts | Lewy bodies | Tau/TDP-43 |
| Age | Bug | Mnemonic |
|---|---|---|
| Newborn (0-3m) | Group B Strep, E. coli, Listeria | "GEL" |
| Child (3m-18y) | N. meningitidis, S. pneumoniae, H. influenzae | "NMSH" |
| Adults | S. pneumoniae, N. meningitidis | "SN" |
| Elderly/Immunocomp. | S. pneumoniae, Listeria | "SPL" |
| Bacterial | Viral | Fungal/TB | |
|---|---|---|---|
| Appearance | Turbid | Clear | Clear/turbid |
| WBC | High PMNs | High Lymphs | High Lymphs |
| Glucose | Very LOW | Normal | Low |
| Protein | Very HIGH | Slightly high | High |
DIABETES INSIPIDUS
(Dilute urine, concentrated blood)
/ \
CENTRAL DI NEPHROGENIC DI
(ADH deficiency) (ADH resistance)
Cause: trauma, Cause: Lithium,
tumors, surgery hypercalcemia, genetic
| |
ADH β WORKS ADH β NO EFFECT
| |
Treatment: Desmopressin Treatment: Thiazides
+ low sodium diet
| Adenoma Type | Hormone | Presentation |
|---|---|---|
| Prolactinoma | Prolactin | Amenorrhea, galactorrhea (F); Impotence (M) |
| Somatotroph | GH | Acromegaly (adult), Gigantism (child) |
| Corticotroph | ACTH | Cushing's disease |
| Thyrotroph | TSH | Hyperthyroidism |
| Non-functioning | None | Mass effects (bitemporal hemianopia) |
THYROID DISORDERS
|
____+____
/ \
HYPO HYPER
| |
Slow Metabolism Fast Metabolism
| |
"SLOW" "FAST"
S-lugish F-lushing/sweating
L-ow T3/T4 A-rrhythmias (AF)
O-besity S-kinny/weight loss
W-arm intolerance T-remor
| Type | Key Fact | Mnemonic |
|---|---|---|
| Papillary (most common, 80%) | Psammoma bodies, "Orphan Annie" nuclei, RET/PTC mutation | Papillary = best Prognosis |
| Follicular (10%) | Hematogenous spread, vascular invasion | Follicular = Far spread |
| Medullary (5-8%) | C-cells β Calcitonin, amyloid stroma, RET mutation | Medullary = MEN2 |
| Anaplastic (<5%) | Elderly, worst prognosis, rapidly fatal | Anaplastic = Annihilation |
HIGH CORTISOL?
|
24h urine cortisol elevated
|
ACTH level?
/ \
HIGH ACTH LOW ACTH
(ACTH-dep.) (ACTH-indep.)
/ \ |
Pituitary Ectopic Adrenal tumor
adenoma (SCLC#1) (adenoma/carcinoma)
"Cushing's "Ectopic "Primary
DISEASE" ACTH" adrenal"
| Feature | Type 1 | Type 2 |
|---|---|---|
| Pathology | Autoimmune beta-cell destruction | Insulin resistance + relative deficiency |
| Age | <30 (child/young adult) | >40 (middle-aged/elderly) |
| Body | Thin | Obese |
| Ketoacidosis | YES (DKA) | Rare (HHS instead) |
| Autoantibodies | Anti-GAD, anti-islet cell | None |
| HLA | DR3, DR4 | No HLA link |
| Treatment | Insulin ONLY | Lifestyle β Metformin β add-ons β Insulin |
| Feature | DKA (Type 1) | HHS (Type 2) |
|---|---|---|
| Glucose | >250 mg/dL | >600 mg/dL |
| pH | <7.3 (acidosis) | Normal (>7.3) |
| Ketones | YES | Minimal/absent |
| Osmolality | Mildly elevated | >320 mOsm/kg |
| Mortality | ~1% | ~15% |
| Treatment | IV saline + Insulin + K+ | IV saline + Insulin |
| Drug | Mechanism | Key MCQ Fact |
|---|---|---|
| Metformin | Decreases hepatic gluconeogenesis | #1 for T2DM, NO hypoglycemia, lactic acidosis risk |
| Sulfonylureas (Glipizide) | Stimulates insulin secretion | Can cause hypoglycemia |
| Thiazolidinediones (Pioglitazone) | PPAR-Ξ³ agonist | Hepatotoxicity, weight gain |
| GLP-1 agonists (Liraglutide) | Incretin effect + weight loss | Used in obese T2DM |
| SGLT2 inhibitors (Empagliflozin) | Glucosuria | Urinary infections, ketoacidosis risk |
| DPP-4 inhibitors (Sitagliptin) | Incretin effect | Pancreatitis risk |
| Clue in question | Answer |
|---|---|
| Periventricular lesions on MRI in young woman | Multiple Sclerosis |
| Ascending paralysis after Campylobacter | GBS |
| Worst headache of my life | Subarachnoid Hemorrhage (Berry aneurysm) |
| Xanthochromia in CSF | SAH |
| Temporal lobe + fever + personality change | HSV Encephalitis β Acyclovir |
| Pill-rolling tremor + cogwheel rigidity | Parkinson's - Lewy bodies |
| Beta-amyloid plaques + neurofibrillary tangles | Alzheimer's Disease |
| "Orphan Annie" nuclei + psammoma bodies | Papillary thyroid cancer |
| Calcitonin-secreting tumor | Medullary thyroid cancer (MEN2) |
| High aldosterone + low renin + hypokalemia | Conn's syndrome |
| Paroxysmal hypertension + diaphoresis | Pheochromocytoma |
| Skin hyperpigmentation + low Na + high K | Addison's Disease |
| Moon face + buffalo hump + striae | Cushing's syndrome |
| Bitemporal hemianopia | Pituitary tumor (optic chiasm compression) |
| High protein + normal cells in CSF | GBS (albuminocytologic dissociation) |
| India ink + HIV | Cryptococcus meningitis |
| Spongiform vacuolation + myoclonus | CJD (prion disease) |
| Butterfly glioma crossing corpus callosum | GBM |
| Homer-Wright rosettes in cerebellum (child) | Medulloblastoma |
Make a downloadable PowerPoint presentation with flowcharts and diagrams
ls -la /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/med-study-pptx
~/med-study-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "CNS & Endocrine Pathology - High Yield MCQ Study Guide";
pres.author = "Orris Study Guide";
// βββ THEME COLORS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const C = {
navy: "0D1B2A",
darkBg: "111827",
teal: "0EA5E9",
tealDk: "0369A1",
green: "10B981",
red: "EF4444",
orange: "F59E0B",
purple: "8B5CF6",
white: "FFFFFF",
offWhite:"F1F5F9",
gray: "94A3B8",
lightGray:"E2E8F0",
cardBg: "1E293B",
cardBg2: "162032",
accent: "38BDF8",
};
// βββ HELPER: slide background ββββββββββββββββββββββββββββββββββββββββββββββββ
function darkSlide(slide) {
slide.background = { color: C.darkBg };
}
function lightSlide(slide) {
slide.background = { color: C.offWhite };
}
// βββ HELPER: section header bar ββββββββββββββββββββββββββββββββββββββββββββββ
function sectionBar(slide, title, color) {
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.85, fill: { color: color || C.tealDk }, line: { color: color || C.tealDk } });
slide.addText(title, { x: 0.2, y: 0, w: 12.9, h: 0.85, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
}
// βββ HELPER: card box ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
function card(slide, x, y, w, h, fillColor) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill: { color: fillColor || C.cardBg },
line: { color: C.teal, width: 1.5 },
rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.3 }
});
}
// βββ HELPER: small label pill ββββββββββββββββββββββββββββββββββββββββββββββββ
function pill(slide, text, x, y, w, h, bg, fg) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w, h, fill: { color: bg || C.teal }, line: { color: bg || C.teal }, rectRadius: 0.12 });
slide.addText(text, { x, y, w, h, fontSize: 9, bold: true, color: fg || C.white, align: "center", valign: "middle", margin: 0 });
}
// βββ HELPER: arrow right βββββββββββββββββββββββββββββββββββββββββββββββββββββ
function arrowRight(slide, x, y, w, h, color) {
slide.addShape(pres.shapes.RIGHT_ARROW, { x, y, w, h, fill: { color: color || C.teal }, line: { color: color || C.teal } });
}
function arrowDown(slide, x, y, w, h, color) {
slide.addShape(pres.shapes.DOWN_ARROW, { x, y, w, h, fill: { color: color || C.teal }, line: { color: color || C.teal } });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 1 β TITLE
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
// Top accent bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
// Bottom accent bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.32, w: 13.3, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
// Decorative circles
s.addShape(pres.shapes.ELLIPSE, { x: 9.5, y: 0.8, w: 3.5, h: 3.5, fill: { color: C.tealDk, transparency: 75 }, line: { color: "000000", transparency: 100 } });
s.addShape(pres.shapes.ELLIPSE, { x: 10.5, y: 3.5, w: 2.5, h: 2.5, fill: { color: C.purple, transparency: 80 }, line: { color: "000000", transparency: 100 } });
// Title
s.addText("CNS & Endocrine Pathology", { x: 0.5, y: 1.5, w: 9.5, h: 1.3, fontSize: 42, bold: true, color: C.white, fontFace: "Calibri" });
s.addText("High-Yield MCQ Study Guide", { x: 0.5, y: 2.85, w: 9.5, h: 0.8, fontSize: 26, bold: false, color: C.teal, fontFace: "Calibri" });
// Subtitle row
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.75, w: 5.2, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("1st Year Preclinical | MCQ-Focused | Mnemonics & Diagrams", { x: 0.5, y: 3.9, w: 9.5, h: 0.5, fontSize: 14, color: C.gray, fontFace: "Calibri" });
// Topics pills
const topics = ["CNS Demyelinating","Brain Tumors","Cerebrovascular","Neurodegeneration","CNS Infections","Pituitary","Thyroid","Adrenal","Diabetes"];
const pillColors = [C.tealDk, C.purple, C.red, C.green, C.orange, C.teal, C.tealDk, C.purple, C.green];
topics.forEach((t, i) => {
const col = i % 5;
const row = Math.floor(i / 5);
pill(s, t, 0.5 + col * 2.5, 4.7 + row * 0.55, 2.3, 0.38, pillColors[i]);
});
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 2 β CNS SECTION INTRO
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.3, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SECTION 1", { x: 0.6, y: 0.5, w: 12, h: 0.5, fontSize: 14, bold: true, color: C.teal, charSpacing: 4 });
s.addText("Central Nervous System\nPathology", { x: 0.6, y: 1.1, w: 12, h: 2, fontSize: 48, bold: true, color: C.white, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.2, w: 4, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
const topics = [
{ label: "01", text: "Demyelinating Diseases", color: C.teal },
{ label: "02", text: "Brain Tumors", color: C.purple },
{ label: "03", text: "Cerebrovascular Disease", color: C.red },
{ label: "04", text: "Neurodegeneration", color: C.green },
{ label: "05", text: "CNS Infections", color: C.orange },
];
topics.forEach((t, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.5 + i * 0.7, w: 0.45, h: 0.45, fill: { color: t.color }, line: { color: t.color } });
s.addText(t.label, { x: 0.6, y: 3.5 + i * 0.7, w: 0.45, h: 0.45, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(t.text, { x: 1.2, y: 3.52 + i * 0.7, w: 8, h: 0.4, fontSize: 16, color: C.white, valign: "middle", margin: 0 });
});
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 3 β DEMYELINATING DISEASES: MS vs GBS
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "01 | Demyelinating Diseases: MS vs GBS", C.tealDk);
// MS Card
card(s, 0.2, 1.0, 6.2, 5.9, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.0, w: 6.2, h: 0.5, fill: { color: C.tealDk }, line: { color: C.tealDk } });
s.addText("MULTIPLE SCLEROSIS (MS)", { x: 0.3, y: 1.0, w: 6.0, h: 0.5, fontSize: 13, bold: true, color: C.white, valign: "middle", margin: 0 });
const msData = [
["Mnemonic", "SPASM: Sensory, Pain, Ataxia,\nSphincter, Motor"],
["Age/Sex", "Young women 20-40"],
["Pathology", "Oligodendrocyte destruction\nβ White matter demyelination"],
["Location", "Periventricular plaques\n'Dawson's Fingers' on MRI"],
["CSF", "Oligoclonal IgG bands"],
["Signs", "Uhthoff's (heat worsens)\nLhermitte's (neck flex = shock)"],
["Treatment", "Beta-interferon (modify)\nSteroids (acute attack)"],
];
msData.forEach(([k, v], i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.62 + i * 0.73, w: 1.6, h: 0.62, fill: { color: C.teal, transparency: 20 }, line: { color: C.teal } });
s.addText(k, { x: 0.3, y: 1.62 + i * 0.73, w: 1.6, h: 0.62, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 2.05, y: 1.62 + i * 0.73, w: 4.2, h: 0.62, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
// GBS Card
card(s, 6.9, 1.0, 6.2, 5.9, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.0, w: 6.2, h: 0.5, fill: { color: C.purple }, line: { color: C.purple } });
s.addText("GUILLAIN-BARRE SYNDROME (GBS)", { x: 7.0, y: 1.0, w: 6.0, h: 0.5, fontSize: 13, bold: true, color: C.white, valign: "middle", margin: 0 });
const gbsData = [
["Mnemonic", "'Goes Bottom-to-Shoulder'\n= Ascending paralysis"],
["Trigger", "Post-infection\n(Campylobacter jejuni #1)"],
["Pathology", "Schwann cell destruction\nβ Peripheral demyelination"],
["Presentation", "Ascending flaccid paralysis\n+ Areflexia"],
["CSF", "ALBUMINOCYTOLOGIC\nDISSOCIATION\n(High protein, normal WBC)"],
["Risk", "Respiratory failure\n(monitor FVC!)"],
["Treatment", "IVIG or Plasmapheresis"],
];
gbsData.forEach(([k, v], i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 7.0, y: 1.62 + i * 0.73, w: 1.6, h: 0.62, fill: { color: C.purple, transparency: 20 }, line: { color: C.purple } });
s.addText(k, { x: 7.0, y: 1.62 + i * 0.73, w: 1.6, h: 0.62, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 8.65, y: 1.62 + i * 0.73, w: 4.3, h: 0.62, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
// MCQ TRAP banner
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 7.0, w: 12.9, h: 0.42, fill: { color: C.red, transparency: 20 }, line: { color: C.red } });
s.addText("MCQ TRAP: MS = CENTRAL (UMN) = Spastic + Hyperreflexia | GBS = PERIPHERAL (LMN) = Flaccid + Areflexia", { x: 0.3, y: 7.0, w: 12.7, h: 0.42, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 4 β BRAIN TUMORS TABLE
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "02 | Brain Tumors β High-Yield Table + GAME Mnemonic", C.purple);
// GAME mnemonic
const game = [
{ letter: "G", text: "liomas (most common overall)", color: C.teal },
{ letter: "A", text: "denocarcinoma mets (#1 in adults)", color: C.orange },
{ letter: "M", text: "eningioma (most common BENIGN)", color: C.green },
{ letter: "E", text: "pendymoma (4th ventricle, child)", color: C.purple },
];
game.forEach((g, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2 + i * 3.25, y: 1.0, w: 3.0, h: 0.9, fill: { color: g.color, transparency: 20 }, line: { color: g.color }, rectRadius: 0.07 });
s.addText(g.letter, { x: 0.2 + i * 3.25, y: 1.0, w: 0.7, h: 0.9, fontSize: 28, bold: true, color: g.color, align: "center", valign: "middle", margin: 0 });
s.addText(g.text, { x: 0.9 + i * 3.25, y: 1.0, w: 2.4, h: 0.9, fontSize: 10, color: C.white, valign: "middle", margin: 0 });
});
// Table
const headers = ["Tumor", "Location", "Age", "Key MCQ Fact"];
const rows = [
["Pilocytic Astrocytoma", "Cerebellum", "Child", "Rosenthal fibers | BENIGN Grade I"],
["Medulloblastoma", "Cerebellum (4th V)", "Child", "Homer-Wright rosettes | Radiosensitive"],
["Ependymoma", "4th Ventricle", "Child", "Perivascular pseudorosettes"],
["GBM (Grade IV)", "Temporal/Frontal", "Elderly", "Butterfly pattern | Pseudopalisading necrosis"],
["Oligodendroglioma", "Frontal lobe", "Adult", "Fried egg cells | 1p/19q deletion"],
["Meningioma", "Parasagittal", "Adult F", "Psammoma bodies | Whorled pattern | BENIGN"],
["Schwannoma (CN VIII)", "CPA angle", "Adult", "S100+ | Bilateral = NF2"],
["Craniopharyngioma", "Suprasellar", "Child", "Calcification | Cholesterol crystals"],
];
const colW = [2.6, 2.2, 1.3, 6.8];
const colX = [0.2, 2.85, 5.1, 6.45];
// Header row
headers.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: colX[ci], y: 2.05, w: colW[ci], h: 0.4, fill: { color: C.purple }, line: { color: C.purple } });
s.addText(h, { x: colX[ci] + 0.05, y: 2.05, w: colW[ci] - 0.1, h: 0.4, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
});
const rowColors = [C.cardBg, C.cardBg2, C.cardBg, C.cardBg2, C.cardBg, C.cardBg2, C.cardBg, C.cardBg2];
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: colX[ci], y: 2.5 + ri * 0.6, w: colW[ci], h: 0.58, fill: { color: rowColors[ri] }, line: { color: C.teal, transparency: 70 } });
s.addText(cell, { x: colX[ci] + 0.05, y: 2.5 + ri * 0.6, w: colW[ci] - 0.1, h: 0.58, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
});
// CAME pill
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 7.08, w: 12.9, h: 0.35, fill: { color: C.orange, transparency: 25 }, line: { color: C.orange }, rectRadius: 0.05 });
s.addText("PEDIATRIC TUMORS (CAME): Craniopharyngioma | Astrocytoma (pilocytic) | Medulloblastoma | Ependymoma", { x: 0.3, y: 7.08, w: 12.7, h: 0.35, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 5 β STROKE FLOWCHART
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "03 | Cerebrovascular Disease β Stroke Classification Flowchart", C.red);
// Central STROKE node
s.addShape(pres.shapes.ELLIPSE, { x: 5.25, y: 1.1, w: 2.8, h: 0.9, fill: { color: C.red }, line: { color: C.red } });
s.addText("STROKE", { x: 5.25, y: 1.1, w: 2.8, h: 0.9, fontSize: 18, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Branches
// Ischemic branch (left)
s.addShape(pres.shapes.RECTANGLE, { x: 2.2, y: 2.3, w: 0.04, h: 0.6, fill: { color: C.teal }, line: { color: C.teal } }); // line spacer
arrowDown(s, 2.7, 1.7, 0.3, 0.45, C.teal);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 1.0, y: 2.2, w: 3.5, h: 0.7, fill: { color: C.tealDk }, line: { color: C.teal }, rectRadius: 0.07 });
s.addText("ISCHEMIC (87%)", { x: 1.0, y: 2.2, w: 3.5, h: 0.7, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Sub: Thrombotic
arrowDown(s, 1.3, 3.0, 0.3, 0.4, C.teal);
card(s, 0.3, 3.45, 2.0, 1.5, C.cardBg);
s.addText("THROMBOTIC", { x: 0.3, y: 3.45, w: 2.0, h: 0.38, fontSize: 10, bold: true, color: C.teal, align: "center", valign: "middle", margin: 0 });
s.addText("Atherosclerotic plaque\nGradual onset\nWake-up stroke", { x: 0.3, y: 3.85, w: 2.0, h: 1.05, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 4 });
// Sub: Embolic
arrowDown(s, 2.65, 3.0, 0.3, 0.4, C.teal);
card(s, 2.3, 3.45, 2.0, 1.5, C.cardBg);
s.addText("EMBOLIC", { x: 2.3, y: 3.45, w: 2.0, h: 0.38, fontSize: 10, bold: true, color: C.teal, align: "center", valign: "middle", margin: 0 });
s.addText("From heart (Afib #1)\nSudden onset\nMiddle cerebral art.", { x: 2.3, y: 3.85, w: 2.0, h: 1.05, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 4 });
// Hemorrhagic branch (right)
arrowDown(s, 10.0, 1.7, 0.3, 0.45, C.red);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 8.8, y: 2.2, w: 3.5, h: 0.7, fill: { color: "#7F1D1D" }, line: { color: C.red }, rectRadius: 0.07 });
s.addText("HEMORRHAGIC (13%)", { x: 8.8, y: 2.2, w: 3.5, h: 0.7, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Sub: ICH
arrowDown(s, 9.1, 3.0, 0.3, 0.4, C.red);
card(s, 8.3, 3.45, 2.0, 1.5, C.cardBg);
s.addText("INTRACEREBRAL", { x: 8.3, y: 3.45, w: 2.0, h: 0.38, fontSize: 9, bold: true, color: C.red, align: "center", valign: "middle", margin: 0 });
s.addText("HTN #1 cause\nCharcot-Bouchard\naneurysms\nPutamen most common", { x: 8.3, y: 3.85, w: 2.0, h: 1.05, fontSize: 8, color: C.offWhite, valign: "top", margin: 4 });
// Sub: SAH
arrowDown(s, 10.65, 3.0, 0.3, 0.4, C.red);
card(s, 10.0, 3.45, 2.2, 1.5, C.cardBg);
s.addText("SUBARACHNOID", { x: 10.0, y: 3.45, w: 2.2, h: 0.38, fontSize: 9, bold: true, color: C.red, align: "center", valign: "middle", margin: 0 });
s.addText("Berry aneurysm #1\n'Worst HA of life'\nXanthochromia CSF\nADPKD association", { x: 10.0, y: 3.85, w: 2.2, h: 1.05, fontSize: 8, color: C.offWhite, valign: "top", margin: 4 });
// EDH vs SDH comparison
s.addText("EDH vs SDH", { x: 4.4, y: 5.15, w: 4.5, h: 0.4, fontSize: 13, bold: true, color: C.orange, align: "center" });
const edhSdh = [
["", "EPIDURAL (EDH)", "SUBDURAL (SDH)"],
["Vessel", "Middle meningeal ARTERY", "Bridging VEINS"],
["CT shape", "Biconvex (lens-shaped)", "Crescent-shaped"],
["Lucid interval", "YES (classic)", "Sometimes"],
["Cause", "Temporal bone fracture", "Elderly / alcoholics"],
["Speed", "Fast (arterial)", "Slow (venous)"],
];
const eCols = [1.3, 4.2, 3.9];
const eX = [4.1, 5.45, 8.4];
edhSdh.forEach((row, ri) => {
row.forEach((cell, ci) => {
const bg = ri === 0 ? C.orange : (ri % 2 === 0 ? C.cardBg : C.cardBg2);
const fg = ri === 0 ? C.navy : (ci === 0 ? C.gray : C.offWhite);
s.addShape(pres.shapes.RECTANGLE, { x: eX[ci], y: 5.58 + ri * 0.32, w: eCols[ci], h: 0.3, fill: { color: bg }, line: { color: C.orange, transparency: 60 } });
s.addText(cell, { x: eX[ci] + 0.05, y: 5.58 + ri * 0.32, w: eCols[ci] - 0.1, h: 0.3, fontSize: 8.5, bold: ri === 0, color: fg, valign: "middle", margin: 0 });
});
});
s.addText("Mnemonic: EDH = ARTERY = FAST | SDH = VEIN = SLOW", { x: 4.1, y: 7.1, w: 9.0, h: 0.3, fontSize: 10, bold: true, color: C.orange, align: "center", margin: 0 });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 6 β NEURODEGENERATION
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "04 | Neurodegenerative Diseases β The Big 4", C.green);
const diseases = [
{
name: "ALZHEIMER'S",
mnemonic: "ABCs of Alzheimer's",
color: C.teal,
points: ["A - Amyloid-Ξ² plaques (extracellular)","B - Brain atrophy (hippocampus 1st)","C - Chromosome 21 / ApoE4","D - Downreg. ACh","E - Early = short-term memory loss","F - Fibrillary tangles (tau, intracell.)","Rx: Donepezil (AChEI)"],
},
{
name: "PARKINSON'S",
mnemonic: "TRAP",
color: C.purple,
points: ["T - Tremor (resting, pill-rolling)","R - Rigidity (cogwheel)","A - Akinesia/bradykinesia","P - Postural instability","Path: Lewy bodies (Ξ±-synuclein)","Location: Substantia Nigra","Rx: Levodopa/Carbidopa (gold std)"],
},
{
name: "ALS",
mnemonic: "All Limbs, Spared Sensation",
color: C.orange,
points: ["UMN + LMN both involved","NO sensory loss","NO cognitive decline","NO autonomic dysfunction","Gene: SOD1 mutation","Progressive respiratory failure","Rx: Riluzole (only disease-modifying)"],
},
{
name: "LEWY BODY",
mnemonic: "VIPs Fluctuate",
color: C.red,
points: ["V - Visual hallucinations (early)","I - Identity: Parkinsonism early","P - Psychiatric (REM sleep disorder)","Fluctuating cognition","Lewy bodies (Ξ±-synuclein)","Sensitive to antipsychotics","Rx: Rivastigmine"],
},
];
diseases.forEach((d, i) => {
const x = 0.2 + i * 3.27;
card(s, x, 1.0, 3.05, 6.35, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.0, w: 3.05, h: 0.48, fill: { color: d.color }, line: { color: d.color } });
s.addText(d.name, { x: x + 0.05, y: 1.0, w: 2.95, h: 0.48, fontSize: 12, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: x + 0.1, y: 1.55, w: 2.85, h: 0.35, fill: { color: d.color, transparency: 50 }, line: { color: d.color, transparency: 30 }, rectRadius: 0.05 });
s.addText(d.mnemonic, { x: x + 0.1, y: 1.55, w: 2.85, h: 0.35, fontSize: 9, bold: true, italic: true, color: C.white, align: "center", valign: "middle", margin: 0 });
d.points.forEach((p, pi) => {
s.addText("β’ " + p, { x: x + 0.12, y: 2.02 + pi * 0.73, w: 2.85, h: 0.65, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 0 });
});
});
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 7 β CNS INFECTIONS
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "05 | CNS Infections β Meningitis, Encephalitis, Prions", C.orange);
// CSF Table
s.addText("CSF Analysis Quick Comparison", { x: 0.2, y: 1.0, w: 12.9, h: 0.4, fontSize: 14, bold: true, color: C.orange });
const csfH = ["Feature", "BACTERIAL", "VIRAL (Aseptic)", "FUNGAL / TB"];
const csfR = [
["Appearance", "Turbid / Cloudy", "Clear", "Clear or Turbid"],
["WBC", "High PMNs (>1000)", "High Lymphocytes", "High Lymphocytes"],
["Glucose", "VERY LOW (<40)", "Normal", "Low"],
["Protein", "VERY HIGH (>200)", "Slightly High", "High"],
["Opening Pressure", "Elevated", "Normal/slightly elevated", "Elevated"],
];
const csfCW = [2.1, 2.9, 3.0, 3.0];
const csfCX = [0.2, 2.35, 5.3, 8.35];
const csfHC = [C.cardBg, C.red, C.tealDk, C.purple];
csfH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: csfCX[ci], y: 1.45, w: csfCW[ci], h: 0.42, fill: { color: csfHC[ci] }, line: { color: csfHC[ci] } });
s.addText(h, { x: csfCX[ci] + 0.05, y: 1.45, w: csfCW[ci] - 0.1, h: 0.42, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0, align: ci > 0 ? "center" : "left" });
});
csfR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: csfCX[ci], y: 1.9 + ri * 0.42, w: csfCW[ci], h: 0.4, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.gray, transparency: 80 } });
s.addText(cell, { x: csfCX[ci] + 0.05, y: 1.9 + ri * 0.42, w: csfCW[ci] - 0.1, h: 0.4, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0, align: ci > 0 ? "center" : "left" });
});
});
// Bugs by age
s.addText("Bacterial Meningitis Bugs by Age Group", { x: 0.2, y: 4.15, w: 6.5, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const ages = [
{ age: "0-3 months", bugs: "GBS, E. coli, Listeria", memo: "GEL", color: C.red },
{ age: "3m - 18 yrs", bugs: "N. meningitidis, S. pneumoniae, H. influenzae", memo: "NMSH", color: C.orange },
{ age: "Adults 18-50", bugs: "S. pneumoniae, N. meningitidis", memo: "SN", color: C.teal },
{ age: "Elderly / Immunocomp.", bugs: "S. pneumoniae, Listeria", memo: "SPL", color: C.purple },
];
ages.forEach((a, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 4.6 + i * 0.7, w: 1.8, h: 0.55, fill: { color: a.color }, line: { color: a.color }, rectRadius: 0.06 });
s.addText(a.age, { x: 0.2, y: 4.6 + i * 0.7, w: 1.8, h: 0.55, fontSize: 8.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(a.bugs, { x: 2.1, y: 4.6 + i * 0.7, w: 4.1, h: 0.55, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
pill(s, "Memo: " + a.memo, 6.3, 4.65 + i * 0.7, 1.4, 0.38, a.color);
});
// Right side: HSV & Crypto
card(s, 8.0, 4.1, 5.1, 1.6, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 8.0, y: 4.1, w: 5.1, h: 0.38, fill: { color: C.red, transparency: 20 }, line: { color: C.red } });
s.addText("HSV Encephalitis", { x: 8.05, y: 4.1, w: 5.0, h: 0.38, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addText("Temporal lobe | Fever + personality change + seizures\nCSF: PCR for HSV DNA | Treatment: IV ACYCLOVIR (STAT!)", { x: 8.05, y: 4.52, w: 5.0, h: 1.1, fontSize: 9, color: C.offWhite, valign: "top", margin: 0 });
card(s, 8.0, 5.85, 5.1, 1.55, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 8.0, y: 5.85, w: 5.1, h: 0.38, fill: { color: C.purple, transparency: 20 }, line: { color: C.purple } });
s.addText("Cryptococcal Meningitis + CJD (Prion)", { x: 8.05, y: 5.85, w: 5.0, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addText("Crypto: HIV (CD4<100) | India Ink halo | Rx: Ampho B + 5-FC\nCJD: Spongiform vacuolation | Myoclonus + rapid dementia", { x: 8.05, y: 6.27, w: 5.0, h: 1.05, fontSize: 9, color: C.offWhite, valign: "top", margin: 0 });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 8 β ENDOCRINE SECTION INTRO
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: "0A1628" };
s.addShape(pres.shapes.RECTANGLE, { x: 13.0, y: 0, w: 0.3, h: 7.5, fill: { color: C.green }, line: { color: C.green } });
s.addText("SECTION 2", { x: 0.6, y: 0.5, w: 12, h: 0.5, fontSize: 14, bold: true, color: C.green, charSpacing: 4 });
s.addText("Endocrine\nPathology", { x: 0.6, y: 1.1, w: 12, h: 2.2, fontSize: 52, bold: true, color: C.white, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.4, w: 4, h: 0.05, fill: { color: C.green }, line: { color: C.green } });
const topics = [
{ label: "01", text: "Pituitary Disorders", color: C.teal },
{ label: "02", text: "Thyroid Disorders", color: C.green },
{ label: "03", text: "Adrenal Disorders", color: C.orange },
{ label: "04", text: "Diabetes Mellitus", color: C.red },
];
topics.forEach((t, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.7 + i * 0.78, w: 0.45, h: 0.48, fill: { color: t.color }, line: { color: t.color } });
s.addText(t.label, { x: 0.6, y: 3.7 + i * 0.78, w: 0.45, h: 0.48, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(t.text, { x: 1.2, y: 3.75 + i * 0.78, w: 9, h: 0.4, fontSize: 18, color: C.white, valign: "middle", margin: 0 });
});
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 9 β PITUITARY
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 01 | Pituitary Disorders β Hormones & Adenomas", C.teal);
// FLAT PiG
s.addText("Anterior Pituitary β Mnemonic: FLAT PiG", { x: 0.2, y: 1.0, w: 7.5, h: 0.38, fontSize: 13, bold: true, color: C.teal });
const hormones = [
{ letter: "F", h: "FSH", note: "Follicle stimulating" },
{ letter: "L", h: "LH", note: "Luteinizing hormone" },
{ letter: "A", h: "ACTH", note: "Adrenocorticotropic" },
{ letter: "T", h: "TSH", note: "Thyroid stimulating" },
{ letter: "Pi", h: "PRL", note: "Prolactin" },
{ letter: "G", h: "GH", note: "Growth hormone" },
];
hormones.forEach((h, i) => {
const x = 0.2 + i * 2.15;
s.addShape(pres.shapes.ELLIPSE, { x, y: 1.5, w: 1.8, h: 0.8, fill: { color: C.tealDk, transparency: 20 }, line: { color: C.teal } });
s.addText(h.letter, { x, y: 1.5, w: 0.55, h: 0.8, fontSize: 18, bold: true, color: C.accent, align: "center", valign: "middle", margin: 0 });
s.addText(h.h + "\n" + h.note, { x: x + 0.5, y: 1.5, w: 1.3, h: 0.8, fontSize: 8, color: C.white, valign: "middle", margin: 0 });
});
s.addText("Posterior: ADH + Oxytocin (made in hypothalamus, stored in posterior pituitary)", { x: 0.2, y: 2.4, w: 12.9, h: 0.35, fontSize: 10, italic: true, color: C.gray });
// Adenoma table
s.addText("Pituitary Adenoma Types", { x: 0.2, y: 2.85, w: 7.5, h: 0.38, fontSize: 13, bold: true, color: C.teal });
const adH = ["Adenoma", "Hormone", "Presentation"];
const adR = [
["Prolactinoma (#1)", "Prolactin", "Amenorrhea + galactorrhea (F); Impotence (M) | Rx: Cabergoline"],
["Somatotroph", "GH", "Acromegaly (adult) / Gigantism (child) | Rx: Transsphenoidal surgery"],
["Corticotroph", "ACTH", "Cushing's DISEASE | Suppressed by high-dose dexamethasone"],
["Non-functioning", "None", "Mass effects: Bitemporal hemianopia (optic chiasm compression)"],
];
const adCW = [2.4, 1.8, 8.7];
const adCX = [0.2, 2.65, 4.5];
adH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: adCX[ci], y: 3.28, w: adCW[ci], h: 0.38, fill: { color: C.tealDk }, line: { color: C.tealDk } });
s.addText(h, { x: adCX[ci] + 0.05, y: 3.28, w: adCW[ci] - 0.1, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
});
adR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: adCX[ci], y: 3.7 + ri * 0.55, w: adCW[ci], h: 0.52, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.teal, transparency: 70 } });
s.addText(cell, { x: adCX[ci] + 0.05, y: 3.7 + ri * 0.55, w: adCW[ci] - 0.1, h: 0.52, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
});
// DI flowchart
s.addText("Diabetes Insipidus Flowchart", { x: 0.2, y: 5.95, w: 12.9, h: 0.38, fontSize: 13, bold: true, color: C.accent });
// DI node
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 5.0, y: 6.38, w: 3.3, h: 0.55, fill: { color: C.tealDk }, line: { color: C.teal }, rectRadius: 0.07 });
s.addText("DIABETES INSIPIDUS\n(Dilute urine, high serum Na)", { x: 5.0, y: 6.38, w: 3.3, h: 0.55, fontSize: 8.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Branches
arrowDown(s, 5.45, 7.0, 0.3, 0.35, C.teal);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 3.8, y: 7.0, w: 2.6, h: 0.38, fill: { color: C.teal, transparency: 25 }, line: { color: C.teal }, rectRadius: 0.06 });
s.addText("CENTRAL DI (ADH deficient)\nRx: Desmopressin", { x: 3.8, y: 7.0, w: 2.6, h: 0.38, fontSize: 8, color: C.white, align: "center", valign: "middle", margin: 0 });
arrowDown(s, 7.55, 7.0, 0.3, 0.35, C.purple);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 7.1, y: 7.0, w: 2.6, h: 0.38, fill: { color: C.purple, transparency: 25 }, line: { color: C.purple }, rectRadius: 0.06 });
s.addText("NEPHROGENIC DI (ADH resistant)\nRx: Thiazides + Low Na diet", { x: 7.1, y: 7.0, w: 2.6, h: 0.38, fontSize: 8, color: C.white, align: "center", valign: "middle", margin: 0 });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 10 β THYROID
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 02 | Thyroid Disorders β Hypo vs Hyper + Cancer", C.green);
// Hypo card
card(s, 0.2, 1.0, 6.15, 3.4, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.0, w: 6.15, h: 0.45, fill: { color: "#1B4332" }, line: { color: C.green } });
s.addText("HYPOTHYROIDISM β Mnemonic: SLOW BM", { x: 0.3, y: 1.0, w: 6.0, h: 0.45, fontSize: 12, bold: true, color: C.green, valign: "middle", margin: 0 });
const hypo = [
["S", "Sensitivity to cold"],
["L", "Lethargy + depression"],
["O", "Obesity (weight gain)"],
["W", "Water retention (myxedema)"],
["B", "Bradycardia"],
["M", "Menorrhagia + constipation"],
];
hypo.forEach(([l, v], i) => {
const col = i % 2, row = Math.floor(i / 2);
s.addShape(pres.shapes.ELLIPSE, { x: 0.3 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fill: { color: C.green }, line: { color: C.green } });
s.addText(l, { x: 0.3 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 0.75 + col * 3.0, y: 1.55 + row * 0.65, w: 2.6, h: 0.35, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Cause #1 (West): Hashimoto's (anti-TPO, anti-Tg) | Rx: Levothyroxine", { x: 0.3, y: 3.6, w: 5.9, h: 0.38, fontSize: 8.5, italic: true, color: C.gray, valign: "middle", margin: 0 });
// Hyper card
card(s, 6.95, 1.0, 6.15, 3.4, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 6.95, y: 1.0, w: 6.15, h: 0.45, fill: { color: "#1C3D2B" }, line: { color: C.teal } });
s.addText("HYPERTHYROIDISM β Mnemonic: FAST THY", { x: 7.05, y: 1.0, w: 6.0, h: 0.45, fontSize: 12, bold: true, color: C.teal, valign: "middle", margin: 0 });
const hyper = [
["F", "Flushing, heat intolerance"],
["A", "Arrhythmia (Afib), anxiety"],
["S", "Skinny (wt loss, diarrhea)"],
["T", "Tremor + tachycardia"],
["T", "Thyroid goiter"],
["HY", "High T3/T4, young women"],
];
hyper.forEach(([l, v], i) => {
const col = i % 2, row = Math.floor(i / 2);
s.addShape(pres.shapes.ELLIPSE, { x: 7.05 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(l, { x: 7.05 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 7.5 + col * 3.0, y: 1.55 + row * 0.65, w: 2.6, h: 0.35, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Graves' triad: Hyperthyroid + Exophthalmos + Pretibial myxedema | Rx: PTU (pregnancy), I-131, Beta-blocker", { x: 7.05, y: 3.6, w: 5.9, h: 0.38, fontSize: 8.5, italic: true, color: C.gray, valign: "middle", margin: 0 });
// Thyroid cancer
s.addText("Thyroid Cancer β PaFoMeAn (Best to Worst Prognosis)", { x: 0.2, y: 4.55, w: 12.9, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const cancers = [
{ name: "PAPILLARY", pct: "80%", color: C.green, key: "Orphan Annie nuclei\nPsammoma bodies\nRET/PTC mutation\nCervical LN mets (still good Px)" },
{ name: "FOLLICULAR", pct: "10%", color: C.teal, key: "Hematogenous spread\nVascular invasion\nNo lymph node mets\nRAI responsive" },
{ name: "MEDULLARY", pct: "5-8%", color: C.orange, key: "C-cells β Calcitonin\nAmyloid stroma\nRET mutation\nMEN2A/2B" },
{ name: "ANAPLASTIC", pct: "<5%", color: C.red, key: "Elderly patients\nRapidly fatal\nNO response to RAI\nWorst prognosis" },
];
cancers.forEach((c, i) => {
const x = 0.2 + i * 3.27;
card(s, x, 5.0, 3.05, 2.3, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x, y: 5.0, w: 3.05, h: 0.4, fill: { color: c.color }, line: { color: c.color } });
s.addText(c.name + " " + c.pct, { x: x + 0.05, y: 5.0, w: 2.95, h: 0.4, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addText(c.key, { x: x + 0.1, y: 5.45, w: 2.85, h: 1.8, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 0 });
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 7.28, w: 12.9, h: 0.15, fill: { color: C.green }, line: { color: C.green } });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 11 β ADRENAL
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 03 | Adrenal Disorders β GFR Zones + Cushing/Addison/Pheo", C.orange);
// GFR zones diagram
s.addText("Adrenal Zones β Mnemonic: GFR (outside β in)", { x: 0.2, y: 1.0, w: 6.5, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const zones = [
{ name: "GLOMERULOSA", makes: "Aldosterone", color: C.teal, x: 0.2, w: 4.2 },
{ name: "FASCICULATA", makes: "Cortisol (longest zone)", color: C.orange, x: 0.2, w: 3.2 },
{ name: "RETICULARIS", makes: "Androgens (DHEA)", color: C.purple, x: 0.2, w: 2.2 },
{ name: "MEDULLA", makes: "Catecholamines (Epi >> NE)", color: C.red, x: 0.2, w: 1.4 },
];
zones.forEach((z, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.5 + i * 0.62, w: z.w + 1.5, h: 0.55, fill: { color: z.color, transparency: 30 }, line: { color: z.color } });
s.addText(z.name + ": " + z.makes, { x: 0.3, y: 1.5 + i * 0.62, w: z.w + 1.3, h: 0.55, fontSize: 9.5, bold: true, color: C.white, valign: "middle", margin: 0 });
});
s.addText("'Go Find Rex' β and Rex lives in the Medulla", { x: 0.2, y: 4.05, w: 5.5, h: 0.35, fontSize: 9, italic: true, color: C.gray });
// Cushing's
card(s, 6.0, 1.0, 7.1, 3.0, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 6.0, y: 1.0, w: 7.1, h: 0.4, fill: { color: C.orange, transparency: 20 }, line: { color: C.orange } });
s.addText("Cushing's Syndrome β Mnemonic: CUSHINGS", { x: 6.1, y: 1.0, w: 6.9, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
const cush = ["C - Central obesity (moon face, buffalo hump)", "U - Urine cortisol elevated", "S - Striae (purple)", "H - Hypertension", "I - Insulin resistance", "N - No menses (amenorrhea)", "G - Glucose elevated", "S - Skin thinning + easy bruising"];
cush.forEach((c, i) => {
const col = i % 2, row = Math.floor(i / 2);
s.addText("β’ " + c, { x: 6.1 + col * 3.5, y: 1.5 + row * 0.48, w: 3.4, h: 0.42, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Dx Test: High-dose Dex suppresses PITUITARY only (not ectopic ACTH, not adrenal)", { x: 6.1, y: 3.62, w: 6.9, h: 0.35, fontSize: 8.5, italic: true, color: C.gray, margin: 0 });
// Addison's
card(s, 0.2, 4.45, 4.3, 2.75, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 4.45, w: 4.3, h: 0.4, fill: { color: C.teal, transparency: 20 }, line: { color: C.teal } });
s.addText("Addison's β SHADE", { x: 0.3, y: 4.45, w: 4.1, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
["S - Skin hyperpigmentation (ACTHβMSH)", "H - Hypotension + Hyperkalemia", "A - Anemia", "D - Dehydration (Na wasting)", "E - Electrolytes: Low Na, High K"].forEach((p, i) => {
s.addText("β’ " + p, { x: 0.3, y: 4.95 + i * 0.43, w: 4.0, h: 0.38, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Rx: IV Hydrocortisone + IV Saline (Addisonian crisis)", { x: 0.3, y: 7.0, w: 4.0, h: 0.35, fontSize: 8, italic: true, color: C.gray });
// Conn's
card(s, 4.7, 4.45, 4.1, 2.75, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 4.7, y: 4.45, w: 4.1, h: 0.4, fill: { color: C.green, transparency: 20 }, line: { color: C.green } });
s.addText("Conn's β HANK", { x: 4.8, y: 4.45, w: 3.9, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
["H - Hypertension (resistant)", "A - Alkalosis (metabolic)", "N - No renin (low renin)", "K - K+ low (hypokalemia)"].forEach((p, i) => {
s.addText("β’ " + p, { x: 4.8, y: 4.95 + i * 0.52, w: 3.85, h: 0.48, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Cause: Adrenal adenoma | Rx: Spironolactone", { x: 4.8, y: 7.0, w: 3.85, h: 0.35, fontSize: 8, italic: true, color: C.gray });
// Pheo
card(s, 9.0, 4.45, 4.1, 2.75, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 9.0, y: 4.45, w: 4.1, h: 0.4, fill: { color: C.red, transparency: 20 }, line: { color: C.red } });
s.addText("Pheochromocytoma β 5 P's", { x: 9.1, y: 4.45, w: 3.9, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
["P - Paroxysmal HTN", "P - Palpitations", "P - Perspiration (diaphoresis)", "P - Pallor", "P - Pain (headache)"].forEach((p, i) => {
s.addText("β’ " + p, { x: 9.1, y: 4.95 + i * 0.43, w: 3.85, h: 0.38, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Rule of 10s | Dx: Urine metanephrines | Rx: Alpha-block FIRST then Beta-block then surgery", { x: 9.1, y: 6.65, w: 3.85, h: 0.55, fontSize: 7.5, italic: true, color: C.gray });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 12 β DIABETES MELLITUS
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 04 | Diabetes Mellitus β T1 vs T2, DKA vs HHS, Drugs", C.red);
// T1 vs T2 table
s.addText("Type 1 vs Type 2 Diabetes", { x: 0.2, y: 1.0, w: 12.9, h: 0.38, fontSize: 13, bold: true, color: C.red });
const dmH = ["Feature", "TYPE 1", "TYPE 2"];
const dmR = [
["Pathology", "Autoimmune beta-cell destruction", "Insulin resistance + relative deficiency"],
["Age", "< 30 (child / young adult)", "> 40 (middle-aged / elderly)"],
["Body type", "Thin", "Obese"],
["Ketoacidosis", "YES β DKA (classic)", "Rare β HHS instead"],
["Autoantibodies", "Anti-GAD, Anti-islet cell", "None"],
["HLA link", "DR3, DR4", "No HLA link"],
["Treatment", "Insulin ONLY", "Lifestyle β Metformin β add-ons β Insulin"],
];
const dmCW = [2.2, 5.3, 5.5];
const dmCX = [0.2, 2.45, 7.8];
dmH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dmCX[ci], y: 1.43, w: dmCW[ci], h: 0.38, fill: { color: ci === 1 ? C.tealDk : (ci === 2 ? "#7F1D1D" : C.cardBg) }, line: { color: C.red } });
s.addText(h, { x: dmCX[ci] + 0.05, y: 1.43, w: dmCW[ci] - 0.1, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0, align: ci === 0 ? "left" : "center" });
});
dmR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dmCX[ci], y: 1.85 + ri * 0.46, w: dmCW[ci], h: 0.44, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.red, transparency: 80 } });
s.addText(cell, { x: dmCX[ci] + 0.05, y: 1.85 + ri * 0.46, w: dmCW[ci] - 0.1, h: 0.44, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
});
// DKA vs HHS
s.addText("DKA vs HHS β Critical Comparison", { x: 0.2, y: 5.15, w: 7.0, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const dkaH = ["Feature", "DKA (Type 1)", "HHS (Type 2)"];
const dkaR = [
["Glucose", "> 250 mg/dL", "> 600 mg/dL"],
["pH", "< 7.3 (ACIDOSIS)", "Normal (> 7.3)"],
["Ketones", "YES (+++)", "Minimal / absent"],
["Osmolality", "Mildly elevated", "> 320 mOsm/kg"],
["Mortality", "~1%", "~15% (worse!)"],
];
const dkaCW = [2.0, 2.5, 2.5];
const dkaCX = [0.2, 2.25, 4.8];
dkaH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dkaCX[ci], y: 5.57, w: dkaCW[ci], h: 0.38, fill: { color: ci === 1 ? C.tealDk : (ci === 2 ? "#7F1D1D" : C.cardBg) }, line: { color: C.orange } });
s.addText(h, { x: dkaCX[ci] + 0.05, y: 5.57, w: dkaCW[ci] - 0.1, h: 0.38, fontSize: 9, bold: true, color: C.white, valign: "middle", margin: 0, align: ci === 0 ? "left" : "center" });
});
dkaR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dkaCX[ci], y: 5.99 + ri * 0.42, w: dkaCW[ci], h: 0.4, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.orange, transparency: 70 } });
s.addText(cell, { x: dkaCX[ci] + 0.05, y: 5.99 + ri * 0.42, w: dkaCW[ci] - 0.1, h: 0.4, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
});
// Oral drugs
s.addText("Key Oral Antidiabetics", { x: 7.6, y: 5.15, w: 5.5, h: 0.38, fontSize: 13, bold: true, color: C.green });
const drugs = [
{ name: "Metformin", memo: "#1 T2DM | No hypoglycemia | Lactic acidosis risk", color: C.green },
{ name: "Sulfonylureas", memo: "Stimulate insulin secretion | CAN cause hypoglycemia", color: C.orange },
{ name: "GLP-1 agonists", memo: "Weight loss | Used in obese T2DM", color: C.teal },
{ name: "SGLT2 inhibitors", memo: "Glucosuria | UTI risk | Cardioprotective", color: C.purple },
];
drugs.forEach((d, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 7.6, y: 5.6 + i * 0.47, w: 2.0, h: 0.38, fill: { color: d.color }, line: { color: d.color }, rectRadius: 0.06 });
s.addText(d.name, { x: 7.6, y: 5.6 + i * 0.47, w: 2.0, h: 0.38, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(d.memo, { x: 9.7, y: 5.6 + i * 0.47, w: 3.4, h: 0.38, fontSize: 8, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("CRAMPS Complications: Cardiovascular | Retinopathy | Atherosclerosis | Micro-albuminuria (nephropathy) | Peripheral neuropathy | Susceptibility to infection", { x: 7.6, y: 7.5, w: 5.5, h: 0.38, fontSize: 7.5, italic: true, color: C.gray });
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 13 β ONE-LINE KILLERS / RAPID RECALL
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
sectionBar(s, "RAPID RECALL β One-Line Killers for MCQs", C.teal);
const killers = [
["Periventricular lesions, young woman", "Multiple Sclerosis", C.teal],
["Ascending paralysis after Campylobacter", "GBS", C.teal],
["'Worst HA of my life'", "SAH (Berry aneurysm)", C.red],
["Xanthochromia in CSF", "Subarachnoid Hemorrhage", C.red],
["Temporal lobe + fever + personality change", "HSV Encephalitis β ACYCLOVIR", C.orange],
["Pill-rolling tremor + cogwheel rigidity", "Parkinson's β Lewy bodies", C.purple],
["Beta-amyloid + neurofibrillary tangles", "Alzheimer's Disease", C.purple],
["Orphan Annie nuclei + Psammoma bodies", "Papillary Thyroid Cancer", C.green],
["Calcitonin-secreting tumor", "Medullary Thyroid Ca (MEN2)", C.green],
["High aldosterone + low renin + low K+", "Conn's Syndrome", C.orange],
["Paroxysmal HTN + diaphoresis + headache", "Pheochromocytoma", C.red],
["Skin hyperpigmentation + low Na + high K+", "Addison's Disease", C.teal],
["Moon face + buffalo hump + purple striae", "Cushing's Syndrome", C.orange],
["Bitemporal hemianopia", "Pituitary tumor (chiasm compression)", C.purple],
["High protein + normal WBC in CSF", "GBS (albuminocytologic dissociation)", C.teal],
["India Ink halo + HIV patient", "Cryptococcus meningitis", C.green],
["Spongiform vacuolation + myoclonus", "CJD (Prion disease)", C.red],
["Butterfly glioma crossing corpus callosum", "GBM (Grade IV)", C.purple],
["Homer-Wright rosettes, child, cerebellum", "Medulloblastoma", C.orange],
["Fried egg cells + 1p/19q deletion", "Oligodendroglioma", C.teal],
];
// Two columns
const left = killers.slice(0, 10);
const right = killers.slice(10);
[left, right].forEach((col, ci) => {
col.forEach(([clue, ans, color], ri) => {
const x = ci === 0 ? 0.2 : 6.75;
const y = 1.0 + ri * 0.63;
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 6.4, h: 0.55, fill: { color: C.cardBg }, line: { color: color, transparency: 50 } });
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.12, h: 0.55, fill: { color: color }, line: { color: color } });
s.addText(clue, { x: x + 0.2, y, w: 3.8, h: 0.55, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
s.addShape(pres.shapes.RIGHT_ARROW, { x: x + 4.05, y: y + 0.15, w: 0.3, h: 0.25, fill: { color: color }, line: { color: color } });
s.addText(ans, { x: x + 4.45, y, w: 1.85, h: 0.55, fontSize: 8, bold: true, color: color, valign: "middle", margin: 0 });
});
});
}
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 14 β CLOSING
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x: 13.12, y: 0, w: 0.18, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Good luck on your exams!", { x: 1.0, y: 1.2, w: 11.3, h: 1.2, fontSize: 42, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText("Master these mnemonics and you will ace your MCQs.", { x: 1.0, y: 2.5, w: 11.3, h: 0.6, fontSize: 20, color: C.teal, align: "center" });
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.2, w: 6.3, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
const mnems = [
{ label: "CNS", text: "SPASM (MS) | GAME (Tumors) | TRAP (Parkinson's) | ABCs (Alzheimer's) | CAME (Pediatric tumors)" },
{ label: "Endocrine", text: "FLAT PiG (Pituitary) | SLOW BM (Hypo) | FAST THY (Hyper) | PaFoMeAn (Thyroid Ca)" },
{ label: "Adrenal", text: "GFR zones | CUSHINGS | SHADE (Addison's) | HANK (Conn's) | 5 P's + Rule of 10s (Pheo)" },
{ label: "Diabetes", text: "CRAMPS (complications) | RAIN (insulin types) | DKA vs HHS comparison" },
];
mnems.forEach((m, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 1.0, y: 3.45 + i * 0.85, w: 1.6, h: 0.6, fill: { color: C.tealDk }, line: { color: C.teal }, rectRadius: 0.06 });
s.addText(m.label, { x: 1.0, y: 3.45 + i * 0.85, w: 1.6, h: 0.6, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(m.text, { x: 2.75, y: 3.48 + i * 0.85, w: 10.0, h: 0.55, fontSize: 9.5, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Prepared by Orris β Your AI Study Companion", { x: 1.0, y: 7.0, w: 11.3, h: 0.35, fontSize: 10, color: C.gray, align: "center" });
}
// βββ WRITE FILE βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pres.writeFile({ fileName: "/home/daytona/workspace/med-study-pptx/CNS_Endocrine_HighYield.pptx" })
.then(() => console.log("SUCCESS: Presentation written."))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/med-study-pptx && node build.js 2>&1
pres.shapes.RIGHT_ARROW and pres.shapes.DOWN_ARROW - these aren't valid. Let me check the valid shape names and fix:node -e "const p = require('pptxgenjs'); const ppt = new p(); console.log(Object.keys(ppt.shapes).filter(k => k.includes('ARROW')))"
arrowRight helper. The issue must be the helper functions using pres.shapes before pres is defined at that call scope. Let me check - actually the arrowRight helper uses pres.shapes.RIGHT_ARROW which IS valid. The error is at line 76 which is in the Title slide. Let me check what's at line 76:line: { color: "000000", transparency: 100 } - the transparency property in a line object is not valid in pptxgenjs. I need to remove those invalid line transparency settings and use line: { color: "000000", width: 0 } or just omit the line. Also the line: { color: C.teal, transparency: 70 } patterns elsewhere need fixing. Let me fix all these issues at once:cd /home/daytona/workspace/med-study-pptx && sed -i 's/line: { color: "000000", transparency: 100 }/line: { color: "000000", width: 0 }/g' build.js && sed -i 's/line: { color: C\.teal, transparency: 70 }/line: { color: "1E293B", width: 0 }/g' build.js && sed -i 's/line: { color: C\.teal, transparency: 80 }/line: { color: "1E293B", width: 0 }/g' build.js && sed -i 's/line: { color: C\.orange, transparency: 70 }/line: { color: "1E293B", width: 0 }/g' build.js && sed -i 's/line: { color: C\.orange, transparency: 60 }/line: { color: C.orange, width: 1 }/g' build.js && sed -i 's/line: { color: C\.gray, transparency: 80 }/line: { color: "1E293B", width: 0 }/g' build.js && sed -i 's/line: { color: C\.red, transparency: 80 }/line: { color: "1E293B", width: 0 }/g' build.js && sed -i 's/line: { color: C\.purple, transparency: 30 }/line: { color: C.purple, width: 1 }/g' build.js && node build.js 2>&1
~/med-study-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "CNS & Endocrine Pathology - High Yield MCQ Study Guide";
const C = {
navy: "0D1B2A",
darkBg: "111827",
teal: "0EA5E9",
tealDk: "0369A1",
green: "10B981",
red: "EF4444",
orange: "F59E0B",
purple: "8B5CF6",
white: "FFFFFF",
offWhite:"F1F5F9",
gray: "94A3B8",
lightGray:"E2E8F0",
cardBg: "1E293B",
cardBg2: "162032",
accent: "38BDF8",
};
function darkSlide(s) { s.background = { color: C.darkBg }; }
function sectionBar(s, title, color) {
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.85, fill: { color: color || C.tealDk }, line: { color: color || C.tealDk } });
s.addText(title, { x: 0.2, y: 0, w: 12.9, h: 0.85, fontSize: 20, bold: true, color: C.white, valign: "middle", margin: 0 });
}
function card(s, x, y, w, h, fillColor) {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill: { color: fillColor || C.cardBg },
line: { color: C.teal, width: 1 },
rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.25 }
});
}
function pill(s, text, x, y, w, h, bg) {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w, h, fill: { color: bg || C.teal }, line: { color: bg || C.teal }, rectRadius: 0.12 });
s.addText(text, { x, y, w, h, fontSize: 8, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
}
// βββ SLIDE 1 β TITLE βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 7.32, w: 13.3, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.ELLIPSE, { x: 9.5, y: 0.8, w: 3.5, h: 3.5, fill: { color: C.tealDk, transparency: 75 }, line: { color: C.tealDk, width: 0 } });
s.addShape(pres.shapes.ELLIPSE, { x: 10.5, y: 3.5, w: 2.5, h: 2.5, fill: { color: C.purple, transparency: 80 }, line: { color: C.purple, width: 0 } });
s.addText("CNS & Endocrine Pathology", { x: 0.5, y: 1.5, w: 9.5, h: 1.3, fontSize: 42, bold: true, color: C.white, fontFace: "Calibri" });
s.addText("High-Yield MCQ Study Guide", { x: 0.5, y: 2.85, w: 9.5, h: 0.8, fontSize: 26, color: C.teal, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.75, w: 5.2, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("1st Year Preclinical | MCQ-Focused | Mnemonics & Flowcharts", { x: 0.5, y: 3.9, w: 9.5, h: 0.5, fontSize: 14, color: C.gray, fontFace: "Calibri" });
const topics = ["CNS Demyelinating","Brain Tumors","Cerebrovascular","Neurodegeneration","CNS Infections","Pituitary","Thyroid","Adrenal","Diabetes"];
const pillColors = [C.tealDk, C.purple, C.red, C.green, C.orange, C.teal, C.tealDk, C.purple, C.green];
topics.forEach((t, i) => {
const col = i % 5, row = Math.floor(i / 5);
pill(s, t, 0.5 + col * 2.5, 4.7 + row * 0.55, 2.3, 0.38, pillColors[i]);
});
}
// βββ SLIDE 2 β CNS SECTION INTRO ββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.3, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("SECTION 1", { x: 0.6, y: 0.5, w: 12, h: 0.5, fontSize: 14, bold: true, color: C.teal, charSpacing: 4 });
s.addText("Central Nervous System\nPathology", { x: 0.6, y: 1.1, w: 12, h: 2, fontSize: 44, bold: true, color: C.white, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.2, w: 4, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
const topics = [
{ label: "01", text: "Demyelinating Diseases (MS, GBS)", color: C.teal },
{ label: "02", text: "Brain Tumors", color: C.purple },
{ label: "03", text: "Cerebrovascular Disease", color: C.red },
{ label: "04", text: "Neurodegeneration", color: C.green },
{ label: "05", text: "CNS Infections", color: C.orange },
];
topics.forEach((t, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.5 + i * 0.7, w: 0.45, h: 0.45, fill: { color: t.color }, line: { color: t.color } });
s.addText(t.label, { x: 0.6, y: 3.5 + i * 0.7, w: 0.45, h: 0.45, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(t.text, { x: 1.2, y: 3.52 + i * 0.7, w: 8, h: 0.4, fontSize: 16, color: C.white, valign: "middle", margin: 0 });
});
}
// βββ SLIDE 3 β MS vs GBS ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "01 | Demyelinating Diseases: Multiple Sclerosis vs Guillain-Barre Syndrome", C.tealDk);
card(s, 0.2, 1.0, 6.2, 6.1, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.0, w: 6.2, h: 0.5, fill: { color: C.tealDk }, line: { color: C.tealDk } });
s.addText("MULTIPLE SCLEROSIS (MS)", { x: 0.3, y: 1.0, w: 6.0, h: 0.5, fontSize: 13, bold: true, color: C.white, valign: "middle", margin: 0 });
const msData = [
["Mnemonic", "SPASM:\nSensory, Pain, Ataxia, Sphincter, Motor"],
["Age/Sex", "Young women 20-40"],
["Pathology", "Oligodendrocyte destruction\nWhite matter demyelination"],
["Location", "Periventricular plaques\nDawson's Fingers on MRI"],
["CSF", "Oligoclonal IgG bands"],
["Signs", "Uhthoff's (heat worsens)\nLhermitte's (neck flex = shock)"],
["Treatment", "Beta-interferon (modify)\nSteroids (acute attack)"],
];
msData.forEach(([k, v], i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.62 + i * 0.65, w: 1.6, h: 0.58, fill: { color: C.tealDk, transparency: 30 }, line: { color: C.teal, width: 1 } });
s.addText(k, { x: 0.3, y: 1.62 + i * 0.65, w: 1.6, h: 0.58, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 2.05, y: 1.62 + i * 0.65, w: 4.25, h: 0.58, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
card(s, 6.9, 1.0, 6.2, 6.1, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 6.9, y: 1.0, w: 6.2, h: 0.5, fill: { color: C.purple }, line: { color: C.purple } });
s.addText("GUILLAIN-BARRE SYNDROME (GBS)", { x: 7.0, y: 1.0, w: 6.0, h: 0.5, fontSize: 13, bold: true, color: C.white, valign: "middle", margin: 0 });
const gbsData = [
["Mnemonic", "Goes Bottom-to-Shoulder\n= Ascending paralysis"],
["Trigger", "Post-infection\nCampylobacter jejuni #1"],
["Pathology", "Schwann cell destruction\nPeripheral demyelination"],
["Presentation", "Ascending flaccid paralysis\n+ Areflexia"],
["CSF", "ALBUMINOCYTOLOGIC\nDISSOCIATION\n(High protein, normal WBC)"],
["Risk", "Respiratory failure\nMonitor FVC!"],
["Treatment", "IVIG or Plasmapheresis"],
];
gbsData.forEach(([k, v], i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 7.0, y: 1.62 + i * 0.65, w: 1.6, h: 0.58, fill: { color: C.purple, transparency: 30 }, line: { color: C.purple, width: 1 } });
s.addText(k, { x: 7.0, y: 1.62 + i * 0.65, w: 1.6, h: 0.58, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 8.7, y: 1.62 + i * 0.65, w: 4.3, h: 0.58, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 7.1, w: 12.9, h: 0.38, fill: { color: C.red, transparency: 20 }, line: { color: C.red, width: 1 } });
s.addText("MCQ TRAP: MS = CENTRAL (UMN) = Spastic + Hyperreflexia | GBS = PERIPHERAL (LMN) = Flaccid + Areflexia", { x: 0.3, y: 7.1, w: 12.7, h: 0.38, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
}
// βββ SLIDE 4 β BRAIN TUMORS ββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "02 | Brain Tumors β High-Yield Table + Mnemonics (GAME / CAME)", C.purple);
const game = [
{ letter: "G", text: "liomas (most common overall)", color: C.teal },
{ letter: "A", text: "denocarcinoma mets (#1 in adults)", color: C.orange },
{ letter: "M", text: "eningioma (most common BENIGN)", color: C.green },
{ letter: "E", text: "pendymoma (4th ventricle, child)", color: C.purple },
];
game.forEach((g, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2 + i * 3.25, y: 1.0, w: 3.0, h: 0.85, fill: { color: g.color, transparency: 25 }, line: { color: g.color, width: 1 }, rectRadius: 0.07 });
s.addText(g.letter, { x: 0.2 + i * 3.25, y: 1.0, w: 0.65, h: 0.85, fontSize: 26, bold: true, color: g.color, align: "center", valign: "middle", margin: 0 });
s.addText(g.text, { x: 0.85 + i * 3.25, y: 1.0, w: 2.4, h: 0.85, fontSize: 10, color: C.white, valign: "middle", margin: 0 });
});
const headers = ["Tumor", "Location", "Age", "Key MCQ Fact"];
const rows = [
["Pilocytic Astrocytoma", "Cerebellum", "Child", "Rosenthal fibers | BENIGN Grade I"],
["Medulloblastoma", "Cerebellum (4th V)", "Child", "Homer-Wright rosettes | Radiosensitive"],
["Ependymoma", "4th Ventricle", "Child", "Perivascular pseudorosettes"],
["GBM (Grade IV)", "Temporal/Frontal", "Elderly", "Butterfly pattern | Pseudopalisading necrosis | GFAP+"],
["Oligodendroglioma", "Frontal lobe", "Adult", "Fried egg cells | 1p/19q deletion"],
["Meningioma", "Parasagittal", "Adult F", "Psammoma bodies | Whorled pattern | BENIGN extra-axial"],
["Schwannoma (CN VIII)", "CPA angle", "Adult", "S100+ | Bilateral = NF2"],
["Craniopharyngioma", "Suprasellar", "Child", "Calcification | Cholesterol crystals | Bitemporal hemianopia"],
];
const colW = [2.6, 2.2, 1.3, 6.8];
const colX = [0.2, 2.85, 5.1, 6.45];
headers.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: colX[ci], y: 2.0, w: colW[ci], h: 0.4, fill: { color: C.purple }, line: { color: C.purple } });
s.addText(h, { x: colX[ci] + 0.05, y: 2.0, w: colW[ci] - 0.1, h: 0.4, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
});
rows.forEach((row, ri) => {
const bg = ri % 2 === 0 ? C.cardBg : C.cardBg2;
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: colX[ci], y: 2.44 + ri * 0.6, w: colW[ci], h: 0.58, fill: { color: bg }, line: { color: C.cardBg, width: 0 } });
s.addText(cell, { x: colX[ci] + 0.05, y: 2.44 + ri * 0.6, w: colW[ci] - 0.1, h: 0.58, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
});
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 7.1, w: 12.9, h: 0.35, fill: { color: C.orange, transparency: 25 }, line: { color: C.orange, width: 1 }, rectRadius: 0.05 });
s.addText("PEDIATRIC (CAME): Craniopharyngioma | Astrocytoma (pilocytic) | Medulloblastoma | Ependymoma", { x: 0.3, y: 7.1, w: 12.7, h: 0.35, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
}
// βββ SLIDE 5 β STROKE FLOWCHART ββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "03 | Cerebrovascular Disease β Stroke Classification Flowchart", C.red);
// Stroke central node
s.addShape(pres.shapes.ELLIPSE, { x: 5.25, y: 1.05, w: 2.8, h: 0.9, fill: { color: C.red }, line: { color: C.red } });
s.addText("STROKE", { x: 5.25, y: 1.05, w: 2.8, h: 0.9, fontSize: 18, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Ischemic branch
s.addShape(pres.shapes.DOWN_ARROW, { x: 2.7, y: 1.6, w: 0.3, h: 0.45, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 1.0, y: 2.1, w: 3.5, h: 0.68, fill: { color: C.tealDk }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
s.addText("ISCHEMIC (87%)", { x: 1.0, y: 2.1, w: 3.5, h: 0.68, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.shapes.DOWN_ARROW, { x: 1.3, y: 2.85, w: 0.3, h: 0.4, fill: { color: C.teal }, line: { color: C.teal } });
card(s, 0.3, 3.3, 2.0, 1.55, C.cardBg);
s.addText("THROMBOTIC", { x: 0.3, y: 3.3, w: 2.0, h: 0.38, fontSize: 10, bold: true, color: C.teal, align: "center", valign: "middle", margin: 0 });
s.addText("Atherosclerotic plaque\nGradual onset\nWake-up stroke", { x: 0.3, y: 3.7, w: 2.0, h: 1.1, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 4 });
s.addShape(pres.shapes.DOWN_ARROW, { x: 2.65, y: 2.85, w: 0.3, h: 0.4, fill: { color: C.teal }, line: { color: C.teal } });
card(s, 2.38, 3.3, 2.0, 1.55, C.cardBg);
s.addText("EMBOLIC", { x: 2.38, y: 3.3, w: 2.0, h: 0.38, fontSize: 10, bold: true, color: C.teal, align: "center", valign: "middle", margin: 0 });
s.addText("From heart (Afib #1)\nSudden onset\nMCA most common", { x: 2.38, y: 3.7, w: 2.0, h: 1.1, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 4 });
// Hemorrhagic branch
s.addShape(pres.shapes.DOWN_ARROW, { x: 10.0, y: 1.6, w: 0.3, h: 0.45, fill: { color: C.red }, line: { color: C.red } });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 8.8, y: 2.1, w: 3.5, h: 0.68, fill: { color: "7F1D1D" }, line: { color: C.red, width: 1 }, rectRadius: 0.07 });
s.addText("HEMORRHAGIC (13%)", { x: 8.8, y: 2.1, w: 3.5, h: 0.68, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.shapes.DOWN_ARROW, { x: 9.1, y: 2.85, w: 0.3, h: 0.4, fill: { color: C.red }, line: { color: C.red } });
card(s, 8.3, 3.3, 2.0, 1.55, C.cardBg);
s.addText("INTRACEREBRAL", { x: 8.3, y: 3.3, w: 2.0, h: 0.38, fontSize: 9, bold: true, color: C.red, align: "center", valign: "middle", margin: 0 });
s.addText("HTN #1 cause\nCharcot-Bouchard\naneurysms\nPutamen most common", { x: 8.3, y: 3.7, w: 2.0, h: 1.1, fontSize: 8, color: C.offWhite, valign: "top", margin: 4 });
s.addShape(pres.shapes.DOWN_ARROW, { x: 10.65, y: 2.85, w: 0.3, h: 0.4, fill: { color: C.red }, line: { color: C.red } });
card(s, 10.0, 3.3, 2.2, 1.55, C.cardBg);
s.addText("SUBARACHNOID", { x: 10.0, y: 3.3, w: 2.2, h: 0.38, fontSize: 9, bold: true, color: C.red, align: "center", valign: "middle", margin: 0 });
s.addText("Berry aneurysm #1\n'Worst HA of life'\nXanthochromia CSF\nADPKD association", { x: 10.0, y: 3.7, w: 2.2, h: 1.1, fontSize: 8, color: C.offWhite, valign: "top", margin: 4 });
// EDH vs SDH table
s.addText("EDH vs SDH Hematoma", { x: 4.4, y: 5.0, w: 4.5, h: 0.38, fontSize: 13, bold: true, color: C.orange, align: "center" });
const edhSdh = [
["", "EPIDURAL (EDH)", "SUBDURAL (SDH)"],
["Vessel", "Middle meningeal ARTERY", "Bridging VEINS"],
["CT shape", "Biconvex (lens)", "Crescent-shaped"],
["Lucid interval", "YES (classic)", "Sometimes"],
["Cause", "Temporal bone fracture", "Elderly / alcoholics"],
];
const eCols = [1.3, 4.0, 3.8];
const eX = [4.2, 5.55, 9.6];
edhSdh.forEach((row, ri) => {
row.forEach((cell, ci) => {
const bg = ri === 0 ? C.orange : (ri % 2 === 0 ? C.cardBg : C.cardBg2);
const fg = ri === 0 ? C.navy : (ci === 0 ? C.gray : C.offWhite);
s.addShape(pres.shapes.RECTANGLE, { x: eX[ci], y: 5.42 + ri * 0.35, w: eCols[ci], h: 0.33, fill: { color: bg }, line: { color: C.cardBg, width: 0 } });
s.addText(cell, { x: eX[ci] + 0.05, y: 5.42 + ri * 0.35, w: eCols[ci] - 0.1, h: 0.33, fontSize: 9, bold: ri === 0, color: fg, valign: "middle", margin: 0 });
});
});
s.addText("Mnemonic: EDH = ARTERY = FAST | SDH = VEIN = SLOW", { x: 4.2, y: 7.15, w: 8.9, h: 0.3, fontSize: 10, bold: true, color: C.orange, align: "center", margin: 0 });
}
// βββ SLIDE 6 β NEURODEGENERATION ββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "04 | Neurodegenerative Diseases β The Big 4 (APAL)", C.green);
const diseases = [
{
name: "ALZHEIMER'S",
mnemonic: "ABCs of Alzheimer's",
color: C.teal,
points: ["A - Amyloid-Ξ² plaques (extracellular)","B - Brain atrophy (hippocampus 1st)","C - Chromosome 21 / ApoE4","D - Downreg. ACh (Rx: Donepezil)","E - Early = short-term memory loss","F - Fibrillary tangles (tau, intracell.)"],
},
{
name: "PARKINSON'S",
mnemonic: "TRAP",
color: C.purple,
points: ["T - Tremor (resting, pill-rolling)","R - Rigidity (cogwheel)","A - Akinesia / bradykinesia","P - Postural instability","Path: Lewy bodies (alpha-synuclein)","Location: Substantia Nigra","Rx: Levodopa/Carbidopa (gold std)"],
},
{
name: "ALS",
mnemonic: "All Limbs, Spared Sensation",
color: C.orange,
points: ["UMN + LMN both involved (unique)","NO sensory loss","NO cognitive decline","NO autonomic dysfunction","Gene: SOD1 mutation","Rx: Riluzole (only disease-modifying)"],
},
{
name: "LEWY BODY",
mnemonic: "VIPs Fluctuate",
color: C.red,
points: ["V - Visual hallucinations (EARLY)","I - Identity: Parkinsonism early","P - Psychiatric (REM sleep disorder)","Fluctuating cognition (hallmark)","Lewy bodies (alpha-synuclein)","Sensitive to antipsychotics!"],
},
];
diseases.forEach((d, i) => {
const x = 0.2 + i * 3.27;
card(s, x, 1.0, 3.05, 6.35, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.0, w: 3.05, h: 0.48, fill: { color: d.color }, line: { color: d.color } });
s.addText(d.name, { x: x + 0.05, y: 1.0, w: 2.95, h: 0.48, fontSize: 12, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: x + 0.1, y: 1.55, w: 2.85, h: 0.35, fill: { color: d.color, transparency: 50 }, line: { color: d.color, width: 1 }, rectRadius: 0.05 });
s.addText(d.mnemonic, { x: x + 0.1, y: 1.55, w: 2.85, h: 0.35, fontSize: 9, bold: true, italic: true, color: C.white, align: "center", valign: "middle", margin: 0 });
d.points.forEach((p, pi) => {
s.addText("β’ " + p, { x: x + 0.12, y: 2.02 + pi * 0.75, w: 2.85, h: 0.68, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 0 });
});
});
}
// βββ SLIDE 7 β CNS INFECTIONS ββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "05 | CNS Infections β Meningitis Bugs, CSF Table, Encephalitis, Prions", C.orange);
// CSF Table
s.addText("CSF Analysis β Quick Comparison", { x: 0.2, y: 1.0, w: 12.9, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const csfH = ["Feature", "BACTERIAL", "VIRAL (Aseptic)", "FUNGAL / TB"];
const csfR = [
["Appearance", "Turbid / Cloudy", "Clear", "Clear or Turbid"],
["WBC", "High PMNs (>1000)", "High Lymphocytes", "High Lymphocytes"],
["Glucose", "VERY LOW (<40)", "Normal", "Low"],
["Protein", "VERY HIGH (>200)", "Slightly High", "High"],
["Opening P", "Elevated", "Normal/slight", "Elevated"],
];
const csfCW = [2.1, 2.9, 3.0, 3.0];
const csfCX = [0.2, 2.35, 5.3, 8.35];
const csfHC = [C.cardBg, C.red, C.tealDk, C.purple];
csfH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: csfCX[ci], y: 1.42, w: csfCW[ci], h: 0.42, fill: { color: csfHC[ci] }, line: { color: csfHC[ci] } });
s.addText(h, { x: csfCX[ci] + 0.05, y: 1.42, w: csfCW[ci] - 0.1, h: 0.42, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0, align: ci > 0 ? "center" : "left" });
});
csfR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: csfCX[ci], y: 1.87 + ri * 0.42, w: csfCW[ci], h: 0.4, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.cardBg, width: 0 } });
s.addText(cell, { x: csfCX[ci] + 0.05, y: 1.87 + ri * 0.42, w: csfCW[ci] - 0.1, h: 0.4, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0, align: ci > 0 ? "center" : "left" });
});
});
// Bugs by age
s.addText("Bacterial Meningitis Bugs by Age", { x: 0.2, y: 4.15, w: 6.5, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const ages = [
{ age: "0-3 months", bugs: "Group B Strep, E. coli, Listeria", memo: "GEL", color: C.red },
{ age: "3m - 18 yrs", bugs: "N. meningitidis, S. pneumoniae, H. influenzae", memo: "NSH", color: C.orange },
{ age: "Adults 18-50", bugs: "S. pneumoniae, N. meningitidis", memo: "SN", color: C.teal },
{ age: "Elderly / Immunocompromised", bugs: "S. pneumoniae + Listeria", memo: "SPL", color: C.purple },
];
ages.forEach((a, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 4.6 + i * 0.68, w: 2.1, h: 0.55, fill: { color: a.color }, line: { color: a.color }, rectRadius: 0.06 });
s.addText(a.age, { x: 0.2, y: 4.6 + i * 0.68, w: 2.1, h: 0.55, fontSize: 8, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(a.bugs, { x: 2.45, y: 4.6 + i * 0.68, w: 3.8, h: 0.55, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
pill(s, "Memo: " + a.memo, 6.4, 4.65 + i * 0.68, 1.35, 0.4, a.color);
});
// Signs
s.addText("Kernig's sign: Hip 90Β° flex - can't extend knee fully", { x: 0.2, y: 7.22, w: 7.5, h: 0.25, fontSize: 8.5, italic: true, color: C.gray });
// HSV + Crypto boxes
card(s, 8.0, 4.1, 5.1, 1.6, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 8.0, y: 4.1, w: 5.1, h: 0.38, fill: { color: C.red, transparency: 25 }, line: { color: C.red, width: 1 } });
s.addText("HSV-1 Encephalitis", { x: 8.05, y: 4.1, w: 5.0, h: 0.38, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addText("Temporal lobe | Fever + personality change + temporal seizures\nCSF: PCR for HSV DNA | Treatment: IV ACYCLOVIR (stat!)", { x: 8.05, y: 4.52, w: 5.0, h: 1.1, fontSize: 9, color: C.offWhite, valign: "top", margin: 0 });
card(s, 8.0, 5.85, 5.1, 1.55, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 8.0, y: 5.85, w: 5.1, h: 0.38, fill: { color: C.purple, transparency: 25 }, line: { color: C.purple, width: 1 } });
s.addText("Cryptococcus + Prion Disease (CJD)", { x: 8.05, y: 5.85, w: 5.0, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addText("Crypto: HIV CD4<100 | India Ink halo | Rx: Ampho B + Flucytosine\nCJD: Spongiform vacuolation | Myoclonus + rapid dementia | PrP protein", { x: 8.05, y: 6.27, w: 5.0, h: 1.05, fontSize: 9, color: C.offWhite, valign: "top", margin: 0 });
}
// βββ SLIDE 8 β ENDOCRINE INTRO βββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: "0A1628" };
s.addShape(pres.shapes.RECTANGLE, { x: 13.0, y: 0, w: 0.3, h: 7.5, fill: { color: C.green }, line: { color: C.green } });
s.addText("SECTION 2", { x: 0.6, y: 0.5, w: 12, h: 0.5, fontSize: 14, bold: true, color: C.green, charSpacing: 4 });
s.addText("Endocrine\nPathology", { x: 0.6, y: 1.1, w: 12, h: 2.2, fontSize: 52, bold: true, color: C.white, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.4, w: 4, h: 0.05, fill: { color: C.green }, line: { color: C.green } });
const topics = [
{ label: "01", text: "Pituitary Disorders", color: C.teal },
{ label: "02", text: "Thyroid Disorders", color: C.green },
{ label: "03", text: "Adrenal Disorders", color: C.orange },
{ label: "04", text: "Diabetes Mellitus", color: C.red },
];
topics.forEach((t, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.7 + i * 0.78, w: 0.45, h: 0.48, fill: { color: t.color }, line: { color: t.color } });
s.addText(t.label, { x: 0.6, y: 3.7 + i * 0.78, w: 0.45, h: 0.48, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(t.text, { x: 1.2, y: 3.75 + i * 0.78, w: 9, h: 0.4, fontSize: 18, color: C.white, valign: "middle", margin: 0 });
});
}
// βββ SLIDE 9 β PITUITARY βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 01 | Pituitary Disorders β Hormones, Adenomas & DI Flowchart", C.teal);
s.addText("Anterior Pituitary β Mnemonic: FLAT PiG", { x: 0.2, y: 1.0, w: 7.5, h: 0.38, fontSize: 13, bold: true, color: C.teal });
const hormones = [
{ letter: "F", h: "FSH", note: "Follicle stimulating" },
{ letter: "L", h: "LH", note: "Luteinizing hormone" },
{ letter: "A", h: "ACTH", note: "Adrenocorticotropic" },
{ letter: "T", h: "TSH", note: "Thyroid stimulating" },
{ letter: "Pi", h: "PRL", note: "Prolactin" },
{ letter: "G", h: "GH", note: "Growth hormone" },
];
hormones.forEach((h, i) => {
const x = 0.2 + i * 2.15;
s.addShape(pres.shapes.ELLIPSE, { x, y: 1.48, w: 1.8, h: 0.82, fill: { color: C.tealDk, transparency: 25 }, line: { color: C.teal, width: 1 } });
s.addText(h.letter, { x, y: 1.48, w: 0.55, h: 0.82, fontSize: 18, bold: true, color: C.accent, align: "center", valign: "middle", margin: 0 });
s.addText(h.h + "\n" + h.note, { x: x + 0.5, y: 1.48, w: 1.3, h: 0.82, fontSize: 8, color: C.white, valign: "middle", margin: 0 });
});
s.addText("Posterior: ADH + Oxytocin (made in hypothalamus, stored in posterior pituitary)", { x: 0.2, y: 2.4, w: 12.9, h: 0.35, fontSize: 10, italic: true, color: C.gray });
s.addText("Pituitary Adenoma Types", { x: 0.2, y: 2.82, w: 7.5, h: 0.38, fontSize: 13, bold: true, color: C.teal });
const adH = ["Adenoma", "Hormone", "Presentation"];
const adR = [
["Prolactinoma (#1)", "Prolactin", "Amenorrhea + galactorrhea (F); Impotence (M) | Rx: Cabergoline"],
["Somatotroph", "GH", "Acromegaly (adult) / Gigantism (child) | Rx: Transsphenoidal surgery"],
["Corticotroph", "ACTH", "Cushing's DISEASE | Suppressed by high-dose dexamethasone"],
["Non-functioning", "None", "Mass effects: Bitemporal hemianopia (optic chiasm compression)"],
];
const adCW = [2.4, 1.8, 8.7];
const adCX = [0.2, 2.65, 4.5];
adH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: adCX[ci], y: 3.25, w: adCW[ci], h: 0.38, fill: { color: C.tealDk }, line: { color: C.tealDk } });
s.addText(h, { x: adCX[ci] + 0.05, y: 3.25, w: adCW[ci] - 0.1, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
});
adR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: adCX[ci], y: 3.67 + ri * 0.55, w: adCW[ci], h: 0.52, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.cardBg, width: 0 } });
s.addText(cell, { x: adCX[ci] + 0.05, y: 3.67 + ri * 0.55, w: adCW[ci] - 0.1, h: 0.52, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
});
// DI flowchart
s.addText("Diabetes Insipidus β Flowchart", { x: 0.2, y: 5.95, w: 12.9, h: 0.35, fontSize: 13, bold: true, color: C.accent });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 4.5, y: 6.35, w: 4.3, h: 0.55, fill: { color: C.tealDk }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
s.addText("DIABETES INSIPIDUS (Dilute urine, high serum Na)", { x: 4.5, y: 6.35, w: 4.3, h: 0.55, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.shapes.DOWN_ARROW, { x: 5.0, y: 6.95, w: 0.3, h: 0.38, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 3.5, y: 7.0, w: 2.8, h: 0.4, fill: { color: C.teal, transparency: 25 }, line: { color: C.teal, width: 1 }, rectRadius: 0.06 });
s.addText("CENTRAL DI (ADH deficient)\nRx: Desmopressin", { x: 3.5, y: 7.0, w: 2.8, h: 0.4, fontSize: 8.5, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.shapes.DOWN_ARROW, { x: 7.97, y: 6.95, w: 0.3, h: 0.38, fill: { color: C.purple }, line: { color: C.purple } });
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 7.0, y: 7.0, w: 2.8, h: 0.4, fill: { color: C.purple, transparency: 25 }, line: { color: C.purple, width: 1 }, rectRadius: 0.06 });
s.addText("NEPHROGENIC DI (ADH resistant)\nRx: Thiazides + Low Na diet", { x: 7.0, y: 7.0, w: 2.8, h: 0.4, fontSize: 8.5, color: C.white, align: "center", valign: "middle", margin: 0 });
}
// βββ SLIDE 10 β THYROID ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 02 | Thyroid Disorders β Hypo vs Hyper + Cancer PaFoMeAn", C.green);
card(s, 0.2, 1.0, 6.15, 3.4, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.0, w: 6.15, h: 0.45, fill: { color: "1B4332" }, line: { color: "1B4332" } });
s.addText("HYPOTHYROIDISM β Mnemonic: SLOW BM", { x: 0.3, y: 1.0, w: 6.0, h: 0.45, fontSize: 12, bold: true, color: C.green, valign: "middle", margin: 0 });
const hypo = [
["S", "Sensitivity to cold"],
["L", "Lethargy + depression"],
["O", "Obesity (weight gain)"],
["W", "Water retention (myxedema)"],
["B", "Bradycardia"],
["M", "Menorrhagia + constipation"],
];
hypo.forEach(([l, v], i) => {
const col = i % 2, row = Math.floor(i / 2);
s.addShape(pres.shapes.ELLIPSE, { x: 0.3 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fill: { color: C.green }, line: { color: C.green } });
s.addText(l, { x: 0.3 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 0.75 + col * 3.0, y: 1.55 + row * 0.65, w: 2.6, h: 0.35, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Cause #1 West: Hashimoto's (anti-TPO, anti-Tg, Hurthle cells) | Rx: Levothyroxine", { x: 0.3, y: 3.62, w: 5.9, h: 0.35, fontSize: 8.5, italic: true, color: C.gray, valign: "middle", margin: 0 });
card(s, 6.95, 1.0, 6.15, 3.4, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 6.95, y: 1.0, w: 6.15, h: 0.45, fill: { color: "1C3D2B" }, line: { color: "1C3D2B" } });
s.addText("HYPERTHYROIDISM β Mnemonic: FAST THY", { x: 7.05, y: 1.0, w: 6.0, h: 0.45, fontSize: 12, bold: true, color: C.teal, valign: "middle", margin: 0 });
const hyper = [
["F", "Flushing, heat intolerance"],
["A", "Arrhythmia (Afib), anxiety"],
["S", "Skinny (wt loss, diarrhea)"],
["T", "Tremor + tachycardia"],
["T", "Thyroid goiter"],
["HY", "High T3/T4, young women"],
];
hyper.forEach(([l, v], i) => {
const col = i % 2, row = Math.floor(i / 2);
s.addShape(pres.shapes.ELLIPSE, { x: 7.05 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(l, { x: 7.05 + col * 3.0, y: 1.55 + row * 0.65, w: 0.35, h: 0.35, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(v, { x: 7.5 + col * 3.0, y: 1.55 + row * 0.65, w: 2.6, h: 0.35, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Graves' triad: Hyperthyroid + Exophthalmos + Pretibial myxedema | Rx: PTU (pregnancy), I-131, Beta-blocker", { x: 7.05, y: 3.62, w: 5.9, h: 0.35, fontSize: 8.5, italic: true, color: C.gray, valign: "middle", margin: 0 });
s.addText("Thyroid Cancer β PaFoMeAn (Best to Worst Prognosis)", { x: 0.2, y: 4.55, w: 12.9, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const cancers = [
{ name: "PAPILLARY 80%", color: C.green, key: "Orphan Annie nuclei\nPsammoma bodies\nRET/PTC mutation\nCervical LN mets (good Px)" },
{ name: "FOLLICULAR 10%", color: C.teal, key: "Hematogenous spread\nVascular invasion\nNo LN mets\nRAI responsive" },
{ name: "MEDULLARY 5-8%", color: C.orange, key: "C-cells - Calcitonin\nAmyloid stroma\nRET mutation\nMEN2A / MEN2B" },
{ name: "ANAPLASTIC <5%", color: C.red, key: "Elderly patients\nRapidly fatal\nNo RAI response\nWorst prognosis" },
];
cancers.forEach((c, i) => {
const x = 0.2 + i * 3.27;
card(s, x, 5.0, 3.05, 2.4, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x, y: 5.0, w: 3.05, h: 0.4, fill: { color: c.color }, line: { color: c.color } });
s.addText(c.name, { x: x + 0.05, y: 5.0, w: 2.95, h: 0.4, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0 });
s.addText(c.key, { x: x + 0.1, y: 5.45, w: 2.85, h: 1.85, fontSize: 8.5, color: C.offWhite, valign: "top", margin: 0 });
});
}
// βββ SLIDE 11 β ADRENAL ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 03 | Adrenal Disorders β GFR Zones + Cushing/Addison/Conn/Pheo", C.orange);
s.addText("Adrenal Zones β GFR Mnemonic (outside to inside)", { x: 0.2, y: 1.0, w: 5.7, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const zones = [
{ name: "G - Glomerulosa", makes: "Aldosterone", color: C.teal, w: 5.2 },
{ name: "F - Fasciculata", makes: "Cortisol (longest zone)", color: C.orange, w: 4.0 },
{ name: "R - Reticularis", makes: "Androgens (DHEA)", color: C.purple, w: 3.0 },
{ name: "Medulla", makes: "Catecholamines (Epi >> NE)", color: C.red, w: 2.2 },
];
zones.forEach((z, i) => {
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.48 + i * 0.62, w: z.w, h: 0.55, fill: { color: z.color, transparency: 30 }, line: { color: z.color, width: 1 } });
s.addText(z.name + " β " + z.makes, { x: 0.3, y: 1.48 + i * 0.62, w: z.w - 0.15, h: 0.55, fontSize: 9.5, bold: true, color: C.white, valign: "middle", margin: 0 });
});
s.addText("Memory: 'Go Find Rex' β Rex lives in the Medulla", { x: 0.2, y: 4.02, w: 5.7, h: 0.3, fontSize: 9, italic: true, color: C.gray });
card(s, 5.9, 1.0, 7.2, 2.9, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 5.9, y: 1.0, w: 7.2, h: 0.4, fill: { color: C.orange, transparency: 20 }, line: { color: C.orange, width: 1 } });
s.addText("Cushing's Syndrome β Mnemonic: CUSHINGS", { x: 6.0, y: 1.0, w: 7.0, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
const cush = ["C - Central obesity (moon face, buffalo hump)","U - Urine cortisol elevated","S - Striae (purple)","H - Hypertension","I - Insulin resistance","N - No menses (amenorrhea)","G - Glucose elevated","S - Skin thinning + easy bruising"];
cush.forEach((c, i) => {
const col = i % 2, row = Math.floor(i / 2);
s.addText("β’ " + c, { x: 6.0 + col * 3.5, y: 1.5 + row * 0.46, w: 3.4, h: 0.42, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Dx: High-dose Dex suppresses PITUITARY only β not ectopic ACTH, not adrenal", { x: 6.0, y: 3.55, w: 7.0, h: 0.32, fontSize: 8.5, italic: true, color: C.gray, margin: 0 });
card(s, 0.2, 4.42, 4.3, 2.8, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 4.42, w: 4.3, h: 0.4, fill: { color: C.teal, transparency: 20 }, line: { color: C.teal, width: 1 } });
s.addText("Addison's Disease β SHADE", { x: 0.3, y: 4.42, w: 4.1, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
["S - Skin hyperpigmentation (ACTHβMSH)","H - Hypotension + Hyperkalemia","A - Anemia (normocytic)","D - Dehydration (Na wasting)","E - Electrolytes: Low Na, High K"].forEach((p, i) => {
s.addText("β’ " + p, { x: 0.3, y: 4.9 + i * 0.42, w: 4.0, h: 0.38, fontSize: 8.8, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Rx: IV Hydrocortisone + IV Saline (crisis)", { x: 0.3, y: 7.0, w: 4.0, h: 0.3, fontSize: 8, italic: true, color: C.gray });
card(s, 4.7, 4.42, 4.0, 2.8, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 4.7, y: 4.42, w: 4.0, h: 0.4, fill: { color: C.green, transparency: 20 }, line: { color: C.green, width: 1 } });
s.addText("Conn's Syndrome β HANK", { x: 4.8, y: 4.42, w: 3.8, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
["H - Hypertension (resistant)","A - Alkalosis (metabolic)","N - No renin (low renin = primary)","K - K+ low (hypokalemia)"].forEach((p, i) => {
s.addText("β’ " + p, { x: 4.8, y: 4.9 + i * 0.48, w: 3.8, h: 0.45, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Cause: Adrenal adenoma | Rx: Surgery or Spironolactone", { x: 4.8, y: 7.0, w: 3.8, h: 0.3, fontSize: 8, italic: true, color: C.gray });
card(s, 8.9, 4.42, 4.2, 2.8, C.cardBg);
s.addShape(pres.shapes.RECTANGLE, { x: 8.9, y: 4.42, w: 4.2, h: 0.4, fill: { color: C.red, transparency: 20 }, line: { color: C.red, width: 1 } });
s.addText("Pheochromocytoma β 5 P's", { x: 9.0, y: 4.42, w: 4.0, h: 0.4, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
["P - Paroxysmal HTN","P - Palpitations","P - Perspiration (diaphoresis)","P - Pallor","P - Pain (headache)"].forEach((p, i) => {
s.addText("β’ " + p, { x: 9.0, y: 4.9 + i * 0.42, w: 3.95, h: 0.38, fontSize: 9, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Rule of 10s | Dx: Urine metanephrines\nRx: Alpha-block FIRST, then beta-block, then surgery", { x: 9.0, y: 6.65, w: 3.95, h: 0.55, fontSize: 7.5, italic: true, color: C.gray });
}
// βββ SLIDE 12 β DIABETES βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
darkSlide(s);
sectionBar(s, "Endocrine 04 | Diabetes Mellitus β T1 vs T2, DKA vs HHS, Drugs", C.red);
s.addText("Type 1 vs Type 2 Diabetes", { x: 0.2, y: 1.0, w: 12.9, h: 0.38, fontSize: 13, bold: true, color: C.red });
const dmH = ["Feature", "TYPE 1", "TYPE 2"];
const dmR = [
["Pathology", "Autoimmune beta-cell destruction", "Insulin resistance + relative deficiency"],
["Age", "< 30 (child / young adult)", "> 40 (middle-aged / elderly)"],
["Body type", "Thin", "Obese"],
["Ketoacidosis", "YES β DKA (classic)", "Rare β HHS instead"],
["Autoantibodies", "Anti-GAD, Anti-islet cell", "None"],
["HLA link", "DR3, DR4", "No HLA link"],
["Treatment", "Insulin ONLY", "Lifestyle - Metformin - add-ons - Insulin"],
];
const dmCW = [2.2, 5.3, 5.5];
const dmCX = [0.2, 2.45, 7.8];
dmH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dmCX[ci], y: 1.42, w: dmCW[ci], h: 0.38, fill: { color: ci === 1 ? C.tealDk : (ci === 2 ? "7F1D1D" : C.cardBg) }, line: { color: C.red, width: 1 } });
s.addText(h, { x: dmCX[ci] + 0.05, y: 1.42, w: dmCW[ci] - 0.1, h: 0.38, fontSize: 10, bold: true, color: C.white, valign: "middle", margin: 0, align: ci === 0 ? "left" : "center" });
});
dmR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dmCX[ci], y: 1.84 + ri * 0.46, w: dmCW[ci], h: 0.44, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.cardBg, width: 0 } });
s.addText(cell, { x: dmCX[ci] + 0.05, y: 1.84 + ri * 0.46, w: dmCW[ci] - 0.1, h: 0.44, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
});
s.addText("DKA vs HHS β Critical Comparison", { x: 0.2, y: 5.15, w: 7.0, h: 0.38, fontSize: 13, bold: true, color: C.orange });
const dkaH = ["Feature", "DKA (Type 1)", "HHS (Type 2)"];
const dkaR = [
["Glucose", "> 250 mg/dL", "> 600 mg/dL"],
["pH", "< 7.3 (ACIDOSIS)", "Normal (> 7.3)"],
["Ketones", "YES (+++)", "Minimal / absent"],
["Osmolality", "Mildly elevated", "> 320 mOsm/kg"],
["Mortality", "~1%", "~15% (worse!)"],
];
const dkaCW = [2.0, 2.5, 2.5];
const dkaCX = [0.2, 2.25, 4.8];
dkaH.forEach((h, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dkaCX[ci], y: 5.57, w: dkaCW[ci], h: 0.38, fill: { color: ci === 1 ? C.tealDk : (ci === 2 ? "7F1D1D" : C.cardBg) }, line: { color: C.orange, width: 1 } });
s.addText(h, { x: dkaCX[ci] + 0.05, y: 5.57, w: dkaCW[ci] - 0.1, h: 0.38, fontSize: 9, bold: true, color: C.white, valign: "middle", margin: 0, align: ci === 0 ? "left" : "center" });
});
dkaR.forEach((row, ri) => {
row.forEach((cell, ci) => {
s.addShape(pres.shapes.RECTANGLE, { x: dkaCX[ci], y: 5.99 + ri * 0.42, w: dkaCW[ci], h: 0.4, fill: { color: ri % 2 === 0 ? C.cardBg : C.cardBg2 }, line: { color: C.cardBg, width: 0 } });
s.addText(cell, { x: dkaCX[ci] + 0.05, y: 5.99 + ri * 0.42, w: dkaCW[ci] - 0.1, h: 0.4, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
});
});
s.addText("Key Oral Antidiabetics", { x: 7.6, y: 5.15, w: 5.5, h: 0.38, fontSize: 13, bold: true, color: C.green });
const drugs = [
{ name: "Metformin", memo: "#1 T2DM | No hypoglycemia | Lactic acidosis risk", color: C.green },
{ name: "Sulfonylureas", memo: "Stimulate insulin secretion | CAN cause hypoglycemia", color: C.orange },
{ name: "GLP-1 agonists", memo: "Weight loss | Used in obese T2DM (Liraglutide)", color: C.teal },
{ name: "SGLT2 inhibitors", memo: "Glucosuria | UTI risk | Cardioprotective (Empagliflozin)", color: C.purple },
];
drugs.forEach((d, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 7.6, y: 5.6 + i * 0.48, w: 2.0, h: 0.38, fill: { color: d.color }, line: { color: d.color }, rectRadius: 0.06 });
s.addText(d.name, { x: 7.6, y: 5.6 + i * 0.48, w: 2.0, h: 0.38, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(d.memo, { x: 9.7, y: 5.6 + i * 0.48, w: 3.4, h: 0.38, fontSize: 8, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 7.6, y: 7.1, w: 5.5, h: 0.35, fill: { color: C.red, transparency: 40 }, line: { color: C.red, width: 1 }, rectRadius: 0.05 });
s.addText("CRAMPS Complications: Cardiovascular | Retinopathy | Atherosclerosis | Micro-albuminuria | Peripheral neuropathy | Susceptibility to infection", { x: 7.65, y: 7.1, w: 5.4, h: 0.35, fontSize: 7.5, color: C.white, valign: "middle", margin: 0 });
}
// βββ SLIDE 13 β ONE-LINE KILLERS βββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
sectionBar(s, "RAPID RECALL β One-Line Killers for MCQs", C.teal);
const killers = [
["Periventricular lesions, young woman", "Multiple Sclerosis", C.teal],
["Ascending paralysis after Campylobacter", "GBS", C.teal],
["'Worst HA of my life'", "SAH β Berry aneurysm", C.red],
["Xanthochromia in CSF", "Subarachnoid Hemorrhage", C.red],
["Temporal lobe + fever + personality change", "HSV Encephalitis β ACYCLOVIR", C.orange],
["Pill-rolling tremor + cogwheel rigidity", "Parkinson's β Lewy bodies", C.purple],
["Beta-amyloid + neurofibrillary tangles", "Alzheimer's Disease", C.purple],
["Orphan Annie nuclei + Psammoma bodies", "Papillary Thyroid Cancer", C.green],
["Calcitonin-secreting tumor", "Medullary Thyroid Ca (MEN2)", C.green],
["High aldosterone + low renin + low K+", "Conn's Syndrome", C.orange],
["Paroxysmal HTN + diaphoresis", "Pheochromocytoma", C.red],
["Skin hyperpigmentation + low Na + high K+", "Addison's Disease", C.teal],
["Moon face + buffalo hump + purple striae", "Cushing's Syndrome", C.orange],
["Bitemporal hemianopia", "Pituitary tumor (chiasm compression)", C.purple],
["High protein + normal WBC in CSF", "GBS (albuminocytologic dissociation)", C.teal],
["India Ink halo + HIV patient", "Cryptococcus meningitis", C.green],
["Spongiform vacuolation + myoclonus", "CJD β Prion disease", C.red],
["Butterfly glioma crossing corpus callosum", "GBM (Grade IV)", C.purple],
["Homer-Wright rosettes, child, cerebellum", "Medulloblastoma", C.orange],
["Fried egg cells + 1p/19q deletion", "Oligodendroglioma", C.teal],
];
const left = killers.slice(0, 10);
const right = killers.slice(10);
[left, right].forEach((col, ci) => {
col.forEach(([clue, ans, color], ri) => {
const x = ci === 0 ? 0.2 : 6.75;
const y = 1.0 + ri * 0.63;
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 6.4, h: 0.55, fill: { color: C.cardBg }, line: { color: color, width: 1 } });
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.12, h: 0.55, fill: { color: color }, line: { color: color } });
s.addText(clue, { x: x + 0.2, y, w: 3.8, h: 0.55, fontSize: 8.5, color: C.offWhite, valign: "middle", margin: 0 });
s.addShape(pres.shapes.RIGHT_ARROW, { x: x + 4.05, y: y + 0.15, w: 0.3, h: 0.25, fill: { color: color }, line: { color: color } });
s.addText(ans, { x: x + 4.45, y, w: 1.85, h: 0.55, fontSize: 8, bold: true, color: color, valign: "middle", margin: 0 });
});
});
}
// βββ SLIDE 14 β CLOSING ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x: 13.12, y: 0, w: 0.18, h: 7.5, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Good luck on your exams!", { x: 1.0, y: 1.2, w: 11.3, h: 1.2, fontSize: 40, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText("Master these mnemonics and you will ace your MCQs.", { x: 1.0, y: 2.5, w: 11.3, h: 0.6, fontSize: 20, color: C.teal, align: "center" });
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.2, w: 6.3, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
const mnems = [
{ label: "CNS", text: "SPASM (MS) | GAME / CAME (Tumors) | TRAP (Parkinson's) | ABCs (Alzheimer's)" },
{ label: "Endocrine", text: "FLAT PiG (Pituitary) | SLOW BM (Hypo) | FAST THY (Hyper) | PaFoMeAn (Thyroid Ca)" },
{ label: "Adrenal", text: "GFR zones | CUSHINGS | SHADE (Addison's) | HANK (Conn's) | 5 P's (Pheo)" },
{ label: "Diabetes", text: "CRAMPS (complications) | RAIN (insulin types) | DKA vs HHS comparison" },
];
mnems.forEach((m, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 1.0, y: 3.45 + i * 0.85, w: 1.6, h: 0.6, fill: { color: C.tealDk }, line: { color: C.teal, width: 1 }, rectRadius: 0.06 });
s.addText(m.label, { x: 1.0, y: 3.45 + i * 0.85, w: 1.6, h: 0.6, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(m.text, { x: 2.75, y: 3.48 + i * 0.85, w: 10.0, h: 0.55, fontSize: 9.5, color: C.offWhite, valign: "middle", margin: 0 });
});
s.addText("Prepared by Orris β Your AI Study Companion", { x: 1.0, y: 7.1, w: 11.3, h: 0.3, fontSize: 10, color: C.gray, align: "center" });
}
pres.writeFile({ fileName: "/home/daytona/workspace/med-study-pptx/CNS_Endocrine_HighYield.pptx" })
.then(() => console.log("SUCCESS"))
.catch(e => { console.error("ERROR:", e.message); process.exit(1); });