A patient presents with suspicion of gastroparesis Point, what are the expected symptoms and appropriate work and management for this patient?
gastroparesis diagnosis management
PMID: 40976635
| Cause | Approximate Incidence |
|---|---|
| Idiopathic gastroparesis (IGP) | ~40% |
| Diabetic (Type 1 >> Type 2) | ~35% |
| Postsurgical (vagotomy, fundoplication, etc.) | ~20% |
| Other (connective tissue disease, neurological, metabolic) | ~5% |
Note: Patients with suspected gastroparesis have an increased aspiration risk - plan endoscopy accordingly.
| Severity | Gastric Retention at 4 Hours |
|---|---|
| Mild | 10-15% |
| Moderate | 15-35% |
| Severe | >35% |

| Intervention | Notes |
|---|---|
| Gastric Per-Oral Endoscopic Pyloromyotomy (G-POEM) | Endoscopic division of pyloric muscle; shown to improve symptoms and gastric emptying; AGA conditionally recommends against routine initial use |
| Gastric Electrical Stimulation (GES / Enterra device) | FDA-approved for refractory nausea/vomiting; may help symptom control even without improving gastric emptying; AGA recommends against routine initial use |
| Botulinum toxin injection into pylorus | Benefit shown in open-label studies; controlled trials show no benefit vs. saline; predictors of response: idiopathic etiology, female, age <50, higher dose (200 units) |
| Surgical pyloroplasty / pyloromyotomy | 2025 AGA identified knowledge gaps; no formal recommendation |
| Gastrostomy tube for decompression | G-tube in severe refractory disease |
Suspected gastroparesis
↓
Rule out obstruction → Upper endoscopy (EGD)
↓
Lab workup → CBC, CMP, HbA1c, TSH, nutritional markers
↓
Stop offending meds → opioids, GLP-1 agonists
↓
Optimize glycemic control (if diabetic)
↓
4-hour Gastric Emptying Scintigraphy
↓
Confirmed delayed emptying (>10% at 4h)
↓
MILD (10-15%) MODERATE (15-35%) SEVERE (>35%)
Diet + metoclopramide + Antiemetics + nutrition + Domperidone/erythromycin
prn support (liquids/PEJ) + Symptom modulators
+ Consider G-POEM/GES
Can you generate an image for this?
A clean medical clinical reference infographic titled "Gastroparesis: Clinical Overview" with four organized sections arranged in a grid layout. Section 1 labeled "Symptoms" lists: nausea (most common), vomiting of undigested food 3-4h post-meal, early satiety, postprandial bloating, abdominal pain, weight loss, succussion splash on exam. Section 2 labeled "Causes" lists with percentages: Idiopathic 40%, Diabetic 35%, Postsurgical 20%, Other 5%, with a note about ICC depletion and pylorospasm as mechanisms. Section 3 labeled "Workup" shows a step-by-step flow: Step 1 Upper endoscopy to rule out obstruction, Step 2 Labs (CBC, CMP, HbA1c, TSH, nutritional markers), Step 3 Stop offending meds (opioids, GLP-1 agonists), Step 4 4-hour Gastric Emptying Scintigraphy - gold standard, with severity thresholds: Mild 10-15%, Moderate 15-35%, Severe over 35% retention at 4 hours. Section 4 labeled "Management" shows three columns by severity - Mild: diet modification plus metoclopramide PRN; Moderate: add antiemetics plus nutritional support; Severe: erythromycin, ondansetron, jejunostomy tube, consider G-POEM or gastric electrical stimulation. A footer note reads "2025 AGA Guideline: 4-hour scintigraphy required; metoclopramide and erythromycin are first-line pharmacotherapy." Professional medical illustration style with a muted blue and white color scheme, clear typography, and subtle anatomical stomach icon in the header.

Now, use this image as well and create a PowerPoint presentation for me of this topic. Try to make 10 slides.
node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care/image-gen/e01a8dbd560a47b49f8f43366126688f.png" 2>/dev/null | head -c 200
mkdir -p /home/daytona/workspace/gastroparesis-pptx && ls /home/daytona/workspace/gastroparesis-pptx/
~/gastroparesis-pptx/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ── Fetch infographic image ──────────────────────────────────────────────────
const imgResult = JSON.parse(
execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care/image-gen/e01a8dbd560a47b49f8f43366126688f.png"`
).toString()
);
const infographicB64 = imgResult[0].base64;
// ── Palette ──────────────────────────────────────────────────────────────────
const C = {
navy: "0D2C54", // dominant dark background
teal: "1A7FA8", // section headers / accents
sky: "4DB8D8", // lighter accent
white: "FFFFFF",
offWhite:"F4F8FB",
lightGray:"E0EBF2",
darkText:"1C2B3A",
gold: "F0A500", // highlight accent
red: "D64045", // warning accent
};
const FONT = "Calibri";
// ── Helper: dark slide background ───────────────────────────────────────────
function darkBg(slide) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: C.navy }, line: { color: C.navy },
});
}
// ── Helper: light slide background ──────────────────────────────────────────
function lightBg(slide) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: C.offWhite }, line: { color: C.offWhite },
});
}
// ── Helper: teal header bar ──────────────────────────────────────────────────
function headerBar(slide, title, subtitle) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: 1.15,
fill: { color: C.teal }, line: { color: C.teal },
});
slide.addText(title, {
x: 0.35, y: 0.1, w: 9.3, h: 0.6,
fontSize: 22, bold: true, color: C.white, fontFace: FONT,
charSpacing: 1, margin: 0,
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.35, y: 0.68, w: 9.3, h: 0.38,
fontSize: 11, color: C.lightGray, fontFace: FONT, italic: true, margin: 0,
});
}
}
// ── Helper: slide number footer ──────────────────────────────────────────────
function footer(slide, num) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 5.35, w: "100%", h: 0.275,
fill: { color: C.navy }, line: { color: C.navy },
});
slide.addText(`Gastroparesis | Clinical Overview | ${num}/10`, {
x: 0.3, y: 5.36, w: 9.4, h: 0.24,
fontSize: 8, color: C.sky, fontFace: FONT, align: "left", margin: 0,
});
}
// ── Helper: card box ─────────────────────────────────────────────────────────
function card(slide, x, y, w, h, fillColor) {
slide.addShape(pres.ShapeType.rect, {
x, y, w, h,
fill: { color: fillColor || C.white },
line: { color: C.lightGray, width: 0.5 },
shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.1 },
});
}
// ── Helper: accent left bar ───────────────────────────────────────────────────
function accentBar(slide, x, y, h, color) {
slide.addShape(pres.ShapeType.rect, {
x, y, w: 0.07, h,
fill: { color: color || C.teal }, line: { color: color || C.teal },
});
}
// ────────────────────────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Gastroparesis: Clinical Overview";
pres.author = "Clinical Education";
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — Title
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkBg(s);
// decorative teal band at top
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: 0.18,
fill: { color: C.sky }, line: { color: C.sky },
});
// decorative gold band
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0.18, w: "100%", h: 0.06,
fill: { color: C.gold }, line: { color: C.gold },
});
// Main title
s.addText("GASTROPARESIS", {
x: 0.6, y: 0.8, w: 8.8, h: 1.3,
fontSize: 52, bold: true, color: C.white, fontFace: FONT,
charSpacing: 6, align: "center", margin: 0,
});
// Subtitle
s.addText("Clinical Presentation · Diagnosis · Management", {
x: 0.6, y: 2.1, w: 8.8, h: 0.55,
fontSize: 17, color: C.sky, fontFace: FONT,
charSpacing: 2, align: "center", margin: 0,
});
// Divider
s.addShape(pres.ShapeType.rect, {
x: 3.5, y: 2.72, w: 3.0, h: 0.04,
fill: { color: C.gold }, line: { color: C.gold },
});
// Tag line
s.addText("Delayed gastric emptying | Absence of mechanical obstruction", {
x: 0.6, y: 2.88, w: 8.8, h: 0.45,
fontSize: 12, color: C.lightGray, fontFace: FONT,
italic: true, align: "center", margin: 0,
});
// Source note
s.addText("Sources: Fischer's Mastery of Surgery 8e · Yamada's Gastroenterology 7e · 2025 AGA Guideline", {
x: 0.6, y: 4.9, w: 8.8, h: 0.3,
fontSize: 8, color: "607080", fontFace: FONT, align: "center", margin: 0,
});
// bottom band
s.addShape(pres.ShapeType.rect, {
x: 0, y: 5.35, w: "100%", h: 0.275,
fill: { color: C.teal }, line: { color: C.teal },
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — Definition & Epidemiology
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Definition & Epidemiology", "Understanding the scope of gastroparesis");
footer(s, 2);
// Definition card
card(s, 0.3, 1.3, 5.9, 1.5, C.white);
accentBar(s, 0.3, 1.3, 1.5, C.teal);
s.addText("Definition", {
x: 0.55, y: 1.38, w: 5.6, h: 0.38,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
s.addText(
"Delayed gastric emptying in the ABSENCE of mechanical obstruction, caused by impaired neuromuscular function of the stomach.",
{
x: 0.55, y: 1.76, w: 5.55, h: 0.95,
fontSize: 11.5, color: C.darkText, fontFace: FONT, margin: 0,
}
);
// Epi card
card(s, 0.3, 2.95, 5.9, 2.1, C.white);
accentBar(s, 0.3, 2.95, 2.1, C.gold);
s.addText("Epidemiology", {
x: 0.55, y: 3.03, w: 5.6, h: 0.38,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
const epiPoints = [
"Prevalence: ~24 per 100,000 persons",
"Female predominance (incidence ~4× higher in women)",
"Second most common sensorimotor GI disorder",
"Decreased 5-year survival vs. healthy cohort",
"Diabetic incidence: 14% type 1, 9% type 2 over 10 years",
];
s.addText(epiPoints.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < epiPoints.length - 1 } })), {
x: 0.55, y: 3.42, w: 5.55, h: 1.55,
fontSize: 11, color: C.darkText, fontFace: FONT, margin: 0,
});
// Stats column
const stats = [
{ val: "24", unit: "per 100k", label: "Prevalence" },
{ val: "4×", unit: "higher", label: "Women vs Men" },
{ val: ">10 yrs", unit: "DM duration", label: "Typical onset" },
];
let sy = 1.3;
stats.forEach(st => {
card(s, 6.5, sy, 3.15, 1.3, C.navy);
s.addText(st.val, {
x: 6.5, y: sy + 0.1, w: 3.15, h: 0.65,
fontSize: 30, bold: true, color: C.sky, fontFace: FONT,
align: "center", margin: 0,
});
s.addText(`${st.unit}\n${st.label}`, {
x: 6.5, y: sy + 0.72, w: 3.15, h: 0.5,
fontSize: 10, color: C.lightGray, fontFace: FONT,
align: "center", margin: 0,
});
sy += 1.45;
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — Etiology & Pathophysiology
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Etiology & Pathophysiology", "Causes and underlying mechanisms");
footer(s, 3);
// Pie-chart style etiology boxes (horizontal)
const causes = [
{ label: "Idiopathic", pct: "40%", color: C.teal },
{ label: "Diabetic", pct: "35%", color: C.navy },
{ label: "Postsurgical", pct: "20%", color: C.gold },
{ label: "Other", pct: "5%", color: C.red },
];
causes.forEach((c, i) => {
const x = 0.3 + i * 2.4;
s.addShape(pres.ShapeType.rect, {
x, y: 1.3, w: 2.2, h: 1.3,
fill: { color: c.color }, line: { color: c.color },
});
s.addText(c.pct, {
x, y: 1.35, w: 2.2, h: 0.72,
fontSize: 30, bold: true, color: C.white, fontFace: FONT,
align: "center", margin: 0,
});
s.addText(c.label, {
x, y: 2.05, w: 2.2, h: 0.5,
fontSize: 11, color: C.white, fontFace: FONT,
align: "center", margin: 0, bold: true,
});
});
// Pathophysiology card
card(s, 0.3, 2.78, 9.4, 2.27, C.white);
accentBar(s, 0.3, 2.78, 2.27, C.teal);
s.addText("Key Pathophysiologic Mechanisms", {
x: 0.55, y: 2.86, w: 9.1, h: 0.4,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
const pathoPoints = [
"Depletion of Interstitial Cells of Cajal (ICC) → loss of gastric pacemaker activity → dysrhythmias",
"Vagal/cholinergic dysfunction → disrupted antropyloric coordination → relative pyloric obstruction",
"Pylorospasm → impaired pyloric relaxation during antral contractions → delayed solid emptying",
"Hyperglycemia (>220 mg/dL) independently delays emptying and blunts prokinetic drug response",
"Postsurgical: vagotomy prevents proximal gastric relaxation and disrupts the antropyloric pump",
];
s.addText(pathoPoints.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < pathoPoints.length - 1 } })), {
x: 0.55, y: 3.28, w: 9.1, h: 1.7,
fontSize: 10.5, color: C.darkText, fontFace: FONT, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — Clinical Symptoms
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Clinical Presentation", "Recognizing the symptom complex");
footer(s, 4);
// Cardinal symptoms
card(s, 0.3, 1.3, 4.55, 3.75, C.white);
accentBar(s, 0.3, 1.3, 3.75, C.teal);
s.addText("Cardinal Symptoms", {
x: 0.55, y: 1.38, w: 4.2, h: 0.38,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
const cardinal = [
{ sym: "Nausea", note: "Most common; often persistent, not relieved by vomiting" },
{ sym: "Vomiting", note: "Occurs 3–4 h post-meal; contains UNDIGESTED food" },
{ sym: "Early satiety", note: "Unable to finish normal-sized meals" },
{ sym: "Bloating", note: "Postprandial abdominal fullness and distension" },
{ sym: "Abdominal pain", note: "Epigastric, variable severity" },
{ sym: "Weight loss", note: "Can be substantial in moderate–severe disease" },
];
let cy = 1.78;
cardinal.forEach(item => {
s.addText([
{ text: item.sym + " — ", options: { bold: true } },
{ text: item.note },
], {
x: 0.55, y: cy, w: 4.2, h: 0.52,
fontSize: 10.5, color: C.darkText, fontFace: FONT, margin: 0,
});
cy += 0.52;
});
// Pathognomonic callout
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 4.77, w: 4.55, h: 0.28,
fill: { color: C.gold }, line: { color: C.gold },
});
s.addText("Pathognomonic: Vomiting of food eaten the DAY BEFORE", {
x: 0.35, y: 4.78, w: 4.45, h: 0.25,
fontSize: 9.5, bold: true, color: C.navy, fontFace: FONT, margin: 0, align: "center",
});
// Exam + special findings
card(s, 5.15, 1.3, 4.5, 2.1, C.white);
accentBar(s, 5.15, 1.3, 2.1, C.gold);
s.addText("Physical Examination", {
x: 5.4, y: 1.38, w: 4.15, h: 0.38,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
const examPoints = [
"Succussion splash (retained gastric contents)",
"Cachexia / muscle wasting in severe disease",
"Signs of peripheral neuropathy (diabetic)",
"Usually unremarkable in mild disease",
];
s.addText(examPoints.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < examPoints.length - 1 } })), {
x: 5.4, y: 1.78, w: 4.15, h: 1.55,
fontSize: 11, color: C.darkText, fontFace: FONT, margin: 0,
});
// Diabetic-specific
card(s, 5.15, 3.55, 4.5, 1.5, C.navy);
s.addText("In Diabetic Gastroparesis", {
x: 5.4, y: 3.63, w: 4.15, h: 0.38,
fontSize: 12, bold: true, color: C.sky, fontFace: FONT, margin: 0,
});
const dmPoints = [
"Erratic blood glucose / unexpected hypoglycemia",
"Recurrent DKA episodes",
"Heartburn / GERD-like symptoms",
"Delayed oral hypoglycemic absorption",
];
s.addText(dmPoints.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < dmPoints.length - 1 } })), {
x: 5.4, y: 4.02, w: 4.15, h: 0.97,
fontSize: 10, color: C.lightGray, fontFace: FONT, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — Diagnostic Workup
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Diagnostic Workup", "Step-by-step evaluation algorithm");
footer(s, 5);
const steps = [
{
num: "1",
title: "Upper Endoscopy (EGD)",
body: "First step — exclude mechanical obstruction: peptic stricture, pyloric stenosis, neoplasm, bezoar. Note: high aspiration risk in this population.",
color: C.teal,
},
{
num: "2",
title: "Laboratory Studies",
body: "CBC · CMP · HbA1c · TSH · Prealbumin/Transferrin · Electrolytes (K⁺, Ca²⁺). Exclude: DKA, uremia, hypocalcemia, hypothyroidism.",
color: C.teal,
},
{
num: "3",
title: "Medication Review",
body: "Discontinue motility-inhibiting drugs: opioids, GLP-1 agonists (semaglutide), anticholinergics, Ca²⁺ channel blockers.",
color: C.gold,
},
{
num: "4",
title: "4-Hour Gastric Emptying Scintigraphy",
body: "Gold standard. Tc-99m labeled 240 kcal low-fat egg meal. Scans at 0, 1, 2, 4 hours. Diagnostic: >10% retention at 4 h.\n2025 AGA: AGAINST 2-hour testing; FOR 4-hour testing.",
color: C.red,
},
];
steps.forEach((step, i) => {
const x = i < 2 ? 0.3 : 0.3;
const col = i < 2 ? 0 : 1;
const row = i % 2;
const sx = col === 0 ? (i === 0 ? 0.3 : 5.15) : 0;
// layout: 2 per row
const lx = i % 2 === 0 ? 0.3 : 5.15;
const ly = 1.3 + Math.floor(i / 2) * 2.1;
card(s, lx, ly, 4.55, 1.9, C.white);
// color accent top
s.addShape(pres.ShapeType.rect, {
x: lx, y: ly, w: 4.55, h: 0.08,
fill: { color: step.color }, line: { color: step.color },
});
// number badge
s.addShape(pres.ShapeType.rect, {
x: lx + 0.15, y: ly + 0.15, w: 0.42, h: 0.42,
fill: { color: step.color }, line: { color: step.color },
});
s.addText(step.num, {
x: lx + 0.15, y: ly + 0.15, w: 0.42, h: 0.42,
fontSize: 16, bold: true, color: C.white, fontFace: FONT,
align: "center", valign: "middle", margin: 0,
});
s.addText(step.title, {
x: lx + 0.68, y: ly + 0.18, w: 3.72, h: 0.38,
fontSize: 12, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
s.addText(step.body, {
x: lx + 0.2, y: ly + 0.62, w: 4.22, h: 1.2,
fontSize: 9.5, color: C.darkText, fontFace: FONT, margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — Severity Classification
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Severity Classification", "Gastric emptying scintigraphy — 4-hour retention thresholds");
footer(s, 6);
const severities = [
{
label: "MILD",
range: "10 – 15%",
retention: "Retention at 4 h",
color: "2EAA6A",
points: [
"Symptoms manageable",
"Dietary modification sufficient",
"Metoclopramide PRN",
"Nutritional support rarely needed",
"No procedural intervention",
],
},
{
label: "MODERATE",
range: "15 – 35%",
retention: "Retention at 4 h",
color: C.gold,
points: [
"More frequent symptoms",
"Regular dietary modification",
"Scheduled prokinetics + antiemetics",
"Caloric liquid supplements",
"PEJ tube occasionally needed",
],
},
{
label: "SEVERE",
range: "> 35%",
retention: "Retention at 4 h",
color: C.red,
points: [
"Debilitating symptoms",
"Blenderized diet routinely",
"Multiple pharmacologic agents",
"PEJ tube / parenteral nutrition",
"Consider G-POEM or GES",
],
},
];
severities.forEach((sev, i) => {
const sx = 0.3 + i * 3.2;
// top color header
s.addShape(pres.ShapeType.rect, {
x: sx, y: 1.28, w: 2.95, h: 0.82,
fill: { color: sev.color }, line: { color: sev.color },
});
s.addText(sev.label, {
x: sx, y: 1.3, w: 2.95, h: 0.42,
fontSize: 18, bold: true, color: C.white, fontFace: FONT,
align: "center", margin: 0, charSpacing: 3,
});
s.addText(sev.range, {
x: sx, y: 1.7, w: 2.95, h: 0.34,
fontSize: 13, bold: true, color: C.white, fontFace: FONT,
align: "center", margin: 0,
});
card(s, sx, 2.1, 2.95, 2.8, C.white);
s.addText(sev.retention, {
x: sx + 0.1, y: 2.15, w: 2.75, h: 0.32,
fontSize: 9, italic: true, color: "888888", fontFace: FONT,
align: "center", margin: 0,
});
s.addText(sev.points.map((t, idx) => ({ text: t, options: { bullet: true, breakLine: idx < sev.points.length - 1 } })), {
x: sx + 0.12, y: 2.52, w: 2.73, h: 2.3,
fontSize: 10, color: C.darkText, fontFace: FONT, margin: 0,
});
});
// footnote
s.addText("Diagnostic threshold: Gastric retention >10% at 4 hours on standard scintigraphy (Tc-99m labeled 240 kcal low-fat egg meal)", {
x: 0.3, y: 5.1, w: 9.4, h: 0.22,
fontSize: 8.5, color: "888888", fontFace: FONT, italic: true, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — General & Dietary Management
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "General & Dietary Management", "First-line measures for all patients");
footer(s, 7);
// General measures
card(s, 0.3, 1.3, 9.4, 1.22, C.white);
accentBar(s, 0.3, 1.3, 1.22, C.teal);
s.addText("General Measures (ALL Patients)", {
x: 0.55, y: 1.38, w: 9.0, h: 0.36,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
s.addText("Stop offending medications (opioids, GLP-1 agonists, anticholinergics) | Optimize glycemic control in diabetics | Treat underlying cause", {
x: 0.55, y: 1.76, w: 9.0, h: 0.66,
fontSize: 11, color: C.darkText, fontFace: FONT, margin: 0,
});
// Dietary table
const dietRows = [
["Dietary Principle", "Mild", "Moderate", "Severe"],
["Meal frequency", "Small, frequent (4–6/day)", "Small, frequent (4–6/day)", "Small, frequent (4–6/day)"],
["Fat content", "Low fat", "Low fat", "Low fat"],
["Fiber", "Low fiber", "Low fiber", "Low fiber"],
["Texture", "Normal; blenderized PRN", "Blenderized (small particle)", "Blenderized routinely"],
["Liquids", "Normal", "Caloric liquid supplements", "Liquid diet as primary intake"],
["Enteral support", "Rarely needed", "PEJ tube (occasionally)", "PEJ tube / TPN if severe malnutrition"],
];
const colW = [2.6, 2.2, 2.2, 2.2];
const tableX = 0.3;
const tableY = 2.65;
const rowH = 0.38;
dietRows.forEach((row, ri) => {
let cx = tableX;
row.forEach((cell, ci) => {
const isHeader = ri === 0;
s.addShape(pres.ShapeType.rect, {
x: cx, y: tableY + ri * rowH, w: colW[ci], h: rowH,
fill: { color: isHeader ? C.teal : (ri % 2 === 0 ? C.offWhite : C.white) },
line: { color: C.lightGray, width: 0.5 },
});
s.addText(cell, {
x: cx + 0.06, y: tableY + ri * rowH + 0.04, w: colW[ci] - 0.12, h: rowH - 0.08,
fontSize: isHeader ? 10 : 9,
bold: isHeader,
color: isHeader ? C.white : C.darkText,
fontFace: FONT, margin: 0, valign: "middle",
});
cx += colW[ci];
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — Pharmacological Treatment
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Pharmacological Treatment", "Prokinetics · Antiemetics · Neuromodulators");
footer(s, 8);
// AGA 2025 banner
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 1.3, w: 9.4, h: 0.42,
fill: { color: C.navy }, line: { color: C.navy },
});
s.addText("2025 AGA Guideline — First-line: Metoclopramide OR Erythromycin | Against: Domperidone, Prucalopride, Aprepitant, Nortriptyline, Buspirone, Cannabidiol as first-line", {
x: 0.38, y: 1.33, w: 9.25, h: 0.36,
fontSize: 9.5, color: C.gold, fontFace: FONT, bold: true, margin: 0,
});
// Prokinetics
card(s, 0.3, 1.85, 4.55, 1.78, C.white);
accentBar(s, 0.3, 1.85, 1.78, C.teal);
s.addText("Prokinetics", {
x: 0.55, y: 1.93, w: 4.2, h: 0.36,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
const prokinetics = [
"Metoclopramide 5–10 mg PO before meals (D2 antagonist) ✓ First-line — risk of tardive dyskinesia; limit to 12 wks",
"Erythromycin 125 mg PO bid (motilin agonist) ✓ First-line — tachyphylaxis with prolonged use",
"Domperidone 10–20 mg PO tid (⚠ 2025 AGA: against as first-line)",
"Prucalopride 2 mg daily — 5HT4 agonist (⚠ 2025 AGA: against as first-line)",
];
s.addText(prokinetics.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < prokinetics.length - 1 } })), {
x: 0.55, y: 2.32, w: 4.2, h: 1.24,
fontSize: 9.5, color: C.darkText, fontFace: FONT, margin: 0,
});
// Antiemetics
card(s, 5.15, 1.85, 4.5, 1.78, C.white);
accentBar(s, 5.15, 1.85, 1.78, C.gold);
s.addText("Antiemetics", {
x: 5.4, y: 1.93, w: 4.15, h: 0.36,
fontSize: 13, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
const antiemetics = [
"Ondansetron 4–8 mg TID PO/SL/IV (5-HT3 antagonist)",
"Promethazine 12.5–25 mg q4–6h PO/PR/IM",
"Prochlorperazine 5–10 mg PO/IM",
"Aprepitant 40–80 mg (NK1 antagonist — severe/refractory)",
"Mirtazapine 15–30 mg daily (severe, poor appetite)",
];
s.addText(antiemetics.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < antiemetics.length - 1 } })), {
x: 5.4, y: 2.32, w: 4.15, h: 1.24,
fontSize: 9.5, color: C.darkText, fontFace: FONT, margin: 0,
});
// Neuromodulators
card(s, 0.3, 3.77, 9.4, 1.23, C.white);
accentBar(s, 0.3, 3.77, 1.23, C.red);
s.addText("Symptom Modulators / Neuromodulators (Severe / Refractory)", {
x: 0.55, y: 3.85, w: 9.0, h: 0.36,
fontSize: 12, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
s.addText(
"Nortriptyline 10–25 mg (TCA — benefit for anorexia/weight; no overall benefit in idiopathic GP per RCT) | Buspirone (⚠ 2025 AGA: against first-line) | Acupuncture (moderate disease)",
{
x: 0.55, y: 4.23, w: 9.0, h: 0.7,
fontSize: 10, color: C.darkText, fontFace: FONT, margin: 0,
}
);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — Procedural & Surgical Options
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
lightBg(s);
headerBar(s, "Procedural & Surgical Options", "Reserved for medically refractory gastroparesis");
footer(s, 9);
// caveat banner
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 1.3, w: 9.4, h: 0.38,
fill: { color: C.red }, line: { color: C.red },
});
s.addText("2025 AGA: G-POEM and Gastric Electrical Stimulation should be reserved for patients FAILING medical therapy — not for routine initial use", {
x: 0.38, y: 1.32, w: 9.25, h: 0.34,
fontSize: 9.5, color: C.white, fontFace: FONT, bold: true, margin: 0,
});
const procedures = [
{
name: "G-POEM",
full: "Gastric Per-Oral Endoscopic Pyloromyotomy",
body: "Endoscopic division of pyloric muscle via submucosal tunnel. Improves gastric emptying and symptoms. Predictors of response: idiopathic etiology, female sex, age <50.",
color: C.teal,
},
{
name: "GES",
full: "Gastric Electrical Stimulation (Enterra™)",
body: "FDA-approved for refractory nausea/vomiting. Implantable device delivers high-frequency, low-energy pulses. May improve symptoms without improving emptying (mechanism unclear).",
color: C.navy,
},
{
name: "Botox",
full: "Pyloric Botulinum Toxin Injection",
body: "Reduces pylorospasm. Open-label studies positive; two small RCTs showed NO benefit vs. saline. Best response: idiopathic GP, female, age <50, dose 200 units.",
color: C.gold,
},
{
name: "Surgery",
full: "Pyloroplasty / Pyloromyotomy / Gastrostomy",
body: "Surgical pyloroplasty/myotomy: limited RCT data; 2025 AGA identified knowledge gaps. G-tube: decompression in severe refractory disease. PEJ tube for nutritional support.",
color: C.red,
},
];
procedures.forEach((proc, i) => {
const px = i % 2 === 0 ? 0.3 : 5.15;
const py = 1.85 + Math.floor(i / 2) * 1.78;
card(s, px, py, 4.55, 1.62, C.white);
s.addShape(pres.ShapeType.rect, {
x: px, y: py, w: 0.85, h: 1.62,
fill: { color: proc.color }, line: { color: proc.color },
});
s.addText(proc.name, {
x: px + 0.02, y: py + 0.55, w: 0.81, h: 0.52,
fontSize: 13, bold: true, color: C.white, fontFace: FONT,
align: "center", margin: 0,
});
s.addText(proc.full, {
x: px + 0.98, y: py + 0.08, w: 3.45, h: 0.38,
fontSize: 10.5, bold: true, color: C.teal, fontFace: FONT, margin: 0,
});
s.addText(proc.body, {
x: px + 0.98, y: py + 0.48, w: 3.45, h: 1.07,
fontSize: 9.5, color: C.darkText, fontFace: FONT, margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — Summary Infographic & Key Takeaways
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkBg(s);
// top band
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: 0.18,
fill: { color: C.sky }, line: { color: C.sky },
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0.18, w: "100%", h: 0.06,
fill: { color: C.gold }, line: { color: C.gold },
});
s.addText("Clinical Summary & Key Takeaways", {
x: 0.4, y: 0.3, w: 9.2, h: 0.52,
fontSize: 22, bold: true, color: C.white, fontFace: FONT,
charSpacing: 1, margin: 0,
});
// infographic image (left)
s.addImage({
data: infographicB64,
x: 0.25, y: 0.95, w: 5.3, h: 3.55,
});
// Key takeaways (right)
const takeaways = [
{ icon: "▶", text: "4-hour scintigraphy is mandatory for diagnosis (2025 AGA)" },
{ icon: "▶", text: "Metoclopramide & erythromycin are the only first-line drugs" },
{ icon: "▶", text: "Vomiting undigested food >6 h post-meal is pathognomonic" },
{ icon: "▶", text: "Stop GLP-1 agonists and opioids before testing" },
{ icon: "▶", text: "Optimize glycemic control in ALL diabetic patients" },
{ icon: "▶", text: "G-POEM & GES: for refractory cases only, not routine" },
{ icon: "▶", text: "Multidisciplinary approach required for severe disease" },
];
let ky = 1.02;
takeaways.forEach(t => {
s.addShape(pres.ShapeType.rect, {
x: 5.75, y: ky, w: 3.95, h: 0.46,
fill: { color: "15375F" }, line: { color: C.teal, width: 0.5 },
});
s.addText([
{ text: t.icon + " ", options: { color: C.sky, bold: true } },
{ text: t.text, options: { color: C.white } },
], {
x: 5.85, y: ky + 0.04, w: 3.78, h: 0.38,
fontSize: 9.5, fontFace: FONT, margin: 0, valign: "middle",
});
ky += 0.52;
});
// bottom reference bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 5.25, w: "100%", h: 0.375,
fill: { color: C.teal }, line: { color: C.teal },
});
s.addText("Fischer's Mastery of Surgery 8e · Yamada's Textbook of Gastroenterology 7e · Sleisenger & Fordtran's GI & Liver Disease · 2025 AGA Clinical Practice Guideline (PMID: 40976635)", {
x: 0.3, y: 5.28, w: 9.4, h: 0.32,
fontSize: 8, color: C.white, fontFace: FONT, align: "center", margin: 0,
});
}
// ── Write file ────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/gastroparesis-pptx/Gastroparesis_Clinical_Overview.pptx" })
.then(() => console.log("SUCCESS: file written"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/gastroparesis-pptx && node build.js 2>&1
node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care/image-gen/e01a8dbd560a47b49f8f43366126688f.png" > /home/daytona/workspace/gastroparesis-pptx/infographic_b64.json 2>&1; echo "exit: $?"
~/gastroparesis-pptx/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/gastroparesis-pptx/build.js'
~/gastroparesis-pptx/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/gastroparesis-pptx/build.js'
cd /home/daytona/workspace/gastroparesis-pptx && node build.js 2>&1
ls -lh /home/daytona/workspace/gastroparesis-pptx/Gastroparesis_Clinical_Overview.pptx
Gastroparesis Clinical Overview
Presentation · PPTX
| # | Slide | Design |
|---|---|---|
| 1 | Title | Dark navy with teal/gold accent bands |
| 2 | Definition & Epidemiology | Stat cards (navy) + key points |
| 3 | Etiology & Pathophysiology | Color-coded cause blocks (40/35/20/5%) + mechanism bullets |
| 4 | Clinical Presentation | Cardinal symptoms + exam findings + diabetic-specific callout box |
| 5 | Diagnostic Workup | 4-step numbered card layout |
| 6 | Severity Classification | Three-column mild/moderate/severe table with color-coded headers |
| 7 | General & Dietary Management | Full dietary management table by severity |
| 8 | Pharmacological Treatment | 2025 AGA banner + prokinetics / antiemetics / neuromodulators cards |
| 9 | Procedural & Surgical Options | G-POEM, GES, Botox, Surgery - each with color-coded panel |
| 10 | Summary & Key Takeaways | Your infographic embedded + 7 key takeaway bullets on dark background |