Make a ppt on peptic ulcer disease for undergraduate medical students (mbbs) in India from Bailey and love Ot should not have more than 25 slides and end in one hour it should also have case based discussion at the first and last and pictures related to each slide it should be interactive and should have lot of flow chart and each slide should have not more than 10 points and each point should not have more than 10 words
I will also provide with a checklist of peer review and it should have heading and subheadings accordingly
peptic ulcer disease Bailey and Love surgery images pathogenesis H pylori NSAID
peptic ulcer disease endoscopy images free medical education H pylori gastric ulcer site:wikimedia.org OR site:radiopaedia.org OR site:ncbi.nlm.nih.gov
ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/peptic-ulcer…
mkdir -p /home/daytona/peptic-ulcer-ppt && ls /home/daytona/
/home/daytona/peptic-ulcer-ppt/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ─── Color palette ────────────────────────────────────────────────────────────
const C = {
navy: "1A2E5A", // dominant dark
teal: "0D7E7E", // heading bars
amber: "E8920A", // accent / flowchart nodes
white: "FFFFFF",
offWhite:"F4F7FA",
lightTeal:"C8E8E8",
red: "C0392B",
green: "1E7A4A",
gray: "566573",
lightGray:"EAF0F6",
yellow: "FFF3CD",
orange: "F0A500",
};
// ─── Fetch images as base64 ───────────────────────────────────────────────────
const imageUrls = [
// 1) Stomach anatomy
"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Stomach_diagram.svg/800px-Stomach_diagram.svg.png",
// 2) H.pylori pathogenesis diagram
"https://www.researchgate.net/publication/362672570/figure/fig4/AS:11431281079561150@1660759264890/Pathogenesis-of-H-pylori.jpg",
// 3) Duodenal ulcer endoscopy (Bailey & Love CDN)
"https://cdn.orris.care/cdss_images/9b8c9b80815ac3526d6c02271dd7a0ea8b3a0d054a5db153ca8b9827c1b8fb42.png",
// 4) Barium meal duodenal ulcer (Bailey & Love CDN)
"https://cdn.orris.care/cdss_images/675c6b1515e8f1b218a165f8bee0054477bcedf899e353e0883df93d04bf5587.png",
// 5) Perforated ulcer erect CXR (Bailey & Love CDN)
"https://cdn.orris.care/cdss_images/ec56874995d0dbd5dae7706865ecb332a07f6afd7cdc8c2e16c7f4f91d12789a.png",
// 6) Billroth I diagram (Bailey & Love CDN)
"https://cdn.orris.care/cdss_images/7cde4ba299c111e8e4061128812fd1d4f52aabae9636099b0aaafb43102d6398.png",
// 7) H.pylori CLO test / urea breath test
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Urea_breath_test_kit.jpg/640px-Urea_breath_test_kit.jpg",
// 8) Peer review checklist image
"https://d361swluvexzqs.cloudfront.net/chats-attachments/image-1779944768082-5n8e2v.png",
];
let imgs = [];
try {
const raw = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
imgs = JSON.parse(raw);
} catch(e) {
console.error("Image fetch error:", e.message);
imgs = imageUrls.map(u => ({ url: u, base64: null, error: e.message }));
}
function imgData(i) {
return imgs[i] && !imgs[i].error ? imgs[i].base64 : null;
}
// ─── Helpers ─────────────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Peptic Ulcer Disease";
pres.author = "MBBS Undergraduate Teaching – Bailey & Love";
// Full dark background slide (title/case)
function darkSlide(title, subtitle, tag) {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
// Top accent bar
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: C.amber } });
if (tag) {
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.5, y: 0.35, w: 1.8, h: 0.38, fill: { color: C.amber }, rectRadius: 0.05 });
sl.addText(tag, { x: 0.5, y: 0.35, w: 1.8, h: 0.38, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
}
sl.addText(title, { x: 0.7, y: 1.3, w: 8.6, h: 1.5, fontSize: 36, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
if (subtitle) {
sl.addText(subtitle, { x: 0.7, y: 3.0, w: 8.6, h: 1.2, fontSize: 18, color: C.lightTeal, align: "center", valign: "top", fontFace: "Calibri" });
}
sl.addText("Bailey & Love's Short Practice of Surgery | MBBS India", {
x: 0, y: 5.2, w: 10, h: 0.35, fontSize: 10, color: C.gray, align: "center", italic: true
});
return sl;
}
// Standard content slide
function contentSlide(title, bullets, imgIdx, imgCaption) {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
// Top bar
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.65, fill: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.65, w: 10, h: 0.05, fill: { color: C.amber } });
sl.addText(title, { x: 0.3, y: 0, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0, fontFace: "Calibri" });
const hasImg = imgIdx !== null && imgIdx !== undefined && imgData(imgIdx);
const contentW = hasImg ? 5.6 : 9.2;
const contentX = 0.4;
// Bullets
const bulletItems = bullets.map((b, i) => ({
text: b,
options: { bullet: { indent: 15 }, breakLine: i < bullets.length - 1, color: C.navy, fontSize: 15, fontFace: "Calibri", paraSpaceBefore: 4 }
}));
sl.addText(bulletItems, { x: contentX, y: 0.85, w: contentW, h: 4.5, valign: "top" });
// Image
if (hasImg) {
sl.addImage({ data: imgData(imgIdx), x: 6.2, y: 0.85, w: 3.5, h: 3.2 });
if (imgCaption) {
sl.addText(imgCaption, { x: 6.2, y: 4.05, w: 3.5, h: 0.45, fontSize: 9, italic: true, color: C.gray, align: "center" });
}
}
// Slide number strip
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.navy } });
return sl;
}
// Two-column slide
function twoColSlide(title, col1Title, col1Items, col2Title, col2Items, col1Color, col2Color) {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.65, fill: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.65, w: 10, h: 0.05, fill: { color: C.amber } });
sl.addText(title, { x: 0.3, y: 0, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0, fontFace: "Calibri" });
// Col 1
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.3, y: 0.85, w: 4.5, h: 4.5, fill: { color: col1Color || C.lightTeal }, line: { color: C.teal, width: 1 }, rectRadius: 0.1 });
sl.addText(col1Title, { x: 0.3, y: 0.85, w: 4.5, h: 0.45, fontSize: 15, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
const c1Items = col1Items.map((b, i) => ({ text: b, options: { bullet: { indent: 12 }, breakLine: i < col1Items.length - 1, color: C.navy, fontSize: 13.5, fontFace: "Calibri", paraSpaceBefore: 3 } }));
sl.addText(c1Items, { x: 0.45, y: 1.38, w: 4.2, h: 3.8, valign: "top" });
// Col 2
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 5.2, y: 0.85, w: 4.5, h: 4.5, fill: { color: col2Color || C.yellow }, line: { color: C.amber, width: 1 }, rectRadius: 0.1 });
sl.addText(col2Title, { x: 5.2, y: 0.85, w: 4.5, h: 0.45, fontSize: 15, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
const c2Items = col2Items.map((b, i) => ({ text: b, options: { bullet: { indent: 12 }, breakLine: i < col2Items.length - 1, color: C.navy, fontSize: 13.5, fontFace: "Calibri", paraSpaceBefore: 3 } }));
sl.addText(c2Items, { x: 5.35, y: 1.38, w: 4.2, h: 3.8, valign: "top" });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.navy } });
return sl;
}
// Flowchart slide (vertical or horizontal chain)
function flowchartSlide(title, steps, colors, imgIdx, imgCaption) {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.65, fill: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.65, w: 10, h: 0.05, fill: { color: C.amber } });
sl.addText(title, { x: 0.3, y: 0, w: 9.4, h: 0.65, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0, fontFace: "Calibri" });
const hasImg = imgIdx !== null && imgIdx !== undefined && imgData(imgIdx);
const maxW = hasImg ? 5.8 : 9.2;
const n = steps.length;
const boxH = 0.54;
const gapY = 0.08;
const totalH = n * boxH + (n - 1) * (gapY + 0.22);
const startY = 0.8 + (4.5 - totalH) / 2;
steps.forEach((step, i) => {
const col = colors ? colors[i % colors.length] : C.teal;
const y = startY + i * (boxH + gapY + 0.22);
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.4, y, w: maxW, h: boxH,
fill: { color: col }, rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 3, offset: 1, angle: 135, opacity: 0.12 }
});
sl.addText(step, { x: 0.4, y, w: maxW, h: boxH, fontSize: 13.5, bold: false, color: C.white, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
if (i < steps.length - 1) {
// Arrow
sl.addShape(pres.shapes.TRIANGLE, {
x: 0.4 + maxW / 2 - 0.15, y: y + boxH + 0.02, w: 0.3, h: 0.2,
fill: { color: C.amber }, rotate: 180
});
}
});
if (hasImg) {
sl.addImage({ data: imgData(imgIdx), x: 6.4, y: 0.85, w: 3.3, h: 3.0 });
if (imgCaption) {
sl.addText(imgCaption, { x: 6.4, y: 3.88, w: 3.3, h: 0.4, fontSize: 9, italic: true, color: C.gray, align: "center" });
}
}
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.navy } });
return sl;
}
// Case slide (interactive)
function caseSlide(slideNum, caseTitle, scenario, questions, bgColor) {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: bgColor || C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: C.amber } });
// Badge
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.4, y: 0.3, w: 2.2, h: 0.42, fill: { color: C.amber }, rectRadius: 0.06 });
sl.addText(`CASE ${slideNum}`, { x: 0.4, y: 0.3, w: 2.2, h: 0.42, fontSize: 13, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
sl.addText(caseTitle, { x: 0.4, y: 0.85, w: 9.2, h: 0.5, fontSize: 20, bold: true, color: C.amber, valign: "middle", fontFace: "Calibri" });
// Scenario box
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.4, y: 1.45, w: 9.2, h: 1.7, fill: { color: "1E3A6E" }, rectRadius: 0.1 });
sl.addText(scenario, { x: 0.55, y: 1.5, w: 8.9, h: 1.6, fontSize: 14, color: C.white, valign: "top", fontFace: "Calibri", wrap: true });
// Questions
sl.addText("Interactive Discussion:", { x: 0.4, y: 3.28, w: 9.2, h: 0.35, fontSize: 15, bold: true, color: C.amber, fontFace: "Calibri" });
const qItems = questions.map((q, i) => ({
text: `Q${i + 1}: ${q}`,
options: { bullet: false, breakLine: i < questions.length - 1, color: C.lightTeal, fontSize: 13.5, fontFace: "Calibri", paraSpaceBefore: 5 }
}));
sl.addText(qItems, { x: 0.4, y: 3.65, w: 9.2, h: 1.6, valign: "top" });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.amber } });
return sl;
}
// ─── PEER REVIEW CHECKLIST SLIDE ──────────────────────────────────────────────
function peerReviewSlide() {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.65, fill: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.65, w: 10, h: 0.05, fill: { color: C.amber } });
sl.addText("Peer Review Checklist – Ramaiah Medical College", {
x: 0.3, y: 0, w: 9.4, h: 0.65, fontSize: 20, bold: true, color: C.white, valign: "middle", margin: 0, fontFace: "Calibri"
});
sl.addText("Evaluation of Faculty Members by Peers", {
x: 0.3, y: 0.75, w: 9.4, h: 0.3, fontSize: 13, italic: true, color: C.teal, fontFace: "Calibri"
});
const criteria = [
["1. Arousal of interest at beginning", "2. Stating objectives clearly"],
["3. Logical organisation of material", "4. Use of relevant content material"],
["5. Pace / speed of presentation", "6. Audibility & clarity"],
["7. Changing pace / shifting emphasis", "8. Using examples to illustrate ideas"],
["9. Explaining complex concepts", "10. Non-verbal cues & eye contact"],
["11. Allowing student questions", "12. Asking facilitative questions"],
["13. Rewarding pupil effort", "14. Using audio-visual aids"],
["15. Integrating course with current issues", "16. Summarising key points at end"],
];
const startY = 1.12;
const rowH = 0.34;
criteria.forEach(([c1, c2], i) => {
const y = startY + i * rowH;
const bg = i % 2 === 0 ? C.lightGray : C.white;
sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y, w: 9.4, h: rowH, fill: { color: bg } });
sl.addText(c1, { x: 0.45, y, w: 4.4, h: rowH, fontSize: 11, color: C.navy, valign: "middle", fontFace: "Calibri" });
sl.addText(c2, { x: 5.0, y, w: 4.4, h: rowH, fontSize: 11, color: C.navy, valign: "middle", fontFace: "Calibri" });
});
// Rating scale
sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 4.9, w: 9.4, h: 0.42, fill: { color: C.navy } });
sl.addText("Rating Scale: 1=Unsatisfactory 2=Satisfactory 3=Above Average 4=Good 5=Excellent", {
x: 0.3, y: 4.9, w: 9.4, h: 0.42, fontSize: 11, color: C.white, align: "center", valign: "middle", bold: true
});
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.navy } });
return sl;
}
// ─── BUILD ALL SLIDES ─────────────────────────────────────────────────────────
// SLIDE 1 – Title
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.15, fill: { color: C.amber } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.475, w: 10, h: 0.15, fill: { color: C.amber } });
// Decorative circle
sl.addShape(pres.shapes.OVAL, { x: 6.5, y: 0.6, w: 4.5, h: 4.5, fill: { color: C.teal, transparency: 80 }, line: { color: C.teal, width: 1, transparency: 60 } });
sl.addShape(pres.shapes.OVAL, { x: 7.0, y: 1.1, w: 3.5, h: 3.5, fill: { color: C.teal, transparency: 70 } });
sl.addText("PEPTIC ULCER DISEASE", { x: 0.5, y: 1.0, w: 6.5, h: 1.4, fontSize: 38, bold: true, color: C.white, valign: "middle", fontFace: "Calibri", charSpacing: 1 });
sl.addText("A Comprehensive Undergraduate Module", { x: 0.5, y: 2.5, w: 6.0, h: 0.5, fontSize: 17, color: C.lightTeal, italic: true, fontFace: "Calibri" });
sl.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.15, w: 5.5, h: 0.04, fill: { color: C.amber } });
sl.addText("Based on Bailey & Love's Short Practice of Surgery (28th Ed.)", { x: 0.5, y: 3.28, w: 6.0, h: 0.45, fontSize: 13, color: C.lightTeal, fontFace: "Calibri" });
sl.addText("MBBS – 3rd / Final Year | Department of Surgery", { x: 0.5, y: 3.8, w: 6.0, h: 0.35, fontSize: 12, color: C.gray, fontFace: "Calibri" });
sl.addText("Duration: 60 Minutes | 25 Slides", { x: 0.5, y: 4.2, w: 4.5, h: 0.32, fontSize: 11, color: C.gray, fontFace: "Calibri" });
// Stomach icon text
if (imgData(0)) {
sl.addImage({ data: imgData(0), x: 6.8, y: 1.2, w: 2.8, h: 2.8, transparency: 10 });
}
}
// SLIDE 2 – Learning Objectives
contentSlide("Learning Objectives", [
"Define peptic ulcer disease (PUD)",
"Understand the epidemiology in Indian context",
"Explain pathogenesis – H. pylori, NSAIDs, acid",
"Distinguish duodenal vs gastric ulcer",
"Describe clinical features & investigations",
"Outline medical management & eradication therapy",
"Identify surgical indications & techniques",
"Recognise & manage complications",
"Apply knowledge to clinical scenarios",
], null, null);
// SLIDE 3 – OPENING CASE
caseSlide("A", "Opening Case – Trigger",
"Ramu, 35-year-old auto driver from Bengaluru. \nC/O: Burning epigastric pain for 3 months, worse 2–3 hrs after food, relieved by antacids. \nHistory: Regular use of ibuprofen for back pain. Smoker × 10 years. No haematemesis.",
[
"What is your provisional diagnosis?",
"What are the causative factors here?",
"Which investigations will you order first?",
],
C.navy
);
// SLIDE 4 – Epidemiology
contentSlide("Epidemiology & Burden", [
"Lifetime prevalence: 5–10% globally",
"Duodenal ulcer (DU) 4× more common than gastric ulcer (GU)",
"DU: males > females; GU: equal gender incidence",
"H. pylori prevalence higher in India (>70% adults)",
"NSAID use increasing due to ageing population",
"Rising incidence in low-socioeconomic groups",
"Decline in West due to H. pylori eradication",
"Complications remain significant cause of mortality",
], null, null);
// SLIDE 5 – Anatomy of stomach (image + key sites)
contentSlide("Relevant Anatomy – Sites of Ulceration", [
"Common sites: 1st part duodenum, lesser curve stomach",
"Also: stomal, oesophageal, Meckel's diverticulum",
"Occurs at junction of different epithelia types",
"Epithelium least resistant to acid is affected",
"Anterior DU → tends to perforate",
"Posterior DU → tends to bleed (gastroduodenal a.)",
"Gastric body: Type I (no H↑acid); Antrum: Type II",
"Johnson classification: Types I–V gastric ulcers",
], 0, "Gastric anatomy & ulcer sites");
// SLIDE 6 – Pathogenesis flowchart
flowchartSlide(
"Pathogenesis – Imbalance of Forces",
[
"AGGRESSIVE FACTORS: H. pylori → urease → NH₃ → mucosal damage",
"AGGRESSIVE FACTORS: NSAIDs → ↓ PGE₂ → ↓ mucus, ↓ bicarbonate, ↓ blood flow",
"AGGRESSIVE FACTORS: Acid (HCl) + Pepsin → mucosal digestion",
"⚖ When Aggression > Defence → Ulcer Forms",
"DEFENSIVE FACTORS: Mucus layer, bicarbonate, prostaglandins, mucosal blood flow",
"NET RESULT: Mucosal break extending through muscularis mucosae",
],
[C.red, C.red, C.red, C.amber, C.green, C.teal],
null, null
);
// SLIDE 7 – H. pylori
contentSlide("Helicobacter pylori – Key Facts", [
"Gram-negative spiral rod; urease-positive",
"Colonises antrum → ↑ gastrin → ↑ acid → DU",
"Colonises corpus → ↓ acid → GU / cancer",
"Virulence factors: CagA, VacA (cytotoxins)",
"Transmission: feco-oral, oral-oral route",
"India: >70% seroprevalence by adulthood",
"Tests: CLO test, UBT, stool antigen, serology",
"Eradication = definitive cure of H. pylori ulcers",
], 2, "H. pylori pathogenesis (Bailey & Love)");
// SLIDE 8 – NSAIDs mechanism flowchart
flowchartSlide(
"NSAID-Induced Ulcer – Mechanism",
[
"NSAID inhibits COX-1 enzyme in gastric mucosa",
"↓ Prostaglandin E₂ synthesis",
"↓ Mucus secretion + ↓ bicarbonate secretion",
"↓ Mucosal blood flow + ↓ epithelial repair",
"Mucosal vulnerability to acid/pepsin ↑",
"Peptic ulcer formation – often asymptomatic!",
],
[C.navy, C.teal, C.teal, C.teal, C.red, C.red],
null, null
);
// SLIDE 9 – DU vs GU comparison
twoColSlide(
"Duodenal Ulcer vs Gastric Ulcer",
"Duodenal Ulcer", [
"Age: 30–50 yrs; M > F",
"Acid secretion: HIGH",
"Pain: 2–3 hrs after food",
"Relieved by eating / antacids",
"Night pain (wakes patient)",
"Rarely malignant",
"Site: 1st part duodenum",
"H. pylori: almost always present",
],
"Gastric Ulcer", [
"Age: 50–60 yrs; M = F",
"Acid secretion: NORMAL / low",
"Pain: immediately after food",
"Not consistently relieved by food",
"Weight loss common",
"Malignancy must be excluded!",
"Site: lesser curve / antrum",
"Biopsy mandatory at endoscopy",
],
C.lightTeal, C.yellow
);
// SLIDE 10 – Clinical Features flowchart
flowchartSlide(
"Clinical Approach – History & Examination",
[
"SYMPTOM: Burning epigastric pain (most common)",
"SYMPTOM: Nausea, vomiting, anorexia, belching",
"ALARM: Haematemesis, melaena → bleeding ulcer",
"ALARM: Sudden severe pain + rigid abdomen → perforation",
"ALARM: Persistent vomiting + succussion splash → stenosis",
"EXAMINATION: Epigastric tenderness, signs of peritonism",
],
[C.teal, C.teal, C.red, C.red, C.red, C.navy],
3, "Duodenal ulcer on barium meal (Bailey & Love)"
);
// SLIDE 11 – Investigations flowchart
flowchartSlide(
"Investigations – Stepwise Approach",
[
"STEP 1: Upper GI Endoscopy (Gold Standard) – biopsy GU",
"STEP 2: H. pylori testing – CLO test / UBT / stool antigen",
"STEP 3: Barium meal (if endoscopy unavailable)",
"STEP 4: Serum gastrin (if ZE syndrome suspected)",
"STEP 5: FBC, LFT, coagulation for complications",
"STEP 6: Erect CXR / CT – if perforation suspected",
],
[C.navy, C.teal, C.teal, C.amber, C.amber, C.red],
4, "Duodenal ulcer endoscopy (Bailey & Love)"
);
// SLIDE 12 – H. pylori diagnosis comparison (two column)
twoColSlide(
"H. pylori Testing – Invasive vs Non-Invasive",
"Invasive (Endoscopy needed)", [
"CLO test (Rapid urease) – quick, cheap",
"Histology – gold standard",
"Culture – antibiotic sensitivity",
"Best sensitivity: antrum + corpus biopsy",
"Required for GU biopsy (exclude Ca)",
],
"Non-Invasive (No endoscopy)", [
"Urea Breath Test – best accuracy",
"Stool antigen test – cheap, reliable",
"Serology – IgG (not for active infection)",
"Stop PPI 2 wks before UBT / CLO",
"Use UBT to confirm eradication",
],
C.lightTeal, C.yellow
);
// SLIDE 13 – Medical Management flowchart
flowchartSlide(
"Medical Management – Treatment Algorithm",
[
"CONFIRM DIAGNOSIS: Endoscopy + H. pylori testing",
"H. pylori POSITIVE → Triple / Quadruple Eradication Therapy",
"NSAID-related → Stop NSAID + PPI for 8 weeks",
"ANTISECRETORY: PPI (omeprazole 20 mg BD) for 4–8 wks",
"CONFIRM ERADICATION: UBT at 4–6 wks post-therapy",
"FOLLOW-UP: Repeat endoscopy for ALL gastric ulcers",
],
[C.navy, C.green, C.amber, C.teal, C.teal, C.red],
null, null
);
// SLIDE 14 – Eradication Therapy
contentSlide("H. pylori Eradication Regimens", [
"Triple Therapy (1st line, 7–14 days):",
" → PPI + Clarithromycin + Amoxicillin",
" → OR PPI + Clarithromycin + Metronidazole",
"Quadruple Therapy (resistance / 2nd line):",
" → PPI + Bismuth + Metronidazole + Tetracycline",
"Sequential Therapy: 5d PPI+Amox → 5d PPI+Clarith+Metro",
"Eradication rate: 80–90% with compliance",
"Reconfirm with UBT 4–6 wks after completion",
"Reinfection rare in adults (<1% per year)",
], null, null);
// SLIDE 15 – Complications flowchart
flowchartSlide(
"Complications of Peptic Ulcer Disease",
[
"BLEEDING (most common) – haematemesis / melaena",
"PERFORATION – sudden severe pain, board-like rigidity",
"GASTRIC OUTLET OBSTRUCTION – recurrent vomiting, succussion splash",
"MALIGNANT TRANSFORMATION – gastric ulcer only",
"PENETRATION – into pancreas → back pain, raised amylase",
],
[C.red, C.red, C.amber, C.teal, C.navy],
null, null
);
// SLIDE 16 – Bleeding ulcer management flowchart
flowchartSlide(
"Upper GI Bleed – Management Flowchart",
[
"RESUSCITATE: IV access × 2, fluid, blood, vitals",
"RISK STRATIFY: Rockall / Blatchford score",
"URGENT ENDOSCOPY within 24 hrs (12 hrs if high risk)",
"ENDOSCOPIC HAEMOSTASIS: injection, clips, thermocoagulation",
"HIGH DOSE PPI: IV infusion × 72 hrs post-endoscopy",
"SURGERY if re-bleeding or endoscopy fails (underrun ligation)",
],
[C.red, C.amber, C.teal, C.teal, C.navy, C.navy],
null, null
);
// SLIDE 17 – Perforated ulcer
contentSlide("Perforated Peptic Ulcer – Management", [
"Classical presentation: sudden-onset, board-like rigidity",
"Erect CXR: free gas under diaphragm (>50% cases)",
"CT abdomen: most sensitive – diagnostic in both perforation & pancreatitis",
"Serum amylase: may be elevated (distinguish from pancreatitis)",
"Initial: IV fluids, NG tube, IV antibiotics, analgesia",
"Surgery: laparotomy / laparoscopy – Graham's omental patch",
"Conservative (Taylor): only selected stable patients",
"NSAIDs responsible for most perforations in elderly",
"Post-op: H. pylori eradication + PPI",
], 5, "Erect CXR – free gas under diaphragm (Bailey & Love)");
// SLIDE 18 – Gastric outlet obstruction (two-column)
twoColSlide(
"Gastric Outlet Obstruction – Features & Management",
"Clinical Features", [
"Recurrent projectile vomiting",
"Vomitus: undigested food, no bile",
"Succussion splash present",
"Weight loss, dehydration",
"Metabolic alkalosis: ↓ Cl, ↓ K, ↑ HCO₃",
"Saline infusion test (Penfield's test)",
],
"Management", [
"Rehydrate: IV 0.9% NaCl + KCl",
"NG tube: decompress stomach",
"Endoscopy: confirm diagnosis + biopsy",
"H. pylori eradication + PPI",
"Balloon dilatation (endoscopic) – first line",
"Surgery if dilatation fails (pyloroplasty / GJ)",
],
C.lightTeal, C.yellow
);
// SLIDE 19 – Surgical management
contentSlide("Surgical Management of PUD", [
"Surgery now RARE for elective PUD management",
"Indications: complications (perforation, bleeding, obstruction)",
"Operations: largely historical but exam-important",
"Truncal vagotomy + drainage (Jaboulay/Heineke-Mikulicz)",
"Billroth I: distal gastrectomy + gastroduodenostomy",
"Billroth II / Pólya: gastrojejunostomy",
"Highly selective vagotomy (proximal gastric vagotomy)",
"Post-gastrectomy syndromes: dumping, bile reflux, diarrhoea",
], 6, "Billroth I gastrectomy (Bailey & Love)");
// SLIDE 20 – Zollinger Ellison Syndrome
contentSlide("Zollinger–Ellison Syndrome (ZES)", [
"Caused by gastrinoma (non-beta pancreatic islet tumour)",
"Gastrin → ↑↑ acid → multiple, recurrent, refractory ulcers",
"Ulcers distal to duodenal bulb → think ZES!",
"Features: diarrhoea, weight loss, steatorrhoea",
"Diagnosis: fasting serum gastrin >1000 pg/mL",
"Confirm: secretin stimulation test (gastrin rises ↑)",
"Imaging: CT, EUS, somatostatin receptor scintigraphy",
"Treatment: high-dose PPI; surgery if localised",
"Part of MEN-1 syndrome (screen for HPT, pituitary)",
], null, null);
// SLIDE 21 – NSAID precautions & special situations
twoColSlide(
"Special Situations & Risk Reduction",
"High-Risk NSAID Users", [
"Co-prescribe PPI with all NSAIDs",
"Use COX-2 selective (celecoxib) if possible",
"Test & treat H. pylori before NSAID therapy",
"Avoid aspirin + NSAID combination",
"Monitor for asymptomatic bleeding",
],
"Pregnancy / Elderly / Renal", [
"Avoid NSAIDs in pregnancy (3rd trimester)",
"Misoprostol: GU prophylaxis (prostaglandin)",
"Elderly: higher risk of silent perforation",
"CKD: avoid NSAIDs (worsens renal function)",
"H. pylori eradication still indicated in elderly",
],
C.lightTeal, C.yellow
);
// SLIDE 22 – Differentials & Red Flags
contentSlide("Differential Diagnosis & Red Flag Features", [
"GERD – heartburn, worse on lying, regurgitation",
"Gastric carcinoma – weight loss, dysphagia, mass",
"Functional dyspepsia – no ulcer on endoscopy",
"Pancreatitis – radiates to back, raised amylase",
"Biliary colic – right hypochondrium, fatty food",
"RED FLAGS (urgent endoscopy): age >55, weight loss,",
" dysphagia, persistent vomiting, haematemesis, melaena,",
" anaemia, family history GI cancer, palpable mass",
], null, null);
// SLIDE 23 – Summary flowchart
flowchartSlide(
"Summary – Management Algorithm (PUD)",
[
"Patient with epigastric pain / dyspepsia",
"Red flags? → Urgent endoscopy + biopsy",
"No red flags, age <55 → Test for H. pylori",
"H. pylori +ve → Eradication therapy (Triple/Quadruple)",
"H. pylori –ve → PPI 4–8 weeks; review NSAID use",
"Complications? → Emergency management (surgery/endoscopy)",
"Follow-up endoscopy mandatory for ALL gastric ulcers",
],
[C.navy, C.red, C.teal, C.green, C.amber, C.red, C.teal],
null, null
);
// SLIDE 24 – CLOSING CASE
caseSlide("B", "Closing Case – Apply Your Knowledge",
"Shanta, 62-year-old woman. \nC/O: Sudden-onset severe generalised abdominal pain for 2 hours. \nO/E: Board-like rigid abdomen, guarding, rebound tenderness. HR 110, BP 90/60 mmHg. \nHistory: On diclofenac for osteoarthritis.",
[
"What is your diagnosis and what caused it?",
"Which investigation confirms diagnosis & what will it show?",
"Outline your immediate management steps (ABCDE)?",
"What definitive surgical procedure will you perform?",
"What is the post-operative medical management?",
],
"1E3A6E"
);
// SLIDE 25 – Peer Review Checklist
peerReviewSlide();
// ─── Write file ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/peptic-ulcer-ppt/Peptic_Ulcer_Disease_MBBS.pptx" })
.then(() => console.log("✅ DONE: Peptic_Ulcer_Disease_MBBS.pptx"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });
cd /home/daytona/peptic-ulcer-ppt && node build.js 2>&1
cd /home/daytona/peptic-ulcer-ppt && timeout 90 node /home/daytona/skills/shared…
Ok give me the ppt without the images
/home/daytona/peptic-ulcer-ppt/build_noimg.js
const pptxgen = require("pptxgenjs");
const C = {
navy: "1A2E5A",
teal: "0D7E7E",
amber: "E8920A",
white: "FFFFFF",
offWhite: "F4F7FA",
lightTeal: "C8E8E8",
red: "C0392B",
green: "1E7A4A",
gray: "566573",
lightGray: "EAF0F6",
yellow: "FFF3CD",
darkBlue: "1E3A6E",
};
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Peptic Ulcer Disease";
pres.author = "MBBS Undergraduate Teaching – Bailey & Love";
// ─── Reusable helpers ─────────────────────────────────────────────────────────
function topBar(sl, title, fontSize) {
sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.65, fill:{ color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0.65, w:10, h:0.05, fill:{ color: C.amber } });
sl.addText(title, { x:0.3, y:0, w:9.4, h:0.65, fontSize: fontSize||22, bold:true,
color: C.white, valign:"middle", margin:0, fontFace:"Calibri" });
sl.addShape(pres.shapes.RECTANGLE, { x:0, y:5.45, w:10, h:0.175, fill:{ color: C.navy } });
}
function bulletSlide(title, bullets, note) {
const sl = pres.addSlide();
topBar(sl, title);
const items = bullets.map((b, i) => ({
text: b,
options: { bullet:{ indent:18 }, breakLine: i < bullets.length-1,
color: C.navy, fontSize:15.5, fontFace:"Calibri", paraSpaceBefore:5 }
}));
sl.addText(items, { x:0.5, y:0.85, w:9.0, h:4.45, valign:"top" });
if (note) {
sl.addShape(pres.shapes.ROUNDED_RECTANGLE,
{ x:0.5, y:5.05, w:9.0, h:0.32, fill:{ color: C.lightTeal }, rectRadius:0.05 });
sl.addText(note, { x:0.55, y:5.05, w:8.9, h:0.32, fontSize:10.5,
italic:true, color: C.navy, valign:"middle" });
}
return sl;
}
function twoColSlide(title, c1Title, c1Items, c2Title, c2Items, c1Bg, c2Bg) {
const sl = pres.addSlide();
topBar(sl, title);
// Col 1
sl.addShape(pres.shapes.ROUNDED_RECTANGLE,
{ x:0.3, y:0.82, w:4.55, h:4.55, fill:{ color: c1Bg||C.lightTeal },
line:{ color: C.teal, width:1.2 }, rectRadius:0.1 });
sl.addText(c1Title, { x:0.3, y:0.82, w:4.55, h:0.46, fontSize:15, bold:true,
color: C.navy, align:"center", valign:"middle", fontFace:"Calibri" });
sl.addText(
c1Items.map((b,i) => ({ text:b, options:{ bullet:{ indent:12 }, breakLine: i<c1Items.length-1,
color: C.navy, fontSize:13.5, fontFace:"Calibri", paraSpaceBefore:4 } })),
{ x:0.45, y:1.34, w:4.25, h:3.85, valign:"top" }
);
// Col 2
sl.addShape(pres.shapes.ROUNDED_RECTANGLE,
{ x:5.15, y:0.82, w:4.55, h:4.55, fill:{ color: c2Bg||C.yellow },
line:{ color: C.amber, width:1.2 }, rectRadius:0.1 });
sl.addText(c2Title, { x:5.15, y:0.82, w:4.55, h:0.46, fontSize:15, bold:true,
color: C.navy, align:"center", valign:"middle", fontFace:"Calibri" });
sl.addText(
c2Items.map((b,i) => ({ text:b, options:{ bullet:{ indent:12 }, breakLine: i<c2Items.length-1,
color: C.navy, fontSize:13.5, fontFace:"Calibri", paraSpaceBefore:4 } })),
{ x:5.3, y:1.34, w:4.25, h:3.85, valign:"top" }
);
return sl;
}
function flowSlide(title, steps, colors) {
const sl = pres.addSlide();
topBar(sl, title);
const n = steps.length;
const boxH = 0.52;
const arrH = 0.22;
const gap = 0.04;
const totalH = n * boxH + (n-1) * (arrH + gap);
let y = 0.82 + Math.max(0, (4.55 - totalH) / 2);
const cols = colors || [];
steps.forEach((step, i) => {
const bg = cols[i] || C.teal;
sl.addShape(pres.shapes.ROUNDED_RECTANGLE,
{ x:0.5, y, w:9.0, h:boxH, fill:{ color: bg }, rectRadius:0.08,
shadow:{ type:"outer", color:"000000", blur:4, offset:1, angle:135, opacity:0.14 } });
sl.addText(step, { x:0.5, y, w:9.0, h:boxH, fontSize:14, color: C.white,
align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
if (i < steps.length - 1) {
const ay = y + boxH + gap;
sl.addShape(pres.shapes.TRIANGLE,
{ x:4.65, y:ay, w:0.35, h:arrH - 0.02,
fill:{ color: C.amber }, rotate:180 });
y += boxH + gap + arrH;
}
});
return sl;
}
function caseSlide(label, caseTitle, scenario, questions) {
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.12, fill:{ color: C.amber } });
// Badge
sl.addShape(pres.shapes.ROUNDED_RECTANGLE,
{ x:0.4, y:0.28, w:2.3, h:0.44, fill:{ color: C.amber }, rectRadius:0.06 });
sl.addText(label, { x:0.4, y:0.28, w:2.3, h:0.44, fontSize:13, bold:true,
color: C.navy, align:"center", valign:"middle", margin:0 });
sl.addText(caseTitle, { x:0.4, y:0.85, w:9.2, h:0.46, fontSize:20, bold:true,
color: C.amber, fontFace:"Calibri" });
// Scenario box
sl.addShape(pres.shapes.ROUNDED_RECTANGLE,
{ x:0.4, y:1.4, w:9.2, h:1.72, fill:{ color: C.darkBlue }, rectRadius:0.1 });
sl.addText(scenario, { x:0.55, y:1.45, w:8.9, h:1.62, fontSize:14,
color: C.white, valign:"top", fontFace:"Calibri", wrap:true });
// Questions
sl.addText("Interactive Discussion:", { x:0.4, y:3.22, w:9.2, h:0.36,
fontSize:15, bold:true, color: C.amber, fontFace:"Calibri" });
sl.addText(
questions.map((q,i) => ({ text:`Q${i+1}: ${q}`,
options:{ bullet:false, breakLine: i<questions.length-1,
color: C.lightTeal, fontSize:13.5, fontFace:"Calibri", paraSpaceBefore:6 } })),
{ x:0.4, y:3.6, w:9.2, h:1.7, valign:"top" }
);
sl.addShape(pres.shapes.RECTANGLE,
{ x:0, y:5.45, w:10, h:0.175, fill:{ color: C.amber } });
return sl;
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – Title
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x:0,y:0, w:10, h:5.625, fill:{ color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x:0,y:0, w:10, h:0.15, fill:{ color: C.amber } });
sl.addShape(pres.shapes.RECTANGLE, { x:0,y:5.475, w:10, h:0.15, fill:{ color: C.amber } });
// Decorative circles
sl.addShape(pres.shapes.OVAL,
{ x:6.3, y:0.5, w:4.8, h:4.8, fill:{ color: C.teal, transparency:82 } });
sl.addShape(pres.shapes.OVAL,
{ x:6.9, y:1.1, w:3.6, h:3.6, fill:{ color: C.teal, transparency:72 } });
sl.addText("PEPTIC ULCER\nDISEASE", { x:0.6, y:0.9, w:6.2, h:2.0, fontSize:40, bold:true,
color: C.white, fontFace:"Calibri", charSpacing:1 });
sl.addText("A Comprehensive Undergraduate Module", { x:0.6, y:3.05, w:6.0, h:0.5,
fontSize:17, color: C.lightTeal, italic:true, fontFace:"Calibri" });
sl.addShape(pres.shapes.RECTANGLE,
{ x:0.6, y:3.65, w:5.6, h:0.04, fill:{ color: C.amber } });
sl.addText("Based on Bailey & Love's Short Practice of Surgery (28th Ed.)",
{ x:0.6, y:3.78, w:6.0, h:0.4, fontSize:13, color: C.lightTeal, fontFace:"Calibri" });
sl.addText("MBBS – 3rd / Final Year | Department of Surgery",
{ x:0.6, y:4.25, w:6.0, h:0.34, fontSize:12, color: C.gray, fontFace:"Calibri" });
sl.addText("Duration: 60 Minutes | 25 Slides",
{ x:0.6, y:4.62, w:4.5, h:0.3, fontSize:11, color: C.gray, fontFace:"Calibri" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – Learning Objectives
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Learning Objectives", [
"Define peptic ulcer disease (PUD) and its spectrum",
"Understand epidemiology in the Indian context",
"Explain pathogenesis – H. pylori, NSAIDs, acid",
"Distinguish duodenal ulcer vs gastric ulcer",
"Describe clinical features and investigations",
"Outline medical management and eradication therapy",
"Identify surgical indications and techniques",
"Recognise and manage acute complications",
"Apply knowledge through clinical case scenarios",
], "By end of session: diagnose, investigate and manage PUD confidently");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – OPENING CASE
// ═══════════════════════════════════════════════════════════════════════════════
caseSlide("CASE 1 – OPENING TRIGGER",
"Meet Ramu, 35 yrs | Auto driver, Bengaluru",
"C/O: Burning epigastric pain for 3 months\n" +
"Worse 2–3 hrs after meals; relieved by antacids; night pain (+)\n" +
"History: Regular ibuprofen for back pain | Smoker × 10 yrs | No haematemesis",
[
"What is your provisional diagnosis?",
"What aetiological factors are at play here?",
"Which investigations will you order first?",
]
);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – Epidemiology
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Epidemiology & Burden of PUD", [
"Lifetime prevalence: 5–10% globally",
"Duodenal ulcer (DU) is 4× more common than gastric ulcer (GU)",
"DU: males > females; GU: equal gender incidence",
"H. pylori seroprevalence in India: >70% adults",
"NSAID use increasing with ageing population",
"Complications (bleeding, perforation) remain major killers",
"Incidence declining in West due to H. pylori eradication",
"Rising in low socioeconomic groups / resource-poor nations",
], "Bailey & Love 28e: DU more common in East; changes mirror H. pylori epidemiology");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – Anatomy & Sites
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Relevant Anatomy – Sites of Ulceration", [
"Common sites: 1st part duodenum + lesser curve of stomach",
"Other sites: stomal, oesophageal, Meckel's diverticulum (ectopic mucosa)",
"Occurs at junction of different epithelial types",
"Epithelium least resistant to acid is affected",
"Anterior DU → tends to perforate (free peritoneal cavity)",
"Posterior DU → tends to bleed (erodes gastroduodenal artery)",
"Johnson classification of gastric ulcers: Types I–V",
"Type I (body, lesser curve) most common; Type II/III near antrum",
"Type IV: near gastro-oesophageal junction; Type V: NSAID-induced",
], "Tip: Malignancy rare in DU – biopsy mandatory for ALL gastric ulcers");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – Pathogenesis flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Pathogenesis – Imbalance of Aggressive vs Defensive Forces", [
"AGGRESSIVE: H. pylori → urease → NH₃ → disrupts mucous barrier",
"AGGRESSIVE: NSAIDs → ↓ COX-1 → ↓ PGE₂ → ↓ mucus, ↓ HCO₃⁻, ↓ blood flow",
"AGGRESSIVE: Gastric acid (HCl) + Pepsin → mucosal digestion",
"⚖ AGGRESSION > DEFENCE → ULCER FORMS",
"DEFENSIVE: Mucous layer, HCO₃⁻, prostaglandins, mucosal blood flow",
"NET RESULT: Mucosal break through muscularis mucosae",
], [C.red, C.red, C.red, C.amber, C.green, C.teal]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – H. pylori
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Helicobacter pylori – Key Facts", [
"Gram-negative spiral rod; urease-positive; microaerophilic",
"Antral colonisation → ↑ gastrin → ↑ acid → duodenal ulcer",
"Corpus colonisation → ↓ acid → gastric ulcer / gastric cancer",
"Virulence factors: CagA (cytotoxin), VacA (vacuolating cytotoxin)",
"Transmission: feco-oral and oral-oral routes",
"India: >70% seroprevalence by adulthood (high prevalence nation)",
"Tests: CLO test, urea breath test (UBT), stool antigen, serology",
"Eradication = definitive cure of H. pylori-associated ulcers",
], "No acid, no ulcer – but H. pylori tips the balance (Bailey & Love 28e)");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – NSAID mechanism flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("NSAID-Induced Ulcer – Mechanism", [
"NSAID inhibits COX-1 in gastric mucosa",
"↓ Prostaglandin E₂ (PGE₂) synthesis",
"↓ Mucus secretion + ↓ Bicarbonate secretion",
"↓ Mucosal blood flow + ↓ Epithelial repair",
"Mucosal vulnerability to acid / pepsin increases",
"Peptic ulcer formation – often completely ASYMPTOMATIC!",
], [C.navy, C.teal, C.teal, C.teal, C.red, C.red]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – DU vs GU comparison
// ═══════════════════════════════════════════════════════════════════════════════
twoColSlide("Duodenal Ulcer vs Gastric Ulcer – Comparison",
"🔵 Duodenal Ulcer", [
"Age: 30–50 yrs; Males > Females",
"Acid secretion: HIGH",
"Pain: 2–3 hrs after food (hunger pain)",
"Relieved by eating and antacids",
"Night pain – wakes patient up",
"Rarely malignant",
"Site: 1st part of duodenum",
"H. pylori: present in ~95%",
],
"🟡 Gastric Ulcer", [
"Age: 50–60 yrs; Males = Females",
"Acid secretion: Normal / low",
"Pain: immediately after food",
"Not consistently relieved by food",
"Weight loss common",
"Malignancy MUST be excluded!",
"Site: lesser curve / antrum",
"Biopsy mandatory at endoscopy",
],
C.lightTeal, C.yellow
);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – Clinical Features flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Clinical Features – Approach to the Patient", [
"SYMPTOM: Burning / gnawing epigastric pain (most common)",
"SYMPTOM: Nausea, vomiting, anorexia, belching, heartburn",
"ALARM ⚠: Haematemesis / melaena → bleeding ulcer",
"ALARM ⚠: Sudden severe pain + board-like rigidity → perforation",
"ALARM ⚠: Recurrent vomiting + succussion splash → gastric outlet obstruction",
"EXAMINE: Epigastric tenderness, signs of peritonism, pallor",
], [C.teal, C.teal, C.red, C.red, C.red, C.navy]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – Investigations flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Investigations – Step-by-Step Approach", [
"STEP 1: Upper GI Endoscopy (Gold standard) – biopsy ALL gastric ulcers",
"STEP 2: H. pylori testing – CLO test / UBT / stool antigen",
"STEP 3: Barium meal (if endoscopy unavailable)",
"STEP 4: Serum gastrin (if Zollinger-Ellison syndrome suspected)",
"STEP 5: FBC, LFT, coagulation screen (for complications)",
"STEP 6: Erect CXR / CT abdomen (if perforation suspected)",
], [C.navy, C.teal, C.teal, C.amber, C.amber, C.red]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – H. pylori testing (two-column)
// ═══════════════════════════════════════════════════════════════════════════════
twoColSlide("H. pylori Testing – Invasive vs Non-Invasive",
"Invasive (Endoscopy required)", [
"CLO test (rapid urease) – quick, cheap",
"Histology – gold standard for diagnosis",
"Culture – antibiotic sensitivity testing",
"Biopsy antrum AND corpus for best sensitivity",
"Mandatory for GU biopsy (exclude cancer)",
],
"Non-Invasive (No endoscopy needed)", [
"Urea Breath Test (UBT) – best accuracy",
"Stool antigen test – cheap, reliable",
"Serology (IgG) – not for active infection",
"Stop PPI 2 weeks before UBT / CLO test",
"UBT to CONFIRM eradication (4–6 wks post-Rx)",
],
C.lightTeal, C.yellow
);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – Medical Management flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Medical Management – Treatment Algorithm", [
"CONFIRM DIAGNOSIS: Endoscopy + H. pylori testing",
"H. pylori POSITIVE → Triple / Quadruple Eradication Therapy",
"NSAID-related ulcer → Stop NSAID + PPI for 8 weeks",
"ANTISECRETORY: PPI (Omeprazole 20 mg BD) for 4–8 weeks",
"CONFIRM ERADICATION: UBT at 4–6 weeks post-therapy",
"FOLLOW-UP: Repeat endoscopy mandatory for ALL gastric ulcers",
], [C.navy, C.green, C.amber, C.teal, C.teal, C.red]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – Eradication Regimens
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("H. pylori Eradication Regimens", [
"Triple Therapy (1st line, 7–14 days):",
" → PPI + Clarithromycin + Amoxicillin (OR)",
" → PPI + Clarithromycin + Metronidazole",
"Quadruple Therapy (2nd line / high clarithromycin resistance):",
" → PPI + Bismuth + Metronidazole + Tetracycline (14 days)",
"Sequential Therapy: 5d (PPI + Amox) → 5d (PPI + Clarith + Metro)",
"Eradication rate: 80–90% with full compliance",
"Confirm success: UBT 4–6 wks after completing course",
"Reinfection in adults: rare (<1% per year)",
], "Resistance to clarithromycin rising in India – check local sensitivity patterns");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – Complications flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Complications of Peptic Ulcer Disease", [
"BLEEDING (most common) → haematemesis / melaena / iron-deficiency anaemia",
"PERFORATION → sudden severe pain, board-like rigidity, free gas on CXR",
"GASTRIC OUTLET OBSTRUCTION → recurrent vomiting, succussion splash",
"PENETRATION → into pancreas: back pain, ↑ serum amylase",
"MALIGNANT TRANSFORMATION → gastric ulcer ONLY (biopsy all GU!)",
], [C.red, C.red, C.amber, C.teal, C.navy]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – Bleeding ulcer management flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Upper GI Bleed – Emergency Management", [
"RESUSCITATE: IV access × 2, IV fluids, blood transfusion, monitor vitals",
"RISK STRATIFY: Rockall score / Blatchford score",
"URGENT ENDOSCOPY: within 24 hrs (12 hrs if haemodynamically unstable)",
"ENDOSCOPIC HAEMOSTASIS: injection therapy, clips, thermocoagulation",
"HIGH-DOSE PPI: IV infusion × 72 hrs post-endoscopy",
"SURGERY: if re-bleed or endoscopy fails → underrun ligation",
], [C.red, C.amber, C.teal, C.teal, C.navy, C.navy]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – Perforated peptic ulcer
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Perforated Peptic Ulcer – Management", [
"Classical: sudden-onset severe pain → board-like rigidity",
"Erect CXR: free gas under diaphragm in >50% cases",
"CT abdomen: most sensitive – diagnostic for perforation vs pancreatitis",
"Serum amylase: may be elevated post-perforation (distinguish from pancreatitis)",
"Initial Rx: IV fluids, NG tube, IV antibiotics, adequate analgesia",
"Surgery: laparotomy or laparoscopy – Graham's omental patch repair",
"Conservative (Taylor's method): only selected haemodynamically stable patients",
"NSAIDs responsible for most perforations in elderly females",
"Post-op: H. pylori eradication + PPI",
], "Analgesia should NOT be withheld – adequate analgesia actually clarifies signs (Bailey & Love)");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 – Gastric outlet obstruction (two-column)
// ═══════════════════════════════════════════════════════════════════════════════
twoColSlide("Gastric Outlet Obstruction – Features & Management",
"Clinical Features", [
"Recurrent projectile vomiting",
"Vomitus: undigested food, no bile",
"Succussion splash present",
"Weight loss and dehydration",
"Metabolic alkalosis: ↓ Cl⁻, ↓ K⁺, ↑ HCO₃⁻",
"Penfield's saline infusion test positive",
],
"Management", [
"Rehydrate: IV 0.9% NaCl + KCl replacement",
"NG tube: gastric decompression",
"Endoscopy: confirm diagnosis + biopsy",
"H. pylori eradication + PPI",
"Endoscopic balloon dilatation – 1st line",
"Surgery if dilatation fails (pyloroplasty / GJ)",
],
C.lightTeal, C.yellow
);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 – Surgical management
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Surgical Management – Historical & Emergency", [
"Surgery now RARE for elective PUD (medical Rx is definitive)",
"Indications: perforation, uncontrolled bleeding, obstruction",
"Truncal vagotomy + drainage (Jaboulay / Heineke-Mikulicz pyloroplasty)",
"Billroth I: distal gastrectomy + gastroduodenostomy (end-to-end)",
"Billroth II / Pólya: distal gastrectomy + gastrojejunostomy",
"Highly selective vagotomy (proximal gastric vagotomy) – least morbidity",
"Post-gastrectomy syndromes: dumping, bile reflux gastritis, diarrhoea",
"Afferent / efferent loop syndrome (Billroth II complication)",
], "Elective surgery for PUD is now a historical rarity – know the operations for exams!");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 20 – Zollinger-Ellison Syndrome
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Zollinger–Ellison Syndrome (ZES)", [
"Caused by gastrinoma (non-beta islet tumour of pancreas / duodenum)",
"Gastrin → ↑↑ acid secretion → multiple, recurrent, refractory ulcers",
"Ulcers in unusual sites (distal duodenum, jejunum) → think ZES!",
"Features: diarrhoea, weight loss, steatorrhoea",
"Diagnosis: fasting serum gastrin >1000 pg/mL",
"Confirm with secretin stimulation test (paradoxical ↑ in gastrin)",
"Imaging: CT, EUS, somatostatin receptor scintigraphy",
"Treatment: high-dose PPI; surgical resection if localised",
"Part of MEN-1 syndrome (screen for hyperparathyroidism, pituitary)",
]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 21 – Special situations (two-column)
// ═══════════════════════════════════════════════════════════════════════════════
twoColSlide("Special Situations & Risk Reduction",
"High-Risk NSAID Users", [
"Co-prescribe PPI with ALL NSAIDs",
"Prefer COX-2 selective agents (celecoxib)",
"Test and treat H. pylori before NSAID therapy",
"Avoid aspirin + NSAID combination",
"Monitor for asymptomatic / silent bleeding",
],
"Elderly / CKD / Pregnancy", [
"Elderly: higher risk of silent perforation",
"H. pylori eradication still indicated in elderly",
"Misoprostol: prostaglandin analogue for GU prophylaxis",
"CKD: avoid NSAIDs (worsen renal function)",
"Avoid NSAIDs in pregnancy (3rd trimester especially)",
],
C.lightTeal, C.yellow
);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 22 – Differentials & Red Flags
// ═══════════════════════════════════════════════════════════════════════════════
bulletSlide("Differential Diagnosis & Red Flag Features", [
"GERD – heartburn, worse on lying down, regurgitation, no ulcer",
"Gastric carcinoma – weight loss, dysphagia, palpable mass",
"Functional dyspepsia – no ulcer on endoscopy",
"Acute pancreatitis – radiates to back, raised amylase/lipase",
"Biliary colic – right hypochondrium, worse with fatty food",
"RED FLAGS → Urgent endoscopy required:",
" Age >55 yrs + new dyspepsia; unexplained weight loss",
" Dysphagia; haematemesis / melaena; iron-deficiency anaemia",
" Palpable abdominal mass; family history of GI cancer",
], "Any alarm feature = endoscopy FIRST, treat later");
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 23 – Summary Algorithm flowchart
// ═══════════════════════════════════════════════════════════════════════════════
flowSlide("Summary – PUD Management Algorithm", [
"Patient with epigastric pain / dyspepsia",
"Alarm features present? → URGENT endoscopy + biopsy",
"No alarm, age <55 → Test for H. pylori first",
"H. pylori +ve → Eradication therapy (Triple / Quadruple)",
"H. pylori –ve → PPI 4–8 wks; review NSAID / smoking",
"Complications? → Emergency endoscopy / surgery",
"All gastric ulcers → Mandatory follow-up endoscopy to confirm healing",
], [C.navy, C.red, C.teal, C.green, C.amber, C.red, C.teal]);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 24 – CLOSING CASE
// ═══════════════════════════════════════════════════════════════════════════════
caseSlide("CASE 2 – CLOSING: APPLY YOUR KNOWLEDGE",
"Meet Shanta, 62 yrs | Osteoarthritis patient",
"C/O: Sudden-onset severe generalised abdominal pain – 2 hours duration\n" +
"O/E: Board-like rigid abdomen, guarding, rebound tenderness\n" +
"Vitals: HR 110 bpm, BP 90/60 mmHg | On diclofenac for 6 months",
[
"What is your diagnosis and what caused it?",
"Which investigation confirms it and what will it show?",
"Outline your immediate ABCDE management steps?",
"What definitive surgical procedure will you perform?",
"What is the post-operative medical management?",
]
);
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 25 – Peer Review Checklist
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x:0,y:0, w:10, h:5.625, fill:{ color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x:0,y:0, w:10, h:0.65, fill:{ color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x:0,y:0.65, w:10, h:0.05, fill:{ color: C.amber } });
sl.addText("Peer Evaluation Checklist – Ramaiah Medical College", {
x:0.3, y:0, w:9.4, h:0.65, fontSize:20, bold:true, color: C.white,
valign:"middle", margin:0, fontFace:"Calibri"
});
sl.addText("Evaluation of Faculty Members by Peers | Rating: 1=Unsatisfactory → 5=Excellent", {
x:0.3, y:0.72, w:9.4, h:0.28, fontSize:11, italic:true, color: C.teal, fontFace:"Calibri"
});
const rows = [
["1. Arousal of interest at beginning of class", "2. Stating objectives of the presentation"],
["3. Organisation of material in logical sequence", "4. Use of relevant content material"],
["5. Pace / speed of presentation", "6. Audibility and clarity of presentation"],
["7. Changing pace by shifting emphasis", "8. Using examples to illustrate main ideas"],
["9. Explaining complex concepts", "10. Non-verbal cues and eye contact"],
["11. Allowing questions from students", "12. Asking questions to facilitate learning"],
["13. Rewarding pupil's effort", "14. Using audio-visual aids"],
["15. Ability to integrate content with current issues", "16. Summarising key points at end of session"],
];
const startY = 1.06;
const rowH = 0.345;
rows.forEach(([c1, c2], i) => {
const y = startY + i * rowH;
const bg = i % 2 === 0 ? C.lightGray : C.white;
sl.addShape(pres.shapes.RECTANGLE,
{ x:0.3, y, w:9.4, h:rowH, fill:{ color: bg } });
// Rating boxes
[1,2,3,4,5].forEach((n, j) => {
const bx = 0.3 + j * 0.26;
sl.addShape(pres.shapes.RECTANGLE,
{ x: 9.1 - (4-j)*0.26, y: y+0.04, w:0.23, h:rowH-0.08,
fill:{ color: C.white }, line:{ color: C.gray, width:0.5 } });
});
sl.addText(c1, { x:0.45, y, w:4.0, h:rowH, fontSize:10.5, color: C.navy, valign:"middle", fontFace:"Calibri" });
sl.addText(c2, { x:4.7, y, w:4.0, h:rowH, fontSize:10.5, color: C.navy, valign:"middle", fontFace:"Calibri" });
// Column headers first row only
if (i === 0) {
["1","2","3","4","5"].forEach((n, j) => {
sl.addText(n, {
x: 9.1 - (4-j)*0.26, y: y-0.28, w:0.23, h:0.26,
fontSize:10, bold:true, color: C.navy, align:"center", valign:"middle",
fontFace:"Calibri"
});
});
}
});
// Rating scale footer
sl.addShape(pres.shapes.RECTANGLE,
{ x:0.3, y:4.88, w:9.4, h:0.44, fill:{ color: C.navy } });
sl.addText(
"Rating Scale: 1 = Unsatisfactory 2 = Satisfactory 3 = Above Average 4 = Good 5 = Excellent",
{ x:0.3, y:4.88, w:9.4, h:0.44, fontSize:11, color: C.white,
align:"center", valign:"middle", bold:true }
);
sl.addText("Put 'X' under the appropriate ranking score nearest to your opinion.",
{ x:0.3, y:5.33, w:9.4, h:0.25, fontSize:10, color: C.gray, italic:true, align:"center" });
}
// ─── Write file ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/peptic-ulcer-ppt/Peptic_Ulcer_Disease_MBBS.pptx" })
.then(() => console.log("SUCCESS"))
.catch(e => { console.error("FAIL:", e); process.exit(1); });