Guillain–Barré Syndrome pa 5 slides ki presentation B'nao related with rehabilitation
Guillain-Barre syndrome rehabilitation physical therapy
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"
~/gbs-rehab-ppt/gbs_rehab.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ─── Colour palette ────────────────────────────────────────────────────────
const DARK_BG = "0D1F2D"; // deep navy (dominant ~65%)
const MID_BG = "1A3247"; // slightly lighter navy panel
const ACCENT = "3ABFBF"; // teal accent
const ACCENT2 = "F4A261"; // warm amber highlight
const WHITE = "FFFFFF";
const LTGRAY = "D4E4EF";
const DIMGRAY = "8BAFC7";
// ─── Image URLs ────────────────────────────────────────────────────────────
const imgUrls = [
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_3fc0b5f32487a3ddb44fdfcd0ab805e4dda970c46b4410fc976276f4e2166f98.jpg", // early rehab / upper limb exercise
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_dd524c501db31e1fb1646f3dfc56be3328bce5179ef6a686f74588d8de88a195.jpg", // pelvic bridging PT session
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_60a6ca2d41197bf5ee33d1c54758ad76ae6b406b84a8448274d18254b28958c5.jpg" // recovery wheelchair → standing
];
// Fetch images as base64
let imgs;
try {
const raw = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ` +
imgUrls.map(u => `"${u}"`).join(" ")
).toString();
imgs = JSON.parse(raw);
} catch(e) {
imgs = imgUrls.map(() => ({ base64: null, error: "fetch failed" }));
}
// ─── Presentation setup ────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Guillain-Barré Syndrome – Rehabilitation";
pres.author = "Orris Medical";
pres.subject = "Neurology / Rehabilitation Medicine";
// ─── Helper: dark navy background ─────────────────────────────────────────
function navyBg(slide) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
}
// ─── Helper: accent top bar ────────────────────────────────────────────────
function topBar(slide, color = ACCENT) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: color } });
}
// ─── Helper: section heading pill ─────────────────────────────────────────
function pill(slide, text, x, y, w = 3.2, bgColor = ACCENT) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h: 0.38,
fill: { color: bgColor }, rectRadius: 0.05
});
slide.addText(text, {
x, y, w, h: 0.38,
fontSize: 11, bold: true, color: DARK_BG,
align: "center", valign: "middle", margin: 0
});
}
// ─── Helper: divider line ─────────────────────────────────────────────────
function hLine(slide, x, y, w, color = ACCENT) {
slide.addShape(pres.ShapeType.line, {
x, y, w, h: 0,
line: { color, width: 1.5 }
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 – Title slide
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
navyBg(s);
// Left teal panel
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: ACCENT } });
// Large hero title
s.addText("Guillain–Barré", {
x: 0.45, y: 0.8, w: 9.1, h: 1.1,
fontSize: 54, bold: true, color: WHITE,
fontFace: "Calibri", charSpacing: 2
});
s.addText("Syndrome", {
x: 0.45, y: 1.85, w: 9.1, h: 0.9,
fontSize: 54, bold: true, color: ACCENT,
fontFace: "Calibri", charSpacing: 2
});
// Subtitle bar
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 2.88, w: 5.5, h: 0.5, fill: { color: MID_BG } });
s.addText("Rehabilitation: Assessment, Interventions & Recovery", {
x: 0.45, y: 2.88, w: 5.5, h: 0.5,
fontSize: 13, color: LTGRAY, italic: true, align: "center", valign: "middle", margin: 0
});
// Key fact box (bottom right)
s.addShape(pres.ShapeType.roundRect, {
x: 6.3, y: 3.5, w: 3.4, h: 1.8,
fill: { color: MID_BG }, rectRadius: 0.1,
line: { color: ACCENT, width: 1 }
});
s.addText([
{ text: "Key Facts\n", options: { bold: true, color: ACCENT, fontSize: 12 } },
{ text: "Incidence: ", options: { bold: true, color: LTGRAY, fontSize: 10 } },
{ text: "1–2 per 100,000/yr\n", options: { color: WHITE, fontSize: 10 } },
{ text: "Mortality: ", options: { bold: true, color: LTGRAY, fontSize: 10 } },
{ text: "~1–5% (modern ICU)\n", options: { color: WHITE, fontSize: 10 } },
{ text: "Recovery: ", options: { bold: true, color: LTGRAY, fontSize: 10 } },
{ text: "80% walk by 6 months", options: { color: WHITE, fontSize: 10 } },
], { x: 6.35, y: 3.55, w: 3.3, h: 1.7, valign: "middle", margin: 8 });
// Image (early rehab patient)
if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 0.45, y: 3.5, w: 2.0, h: 1.8 });
}
// Bottom caption
s.addText("Bradley & Daroff's Neurology in Clinical Practice | Rehabilitation Medicine", {
x: 0, y: 5.4, w: 10, h: 0.22,
fontSize: 7.5, color: DIMGRAY, align: "center", italic: true
});
topBar(s, ACCENT);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 – Pathophysiology & Clinical Features
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
navyBg(s);
topBar(s);
// Title
s.addText("Pathophysiology & Clinical Features", {
x: 0.4, y: 0.15, w: 9.2, h: 0.55,
fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri"
});
hLine(s, 0.4, 0.73, 9.2);
// LEFT column – Pathophysiology
pill(s, "PATHOPHYSIOLOGY", 0.35, 0.85, 2.7, ACCENT);
const path_items = [
"Autoimmune demyelination of peripheral nerves & spinal roots",
"Molecular mimicry (post-infectious: Campylobacter, CMV, EBV)",
"Axonal subtypes: AMAN & AMSAN (more severe, poor recovery)",
"Complement-fixing Abs to peripheral nerve myelin (acute phase)",
"Miller-Fisher variant: anti-GQ1b Ab (95–98% sensitivity)",
];
s.addText(path_items.map((t,i) => ({
text: t,
options: { bullet: { indent: 15 }, color: i===0 ? WHITE : LTGRAY, fontSize: 10.5, breakLine: true }
})), { x: 0.35, y: 1.3, w: 4.4, h: 2.5, valign: "top" });
// RIGHT column – Clinical
pill(s, "CLINICAL FEATURES", 5.0, 0.85, 2.7, ACCENT2);
const clin = [
{ label:"Motor:", val:"Progressive bilateral weakness (legs→arms)" },
{ label:"Reflexes:",val:"Areflexia / hyporeflexia (universal)" },
{ label:"Sensory:", val:"Paresthesias, mild sensory loss" },
{ label:"Cranial:", val:"Bifacial palsies; bulbar weakness" },
{ label:"Autonomic:",val:"Dysautonomia (BP swings, arrhythmias)" },
{ label:"CSF:", val:"↑Protein, <10 cells/μL (albumino-cytologic dissociation)" },
];
clin.forEach((c, i) => {
s.addText([
{ text: c.label + " ", options: { bold: true, color: ACCENT2, fontSize: 10.5 } },
{ text: c.val, options: { color: WHITE, fontSize: 10.5 } }
], { x: 5.0, y: 1.3 + i * 0.43, w: 4.65, h: 0.4 });
});
// Diagnostic criteria box at bottom
s.addShape(pres.ShapeType.roundRect, {
x: 0.35, y: 3.95, w: 9.3, h: 1.4,
fill: { color: MID_BG }, rectRadius: 0.08,
line: { color: ACCENT, width: 1 }
});
s.addText("DIAGNOSIS REQUIRES: ", {
x: 0.5, y: 4.05, w: 9.0, h: 0.28,
fontSize: 10, bold: true, color: ACCENT
});
s.addText(
"Progressive weakness of both legs & arms · Areflexia or hyporeflexia · Supported by NCS (demyelination / conduction block) · CSF albumino-cytologic dissociation",
{ x: 0.5, y: 4.32, w: 9.0, h: 0.9, fontSize: 10, color: LTGRAY, wrap: true }
);
// footer
s.addText("Source: Bradley & Daroff's Neurology in Clinical Practice, Box 106.10", {
x: 0, y: 5.48, w: 10, h: 0.14, fontSize: 7, color: DIMGRAY, align: "center", italic: true
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 – Acute Management & ICU Phase
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
navyBg(s);
topBar(s, ACCENT2);
s.addText("Acute Management & ICU Phase", {
x: 0.4, y: 0.15, w: 9.2, h: 0.55,
fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri"
});
hLine(s, 0.4, 0.73, 9.2, ACCENT2);
// Three columns
const cols = [
{
title: "IMMUNOTHERAPY",
color: ACCENT,
items: [
"IVIg: 0.4 g/kg/day × 5 days (= PE efficacy)",
"Plasma Exchange (PE): 4–6 sessions over 8–13 days",
"NOT combined: no added benefit",
"Steroids: no proven benefit in GBS",
"Start within 2–4 weeks of symptom onset",
]
},
{
title: "RESPIRATORY CARE",
color: ACCENT2,
items: [
"Monitor FVC q4–8h; intubate if FVC <20 mL/kg",
"25% of GBS patients require mechanical ventilation",
"\"20-30-40 rule\": FVC<20, MIP<-30, MEP<40 cmH₂O",
"Tracheostomy if ventilation expected >2 weeks",
"Aggressive pulmonary toilet & positioning",
]
},
{
title: "SUPPORTIVE CARE",
color: "9B59B6",
items: [
"Cardiac monitoring (dysautonomia risk)",
"DVT prophylaxis (LMWH + compression)",
"Pain management (neuropathic: gabapentin/opioids)",
"Nutrition (NG/PEG if dysphagic)",
"Bladder/bowel care; pressure ulcer prevention",
]
},
];
cols.forEach((col, ci) => {
const x = 0.25 + ci * 3.28;
// header pill
s.addShape(pres.ShapeType.roundRect, {
x, y: 0.9, w: 3.1, h: 0.38,
fill: { color: col.color }, rectRadius: 0.05
});
s.addText(col.title, {
x, y: 0.9, w: 3.1, h: 0.38,
fontSize: 10, bold: true, color: DARK_BG,
align: "center", valign: "middle", margin: 0
});
col.items.forEach((item, ii) => {
s.addShape(pres.ShapeType.rect, {
x: x + 0.02, y: 1.38 + ii * 0.73, w: 3.06, h: 0.65,
fill: { color: ii % 2 === 0 ? MID_BG : DARK_BG },
line: { color: col.color, width: 0.5 }
});
s.addText(item, {
x: x + 0.08, y: 1.42 + ii * 0.73, w: 2.94, h: 0.58,
fontSize: 9.5, color: WHITE, wrap: true, valign: "middle"
});
});
});
s.addText("Source: Bradley & Daroff's Neurology in Clinical Practice | Miller's Anesthesia 10e", {
x: 0, y: 5.48, w: 10, h: 0.14, fontSize: 7, color: DIMGRAY, align: "center", italic: true
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 – Rehabilitation Programme
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
navyBg(s);
topBar(s);
s.addText("Rehabilitation Programme", {
x: 0.4, y: 0.15, w: 9.2, h: 0.55,
fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri"
});
hLine(s, 0.4, 0.73, 9.2);
// Phase timeline strip
const phases = [
{ label: "PHASE 1\nAcute/ICU", color: "C0392B", x: 0.3 },
{ label: "PHASE 2\nSubacute", color: ACCENT2, x: 2.7 },
{ label: "PHASE 3\nInpatient Rehab",color: ACCENT, x: 5.1 },
{ label: "PHASE 4\nCommunity/Home", color: "27AE60", x: 7.5 },
];
phases.forEach(p => {
s.addShape(pres.ShapeType.roundRect, {
x: p.x, y: 0.82, w: 2.2, h: 0.52,
fill: { color: p.color }, rectRadius: 0.06
});
s.addText(p.label, {
x: p.x, y: 0.82, w: 2.2, h: 0.52,
fontSize: 9, bold: true, color: WHITE,
align: "center", valign: "middle", margin: 0
});
});
// Rehab components – left panel
const rehabRows = [
{ cat: "Physiotherapy", items: "Passive ROM → active-assisted → progressive resistance exercises; breathing exercises; chest PT; gait re-training with parallel bars / walking aids" },
{ cat: "Occupational Tx",items: "ADL retraining (dressing, feeding, hygiene); splinting for foot-drop / wrist-drop; adaptive equipment; fatigue management strategies" },
{ cat: "Speech & Language",items:"Dysphagia screen → videofluoroscopy; modified textures; vocal cord exercises; AAC devices if severe bulbar involvement" },
{ cat: "Pain & Sensory", items: "TENS, hydrotherapy, mirror therapy; neuropathic pain meds (gabapentin, duloxetine); desensitisation programme" },
];
rehabRows.forEach((r, i) => {
const yBase = 1.5 + i * 0.88;
s.addShape(pres.ShapeType.roundRect, {
x: 0.3, y: yBase, w: 9.4, h: 0.8,
fill: { color: i % 2 === 0 ? MID_BG : "152535" },
rectRadius: 0.06
});
s.addText(r.cat, {
x: 0.4, y: yBase + 0.05, w: 2.0, h: 0.7,
fontSize: 10.5, bold: true, color: ACCENT, valign: "middle"
});
s.addShape(pres.ShapeType.line, {
x: 2.45, y: yBase + 0.15, w: 0, h: 0.5,
line: { color: ACCENT, width: 1 }
});
s.addText(r.items, {
x: 2.6, y: yBase + 0.05, w: 7.0, h: 0.7,
fontSize: 9.8, color: LTGRAY, wrap: true, valign: "middle"
});
});
// PT image
if (imgs[1] && !imgs[1].error) {
// overlay small image top-right
s.addImage({ data: imgs[1].base64, x: 8.0, y: 0.85, w: 1.7, h: 1.3 });
}
s.addText("Source: Bradley & Daroff's Neurology in Clinical Practice, Rehabilitation Chapter", {
x: 0, y: 5.48, w: 10, h: 0.14, fontSize: 7, color: DIMGRAY, align: "center", italic: true
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 – Outcomes, Prognosis & Key Take-aways
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
navyBg(s);
topBar(s, ACCENT);
s.addText("Outcomes, Prognosis & Key Take-aways", {
x: 0.4, y: 0.15, w: 9.2, h: 0.55,
fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri"
});
hLine(s, 0.4, 0.73, 9.2);
// Outcome stats – 4 tiles
const stats = [
{ num: "~80%", desc: "walk independently\nby 6 months", col: ACCENT },
{ num: "1–5%", desc: "mortality (modern\nICU care)", col: "C0392B"},
{ num: "~20%", desc: "persist. disability\nat 1 year", col: ACCENT2 },
{ num: "5–10%", desc: "relapse (CIDP\noverlap)", col: "27AE60"},
];
stats.forEach((st, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, {
x, y: 0.88, w: 2.15, h: 1.5,
fill: { color: MID_BG }, rectRadius: 0.1,
line: { color: st.col, width: 2 }
});
s.addText(st.num, {
x, y: 0.95, w: 2.15, h: 0.75,
fontSize: 32, bold: true, color: st.col,
align: "center", valign: "middle"
});
s.addText(st.desc, {
x, y: 1.7, w: 2.15, h: 0.65,
fontSize: 9.5, color: LTGRAY,
align: "center", valign: "middle", wrap: true
});
});
// Prognostic factors
s.addShape(pres.ShapeType.roundRect, {
x: 0.3, y: 2.52, w: 4.4, h: 2.8,
fill: { color: MID_BG }, rectRadius: 0.08,
line: { color: ACCENT, width: 1 }
});
pill(s, "POOR PROGNOSTIC FACTORS", 0.3, 2.52, 4.4, ACCENT);
const poorProg = [
"Rapid onset (<7 days to nadir)",
"Preceding Campylobacter jejuni infection",
"AMSAN / axonal subtype",
"Advanced age (>60 years)",
"Mechanical ventilation required",
"MRC sum score <40 at nadir",
"Absent sural nerve SNAP",
];
s.addText(poorProg.map((t,i) => ({
text: "▸ " + t,
options: { color: i < 2 ? "FF6B6B" : LTGRAY, fontSize: 10, breakLine: true }
})), { x: 0.45, y: 3.0, w: 4.15, h: 2.2, valign: "top" });
// Key take-aways
s.addShape(pres.ShapeType.roundRect, {
x: 4.9, y: 2.52, w: 4.8, h: 2.8,
fill: { color: MID_BG }, rectRadius: 0.08,
line: { color: ACCENT2, width: 1 }
});
pill(s, "REHABILITATION TAKE-AWAYS", 4.9, 2.52, 4.8, ACCENT2);
const takeaways = [
"Early mobilisation (even in ICU) prevents deconditioning",
"Multidisciplinary team: physio + OT + SLP + psychology",
"Progressive resistance bands q1h even while bed-resting",
"Fatigue is prominent — pace activities; energy conservation",
"Community re-integration & driving assessment at discharge",
"Long-term follow-up: CIDP exclusion, pain, mental health",
];
s.addText(takeaways.map((t,i) => ({
text: "✓ " + t,
options: { color: i % 2 === 0 ? WHITE : LTGRAY, fontSize: 9.8, breakLine: true }
})), { x: 5.05, y: 3.0, w: 4.55, h: 2.25, valign: "top" });
// Recovery image
if (imgs[2] && !imgs[2].error) {
s.addImage({ data: imgs[2].base64, x: 8.2, y: 0.88, w: 1.5, h: 1.5 });
} else if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 8.2, y: 0.88, w: 1.5, h: 1.5 });
}
s.addText("Sources: Bradley & Daroff's Neurology | Robbins & Kumar Basic Pathology | Medical Microbiology 9e", {
x: 0, y: 5.48, w: 10, h: 0.14, fontSize: 7, color: DIMGRAY, align: "center", italic: true
});
}
// ─── Write file ────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/gbs-rehab-ppt/GBS_Rehabilitation.pptx" })
.then(() => console.log("✅ Saved: /home/daytona/workspace/gbs-rehab-ppt/GBS_Rehabilitation.pptx"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });