I want power point presentation on multiple sclerosis Case presentation with 12 to 15 slides for the subject Physical medicine and rehabilitation
multiple sclerosis MRI brain lesions demyelination
multiple sclerosis rehabilitation physiotherapy exercise spasticity
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not foun…
mkdir -p /home/daytona/workspace/ms-presentation && echo "done"
~/ms-presentation/create_ms_pptx.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ─── Fetch images ────────────────────────────────────────────────────────────
const imageUrls = [
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9c900f79f0a744bb3622285f17238eec399a8d2365df206c4e771463f5973166.jpg", // MRI Dawson's fingers + spinal cord
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_672f78c9ca25dd77dce2d71f20dc6b259bef9c1492e3f61a10e034d82f06631a.jpg", // MRI T2 + Gd enhancing
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_37046fdcb0f81e355af3478e1960f9fc301bd618bf757a8832c71d0f50badcbf.jpg", // Bobath rehab
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_49416c83da33751f3c311cbc419fb9f48c4ad47bb75f09e2d8fa748414e13480.jpg", // spasticity management
];
let imgs = [];
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
imgs = JSON.parse(result);
} catch (e) {
console.error("Image fetch failed:", e.message);
imgs = imageUrls.map(() => ({ base64: null, error: e.message }));
}
// ─── Color palette ───────────────────────────────────────────────────────────
const C = {
navy: "0D2B55", // dominant dark
teal: "1B6CA8", // secondary blue
accent: "E8F4FD", // light blue fill
white: "FFFFFF",
gold: "E9A21B", // highlight accent
dark: "1A1A2E",
text: "1C2B3A",
muted: "6B7C8D",
red: "C0392B",
green: "1E8449",
lightbg: "F0F7FF",
};
// ─── Presentation ────────────────────────────────────────────────────────────
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Multiple Sclerosis – Case Presentation";
pres.author = "Department of Physical Medicine & Rehabilitation";
// ═══════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
// Full background gradient via rectangle
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
// decorative side bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
// big title
s.addText("MULTIPLE SCLEROSIS", {
x: 0.4, y: 0.8, w: 9.2, h: 1.1,
fontSize: 40, bold: true, color: C.white,
fontFace: "Calibri", align: "center", charSpacing: 3,
});
s.addText("A Case-Based Presentation", {
x: 0.4, y: 1.95, w: 9.2, h: 0.55,
fontSize: 22, color: C.gold, fontFace: "Calibri", align: "center", italic: true,
});
// divider line
s.addShape(pres.ShapeType.line, { x: 1.5, y: 2.62, w: 7.0, h: 0, line: { color: C.gold, width: 2 } });
s.addText("Department of Physical Medicine & Rehabilitation", {
x: 0.4, y: 2.78, w: 9.2, h: 0.45,
fontSize: 16, color: C.accent, fontFace: "Calibri", align: "center",
});
s.addText("Relapsing-Remitting MS | Diagnosis | Rehabilitation Management", {
x: 0.4, y: 3.3, w: 9.2, h: 0.4,
fontSize: 13, color: C.muted, fontFace: "Calibri", align: "center",
});
// footer
s.addText("May 2026", {
x: 0.4, y: 5.1, w: 9.2, h: 0.35,
fontSize: 11, color: C.muted, align: "center", fontFace: "Calibri",
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 2 — CASE PRESENTATION
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("CASE PRESENTATION", {
x: 0.35, y: 0.1, w: 9.2, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
// Patient card
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.85, w: 4.1, h: 4.55, fill: { color: C.white }, line: { color: C.teal, width: 1.5 } });
s.addText("PATIENT PROFILE", {
x: 0.45, y: 0.9, w: 3.9, h: 0.38,
fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri",
});
const patientInfo = [
{ label: "Name:", value: "Ms. S.R." },
{ label: "Age:", value: "28 years" },
{ label: "Sex:", value: "Female" },
{ label: "Occupation:", value: "Software Engineer" },
{ label: "Referred by:", value: "Neurology Dept." },
];
patientInfo.forEach((item, i) => {
s.addText([
{ text: item.label + " ", options: { bold: true, color: C.navy } },
{ text: item.value, options: { color: C.text } },
], { x: 0.5, y: 1.35 + i * 0.55, w: 3.8, h: 0.44, fontSize: 13, fontFace: "Calibri" });
});
// Chief complaints card
s.addShape(pres.ShapeType.rect, { x: 4.7, y: 0.85, w: 5.0, h: 4.55, fill: { color: C.white }, line: { color: C.gold, width: 1.5 } });
s.addText("CHIEF COMPLAINTS", {
x: 4.8, y: 0.9, w: 4.8, h: 0.38,
fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri",
});
const complaints = [
"Sudden loss of vision in right eye → 3 weeks ago",
"Painful eye movements (retro-orbital pain)",
"Progressive weakness in both lower limbs → 2 months",
"Tingling & numbness below waist level",
"Urgency & hesitancy of micturition",
"Fatigue limiting daily activities",
];
complaints.forEach((item, i) => {
s.addText([
{ text: "▸ ", options: { color: C.gold, bold: true } },
{ text: item, options: { color: C.text } },
], { x: 4.85, y: 1.35 + i * 0.52, w: 4.7, h: 0.44, fontSize: 12, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 3 — HISTORY OF PRESENT ILLNESS
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("HISTORY OF PRESENT ILLNESS", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
const timeline = [
{ time: "2 Years Ago", color: C.navy, detail: "Episode of diplopia lasting 4 weeks → resolved spontaneously. No workup done." },
{ time: "6 Months Ago", color: C.teal, detail: "Unsteady gait, ataxia for 3 weeks → partially resolved. Dismissed as 'stress-related'." },
{ time: "2 Months Ago", color: C.gold, detail: "Progressive bilateral lower limb weakness and sensory disturbance below T10 level." },
{ time: "3 Weeks Ago", color: C.red, detail: "Sudden painful vision loss OD (right eye) — diagnosed as optic neuritis at ER." },
{ time: "Present", color: C.green, detail: "Referred to PM&R for comprehensive rehabilitation assessment and management planning." },
];
timeline.forEach((item, i) => {
const y = 0.88 + i * 0.89;
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 1.5, h: 0.65, fill: { color: item.color } });
s.addText(item.time, { x: 0.35, y, w: 1.5, h: 0.65, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x: 1.85, y: y + 0.08, w: 7.9, h: 0.55, fill: { color: C.white }, line: { color: item.color, width: 1 } });
s.addText(item.detail, { x: 2.0, y: y + 0.07, w: 7.6, h: 0.58, fontSize: 12, color: C.text, fontFace: "Calibri", valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 4 — PAST HISTORY & EXAMINATION
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("PAST HISTORY & PHYSICAL EXAMINATION", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 20, bold: true, color: C.white, fontFace: "Calibri",
});
// Left column
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.85, w: 4.35, h: 4.55, fill: { color: C.white }, line: { color: C.navy, width: 1 } });
s.addText("PAST MEDICAL HISTORY", { x: 0.45, y: 0.9, w: 4.1, h: 0.38, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri" });
const past = [
"No known chronic illnesses",
"No prior neurological diagnosis",
"No recent infections or vaccinations",
"Family history: maternal aunt with MS",
"Non-smoker, no alcohol/drug use",
"No relevant drug history",
];
past.forEach((item, i) => {
s.addText([{ text: "• ", options: { color: C.teal, bold: true } }, { text: item, options: { color: C.text } }],
{ x: 0.5, y: 1.38 + i * 0.49, w: 4.0, h: 0.42, fontSize: 12, fontFace: "Calibri" });
});
// Right column
s.addShape(pres.ShapeType.rect, { x: 4.9, y: 0.85, w: 4.85, h: 4.55, fill: { color: C.white }, line: { color: C.teal, width: 1 } });
s.addText("NEUROLOGICAL EXAMINATION", { x: 5.0, y: 0.9, w: 4.6, h: 0.38, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri" });
const exam = [
["Visual Acuity OD:", "6/60 (↓ from 6/6)"],
["Relative Afferent Pupillary Defect:", "Present (RAPD +ve)"],
["Fundus:", "Disc pallor OD"],
["Motor:", "MRC Grade 3/5 both LL"],
["Tone:", "Spasticity both LL (↑)"],
["Reflexes:", "Hyperreflexia + Babinski +ve"],
["Sensory:", "Reduced vibration below T10"],
["Cerebellar:", "Ataxia, dysdiadochokinesia"],
["Lhermitte's Sign:", "Positive"],
];
exam.forEach((item, i) => {
s.addText([
{ text: item[0] + " ", options: { bold: true, color: C.navy } },
{ text: item[1], options: { color: C.text } },
], { x: 5.05, y: 1.38 + i * 0.38, w: 4.55, h: 0.35, fontSize: 11, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 5 — INVESTIGATIONS & MRI (with image)
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("INVESTIGATIONS", {
x: 0.35, y: 0.08, w: 9.4, h: 0.56,
fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 2,
});
// left column — labs
const labRows = [
["MRI Brain (FLAIR):", "Periventricular T2 hyperintensities,\nDawson's fingers, juxtacortical lesions"],
["MRI Cervical Spine:", "Multiple intramedullary T2 lesions\n(C3-C5, C7-T1)"],
["Gd-Enhancement:", "Active right frontal lesion"],
["CSF Analysis:", "Oligoclonal IgG bands (positive),\nIgG index elevated"],
["VEP:", "Prolonged P100 latency bilaterally\n(right > left)"],
["CBC / Metabolic Panel:", "Within normal limits"],
["ANA / ANCA:", "Negative (to exclude lupus, vasculitis)"],
["NMO-IgG (AQP4):", "Negative"],
];
labRows.forEach((row, i) => {
const y = 0.76 + i * 0.56;
s.addText(row[0], { x: 0.35, y, w: 2.6, h: 0.5, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", valign: "middle" });
s.addText(row[1], { x: 2.95, y, w: 3.2, h: 0.5, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "middle" });
if (i < labRows.length - 1)
s.addShape(pres.ShapeType.line, { x: 0.35, y: y + 0.52, w: 6.15, h: 0, line: { color: "2C4A6E", width: 0.75 } });
});
// Right — MRI image
if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 6.5, y: 0.65, w: 3.25, h: 3.2 });
s.addText("MRI: Periventricular lesions (Dawson's fingers)\n& cervical cord plaques", {
x: 6.5, y: 3.88, w: 3.25, h: 0.65,
fontSize: 9.5, italic: true, color: C.muted, fontFace: "Calibri", align: "center",
});
} else {
s.addShape(pres.ShapeType.rect, { x: 6.5, y: 0.65, w: 3.25, h: 3.2, fill: { color: "1A2744" }, line: { color: C.teal, width: 1 } });
s.addText("MRI Scan\n(Periventricular lesions)", { x: 6.5, y: 0.65, w: 3.25, h: 3.2, fontSize: 13, color: C.muted, align: "center", valign: "middle", fontFace: "Calibri" });
}
}
// ═══════════════════════════════════════════════════════
// SLIDE 6 — DIAGNOSIS & McDONALD CRITERIA
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("DIAGNOSIS: McDonald Criteria 2017", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
// Diagnosis banner
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.82, w: 9.4, h: 0.72, fill: { color: C.navy } });
s.addText("FINAL DIAGNOSIS: Relapsing-Remitting Multiple Sclerosis (RRMS)", {
x: 0.35, y: 0.82, w: 9.4, h: 0.72,
fontSize: 18, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle",
});
// Two criteria boxes
const left = [
["Dissemination in Space (DIS)", [
"≥2 lesion locations: periventricular, juxtacortical,",
"infratentorial, spinal cord",
"✔ Periventricular lesions (Dawson's fingers)",
"✔ Juxtacortical lesion",
"✔ Cervical cord lesions (C3–C5, C7–T1)",
"✔ Optic nerve involvement",
]],
];
const right = [
["Dissemination in Time (DIT)", [
"≥2 attacks separated in time OR",
"simultaneous Gd+ & T2 lesions",
"✔ First attack: diplopia 2 years ago",
"✔ Second attack: ataxia 6 months ago",
"✔ Current attack: optic neuritis",
"✔ Active Gd-enhancing lesion on MRI",
]],
];
[[left, 0.35], [right, 5.05]].forEach(([cols, xStart]) => {
cols.forEach(([title, items]) => {
s.addShape(pres.ShapeType.rect, { x: xStart, y: 1.65, w: 4.55, h: 3.75, fill: { color: C.white }, line: { color: C.teal, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x: xStart, y: 1.65, w: 4.55, h: 0.48, fill: { color: C.teal } });
s.addText(title, { x: xStart + 0.1, y: 1.65, w: 4.35, h: 0.48, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
items.forEach((item, i) => {
const isCheck = item.startsWith("✔");
s.addText(item, {
x: xStart + 0.2, y: 2.2 + i * 0.44, w: 4.2, h: 0.4,
fontSize: 11.5, color: isCheck ? C.green : C.text,
bold: isCheck, fontFace: "Calibri",
});
});
});
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 7 — DISEASE SUBTYPES & EPIDEMIOLOGY
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("MS — DISEASE OVERVIEW & EPIDEMIOLOGY", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 21, bold: true, color: C.white, fontFace: "Calibri",
});
// Epidemiology stats row
const stats = [
{ val: "2.9M+", lbl: "People with MS\nWorldwide" },
{ val: "F:M 2:1", lbl: "Female Predomi-\nnance" },
{ val: "20–40 yr", lbl: "Typical Age\nat Onset" },
{ val: "85%", lbl: "Initially\nRRMS" },
];
stats.forEach((st, i) => {
const x = 0.35 + i * 2.35;
s.addShape(pres.ShapeType.rect, { x, y: 0.82, w: 2.2, h: 1.1, fill: { color: C.navy } });
s.addText(st.val, { x, y: 0.82, w: 2.2, h: 0.6, fontSize: 20, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "bottom" });
s.addText(st.lbl, { x, y: 1.38, w: 2.2, h: 0.5, fontSize: 10, color: C.white, fontFace: "Calibri", align: "center" });
});
// Subtypes
s.addText("Disease Subtypes", { x: 0.35, y: 2.05, w: 9.4, h: 0.42, fontSize: 15, bold: true, color: C.navy, fontFace: "Calibri" });
const subtypes = [
{ name: "RRMS", color: C.teal, desc: "85% of cases. Distinct relapses with full/partial recovery. Our patient." },
{ name: "SPMS", color: C.navy, desc: "Gradual progression after initial relapsing course. Disability accumulates." },
{ name: "PPMS", color: C.red, desc: "15% of cases. Steady worsening from onset without relapses. Male-predominant." },
{ name: "CIS", color: C.green, desc: "First demyelinating episode. Not yet classified as MS until 2nd attack." },
];
subtypes.forEach((sub, i) => {
const x = 0.35 + (i % 2) * 4.75;
const y = 2.55 + Math.floor(i / 2) * 1.35;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.2, fill: { color: C.white }, line: { color: sub.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 1.0, h: 1.2, fill: { color: sub.color } });
s.addText(sub.name, { x, y, w: 1.0, h: 1.2, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText(sub.desc, { x: x + 1.1, y: y + 0.18, w: 3.35, h: 0.85, fontSize: 11.5, color: C.text, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 8 — PATHOPHYSIOLOGY
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("PATHOPHYSIOLOGY", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 2,
});
// Flow arrow chain
const steps = [
{ icon: "①", head: "Genetic Predisposition", body: "HLA-DR2 / HLA-DRB1*1501\n+ environmental triggers" },
{ icon: "②", head: "Peripheral Sensitization", body: "Autoreactive T-cells against\nmyelin basic protein (MBP)" },
{ icon: "③", head: "BBB Breakdown", body: "T-cells cross blood–brain barrier;\nlocal inflammation & cytokines" },
{ icon: "④", head: "Demyelination & Plaque", body: "Oligodendrocyte damage;\naxonal conduction failure" },
{ icon: "⑤", head: "Neurodegeneration", body: "Progressive axonal loss;\nirreversible disability" },
];
steps.forEach((step, i) => {
const x = 0.35 + i * 1.9;
s.addShape(pres.ShapeType.rect, { x, y: 0.78, w: 1.78, h: 3.8, fill: { color: "0F1F38" }, line: { color: C.teal, width: 1 } });
s.addShape(pres.ShapeType.rect, { x, y: 0.78, w: 1.78, h: 0.55, fill: { color: C.teal } });
s.addText(step.icon, { x, y: 0.78, w: 1.78, h: 0.55, fontSize: 18, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(step.head, { x: x + 0.08, y: 1.42, w: 1.62, h: 0.7, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", align: "center" });
s.addText(step.body, { x: x + 0.08, y: 2.18, w: 1.62, h: 2.3, fontSize: 10.5, color: C.white, fontFace: "Calibri", align: "center" });
if (i < steps.length - 1) {
s.addShape(pres.ShapeType.line, { x: x + 1.78, y: 1.42, w: 0.12, h: 0, line: { color: C.gold, width: 2 } });
}
});
// Key features bottom
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 4.72, w: 9.4, h: 0.72, fill: { color: "0F1F38" } });
s.addText([
{ text: "Key targets: ", options: { bold: true, color: C.gold } },
{ text: "Myelin (CNS) • Oligodendrocytes • Axons | Hallmark: Multifocal demyelinated plaques — periventricular, optic nerves, brainstem, spinal cord, cerebellum", options: { color: C.white } },
], { x: 0.5, y: 4.72, w: 9.1, h: 0.72, fontSize: 11.5, fontFace: "Calibri", valign: "middle" });
}
// ═══════════════════════════════════════════════════════
// SLIDE 9 — MRI FINDINGS (with image)
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("MRI FINDINGS IN THIS CASE", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
});
if (imgs[1] && !imgs[1].error) {
s.addImage({ data: imgs[1].base64, x: 0.35, y: 0.72, w: 5.5, h: 4.6 });
} else {
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.72, w: 5.5, h: 4.6, fill: { color: "1A2744" }, line: { color: C.teal, width: 1 } });
s.addText("MRI Image", { x: 0.35, y: 0.72, w: 5.5, h: 4.6, fontSize: 18, color: C.muted, align: "center", valign: "middle", fontFace: "Calibri" });
}
const findings = [
["FLAIR/T2:", "Multiple periventricular hyperintense ovoid lesions perpendicular to ventricles ("Dawson's fingers")"],
["Juxtacortical:", "Lesion in left inferior temporal lobe"],
["Infratentorial:", "Lesion in pons/cerebellum"],
["Spinal Cord:", "Intramedullary lesions at C3–C5 & C7–T1"],
["T1 Gd+:", "Active right frontal enhancing lesion → blood–brain barrier breakdown"],
["DIT + DIS:", "Fulfilled → confirms McDonald 2017 criteria"],
];
findings.forEach((row, i) => {
s.addText([
{ text: row[0] + " ", options: { bold: true, color: C.gold } },
{ text: row[1], options: { color: C.white } },
], { x: 6.0, y: 0.82 + i * 0.72, w: 3.75, h: 0.64, fontSize: 11, fontFace: "Calibri", valign: "middle" });
if (i < findings.length - 1)
s.addShape(pres.ShapeType.line, { x: 6.0, y: 0.82 + (i + 1) * 0.72 - 0.04, w: 3.75, h: 0, line: { color: "2C4A6E", width: 0.75 } });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 10 — DISABILITY ASSESSMENT (EDSS)
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("FUNCTIONAL STATUS & DISABILITY ASSESSMENT", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 20, bold: true, color: C.white, fontFace: "Calibri",
});
// EDSS score
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.82, w: 3.5, h: 1.8, fill: { color: C.navy } });
s.addText("EDSS Score", { x: 0.35, y: 0.82, w: 3.5, h: 0.5, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center" });
s.addText("4.5", { x: 0.35, y: 1.22, w: 3.5, h: 1.0, fontSize: 52, bold: true, color: C.gold, fontFace: "Calibri", align: "center" });
s.addText("Moderate Disability", { x: 0.35, y: 2.22, w: 3.5, h: 0.38, fontSize: 12, color: C.white, fontFace: "Calibri", align: "center" });
s.addText("Expanded Disability Status Scale (EDSS) — Kurtzke", {
x: 0.35, y: 2.7, w: 3.5, h: 0.35, fontSize: 9.5, italic: true, color: C.muted, fontFace: "Calibri", align: "center",
});
// Functional systems
const fs = [
{ name: "Pyramidal", score: 3, max: 6, note: "Mild-moderate paraparesis LL" },
{ name: "Sensory", score: 3, max: 6, note: "↓ vibration, position sense" },
{ name: "Visual", score: 3, max: 6, note: "Optic neuritis OD" },
{ name: "Cerebellar", score: 2, max: 5, note: "Mild ataxia" },
{ name: "Bladder/Bowel", score: 2, max: 6, note: "Urgency/hesitancy" },
{ name: "Brainstem", score: 1, max: 5, note: "Subtle signs" },
{ name: "Cerebral", score: 1, max: 5, note: "Mild fatigue/mood" },
];
s.addText("Functional System Scores", { x: 4.1, y: 0.82, w: 5.65, h: 0.38, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri" });
fs.forEach((f, i) => {
const y = 1.28 + i * 0.54;
const barW = (f.score / f.max) * 3.5;
s.addText(f.name, { x: 4.1, y, w: 1.55, h: 0.38, fontSize: 11, color: C.text, fontFace: "Calibri", bold: true });
s.addShape(pres.ShapeType.rect, { x: 5.7, y: y + 0.06, w: 3.5, h: 0.26, fill: { color: "D6E8F5" } });
s.addShape(pres.ShapeType.rect, { x: 5.7, y: y + 0.06, w: barW, h: 0.26, fill: { color: C.teal } });
s.addText(`${f.score}/${f.max}`, { x: 9.25, y, w: 0.5, h: 0.38, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri" });
s.addText(f.note, { x: 4.1, y: y + 0.34, w: 5.65, h: 0.18, fontSize: 9, italic: true, color: C.muted, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 11 — MEDICAL MANAGEMENT
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("MEDICAL MANAGEMENT", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
const sections = [
{
title: "Acute Relapse Treatment", color: C.red, x: 0.35, y: 0.82, items: [
"IV Methylprednisolone 1g/day × 5 days",
"Shortens relapse duration (not long-term disability)",
"Consider plasma exchange if steroid-refractory",
]
},
{
title: "Disease-Modifying Therapy (DMT)", color: C.navy, x: 5.05, y: 0.82, items: [
"High-efficacy preferred for active RRMS",
"Natalizumab (anti-VLA-4) — preferred (high activity)",
"Alternatives: Ocrelizumab, Alemtuzumab",
"First-line: IFN-β, Glatiramer, Teriflunomide",
]
},
{
title: "Symptomatic Management", color: C.teal, x: 0.35, y: 2.68, items: [
"Spasticity: Baclofen 5–20 mg TID, Tizanidine",
"Fatigue: Amantadine 100 mg BD, exercise",
"Bladder: Oxybutynin / CIC as needed",
"Pain/Lhermitte's: Carbamazepine, Gabapentin",
"Depression: SSRIs, CBT",
"Pseudobulbar affect: Dextromethorphan/Quinidine",
]
},
{
title: "Neuroprotection & Monitoring", color: C.green, x: 5.05, y: 2.68, items: [
"Vitamin D supplementation (target >50 ng/mL)",
"Annual brain MRI to monitor lesion burden",
"EDSS reassessment every 6 months",
"Ophthalmology follow-up for optic neuritis",
]
},
];
sections.forEach(sec => {
s.addShape(pres.ShapeType.rect, { x: sec.x, y: sec.y, w: 4.55, h: 2.6, fill: { color: C.white }, line: { color: sec.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x: sec.x, y: sec.y, w: 4.55, h: 0.44, fill: { color: sec.color } });
s.addText(sec.title, { x: sec.x + 0.1, y: sec.y, w: 4.35, h: 0.44, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
sec.items.forEach((item, i) => {
s.addText([{ text: "▸ ", options: { color: sec.color, bold: true } }, { text: item, options: { color: C.text } }],
{ x: sec.x + 0.12, y: sec.y + 0.52 + i * 0.43, w: 4.28, h: 0.4, fontSize: 11, fontFace: "Calibri" });
});
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 12 — PM&R REHABILITATION GOALS
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("PM&R REHABILITATION GOALS", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
s.addText("Comprehensive rehabilitation addresses physical, cognitive, and psychosocial dimensions", {
x: 0.35, y: 0.8, w: 9.4, h: 0.4,
fontSize: 12, italic: true, color: C.teal, fontFace: "Calibri",
});
const goals = [
{ icon: "🦵", domain: "Motor", items: ["Improve lower limb strength (target MRC 4/5)", "Reduce spasticity & contracture risk", "Restore gait pattern & balance", "Prevent falls & injury"] },
{ icon: "🧠", domain: "Cognitive", items: ["Address fatigue management strategies", "Cognitive retraining for attention/memory", "Vocational rehabilitation assessment", "Return to work planning"] },
{ icon: "🚽", domain: "Bladder/Bowel", items: ["Bladder retraining program", "Timed voiding schedule", "CIC teaching if indicated", "Bowel program & dietary advice"] },
{ icon: "❤️", domain: "Quality of Life", items: ["Psychological support & counseling", "ADL training & adaptive equipment", "Social & community reintegration", "Patient & family education"] },
];
goals.forEach((goal, i) => {
const x = 0.35 + (i % 2) * 4.75;
const y = 1.28 + Math.floor(i / 2) * 2.1;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.95, fill: { color: C.white }, line: { color: C.teal, width: 1 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.7, h: 1.95, fill: { color: i % 2 === 0 ? C.navy : C.teal } });
s.addText(goal.domain, { x, y: y + 0.05, w: 0.7, h: 1.85, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
goal.items.forEach((item, j) => {
s.addText([{ text: "• ", options: { color: C.gold, bold: true } }, { text: item, options: { color: C.text } }],
{ x: x + 0.78, y: y + 0.12 + j * 0.43, w: 3.65, h: 0.4, fontSize: 11, fontFace: "Calibri" });
});
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 13 — REHABILITATION INTERVENTIONS
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("REHABILITATION INTERVENTIONS", {
x: 0.35, y: 0.1, w: 5.6, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
const interventions = [
{ title: "Physiotherapy", color: C.teal, items: ["Stretching & ROM exercises for spasticity", "Progressive resistance training", "Gait training with AFO if foot drop", "Balance & proprioception training", "Frenkel's exercises for ataxia"] },
{ title: "Occupational Therapy", color: C.gold, items: ["ADL training & adaptive equipment", "Energy conservation techniques", "Upper limb fine motor training", "Home modification assessment", "Driving rehabilitation evaluation"] },
{ title: "Speech & Swallowing", color: C.navy, items: ["Dysarthria therapy if present", "Dysphagia assessment (VFSS)", "Communication aids if needed"] },
{ title: "Neuromodulation", color: C.red, items: ["Transcutaneous electrical stimulation", "Functional electrical stimulation (FES)", "Transcranial magnetic stimulation (rTMS)", "Intrathecal baclofen if severe spasticity"] },
];
interventions.forEach((iv, i) => {
const x = 0.35 + (i % 2) * 4.75;
const y = 0.75 + Math.floor(i / 2) * 2.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 2.15, fill: { color: "0F1F38" }, line: { color: iv.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 0.44, fill: { color: iv.color } });
s.addText(iv.title, { x: x + 0.1, y, w: 4.35, h: 0.44, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
iv.items.forEach((item, j) => {
s.addText([{ text: "▸ ", options: { color: iv.color, bold: true } }, { text: item, options: { color: C.white } }],
{ x: x + 0.15, y: y + 0.52 + j * 0.33, w: 4.25, h: 0.3, fontSize: 10.5, fontFace: "Calibri" });
});
});
// Rehab image
if (imgs[2] && !imgs[2].error) {
s.addImage({ data: imgs[2].base64, x: 9.1 - 0.5, y: 0.62, w: 0.95, h: 4.75 });
}
}
// ═══════════════════════════════════════════════════════
// SLIDE 14 — MULTIDISCIPLINARY TEAM & OUTCOME
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightbg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("MDT APPROACH & FUNCTIONAL OUTCOME", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
// MDT wheel - central text + spokes
s.addShape(pres.ShapeType.ellipse, { x: 3.6, y: 0.82, w: 2.8, h: 2.8, fill: { color: C.navy }, line: { color: C.gold, width: 2 } });
s.addText("MDT\nTeam", { x: 3.6, y: 0.82, w: 2.8, h: 2.8, fontSize: 18, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });
const members = [
{ role: "Physiatrist", x: 0.35, y: 0.95 },
{ role: "Physiotherapist", x: 0.35, y: 1.8 },
{ role: "Occupational\nTherapist", x: 0.35, y: 2.7 },
{ role: "Neurologist", x: 7.05, y: 0.95 },
{ role: "Urologist /\nContinence Nurse", x: 7.05, y: 1.8 },
{ role: "Psychologist /\nSocial Worker", x: 7.05, y: 2.7 },
];
members.forEach((m) => {
s.addShape(pres.ShapeType.rect, { x: m.x, y: m.y, w: 2.9, h: 0.65, fill: { color: C.white }, line: { color: C.teal, width: 1 } });
s.addText(m.role, { x: m.x + 0.1, y: m.y, w: 2.7, h: 0.65, fontSize: 12, color: C.navy, fontFace: "Calibri", bold: true, valign: "middle", align: "center" });
});
// Outcome
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.62, w: 9.4, h: 1.78, fill: { color: C.white }, line: { color: C.navy, width: 1 } });
s.addText("PATIENT OUTCOME AT 6 MONTHS", { x: 0.45, y: 3.67, w: 9.2, h: 0.4, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri" });
const outcomes = [
"EDSS improved from 4.5 → 3.0 (ambulatory without aid)",
"Visual acuity OD recovered to 6/18 following optic neuritis treatment",
"Lower limb strength improved to MRC 4/5 bilaterally",
"Bladder symptoms controlled with timed voiding + anticholinergic therapy",
"Returned to part-time work; enrolled in natalizumab therapy",
];
outcomes.forEach((oc, i) => {
s.addText([{ text: "✔ ", options: { color: C.green, bold: true } }, { text: oc, options: { color: C.text } }],
{ x: 0.5, y: 4.12 + i * 0.24, w: 9.1, h: 0.22, fontSize: 11, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════
// SLIDE 15 — SUMMARY & KEY MESSAGES
// ═══════════════════════════════════════════════════════
{
let s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0, w: 9.65, h: 0.72, fill: { color: "0A1A30" } });
s.addText("SUMMARY & TAKE-HOME MESSAGES", {
x: 0.35, y: 0.1, w: 9.4, h: 0.52,
fontSize: 22, bold: true, color: C.gold, fontFace: "Calibri",
});
const messages = [
{ num: "01", msg: "MS is the leading cause of non-traumatic neurological disability in young adults — females > males (2:1)." },
{ num: "02", msg: "McDonald 2017 criteria require Dissemination in Space AND Time — MRI is the cornerstone of diagnosis." },
{ num: "03", msg: "RRMS (85%) presents with relapses; Optic neuritis + sensorimotor deficits in young females should prompt urgent workup." },
{ num: "04", msg: "Early high-efficacy DMT (Natalizumab/Ocrelizumab) significantly reduces relapse rate and disability accumulation." },
{ num: "05", msg: "PM&R plays a critical role: MDT rehabilitation improves function, independence, and quality of life across the disease course." },
{ num: "06", msg: "EDSS monitoring, bladder care, spasticity management, and psychosocial support are essential PM&R components." },
];
messages.forEach((m, i) => {
const y = 0.85 + i * 0.77;
s.addShape(pres.ShapeType.ellipse, { x: 0.35, y: y + 0.06, w: 0.55, h: 0.55, fill: { color: C.gold } });
s.addText(m.num, { x: 0.35, y: y + 0.06, w: 0.55, h: 0.55, fontSize: 13, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(m.msg, { x: 1.08, y, w: 8.55, h: 0.7, fontSize: 12.5, color: C.white, fontFace: "Calibri", valign: "middle" });
if (i < messages.length - 1)
s.addShape(pres.ShapeType.line, { x: 0.35, y: y + 0.76, w: 9.3, h: 0, line: { color: "1B3A6B", width: 0.75 } });
});
}
// ─── Write file ───────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/ms-presentation/Multiple_Sclerosis_CasePresentation_PMR.pptx" })
.then(() => console.log("DONE"))
.catch(err => console.error("ERROR:", err));
cd /home/daytona/workspace/ms-presentation && node create_ms_pptx.js 2>&1
Hi