Make a ppt on meckels diverticulum from standard textbook in paragraph form and black and white format with textbook photographs
mkdir -p /home/daytona/workspace/meckel-diverticulum-ppt && ls /home/daytona/workspace/meckel-diverticulum-ppt
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.care/cdss_images/5695c6f2d07dca09d14dd62e631a039f5d50cfaabf3ff823ee97170c89d32421.png" \ "https://cdn.orris.care/cdss_images/b292d18497265c1e3abf567caff257266856e4384c13acc9da6f7b5591092a3a.png" \ "https://cdn.orris.care/cdss_images/e7970a3e7b9b24e2ad07556ab22fc5936c7c61ea783f8d647602330bbcb15f95.png" \ "https://cdn.orris.care/cdss_images/ae50ebd8f579562777b1830cd3f6b3e0208d8871e119d63041d0c0e6c1cefe49.png" \ 2>/dev/null | node -e "const d=require('fs');let r='';process.stdin.on('data',c=>r+=c);process.stdin.on('end',()=>{const a=JSON.parse(r);a.forEach((x,i)=>{if(x.base64){const b=x.base64.split(',')[1]||x.base64;d.writeFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img'+i+'.b64',x.base64);}console.log(i,x.error||'ok',x.base64?x.base64.substring(0,40):'');});})"
~/meckel-diverticulum-ppt/build.js
const pptxgen = require("pptxgenjs");
const fs = require("fs");
// Load base64 images
const img0 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img0.b64', 'utf8'); // Robbins gross specimen
const img1 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img1.b64', 'utf8'); // Sabiston gross specimen
const img2 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img2.b64', 'utf8'); // AXR with arrows
const img3 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img3.b64', 'utf8'); // Meckel scan (99mTc)
// --- B&W palette ---
const BLACK = "000000";
const DKGRAY = "1A1A1A";
const MIDGRAY = "4A4A4A";
const LTGRAY = "A0A0A0";
const OFFWHT = "F2F2F2";
const WHITE = "FFFFFF";
const DIVLINE = "CCCCCC";
let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.title = "Meckel's Diverticulum";
pres.author = "Orris Medical Presentation";
// ─────────────────────────────────────────────
// Helper: add a thin horizontal rule
function addRule(slide, y) {
slide.addShape(pres.ShapeType.rect, {
x: 0.4, y: y, w: 9.2, h: 0.02,
fill: { color: DIVLINE },
line: { color: DIVLINE }
});
}
// Helper: slide heading bar
function addHeadingBar(slide, title) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.72,
fill: { color: BLACK },
line: { color: BLACK }
});
slide.addText(title, {
x: 0.3, y: 0.06, w: 9.4, h: 0.6,
fontSize: 22, bold: true, color: WHITE,
fontFace: "Calibri", valign: "middle", margin: 0
});
}
// Helper: body text paragraph
function addBodyText(slide, text, x, y, w, h, opts) {
slide.addText(text, {
x, y, w, h,
fontSize: opts && opts.fontSize ? opts.fontSize : 12,
color: opts && opts.color ? opts.color : DKGRAY,
fontFace: "Calibri",
align: opts && opts.align ? opts.align : "left",
valign: "top",
wrap: true,
...(opts || {})
});
}
// Helper: label below image
function addImgLabel(slide, text, x, y, w) {
slide.addText(text, {
x, y, w, h: 0.35,
fontSize: 8.5, italic: true, color: LTGRAY,
fontFace: "Calibri", align: "center", wrap: true
});
}
// ─────────────────────────────────────────────
// SLIDE 1: TITLE
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
// Full black background
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: BLACK }, line: { color: BLACK }
});
// White centre box
slide.addShape(pres.ShapeType.rect, {
x: 1.0, y: 1.3, w: 8.0, h: 3.0,
fill: { color: "111111" },
line: { color: LTGRAY, pt: 1 }
});
slide.addText("MECKEL'S DIVERTICULUM", {
x: 1.1, y: 1.55, w: 7.8, h: 1.0,
fontSize: 36, bold: true, color: WHITE,
fontFace: "Calibri", align: "center", charSpacing: 4
});
addRule(slide, 2.65);
slide.addText("Embryology · Anatomy · Clinical Features · Diagnosis · Management", {
x: 1.1, y: 2.75, w: 7.8, h: 0.55,
fontSize: 13, color: LTGRAY, fontFace: "Calibri", align: "center", italic: true
});
slide.addText("Sources: Robbins & Cotran Pathologic Basis of Disease | Sleisenger & Fordtran GI & Liver Disease\nSabiston Textbook of Surgery | Bailey & Love's Short Practice of Surgery | Grainger & Allison's Diagnostic Radiology", {
x: 1.1, y: 3.5, w: 7.8, h: 0.7,
fontSize: 8.5, color: MIDGRAY, fontFace: "Calibri", align: "center", italic: true
});
}
// ─────────────────────────────────────────────
// SLIDE 2: DEFINITION & EMBRYOLOGY
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: WHITE };
addHeadingBar(slide, "Definition & Embryology");
addBodyText(slide,
"Meckel's diverticulum is the most common congenital anomaly of the gastrointestinal tract and the most common true diverticulum of the alimentary canal. A true diverticulum is a blind outpouching that communicates with the intestinal lumen and incorporates all three layers of the bowel wall — mucosa, muscularis propria, and serosa.",
0.4, 0.85, 9.2, 1.0, { fontSize: 12.5 }
);
addBodyText(slide,
"Meckel's diverticulum arises due to failure of involution of the vitelline (omphalomesenteric) duct, a structure that connects the lumen of the developing midgut to the yolk sac during embryological development. This duct is normally obliterated between the 5th and 7th weeks of gestation. Incomplete obliteration at its intestinal end results in a persistent diverticulum projecting from the antimesenteric border of the ileum.",
0.4, 1.85, 9.2, 1.15, { fontSize: 12.5 }
);
addRule(slide, 3.1);
// Rule of 2s box
slide.addShape(pres.ShapeType.rect, {
x: 0.4, y: 3.18, w: 9.2, h: 2.15,
fill: { color: OFFWHT }, line: { color: DIVLINE, pt: 1 }
});
slide.addText("THE RULE OF 2's", {
x: 0.55, y: 3.22, w: 9.0, h: 0.38,
fontSize: 13, bold: true, color: BLACK, fontFace: "Calibri", align: "left", margin: 0
});
const rules = [
"Occurs in approximately 2% of the population",
"Located within 2 feet (60 cm) of the ileocaecal valve",
"Approximately 2 inches (5 cm) in length",
"Male:female ratio of 2:1",
"Most often symptomatic before age 2 (only ~2–4% are ever symptomatic)",
"Two types of heterotopic tissue: gastric (most common) and pancreatic"
];
const ruleItems = rules.map(r => ({ text: " • " + r, options: { breakLine: true, fontSize: 11, color: MIDGRAY } }));
ruleItems[ruleItems.length-1].options.breakLine = false;
slide.addText(ruleItems, {
x: 0.55, y: 3.62, w: 8.9, h: 1.6, fontFace: "Calibri", valign: "top"
});
}
// ─────────────────────────────────────────────
// SLIDE 3: GROSS ANATOMY & HISTOLOGY (with images)
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: WHITE };
addHeadingBar(slide, "Gross Anatomy & Histological Features");
// Left: text
addBodyText(slide,
"The diverticulum arises exclusively from the antimesenteric border of the ileum and typically measures 1–10 cm in length, with a mean of approximately 3 cm. Diverticula exceeding 5 cm are considered 'giant'. It possesses its own blood supply from a persistent vitelline artery, a branch of the superior mesenteric artery. The lumen may be wide or narrow, the latter predisposing to diverticulitis.",
0.4, 0.82, 5.0, 1.3, { fontSize: 11.8 }
);
addBodyText(slide,
"The mucosal lining of a Meckel's diverticulum may resemble normal small intestinal mucosa, but heterotopic tissue is present in approximately 50% of cases. Gastric mucosa accounts for 80–85% of all heterotopic tissue and may secrete hydrochloric acid, leading to peptic ulceration of the adjacent ileal mucosa at the gastric–ileal mucosal junction ('marginal ulcer'). Pancreatic, duodenal, biliary, and colonic mucosa have also been described.",
0.4, 2.2, 5.0, 1.4, { fontSize: 11.8 }
);
// Right: two gross specimen images
slide.addImage({ data: img0, x: 5.6, y: 0.82, w: 4.0, h: 2.3 });
addImgLabel(slide, "Fig. 1 — Gross specimen showing Meckel's diverticulum as a blind pouch on the antimesenteric border of the ileum. (Robbins & Cotran Pathologic Basis of Disease)", 5.6, 3.14, 4.0);
slide.addImage({ data: img1, x: 5.6, y: 3.55, w: 2.0, h: 1.78 });
addImgLabel(slide, "Fig. 2 — Surgical specimen showing antimesenteric outpouching. (Sabiston Textbook of Surgery)", 5.6, 5.33, 3.9);
addBodyText(slide,
"Heterotopic gastric oxyntic mucosa within the diverticulum is the principal cause of haemorrhage and peptic ulceration, which are the most common symptomatic complications in children.",
0.4, 3.65, 5.0, 0.8, { fontSize: 11.5, color: MIDGRAY, italic: true }
);
}
// ─────────────────────────────────────────────
// SLIDE 4: CLINICAL PRESENTATIONS
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: WHITE };
addHeadingBar(slide, "Clinical Presentations");
const presentations = [
{
title: "Gastrointestinal Haemorrhage",
body: "Painless rectal bleeding is the most common clinical manifestation of Meckel's diverticulum, especially in children. Blood in the stool is typically maroon or dark in colour. The underlying mechanism is peptic ulceration secondary to acid secretion by heterotopic gastric mucosa within the diverticulum. A 'marginal ulcer' develops at the junction of gastric and ileal mucosae. Despite potentially massive bleeding, children rarely develop fatal haemorrhage because splanchnic vasoconstriction limits blood loss. Melena may be seen with intermittent, less severe bleeding episodes."
},
{
title: "Intestinal Obstruction",
body: "Obstruction is the second most common complication and occurs through several mechanisms: (1) intussusception, in which the diverticulum acts as a lead point — the dominant cause of obstruction in children older than age 4; (2) volvulus around a persistent fibrous vitello-intestinal band connecting the diverticulum apex to the umbilicus; and (3) internal herniation through a mesodiverticular band. Bilious vomiting and abdominal distension are the typical presenting features."
},
{
title: "Diverticulitis & Perforation",
body: "Acute inflammation of a Meckel's diverticulum (Meckel's diverticulitis) clinically mimics acute appendicitis and is almost always diagnosed at exploratory laparotomy. Perforation complicates approximately one third of cases of diverticulitis and may produce a clinical picture resembling perforated peptic ulcer. Chronic Meckel's ileitis can mimic Crohn disease of the terminal ileum."
},
{
title: "Other Presentations",
body: "A Meckel's diverticulum found within an inguinal or femoral hernia sac is termed a 'Littre's hernia'. Chronic umbilical pain may occur due to the embryological midgut origin of the diverticulum. Rarely, Meckel's diverticulum has been reported as a predisposing factor for small intestinal malignancy, though neoplasms are very uncommon."
}
];
const boxH = 1.16;
const boxW = 4.4;
const positions = [
{ x: 0.3, y: 0.82 },
{ x: 5.3, y: 0.82 },
{ x: 0.3, y: 2.1 },
{ x: 5.3, y: 2.1 },
];
presentations.forEach((p, i) => {
const pos = positions[i];
slide.addShape(pres.ShapeType.rect, {
x: pos.x, y: pos.y, w: boxW, h: boxH + 0.18,
fill: { color: OFFWHT }, line: { color: DIVLINE, pt: 1 }
});
slide.addText(p.title, {
x: pos.x + 0.1, y: pos.y + 0.05, w: boxW - 0.2, h: 0.32,
fontSize: 12, bold: true, color: BLACK, fontFace: "Calibri", margin: 0
});
slide.addText(p.body, {
x: pos.x + 0.1, y: pos.y + 0.38, w: boxW - 0.2, h: boxH - 0.25,
fontSize: 10.2, color: MIDGRAY, fontFace: "Calibri", wrap: true, valign: "top"
});
});
// Age distribution note
addRule(slide, 3.45);
slide.addText("Age distribution of complications (one series, Current Surgical Therapy 14e):", {
x: 0.4, y: 3.52, w: 9.2, h: 0.28, fontSize: 11, bold: true, color: BLACK, fontFace: "Calibri"
});
const stats = [
{ label: "Incidental finding", pct: "19%" },
{ label: "GI Bleeding", pct: "35%" },
{ label: "Diverticulitis/Perforation", pct: "20%" },
{ label: "Obstruction", pct: "14%" },
{ label: "Intussusception", pct: "12%" },
];
stats.forEach((s, i) => {
const bx = 0.35 + i * 1.88;
slide.addShape(pres.ShapeType.rect, {
x: bx, y: 3.87, w: 1.75, h: 1.5,
fill: { color: i === 1 ? "222222" : OFFWHT }, line: { color: i === 1 ? BLACK : DIVLINE, pt: 1 }
});
slide.addText(s.pct, {
x: bx, y: 3.92, w: 1.75, h: 0.72,
fontSize: 28, bold: true, color: i === 1 ? WHITE : BLACK,
fontFace: "Calibri", align: "center"
});
slide.addText(s.label, {
x: bx, y: 4.65, w: 1.75, h: 0.68,
fontSize: 9.5, color: i === 1 ? WHITE : MIDGRAY,
fontFace: "Calibri", align: "center", wrap: true
});
});
}
// ─────────────────────────────────────────────
// SLIDE 5: DIAGNOSIS
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: WHITE };
addHeadingBar(slide, "Diagnosis");
// Left column: text
addBodyText(slide,
"The diagnosis of Meckel's diverticulum is notoriously difficult to establish preoperatively, and investigations must be tailored to the clinical presentation.",
0.4, 0.82, 5.3, 0.52, { fontSize: 12, italic: true, color: MIDGRAY }
);
const diagItems = [
{
h: "Meckel Scan (99mTc-Pertechnetate Scintigraphy)",
b: "This is the investigation of choice for suspected bleeding Meckel's diverticulum. Technetium-99m pertechnetate has an affinity for the mucus-secreting cells of gastric mucosa. The sensitivity is approximately 85–90% when ectopic gastric mucosa is present. Specificity approaches 95%. The study can be enhanced by pretreatment with pentagastrin, glucagon, or H2-receptor antagonists. Pentagastrin increases mucus-cell metabolism but carries a small risk of inducing perforation. Glucagon inhibits peristaltic dilution of the radionuclide. H2RAs retard release of pertechnetate from mucus-producing cells. A negative scan does not exclude a Meckel's diverticulum."
},
{
h: "CT Scan & CT Enterography",
b: "On CT, a Meckel's diverticulum appears as a tubular, blind-ending structure arising from the antimesenteric border of the terminal ileum. It may be mistaken for a normal small bowel loop. CT enterography has further improved detection. In the setting of intestinal obstruction or peritonitis, CT is often the first imaging modality performed."
},
{
h: "Ultrasound",
b: "Ultrasound is not reliable for direct visualisation of the diverticulum. However, intussusception caused by a Meckel's diverticulum may be identified on US. Standard abdominal plain films and barium contrast studies are seldom helpful; rarely, an enterolith (often indistinguishable from an appendicolith) or air-fluid levels within the diverticulum may be seen."
},
{
h: "Angiography & Endoscopy",
b: "Splanchnic angiography and 99mTc-labelled red blood cell studies may be used when the Meckel scan is negative and a bleeding source is suspected. Wireless capsule endoscopy and double-balloon enteroscopy have detected Meckel's diverticula in patients with obscure GI bleeding. CT angiography is increasingly used as a sensitive adjunct. Definitive diagnosis is most often made at surgery."
}
];
let ty = 1.4;
diagItems.forEach((item) => {
slide.addText(item.h, {
x: 0.4, y: ty, w: 5.2, h: 0.28,
fontSize: 11.5, bold: true, color: BLACK, fontFace: "Calibri", margin: 0
});
ty += 0.3;
slide.addText(item.b, {
x: 0.4, y: ty, w: 5.2, h: 0.75,
fontSize: 10, color: MIDGRAY, fontFace: "Calibri", wrap: true, valign: "top"
});
ty += 0.8;
});
// Right column: images
slide.addImage({ data: img3, x: 5.85, y: 0.82, w: 3.7, h: 3.7 });
addImgLabel(slide, "Fig. 3 — 99mTc-pertechnetate scintigram showing uptake by ectopic gastric mucosa within Meckel's diverticulum (left focal uptake), stomach (top), and bladder (right). (Current Surgical Therapy 14e)", 5.85, 4.54, 3.7);
slide.addImage({ data: img2, x: 5.85, y: 4.88, w: 3.75, h: 0.65 });
addImgLabel(slide, "Fig. 4 — Plain abdominal radiograph showing dilated bowel loops and gas-fluid levels; soft-tissue shadow of diverticulum visible (arrows). (Grainger & Allison's Diagnostic Radiology)", 5.85, 5.56, 3.75);
}
// Re-do slide 5 with proper image layout (AXR in larger size)
// NOTE: images fit into two rows in the right panel
// ─────────────────────────────────────────────
// SLIDE 6: RADIOGRAPH SLIDE (dedicated imaging)
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: "0D0D0D" };
slide.addText("IMAGING IN MECKEL'S DIVERTICULUM", {
x: 0.3, y: 0.1, w: 9.4, h: 0.55,
fontSize: 18, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", charSpacing: 2
});
// AXR large
slide.addImage({ data: img2, x: 0.3, y: 0.72, w: 4.5, h: 4.55 });
slide.addText("Abdominal Radiograph — 2-year-old boy with acute abdominal pain and peritonitis. Dilated bowel loops with gas-fluid levels. Saccular soft-tissue shadow of the Meckel's diverticulum is visible in the mid-abdomen (white arrows).\n\nSource: Grainger & Allison's Diagnostic Radiology", {
x: 0.3, y: 5.3, w: 4.5, h: 0.3,
fontSize: 8.5, italic: true, color: LTGRAY, fontFace: "Calibri", align: "center", wrap: true
});
// Meckel scan large
slide.addImage({ data: img3, x: 5.15, y: 0.72, w: 4.5, h: 4.55 });
slide.addText("99mTc-Pertechnetate Scintigram ('Meckel Scan') — Focal uptake by ectopic gastric mucosa within the diverticulum (left), stomach (top), and bladder (right). This is the investigation of choice for bleeding Meckel's diverticulum.\n\nSource: Current Surgical Therapy 14e", {
x: 5.15, y: 5.3, w: 4.5, h: 0.3,
fontSize: 8.5, italic: true, color: LTGRAY, fontFace: "Calibri", align: "center", wrap: true
});
}
// ─────────────────────────────────────────────
// SLIDE 7: MANAGEMENT
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: WHITE };
addHeadingBar(slide, "Management");
// Symptomatic
slide.addShape(pres.ShapeType.rect, {
x: 0.3, y: 0.82, w: 9.4, h: 0.36,
fill: { color: BLACK }, line: { color: BLACK }
});
slide.addText("SYMPTOMATIC MECKEL'S DIVERTICULUM", {
x: 0.3, y: 0.82, w: 9.4, h: 0.36,
fontSize: 12.5, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
addBodyText(slide,
"All symptomatic Meckel's diverticula require surgical resection. The standard procedure is diverticulectomy — wedge resection of the diverticulum with primary closure of the ileum — or, when ectopic tissue is suspected to extend to the base, a segmental resection of the adjacent ileum with end-to-end anastomosis. Laparoscopic diverticulectomy is now the preferred approach in experienced centres, with conversion to open surgery as required. In the setting of haemorrhage, the Meckel scan and angiography guide preoperative localisation; however, surgical exploration may ultimately be required if imaging is inconclusive and haemorrhage continues.",
0.4, 1.26, 9.2, 1.5, { fontSize: 12 }
);
// Incidental
slide.addShape(pres.ShapeType.rect, {
x: 0.3, y: 2.85, w: 9.4, h: 0.36,
fill: { color: MIDGRAY }, line: { color: MIDGRAY }
});
slide.addText("INCIDENTALLY DISCOVERED MECKEL'S DIVERTICULUM", {
x: 0.3, y: 2.85, w: 9.4, h: 0.36,
fontSize: 12.5, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
addBodyText(slide,
"Management of an incidentally discovered Meckel's diverticulum remains debated. The lifetime risk of complications is estimated at 2–6%, and mortality from a complication is extremely rare. Most authorities agree that there is no compelling indication for prophylactic resection in adults. However, resection is generally advocated in children, and in adults when: palpable ectopic tissue is present within the diverticulum, the diverticulum has a narrow neck (predisposing to diverticulitis), a mesodiverticular fibrous band is present, or there is a prior history of diverticulitis, haemorrhage, obstruction, or intussusception attributed to the diverticulum.",
0.4, 3.27, 9.2, 1.5, { fontSize: 12 }
);
addRule(slide, 4.88);
slide.addShape(pres.ShapeType.rect, {
x: 0.3, y: 4.95, w: 9.4, h: 0.58,
fill: { color: OFFWHT }, line: { color: DIVLINE }
});
slide.addText([
{ text: "Key principle: ", options: { bold: true, color: BLACK } },
{ text: "When a Meckel's diverticulum is found at laparotomy, it can safely be left alone if it has a wide mouth and is not thickened or indurated. When in doubt, resection is prudent. — Bailey & Love's Short Practice of Surgery, 28th ed.", options: { italic: true, color: MIDGRAY } }
], {
x: 0.45, y: 4.97, w: 9.1, h: 0.52,
fontSize: 10.8, fontFace: "Calibri", valign: "middle"
});
}
// ─────────────────────────────────────────────
// SLIDE 8: SUMMARY
// ─────────────────────────────────────────────
{
let slide = pres.addSlide();
slide.background = { color: BLACK };
slide.addText("SUMMARY", {
x: 0.3, y: 0.2, w: 9.4, h: 0.6,
fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", charSpacing: 6
});
addRule(slide, 0.88);
const summaryPoints = [
"Meckel's diverticulum is the most common congenital anomaly of the GI tract, occurring in ~2% of the population, with a 2:1 male predominance.",
"It is a true diverticulum — containing all three bowel wall layers — arising from failed involution of the vitelline duct, always on the antimesenteric ileal border.",
"Located within 2 feet of the ileocaecal valve; approximately 2 inches long; most often symptomatic in the first 2 years of life.",
"Heterotopic gastric mucosa (80–85% of ectopic tissue) causes acid secretion and peptic ulceration, leading to painless haemorrhage — the most common complication.",
"Other complications include intestinal obstruction (via intussusception or volvulus), diverticulitis (mimicking appendicitis), and perforation.",
"Investigation of choice for bleeding: 99mTc-pertechnetate Meckel scan (sensitivity 85–90%). CT enterography for structural diagnosis. Plain films and barium studies are seldom useful.",
"Treatment: surgical diverticulectomy (laparoscopic preferred) for all symptomatic cases. Prophylactic resection of incidentally found diverticula is recommended in children and selected adults.",
"Littre's hernia = Meckel's diverticulum found within an inguinal or femoral hernia sac."
];
let ty = 0.97;
summaryPoints.forEach((pt, i) => {
slide.addShape(pres.ShapeType.rect, {
x: 0.3, y: ty, w: 0.08, h: 0.35,
fill: { color: WHITE }, line: { color: WHITE }
});
slide.addText(pt, {
x: 0.5, y: ty, w: 9.15, h: 0.45,
fontSize: 11, color: OFFWHT, fontFace: "Calibri", wrap: true, valign: "top"
});
ty += 0.51;
});
}
// ─────────────────────────────────────────────
// WRITE FILE
// ─────────────────────────────────────────────
const outPath = "/home/daytona/workspace/meckel-diverticulum-ppt/Meckel_Diverticulum.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("DONE: " + outPath);
}).catch(err => {
console.error("ERROR:", err);
process.exit(1);
});
cd /home/daytona/workspace/meckel-diverticulum-ppt && node build.js
Meckel Diverticulum
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide — black background with source textbooks listed |
| 2 | Definition & Embryology — vitelline duct failure, true diverticulum definition, plus the full "Rule of 2's" in a framed box |
| 3 | Gross Anatomy & Histology — antimesenteric location, wall layers, heterotopic gastric/pancreatic mucosa, marginal ulcer mechanism; with two gross specimen photographs (Robbins & Cotran, Sabiston) |
| 4 | Clinical Presentations — four framed sections covering haemorrhage, obstruction, diverticulitis/perforation, Littre's hernia; with a statistics bar showing % breakdown of complications |
| 5 | Diagnosis — Meckel scan (99mTc scintigraphy), CT/CT enterography, ultrasound, angiography & endoscopy; with Meckel scan and AXR images |
| 6 | Dedicated Imaging slide — full-panel AXR (Grainger & Allison) and 99mTc Meckel scan side by side on black background with captions |
| 7 | Management — symptomatic (surgical diverticulectomy, laparoscopic preferred) vs. incidental discovery; indications for prophylactic resection |
| 8 | Summary — 8-point recap on white text/black background |
Make a detailed ppt of 20-25 slides
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.care/cdss_images/5695c6f2d07dca09d14dd62e631a039f5d50cfaabf3ff823ee97170c89d32421.png" \ "https://cdn.orris.care/cdss_images/b292d18497265c1e3abf567caff257266856e4384c13acc9da6f7b5591092a3a.png" \ "https://cdn.orris.care/cdss_images/e7970a3e7b9b24e2ad07556ab22fc5936c7c61ea783f8d647602330bbcb15f95.png" \ "https://cdn.orris.care/cdss_images/ae50ebd8f579562777b1830cd3f6b3e0208d8871e119d63041d0c0e6c1cefe49.png" \ "https://cdn.orris.care/cdss_images/3afdbede7d1897eb8f6f99fa63a20e652247678728eaf7696a94456d29fe8643.png" \ 2>/dev/null | node -e " const d=require('fs'); let r=''; process.stdin.on('data',c=>r+=c); process.stdin.on('end',()=>{ const a=JSON.parse(r); a.forEach((x,i)=>{ if(x.base64) d.writeFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img'+i+'.b64',x.base64); console.log(i,x.error||'ok'); }); }); "
Try once again
ls /home/daytona/workspace/meckel-diverticulum-ppt/ 2>/dev/null && echo "EXISTS" || echo "MISSING"
~/meckel-diverticulum-ppt/build2.js
const pptxgen = require("pptxgenjs");
const fs = require("fs");
// ── Images (already downloaded) ───────────────────────────────────────────
const img0 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img0.b64','utf8'); // Robbins gross specimen
const img1 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img1.b64','utf8'); // Sabiston gross specimen
const img2 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img2.b64','utf8'); // AXR (Grainger & Allison)
const img3 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img3.b64','utf8'); // 99mTc Meckel scan
const img4 = fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img4.b64','utf8'); // Bailey & Love operative photo
// ── Colour palette (strict B&W) ───────────────────────────────────────────
const C = {
black: "000000",
ink: "111111",
dkgray: "222222",
midgray: "4A4A4A",
ltgray: "8A8A8A",
silver: "C8C8C8",
offwht: "F4F4F4",
white: "FFFFFF",
};
let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.title = "Meckel's Diverticulum – Detailed Presentation";
// ── Helpers ───────────────────────────────────────────────────────────────
/** Full-width heading bar */
function bar(slide, text, y=0, h=0.72, bg=C.black, fg=C.white, fs=20) {
slide.addShape(pres.ShapeType.rect, { x:0, y, w:10, h, fill:{color:bg}, line:{color:bg} });
slide.addText(text, { x:0.3, y:y+0.04, w:9.4, h:h-0.08,
fontSize:fs, bold:true, color:fg, fontFace:"Calibri", valign:"middle", margin:0 });
}
/** Thin rule */
function rule(slide, y, color=C.silver) {
slide.addShape(pres.ShapeType.rect, { x:0.35, y, w:9.3, h:0.018, fill:{color}, line:{color} });
}
/** Standard paragraph text */
function para(slide, text, x, y, w, h, opts={}) {
slide.addText(text, {
x, y, w, h,
fontSize: opts.fs || 11.5,
color: opts.color || C.midgray,
fontFace: "Calibri",
align: opts.align || "left",
valign: "top",
bold: opts.bold || false,
italic: opts.italic|| false,
wrap: true,
});
}
/** Caption under image */
function cap(slide, text, x, y, w) {
slide.addText(text, {
x, y, w, h:0.55,
fontSize:8, italic:true, color:C.ltgray,
fontFace:"Calibri", align:"center", wrap:true,
});
}
/** Section divider (section-title slides) */
function sectionSlide(num, title, subtitle) {
let sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect,{ x:0,y:0,w:10,h:5.625, fill:{color:C.ink}, line:{color:C.ink} });
sl.addShape(pres.ShapeType.rect,{ x:0,y:2.45,w:10,h:0.04, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(num, { x:0.5,y:0.6,w:9,h:1.0, fontSize:60, bold:true, color:"2A2A2A", fontFace:"Calibri", align:"center" });
sl.addText(title, { x:0.5,y:2.55,w:9,h:0.9, fontSize:30, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
sl.addText(subtitle, { x:0.5,y:3.55,w:9,h:0.6, fontSize:14, italic:true, color:C.ltgray, fontFace:"Calibri", align:"center" });
return sl;
}
/** Shaded box with title + body */
function box(slide, title, body, x, y, w, h, dark=false) {
const bg = dark ? C.dkgray : C.offwht;
const tc = dark ? C.white : C.black;
const bc = dark ? C.silver : C.midgray;
slide.addShape(pres.ShapeType.rect,{ x, y, w, h, fill:{color:bg}, line:{color:C.silver, pt:0.75} });
slide.addText(title, { x:x+0.12, y:y+0.06, w:w-0.24, h:0.3, fontSize:11.5, bold:true, color:tc, fontFace:"Calibri", margin:0 });
slide.addText(body, { x:x+0.12, y:y+0.38, w:w-0.24, h:h-0.48, fontSize:10.2, color:bc, fontFace:"Calibri", wrap:true, valign:"top" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect,{ x:0,y:0,w:10,h:5.625, fill:{color:C.black}, line:{color:C.black} });
sl.addShape(pres.ShapeType.rect,{ x:0.7,y:0.9,w:8.6,h:3.8, fill:{color:"0D0D0D"}, line:{color:C.silver,pt:1} });
sl.addText("MECKEL'S DIVERTICULUM", { x:0.9,y:1.25,w:8.2,h:1.2,
fontSize:38, bold:true, color:C.white, fontFace:"Calibri", align:"center", charSpacing:3 });
rule(sl, 2.55, C.ltgray);
sl.addText("A Comprehensive Review", { x:0.9,y:2.65,w:8.2,h:0.55,
fontSize:18, italic:true, color:C.ltgray, fontFace:"Calibri", align:"center" });
sl.addText("Embryology · Anatomy · Pathology · Clinical Features · Diagnosis · Surgery", {
x:0.9,y:3.28,w:8.2,h:0.48, fontSize:12, color:"606060", fontFace:"Calibri", align:"center" });
sl.addText("Sources: Robbins & Cotran | Sabiston Surgery | Sleisenger & Fordtran | Bailey & Love | Yamada's Gastroenterology | Grainger & Allison | Current Surgical Therapy",{
x:0.9,y:4.1,w:8.2,h:0.55, fontSize:8.5, italic:true, color:"555555", fontFace:"Calibri", align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — TABLE OF CONTENTS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"Table of Contents");
const topics = [
["01","Historical Background"],
["02","Embryology & Vitelline Duct"],
["03","Epidemiology & the Rule of 2's"],
["04","Gross Anatomy"],
["05","Histology & Heterotopic Tissue"],
["06","Omphalomesenteric Duct Remnants"],
["07","Clinical Presentations — Overview"],
["08","Gastrointestinal Haemorrhage"],
["09","Intestinal Obstruction"],
["10","Meckel's Diverticulitis"],
["11","Perforation & Peritonitis"],
["12","Neoplasms"],
["13","Littre's Hernia & Rare Manifestations"],
["14","Approach to Diagnosis"],
["15","Meckel Scan (99mTc Scintigraphy)"],
["16","CT & CT Enterography"],
["17","Other Investigations"],
["18","Differential Diagnosis"],
["19","Surgical Management — Symptomatic"],
["20","Incidental Discovery — Controversies"],
["21","Laparoscopic Approach"],
["22","Summary & Key Points"],
];
const half = Math.ceil(topics.length/2);
topics.forEach(([num, title], i) => {
const col = i < half ? 0 : 1;
const row = i < half ? i : i - half;
const x = col===0 ? 0.35 : 5.2;
const y = 0.88 + row * 0.215;
sl.addText(`${num} ${title}`, { x, y, w:4.6, h:0.21,
fontSize:10.5, color: C.midgray, fontFace:"Calibri", bold: false });
sl.addShape(pres.ShapeType.rect,{ x, y:y+0.19, w:4.6, h:0.01, fill:{color:C.offwht}, line:{color:C.offwht} });
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — HISTORICAL BACKGROUND
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"01 Historical Background");
para(sl,
"The condition was first described in 1598 by Fabricius Hildanus, a Swiss surgeon, who noted a blind intestinal outpouching during autopsy. The entity remained obscure for over two centuries until Johann Friedrich Meckel the Younger, a German anatomist, provided the definitive anatomical and embryological description in 1809. Meckel recognized the structure as a persistent remnant of the vitelline (omphalomesenteric) duct and systematically catalogued its morphological features, earning the eponymous designation. His work established the developmental basis of the anomaly and distinguished it from acquired intestinal diverticula.",
0.4, 0.85, 9.2, 1.35, { fs:12.5 });
rule(sl, 2.3);
para(sl,
"Subsequent contributions came from a succession of anatomists and surgeons who clarified the embryological origin, described the spectrum of vitelline duct remnants, and characterized the clinical complications. The 'rule of 2's' — a pedagogical mnemonic summarizing the key epidemiological features — became widely adopted in medical education and is still taught as a first-line aid to memory. Modern understanding has extended from the purely anatomical to the molecular level, with transcription factors such as SOX2 and CDX2 implicated in the aberrant gut specification that produces heterotopic gastric tissue within the diverticulum.",
0.4, 2.38, 9.2, 1.4, { fs:12.5 });
rule(sl, 3.88);
sl.addShape(pres.ShapeType.rect,{ x:0.35,y:3.95,w:9.3,h:1.5, fill:{color:C.offwht}, line:{color:C.silver,pt:0.75} });
sl.addText("Key Milestones", { x:0.5,y:3.98,w:9.0,h:0.3, fontSize:12, bold:true, color:C.black, fontFace:"Calibri", margin:0 });
const milestones = [
"1598 — Fabricius Hildanus: first anatomical report of a persistent vitelline duct remnant",
"1809 — Johann Friedrich Meckel the Younger: definitive description, embryological interpretation",
"1904 — MacMahon and colleagues: clinical correlation of symptomatic presentations",
"1943 — Moore and Mercer: Meckel scan concept pioneered through radionuclide studies",
"1976 — Soltero and Bill: landmark paper defining surgical management of incidental diverticula",
];
sl.addText(milestones.map(m=>({text:"• "+m, options:{breakLine:true, fontSize:10.2, color:C.midgray}})),
{ x:0.5,y:4.3,w:9.0,h:1.1, fontFace:"Calibri", valign:"top" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — EMBRYOLOGY
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"02 Embryology & the Vitelline Duct");
para(sl,
"During early gestation, the omphalomesenteric (vitelline) duct connects the fetal yolk sac to the primitive gut lumen. This structure is a critical nutritional conduit in early embryonic life. By the 5th to 7th weeks of gestation — and certainly by the 7th to 8th weeks — the duct undergoes progressive obliteration in a proximal-to-distal direction, ultimately disappearing completely under normal developmental conditions.",
0.4, 0.85, 9.2, 1.1, { fs:12.5 });
para(sl,
"Failure of complete obliteration produces a spectrum of anomalies depending on which portion of the duct persists. Meckel's diverticulum — representing persistence of the intestinal end — is the most common outcome and accounts for approximately 67% of all omphalomesenteric duct remnants. The cells lining the vitelline duct are pluripotent, which explains why heterotopic tissue of gastric, pancreatic, colonic, or hepatobiliary type may be found within the resulting diverticulum.",
0.4, 2.0, 9.2, 1.15, { fs:12.5 });
rule(sl, 3.25);
para(sl,
"Molecular basis: Proper gut patterning requires balanced expression of key transcription factors. SOX2 is normally expressed in the proximal (gastric) primitive gut and specifies the gastric epithelial lineage, while CDX2 establishes posterior gut identity in the intestine. Aberrant SOX2 expression — rather than absence of CDX2 — has been demonstrated in the gastric-type heteroplasia found in Meckel diverticula, providing a transcription-factor basis for the ectopic gastric mucosa that is the root cause of most complications.",
0.4, 3.33, 9.2, 1.2, { fs:12.5 });
rule(sl, 4.62);
sl.addShape(pres.ShapeType.rect,{ x:0.35,y:4.68,w:9.3,h:0.75, fill:{color:C.offwht}, line:{color:C.silver,pt:0.75} });
sl.addText("Normal obliteration at 5–8 weeks gestation | Pluripotent duct epithelium | Meckel's diverticulum = 67% of all vitelline duct remnants | SOX2/CDX2 transcription factor dysregulation", {
x:0.5,y:4.7,w:9.0,h:0.68, fontSize:10.2, italic:true, color:C.midgray, fontFace:"Calibri", align:"center", wrap:true });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — EPIDEMIOLOGY & RULE OF 2'S
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"03 Epidemiology & the Rule of 2's");
para(sl,
"Meckel's diverticulum is the most common congenital anomaly of the gastrointestinal tract. Large autopsy series report a prevalence of 1–3% in the general population (most studies cite approximately 2%). The anomaly is 2–3 times more common in males than females, though females may experience a proportionally higher rate of certain complications. The lifetime risk of any complication is estimated at 2–6%, and mortality from a complication is extremely rare. Only approximately 2–4% of individuals with a Meckel's diverticulum are ever symptomatic, and the risk of complications decreases markedly with advancing age.",
0.4, 0.85, 9.2, 1.25, { fs:12.5 });
rule(sl, 2.2);
// Rule of 2s visual grid
sl.addText("THE RULE OF 2's", { x:0.4,y:2.28,w:9.2,h:0.38,
fontSize:15, bold:true, color:C.black, fontFace:"Calibri" });
const rules = [
["2%","Prevalence in the general population"],
["2 feet","Distance from the ileocaecal valve (60 cm)"],
["2 inches","Typical length of the diverticulum (5 cm)"],
["2:1","Male to female ratio"],
["Age 2","Most often symptomatic before age 2 years"],
["2 types","Two types of heterotopic tissue: gastric & pancreatic"],
["2%","Lifetime risk of complications"],
["2 types","Two main symptom types: bleeding & obstruction"],
];
rules.forEach(([num, desc], i) => {
const col = i%2;
const row = Math.floor(i/2);
const x = col===0 ? 0.35 : 5.1;
const y = 2.76 + row*0.62;
sl.addShape(pres.ShapeType.rect,{ x, y, w:4.55, h:0.55, fill:{color:i%2===0?C.offwht:"F8F8F8"}, line:{color:C.silver,pt:0.75} });
sl.addText(num, { x:x+0.12,y:y+0.04,w:1.1,h:0.46, fontSize:16, bold:true, color:C.black, fontFace:"Calibri", align:"center" });
sl.addShape(pres.ShapeType.rect,{ x:x+1.25,y:y+0.12,w:0.025,h:0.3, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(desc, { x:x+1.35,y:y+0.08,w:3.1,h:0.42, fontSize:10.5, color:C.midgray, fontFace:"Calibri", valign:"middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — GROSS ANATOMY (with image)
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"04 Gross Anatomy");
// Left text
para(sl,
"Meckel's diverticulum is by definition a true diverticulum: it incorporates all three layers of the intestinal wall — mucosa, muscularis propria, and serosa. It arises exclusively from the antimesenteric border of the ileum, in contrast to enteric duplication cysts which arise from the mesenteric border. The diverticulum is always solitary.",
0.4, 0.85, 5.1, 1.05, { fs:12 });
para(sl,
"Location: Most diverticula are found within 45–100 cm of the ileocaecal valve; the classic teaching places it at 60 cm (2 feet). In rare cases it may be located more proximally in the ileum or even in the jejunum.",
0.4, 1.95, 5.1, 0.75, { fs:12 });
para(sl,
"Size: Diverticula typically measure 1–10 cm in length. The average is 3–6 cm. Diverticula exceeding 5 cm are designated 'giant' Meckel's diverticula. Two forms of giant diverticulum are recognized: Type I — elongated, of similar calibre to the ileum; Type II (ovoid) — a wide, saccular form.",
0.4, 2.75, 5.1, 0.9, { fs:12 });
para(sl,
"Blood supply: The diverticulum receives its own arterial supply from a persistent branch of the superior mesenteric artery — a vitelline (omphalomesenteric) artery. This vessel runs in the wall of the diverticulum and is an important landmark during surgical resection.",
0.4, 3.7, 5.1, 0.9, { fs:12 });
para(sl,
"The diverticulum may also be connected to the abdominal wall or umbilicus by a persistent fibrous band (mesodiverticular band), which is a remnant of the vitelline cord and can serve as an axis for intestinal volvulus.",
0.4, 4.65, 5.1, 0.75, { fs:12 });
// Right image
sl.addImage({ data:img0, x:5.65, y:0.82, w:4.0, h:3.9 });
cap(sl,"Fig. 1 — Gross specimen: Meckel's diverticulum as a blind pouch on the antimesenteric border of the ileum. Note the bifurcated end and scale bar. (Robbins & Cotran Pathologic Basis of Disease)", 5.65, 4.74, 4.0);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — HISTOLOGY & HETEROTOPIC TISSUE (with image)
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"05 Histology & Heterotopic Tissue");
para(sl,
"The lining of a Meckel's diverticulum may be identical to normal small intestinal mucosa — a villous architecture with enterocytes, goblet cells, and underlying muscularis mucosae. However, heterotopic tissue is found in approximately 50% of all diverticula, with a higher prevalence (up to 70–80%) in those that become symptomatic. The pluripotent nature of the cells that originally lined the vitelline duct accounts for this phenomenon.",
0.4, 0.85, 5.3, 1.2, { fs:12 });
para(sl,
"Types of heterotopic tissue (in order of frequency):\n1. Gastric mucosa: 80–85% of all heterotopic tissue. Oxyntic (parietal cell-containing) mucosa secretes hydrochloric acid, causing peptic ulceration of adjacent normal ileal mucosa. The ulcer typically forms at the transition zone between gastric and ileal epithelia — the so-called 'marginal ulcer'.\n2. Pancreatic tissue: second most common. May be exocrine (acinar) or endocrine, but functional complications are rare.\n3. Others (rare): colonic mucosa, Brunner's glands, jejunal tissue, hepatobiliary tissue.",
0.4, 2.1, 5.3, 1.85, { fs:11.8 });
para(sl,
"Molecular note: SOX2 expression (normally restricted to gastric epithelium) has been demonstrated in the heterotopic gastric tissue of Meckel diverticula, providing a transcription-factor explanation for this ectopic specification. Helicobacter pylori has occasionally been identified within the diverticular gastric mucosa, though a proven causal link to bleeding remains uncertain.",
0.4, 4.0, 5.3, 1.0, { fs:11.5, italic:true });
// Right image
sl.addImage({ data:img1, x:5.75, y:0.82, w:3.9, h:3.5 });
cap(sl,"Fig. 2 — Surgical specimen showing Meckel's diverticulum projecting from the antimesenteric ileal border. The rounded blind end is characteristic. (Current Surgical Therapy 14e / Sabiston Surgery)", 5.75, 4.34, 3.9);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — OMPHALOMESENTERIC DUCT REMNANTS (SPECTRUM)
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"06 Omphalomesenteric Duct Remnants — Spectrum");
para(sl,
"Incomplete obliteration of the vitelline duct can produce a spectrum of anomalies, each reflecting a different segment or degree of persistence. Meckel's diverticulum (67% of remnants) is the most common, but several other forms are recognized clinically and are often discovered in infants and young children.",
0.4, 0.85, 9.2, 0.9, { fs:12 });
const remnants = [
{ title:"Meckel's Diverticulum", body:"Persistence of the intestinal end of the duct. A true diverticulum projecting from the antimesenteric ileum. Accounts for ~67% of all remnants. May contain heterotopic tissue. Complications: bleeding, obstruction, diverticulitis, perforation." },
{ title:"Vitelline Fistula (Patent Duct)", body:"Complete failure of obliteration — a patent fistula connecting the ileum to the umbilicus. Presents in the neonatal period as foul-smelling discharge from the umbilicus after cord separation. Male:female ratio 5:1. Accounts for 6–15% of remnants. Treatment: surgical excision." },
{ title:"Fibrous Cord (Omphalomesenteric Band)", body:"The duct obliterates but persists as an avascular or vascular fibrous cord connecting the ileum to the umbilicus or abdominal wall. No lumen remains. Clinically silent until it causes small bowel obstruction by internal hernia or volvulus around the band. Found in ~25% of remnants." },
{ title:"Vitelline (Omphalomesenteric) Cyst", body:"A mucosa-lined cystic remnant within a fibrous cord, not connecting to the ileum or umbilicus. Presents as a palpable intra-abdominal mass or umbilical nodule. Susceptible to torsion or infection. More common in males. Treatment: resection." },
{ title:"Umbilical Sinus / Polyp", body:"Partial obliteration leaving an opening at the umbilicus but not communicating with the bowel. An umbilical sinus produces persistent discharge. An umbilical polyp is a small, bright-red, mucosa-covered nodule at the umbilicus, often mistaken for granulation tissue." },
{ title:"Mesodiverticular Band", body:"A fibrous or vascular band arising from the tip of a Meckel's diverticulum and attaching to the mesentery or abdominal wall. Acts as a fulcrum for intestinal volvulus. May also lead to internal herniation." },
];
remnants.forEach((r, i) => {
const col = i%2;
const row = Math.floor(i/2);
const x = col===0 ? 0.3 : 5.15;
const y = 1.88 + row * 1.2;
box(sl, r.title, r.body, x, y, 4.65, 1.08, false);
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — CLINICAL PRESENTATIONS OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"07 Clinical Presentations — Overview");
para(sl,
"The vast majority of Meckel's diverticula are asymptomatic and discovered incidentally at laparotomy, autopsy, or cross-sectional imaging performed for another indication. Only 2–4% are ever symptomatic. However, when complications occur, they can be life-threatening. The pattern of complications differs by age: children under 2 years most commonly present with haemorrhage; older children and adults more often present with obstruction or diverticulitis.",
0.4, 0.85, 9.2, 1.1, { fs:12.5 });
// Frequency table
rule(sl, 2.05);
sl.addText("Signs and Symptoms of Meckel Diverticulum (Mulholland & Greenfield's Surgery)", {
x:0.4,y:2.12,w:9.2,h:0.3, fontSize:11, bold:true, color:C.black, fontFace:"Calibri" });
const tableData = [
["Clinical Presentation","Frequency (%)", "Predominant Age Group"],
["Gastrointestinal Haemorrhage","30–35%","Children <2 years"],
["Small Bowel Obstruction","30–35%","Any age; neonates–adults"],
["Meckel's Diverticulitis","20–25%","Older children & adults"],
["Umbilical Fistula / Sinus","~10%","Neonates"],
["Intussusception","5–12%","Children 4–10 years"],
["Littre's Hernia","Rare","Adults"],
["Neoplasm","0.5–3.2%","Adults"],
];
tableData.forEach((row, ri) => {
row.forEach((cell, ci) => {
const x = [0.3, 3.8, 7.05][ci];
const w = [3.4, 3.1, 2.85][ci];
const y = 2.48 + ri*0.36;
const bg = ri===0 ? C.dkgray : (ri%2===0 ? C.offwht : C.white);
const fc = ri===0 ? C.white : C.midgray;
sl.addShape(pres.ShapeType.rect,{ x,y,w,h:0.35, fill:{color:bg}, line:{color:C.silver,pt:0.5} });
sl.addText(cell, { x:x+0.08,y:y+0.04,w:w-0.16,h:0.27, fontSize:ri===0?10.5:10, bold:ri===0, color:fc, fontFace:"Calibri", valign:"middle" });
});
});
para(sl,
"Note: In a single-centre paediatric series (Current Surgical Therapy 14e), of all known Meckel's diverticula: 19% were incidental; 35% presented with GI bleeding; 20% with diverticulitis or perforation; 14% with obstruction; 12% with intussusception.",
0.4, 5.18, 9.2, 0.38, { fs:9.5, italic:true, color:C.ltgray });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 — GASTROINTESTINAL HAEMORRHAGE
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"08 Gastrointestinal Haemorrhage");
para(sl,
"Painless rectal bleeding is the most common clinical manifestation of Meckel's diverticulum, particularly in children under 2 years of age. It is the presenting complaint in 30–35% of all symptomatic cases. The mechanism involves acid secretion by heterotopic gastric mucosa within the diverticulum, causing peptic ulceration of the adjacent normal ileal mucosa at the gastric-ileal mucosal junction. This 'marginal ulcer' erodes into the underlying submucosal vessels, producing bleeding that ranges from minor to massive.",
0.4, 0.85, 9.2, 1.25, { fs:12.5 });
rule(sl, 2.2);
box(sl,"Character of Bleeding",
"Blood in the stool is typically maroon or brick-red in colour, even during massive haemorrhage with hypovolaemic shock. Bright red blood per rectum (BRBPR), as is characteristic of left colonic bleeding, is almost never encountered. Melaena may be seen with intermittent, lower-volume episodes. The volume of bleeding can be deceptively large before the patient becomes haemodynamically unstable.",
0.3, 2.28, 4.5, 1.25);
box(sl,"Why Children Tolerate Massive Bleeding",
"Despite potentially dramatic haemorrhage, death from bleeding is rare in children. Hypovolaemia triggers intense splanchnic vasoconstriction via reflex sympathetic activation, causing the bleeding vessels to contract and temporarily cease bleeding. This auto-tamponade effect — combined with the rarity of comorbid conditions in children — explains the favourable natural history, though prompt evaluation remains essential.",
4.95, 2.28, 4.65, 1.25);
box(sl,"Spectrum of Presentation",
"Acute massive haemorrhage: sudden-onset, large-volume rectal blood loss with haemodynamic instability.\nChronic occult bleeding: iron-deficiency anaemia, positive faecal occult blood test, without acute events.\nRecurrent episodic bleeding: self-limited bouts of rectal blood loss with spontaneous resolution between episodes, making definitive diagnosis challenging.",
0.3, 3.63, 4.5, 1.35);
box(sl,"Important Clinical Clues",
"Suspect Meckel's diverticulum in:\n• Any infant or child with significant painless rectal bleeding\n• Young patients (<30 years) with GI bleeding after negative upper and lower endoscopy\n• Recurrent episodic haemorrhage without identifiable cause\n• H. pylori-negative peptic-type bleeding in a child\nThe absence of abdominal pain during bleeding is a key distinguishing feature from most other causes of acute GI haemorrhage in this age group.",
4.95, 3.63, 4.65, 1.35);
rule(sl, 5.1);
para(sl,"Almost all diverticula that bleed contain heterotopic gastric mucosa. — Sleisenger & Fordtran's Gastrointestinal and Liver Disease",
0.4, 5.16, 9.2, 0.38, { fs:10, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 — INTESTINAL OBSTRUCTION
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"09 Intestinal Obstruction");
para(sl,
"Intestinal obstruction is the second most common complication of Meckel's diverticulum, accounting for 30–35% of all symptomatic presentations. It occurs across all age groups but is most common in children over 4 years and in adults. Bilious vomiting, abdominal distension, and colicky abdominal pain are the hallmark features. Multiple distinct mechanisms may be responsible:",
0.4, 0.85, 9.2, 1.05, { fs:12.5 });
rule(sl, 2.0);
const mechs = [
{ title:"Intussusception", body:"A broad-based Meckel's diverticulum invaginates into the lumen and is propelled distally by peristalsis, acting as the lead point for ileoileal or ileocolic intussusception. This is the dominant mechanism in children over 4 years — in this age group, intussusception is almost always secondary to a Meckel's diverticulum. Classic features include acute colicky pain, vomiting, a palpable abdominal mass, and 'currant jelly' stools (blood-stained mucus). Enema reduction is less likely to succeed than in idiopathic intussusception, and surgical resection is required to prevent recurrence." },
{ title:"Volvulus", body:"A persistent fibrous band (mesodiverticular band or omphalomesenteric cord) connecting the diverticulum tip to the abdominal wall or umbilicus serves as an axis around which adjacent bowel loops twist. Volvulus is an acute event that, if untreated, rapidly progresses to intestinal ischaemia and strangulation. It may occur at any age, including the neonatal period. CT scan or surgical exploration is both diagnostic and definitive." },
{ title:"Internal Herniation", body:"Bowel loops may herniate through an abnormal aperture formed by a mesodiverticular band. The incarcerated segment may strangulate. This mechanism is less common than intussusception or volvulus but should be considered in any patient with small bowel obstruction and known or suspected Meckel's diverticulum." },
{ title:"Incarceration in Hernia (Littre's Hernia)", body:"A Meckel's diverticulum can enter an inguinal or femoral hernia sac and become incarcerated or strangulated within it. This is known as Littre's hernia. The diagnosis is usually made at operation. Repair requires reduction and resection of the diverticulum in addition to standard hernia repair." },
];
mechs.forEach((m, i) => {
const y = 2.1 + i * 0.82;
sl.addShape(pres.ShapeType.rect,{ x:0.3,y,w:9.4,h:0.76, fill:{color: i%2===0?C.offwht:C.white}, line:{color:C.silver,pt:0.5} });
sl.addText(m.title, { x:0.45,y:y+0.06,w:1.9,h:0.62, fontSize:11, bold:true, color:C.black, fontFace:"Calibri", valign:"top" });
sl.addShape(pres.ShapeType.rect,{ x:2.38,y:y+0.1,w:0.025,h:0.55, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(m.body, { x:2.5,y:y+0.04,w:7.1,h:0.68, fontSize:10, color:C.midgray, fontFace:"Calibri", wrap:true, valign:"top" });
});
rule(sl, 5.4);
para(sl,"In children >4 years, intussusception is almost always secondary to Meckel's diverticulum. — Sleisenger & Fordtran",
0.4, 5.45, 9.2, 0.3, { fs:10, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 — MECKEL'S DIVERTICULITIS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"10 Meckel's Diverticulitis");
para(sl,
"Acute inflammation of a Meckel's diverticulum (Meckel's diverticulitis) accounts for 20–25% of symptomatic presentations and is more common in adults than in children. It is clinically indistinguishable from acute appendicitis and is almost invariably diagnosed at exploratory laparotomy. The condition should be sought whenever the appendix is found to be normal during an operation for suspected appendicitis, particularly if free fluid, free pus, or localised inflammatory changes are present in the right iliac fossa or mid-abdomen.",
0.4, 0.85, 9.2, 1.2, { fs:12.5 });
rule(sl, 2.15);
box(sl,"Pathogenesis",
"Two mechanisms drive acute Meckel's diverticulitis:\n1. Intraluminal obstruction: Similar to the pathogenesis of appendicitis, obstruction at the neck of the diverticulum (by a faecolith, enterolith, or mucosal swelling) causes bacterial proliferation, raised intraluminal pressure, mural ischaemia, and ultimately gangrene and perforation.\n2. Peptic ulceration: Acid secreted by heterotopic gastric mucosa erodes through the diverticular wall, causing localised peritonitis.",
0.3, 2.23, 4.5, 1.55);
box(sl,"Clinical Features",
"• Central or periumbilical abdominal pain, migrating to the right iliac fossa or mid-abdomen\n• Fever, tachycardia, anorexia, nausea\n• Localised tenderness and guarding; signs of peritonism if perforated\n• Raised white cell count and inflammatory markers (CRP, ESR)\n• Pre-operative diagnosis is almost never made — the presentation is identical to appendicitis\n• A chronic form (Meckel's ileitis) mimics Crohn's disease of the terminal ileum",
4.95, 2.23, 4.65, 1.55);
box(sl,"Perforation",
"Perforation complicates approximately one-third of cases of Meckel's diverticulitis. When the perforation is contained, a localised abscess forms. Free perforation produces generalised peritonitis with signs of an acute abdomen — diffuse tenderness, rigidity, rebound tenderness. The clinical picture may then resemble a perforated peptic ulcer rather than appendicitis.",
0.3, 3.9, 4.5, 1.35);
box(sl,"Surgical Implications",
"When a Meckel's diverticulum is found to be acutely inflamed at laparotomy, resection is mandatory. If perforation has occurred, the surrounding ileum may be involved and a wider segmental bowel resection with primary anastomosis is required. The appendix should also be inspected and, if normal, may be removed to avoid future diagnostic confusion.",
4.95, 3.9, 4.65, 1.35);
rule(sl, 5.35);
para(sl,"'Meckel diverticulitis is clinically indistinguishable from appendicitis, and exploration is both diagnostic and therapeutic.' — Sabiston Textbook of Surgery",
0.4, 5.4, 9.2, 0.35, { fs:10, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 — NEOPLASMS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"11 Neoplasms Arising in Meckel's Diverticulum");
para(sl,
"Neoplasms are uncommon but clinically important complications of Meckel's diverticulum, occurring in approximately 0.5% to 3.2% of all diverticula. They represent the malignant potential conferred by the pluripotent epithelium of the original vitelline duct, as well as the chronic inflammatory milieu that may arise from heterotopic tissue. The diagnosis is almost always made postoperatively after histological examination of a resected specimen.",
0.4, 0.85, 9.2, 1.1, { fs:12.5 });
rule(sl, 2.05);
sl.addText("Histological Types (Sabiston Textbook of Surgery)", {
x:0.4,y:2.12,w:9.2,h:0.3, fontSize:11.5, bold:true, color:C.black, fontFace:"Calibri" });
const tumours = [
["Neuroendocrine Tumour (NET / Carcinoid)","33–44%","Most common malignancy. Arises from enterochromaffin cells. May secrete serotonin in large tumours. Typically found incidentally; carcinoid syndrome is rare unless there is hepatic metastasis."],
["Leiomyosarcoma","18–25%","Smooth muscle tumour. May present as an abdominal mass or with bleeding from mucosal ulceration. Aggressive histological variants carry a poor prognosis."],
["Adenocarcinoma","12–16%","Arises predominantly from heterotopic gastric mucosa. May arise from areas of chronic peptic ulceration. Risk factors include long-standing gastric-type mucosa and chronic inflammation."],
["GIST (Gastrointestinal Stromal Tumour)","~12%","Arises from the interstitial cells of Cajal. May be detected incidentally or present with bleeding or obstruction. KIT/PDGFRA mutation-driven."],
["Lymphoma","Rare","Primary GI lymphoma may involve the diverticulum as part of generalised small bowel lymphoma. Usually non-Hodgkin type."],
];
tumours.forEach(([type, freq, desc], i) => {
const y = 2.5 + i*0.58;
const bg = i%2===0 ? C.offwht : C.white;
sl.addShape(pres.ShapeType.rect,{ x:0.3,y,w:9.4,h:0.52, fill:{color:bg}, line:{color:C.silver,pt:0.5} });
sl.addText(type, { x:0.42,y:y+0.04,w:3.2,h:0.44, fontSize:10.5, bold:true, color:C.black, fontFace:"Calibri", valign:"top" });
sl.addShape(pres.ShapeType.rect,{ x:3.65,y:y+0.1,w:0.025,h:0.32, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(freq, { x:3.72,y:y+0.04,w:0.88,h:0.44, fontSize:11, bold:true, color:C.dkgray, fontFace:"Calibri", align:"center", valign:"middle" });
sl.addShape(pres.ShapeType.rect,{ x:4.62,y:y+0.1,w:0.025,h:0.32, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(desc, { x:4.7,y:y+0.04,w:4.9,h:0.44, fontSize:10, color:C.midgray, fontFace:"Calibri", wrap:true, valign:"top" });
});
rule(sl, 5.43);
para(sl,"Recent studies have argued for surgical resection of incidentally found Meckel's diverticula because of their propensity for harbouring malignancies. — Sabiston Textbook of Surgery",
0.4, 5.48, 9.2, 0.35, { fs:9.5, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 14 — APPROACH TO DIAGNOSIS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"13 Approach to Diagnosis");
para(sl,
"The diagnosis of Meckel's diverticulum is notoriously difficult to establish preoperatively. No single investigation is universally sensitive, and the choice of investigation must be guided by the clinical presentation. The diverticulum is rarely visualised directly until the operating theatre; the goal of pre-operative investigation is therefore to confirm the diverticulum as the likely source of the presenting complication.",
0.4, 0.85, 9.2, 1.05, { fs:12.5 });
rule(sl, 2.0);
const algos = [
{ pres:"Painless rectal bleeding", inv:"Meckel scan (99mTc-pertechnetate) as first-line. If negative and bleeding continues: 99mTc-RBC scan, mesenteric angiography. If still inconclusive: capsule endoscopy or double-balloon enteroscopy. CT angiography increasingly used. In haemodynamic instability: proceed directly to surgical exploration." },
{ pres:"Intestinal obstruction", inv:"CT abdomen (imaging of choice for obstruction). May reveal tubular blind-ending structure in mid-abdomen. Intussusception may be visible. Enema reduction may be attempted for intussusception but surgical backup is essential. Volvulus requires urgent operative exploration." },
{ pres:"Suspected diverticulitis", inv:"CT abdomen is the primary investigation — may show an inflamed pericaecal or para-ileal mass, fat stranding, free fluid. Often indistinguishable from appendicitis radiologically. Diagnosis confirmed at laparotomy when appendix is found to be normal." },
{ pres:"Incidental discovery", inv:"Most often during abdominal surgery, CT, or autopsy. No pre-operative investigation is needed. Decision for resection based on individual risk-benefit assessment." },
];
algos.forEach((a, i) => {
const y = 2.1 + i * 0.8;
sl.addShape(pres.ShapeType.rect,{ x:0.3,y,w:9.4,h:0.73, fill:{color:i%2===0?C.offwht:C.white}, line:{color:C.silver,pt:0.5} });
sl.addText("Presentation:", { x:0.42,y:y+0.05,w:1.3,h:0.18, fontSize:9, bold:true, color:C.midgray, fontFace:"Calibri" });
sl.addText(a.pres, { x:0.42,y:y+0.24,w:2.4,h:0.42, fontSize:10.5, bold:true, color:C.black, fontFace:"Calibri", wrap:true, valign:"top" });
sl.addShape(pres.ShapeType.rect,{ x:2.88,y:y+0.1,w:0.025,h:0.52, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText("Investigations:", { x:2.97,y:y+0.05,w:1.3,h:0.18, fontSize:9, bold:true, color:C.midgray, fontFace:"Calibri" });
sl.addText(a.inv, { x:2.97,y:y+0.24,w:6.65,h:0.44, fontSize:10, color:C.midgray, fontFace:"Calibri", wrap:true, valign:"top" });
});
rule(sl, 5.33);
para(sl,"Standard abdominal plain films, barium contrast studies, and ultrasound are seldom helpful in making the diagnosis. — Sleisenger & Fordtran",
0.4, 5.38, 9.2, 0.35, { fs:10, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 15 — MECKEL SCAN (99mTc) — with image
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"14 Meckel Scan — 99mTc-Pertechnetate Scintigraphy");
// Left text
para(sl,
"Technetium-99m pertechnetate scintigraphy ('Meckel scan') is the investigation of choice for suspected bleeding Meckel's diverticulum, particularly in children. Pertechnetate is taken up preferentially by the mucus-secreting cells of gastric mucosa (including ectopic gastric mucosa within a Meckel's diverticulum) and by the thyroid, salivary glands, and gastric mucosa.",
0.4, 0.85, 5.2, 1.1, { fs:12 });
para(sl,
"Performance characteristics:\n• Sensitivity: 85–90% in children; falls to ~63% in adults (less ectopic gastric mucosa)\n• Specificity: ~95%\n• Accuracy: ~90% in the paediatric age group\n• Positive predictive value: very high when result is positive\n• A negative scan does NOT exclude Meckel's diverticulum",
0.4, 2.0, 5.2, 1.3, { fs:12 });
para(sl,
"Enhancement strategies to improve sensitivity:\n• H2 receptor antagonists (cimetidine, ranitidine): inhibit peptic secretion but preserve pertechnetate uptake, retaining the radionuclide in the diverticular wall longer\n• Glucagon: inhibits peristalsis, reduces dilution and washout of the isotope\n• Pentagastrin: stimulates mucus-cell metabolism (rarely used — risk of perforation)",
0.4, 3.35, 5.2, 1.3, { fs:12 });
para(sl,
"False negatives occur with: absent gastric mucosal cells, inflammatory oedema/necrosis masking uptake, diverticular outlet obstruction, severe anaemia. In these cases, 99mTc-labelled RBC scan, mesenteric angiography, or surgical exploration is required.",
0.4, 4.68, 5.2, 0.82, { fs:11.5, italic:true, color:C.midgray });
// Right image
sl.addImage({ data:img3, x:5.75, y:0.82, w:3.9, h:3.9 });
cap(sl,"Fig. 3 — 99mTc-pertechnetate scintigram. Focal uptake in the mid-abdomen (Meckel's diverticulum), stomach (upper), and bladder (lower right). This is the investigation of choice for bleeding Meckel's diverticulum. (Current Surgical Therapy 14e)", 5.75, 4.74, 3.9);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 16 — ABDOMINAL RADIOGRAPH & CT (with AXR image)
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"15 Plain Radiography & CT Imaging");
// Left image
sl.addImage({ data:img2, x:0.3, y:0.82, w:4.35, h:4.4 });
cap(sl,"Fig. 4 — Abdominal radiograph of a 2-year-old with acute abdominal pain and peritonitis. Dilated bowel loops with gas-fluid levels. The saccular soft-tissue shadow of the diverticulum is visible in the mid-abdomen (white arrows). (Grainger & Allison's Diagnostic Radiology)", 0.3, 5.24, 4.35);
// Right text
para(sl,
"Plain Abdominal Radiography\n\nStandard abdominal plain films are seldom diagnostic. However, in rare cases of Meckel's diverticulitis or perforation, the following may be seen:\n• Dilated bowel loops with gas-fluid levels suggesting mechanical ileus\n• A saccular soft-tissue shadow in the mid-abdomen (the inflamed diverticulum)\n• An enterolith within the diverticulum (radiodense, resembles an appendicolith)\n• Free intraperitoneal gas (pneumoperitoneum) if perforation has occurred",
5.0, 0.85, 4.7, 1.8, { fs:11.5 });
para(sl,
"CT Abdomen & CT Enterography\n\nCT is the first-line investigation in suspected obstruction, diverticulitis, or perforation. The Meckel's diverticulum may appear as a tubular, blind-ending structure arising from the antimesenteric border of the terminal ileum, occasionally with surrounding fat stranding if inflamed. However, it may be indistinguishable from a normal small bowel loop, especially if non-inflamed. CT enterography (with luminal distension) significantly improves detection of the diverticulum itself. CT angiography is increasingly used in adults with GI bleeding when scintigraphy is inconclusive.",
5.0, 2.72, 4.7, 1.8, { fs:11.5 });
para(sl,
"Barium Studies & Ultrasound\n\nConventional barium contrast studies may be useful in patients with chronic persistent symptoms and negative cross-sectional or nuclear medicine imaging. The characteristic barium feature is a saccular, blind-ending pouch on the antimesenteric border of the ileum with a triradiate mucosal fold pattern converging with the ileum. Ultrasound is not reliable for direct visualisation of the diverticulum but may detect intussusception caused by it.",
5.0, 4.58, 4.7, 1.0, { fs:11.5 });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 17 — ADVANCED INVESTIGATIONS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"16 Advanced Investigations");
para(sl,
"When initial investigations (Meckel scan, CT) are negative or equivocal, and a Meckel's diverticulum remains the most likely diagnosis, several advanced techniques may be employed. The choice depends on the clinical urgency, the patient's age, and the presenting complication.",
0.4, 0.85, 9.2, 0.85, { fs:12.5 });
const inv = [
{ title:"Mesenteric Angiography", body:"Indicated in the setting of active or recent significant haemorrhage, particularly when the Meckel scan is negative. Selective catheterisation of the superior mesenteric artery may identify the bleeding vessel, allow localisation of the diverticulum, and in selected cases permit therapeutic embolisation. However, active bleeding at a rate of at least 0.5–1 mL/min is required for a positive result." },
{ title:"99mTc-Labelled Red Blood Cell Scan", body:"Tagged red blood cell scintigraphy can detect lower rates of active bleeding (as little as 0.1 mL/min). The scan acquires images over several hours and can localise bleeding to a bowel segment, guiding surgical exploration. Less specific than angiography for precise anatomical localisation but useful in intermittent or slower bleeding." },
{ title:"Capsule Endoscopy", body:"Wireless capsule endoscopy (WCE) has successfully detected Meckel's diverticula in children and adults with obscure gastrointestinal bleeding. The capsule may visualise the diverticular orifice, the marginal ulcer, or active bleeding within the small bowel. Limitations include inability to biopsy or treat, and the capsule may be retained if obstruction coexists." },
{ title:"Double-Balloon Enteroscopy (DBE)", body:"Allows deep intubation of the small bowel with direct visualisation, biopsy capability, and the potential for endoscopic therapy. DBE has detected Meckel's diverticula in patients with obscure GI bleeding after negative standard endoscopy and WCE. Both anterograde (oral) and retrograde (anal) approaches can reach the mid-small bowel." },
{ title:"Intraoperative Enteroscopy", body:"When pre-operative investigations fail to localise a bleeding source and the patient undergoes laparotomy, intraoperative enteroscopy (via an enterotomy or per-oral/per-anal technique) can systematically examine the entire small bowel mucosa. This ensures the diverticulum and its marginal ulcer are identified before the decision to resect." },
{ title:"Surgical Exploration", body:"Surgical exploration remains the definitive diagnostic and therapeutic intervention when all other investigations are inconclusive and the clinical picture demands action. When a Meckel's diverticulum is found intraoperatively, the decision for resection is straightforward if it is symptomatic. The entire small bowel should be systematically examined from ileocaecal valve to Treitz." },
];
inv.forEach((item, i) => {
const col = i%2;
const row = Math.floor(i/2);
const x = col===0 ? 0.3 : 5.15;
const y = 1.82 + row*1.22;
box(sl, item.title, item.body, x, y, 4.65, 1.1, false);
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 18 — DIFFERENTIAL DIAGNOSIS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"17 Differential Diagnosis");
para(sl,
"Because Meckel's diverticulum can mimic several common conditions, a high index of suspicion is essential. The differential diagnosis varies according to the presenting complication and the patient's age. Failure to consider Meckel's diverticulum frequently leads to diagnostic delay and operative surprise.",
0.4, 0.85, 9.2, 0.82, { fs:12.5 });
const diffs = [
{ pres:"Painless rectal bleeding (child)", diffs:"Intussusception · Juvenile polyp · Anal fissure · Allergic colitis · Infectious colitis · Colorectal polyp" },
{ pres:"Painful rectal bleeding (child)", diffs:"Intussusception · Infectious colitis · Henoch-Schönlein purpura · Inflammatory bowel disease" },
{ pres:"Right iliac fossa pain (any age)", diffs:"Acute appendicitis (most important) · Right-sided colonic diverticulitis · Mesenteric adenitis · Ovarian pathology · Crohn's disease · Renal colic" },
{ pres:"GI bleeding (adults <30 yr)", diffs:"Peptic ulcer disease · Inflammatory bowel disease · Arteriovenous malformation · Small bowel tumour · Hereditary haemorrhagic telangiectasia" },
{ pres:"Small bowel obstruction", diffs:"Adhesive obstruction · Hernia · Crohn's disease stricture · Small bowel tumour · Volvulus (other causes) · Gallstone ileus" },
{ pres:"Peritonitis / acute abdomen", diffs:"Perforated appendicitis · Perforated peptic ulcer · Perforated Crohn's · Ischaemic bowel · Ovarian cyst rupture" },
{ pres:"Umbilical anomaly (neonate)", diffs:"Umbilical granuloma · Urachal fistula · Umbilical polyp · Omphalitis · Omphalocoele · Umbilical hernia" },
{ pres:"Chronic periumbilical pain", diffs:"Irritable bowel syndrome · Crohn's disease · Chronic Meckel's ileitis · Adhesions · Mesenteric ischaemia" },
];
diffs.forEach((d, i) => {
const y = 1.78 + i * 0.46;
const bg = i%2===0 ? C.offwht : C.white;
sl.addShape(pres.ShapeType.rect,{ x:0.3,y,w:9.4,h:0.42, fill:{color:bg}, line:{color:C.silver,pt:0.5} });
sl.addText(d.pres, { x:0.42,y:y+0.05,w:3.0,h:0.32, fontSize:10.2, bold:true, color:C.black, fontFace:"Calibri", valign:"middle" });
sl.addShape(pres.ShapeType.rect,{ x:3.45,y:y+0.08,w:0.025,h:0.25, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(d.diffs, { x:3.55,y:y+0.05,w:6.1,h:0.32, fontSize:10, color:C.midgray, fontFace:"Calibri", valign:"middle", wrap:true });
});
rule(sl, 5.52);
para(sl,"The most important differential is acute appendicitis. Always inspect the distal ileum when a normal appendix is found at laparotomy.",
0.4, 5.57, 9.2, 0.32, { fs:10, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 19 — SURGICAL MANAGEMENT: SYMPTOMATIC
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"18 Surgical Management — Symptomatic Meckel's Diverticulum");
para(sl,
"All symptomatic Meckel's diverticula require prompt surgical intervention. The general principle is resection of the diverticulum with restoration of intestinal continuity. The specific approach and extent of resection depend on the complication, the status of the bowel, and the presence of heterotopic tissue.",
0.4, 0.85, 9.2, 0.9, { fs:12.5 });
rule(sl, 1.85);
box(sl,"Diverticulectomy",
"The standard procedure for a non-bleeding Meckel's diverticulum with a narrow neck and no evidence of ectopic tissue at the base. The diverticulum is excised at its base, and the resulting defect in the ileum is closed transversely (to avoid stenosis) using either a hand-sewn technique or a linear stapler applied diagonally across the base. Widely used for diverticulitis without peritonitis.",
0.3, 1.93, 4.5, 1.4);
box(sl,"Segmental Ileal Resection & Anastomosis",
"Required when: (1) there is haemorrhage (the bleeding marginal ulcer is in the adjacent ileum, not in the diverticulum itself — a diverticulectomy alone will not remove it); (2) the base is broad, making simple diverticulectomy technically unsafe; (3) ectopic tissue is palpable extending to the base; (4) the surrounding ileum is gangrenous or heavily contaminated; (5) a neoplasm is suspected. A primary end-to-end anastomosis is performed after resection.",
4.95, 1.93, 4.65, 1.4);
box(sl,"Preoperative Steps",
"For haemorrhage: resuscitation with IV fluids and blood products; crossmatch; Meckel scan or angiography if haemodynamically stable. For obstruction: nasogastric decompression, IV fluids, correction of electrolytes. For diverticulitis/perforation: IV antibiotics covering gram-negative organisms and anaerobes; urgent laparotomy. Never delay surgery in a haemodynamically unstable patient to obtain imaging.",
0.3, 3.43, 4.5, 1.35);
box(sl,"Intraoperative Considerations",
"Systematically examine 60–100 cm of ileum proximal to the ileocaecal valve. Palpate the diverticulum for mural thickening (suggests ectopic tissue or neoplasm). Inspect the mesenteric border for anomalous fibrous bands. Perform appendicectomy if the appendix appears normal (to avoid future diagnostic confusion), provided the patient's condition permits. In laparoscopic cases, external palpation through a port may be possible.",
4.95, 3.43, 4.65, 1.35);
rule(sl, 4.9);
sl.addShape(pres.ShapeType.rect,{ x:0.3,y:4.97,w:9.4,h:0.58, fill:{color:C.dkgray}, line:{color:C.dkgray} });
sl.addText([
{ text:"Key principle: ", options:{ bold:true, color:C.white } },
{ text:"Segmental resection (not diverticulectomy) is required for haemorrhage — the bleeding ulcer is in the adjacent ileum, not in the diverticulum. — Sabiston Textbook of Surgery", options:{ italic:true, color:C.silver } }
], { x:0.45,y:4.99,w:9.1,h:0.52, fontSize:11, fontFace:"Calibri", valign:"middle" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 20 — INCIDENTAL DISCOVERY
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"19 Incidentally Discovered Meckel's Diverticulum — Controversies");
para(sl,
"The management of a Meckel's diverticulum discovered incidentally at laparotomy or on imaging remains one of the most debated topics in GI surgery. The lifetime risk of complications is low (2–6%), and mortality from incidental resection is not zero, making the risk-benefit calculation non-trivial. The foundational paper by Soltero and Bill (1976) estimated the complication risk in adults at <2% and argued against routine removal; this influenced surgical practice for decades. However, more recent data challenge this view.",
0.4, 0.85, 9.2, 1.25, { fs:12 });
rule(sl, 2.2);
box(sl,"Arguments AGAINST prophylactic resection (adults)",
"• Lifetime complication risk is low (2–6%); most diverticula remain asymptomatic throughout life\n• Morbidity of incidental resection historically ~12% (Soltero & Bill)\n• No reliable predictor identifies which diverticula will become symptomatic\n• Adds operative time and risk to the primary surgery\n• Mortality from elective diverticulectomy is not zero",
0.3, 2.28, 4.5, 1.55, false);
box(sl,"Arguments FOR prophylactic resection (adults)",
"• Complications, when they occur, can be life-threatening (obstruction, haemorrhage, perforation)\n• Modern laparoscopic technique has reduced operative morbidity significantly\n• Risk of malignancy (0.5–3.2%) — may not be apparent from external examination\n• The symptomatic risk is unevenly distributed: males, younger patients, and those with ectopic tissue are at higher risk\n• Some authors argue net benefit of resection in high-risk individuals outweighs risk",
4.95, 2.28, 4.65, 1.55, false);
rule(sl, 3.95);
sl.addText("Factors associated with higher complication risk — favouring resection (Sabiston Surgery)", {
x:0.4,y:4.02,w:9.2,h:0.28, fontSize:11, bold:true, color:C.black, fontFace:"Calibri" });
const factors = [
["Age","Under 50 years — risk of complications decreases substantially with age"],
["Sex","Male sex — 2–3× higher risk of complications than females"],
["Length",">2 cm in length — associated with higher complication frequency"],
["Ectopic tissue","Palpable abnormality or suspected heterotopic tissue at base"],
["Fibrous band","Presence of a mesodiverticular band (obstruction risk)"],
];
factors.forEach(([factor, desc], i) => {
const y = 4.35 + i*0.24;
sl.addText(`• ${factor}: `, { x:0.45,y,w:1.4,h:0.22, fontSize:10.5, bold:true, color:C.black, fontFace:"Calibri" });
sl.addText(desc, { x:1.5,y,w:8.1,h:0.22, fontSize:10.5, color:C.midgray, fontFace:"Calibri" });
});
rule(sl, 5.58);
para(sl,"In children, most authorities recommend resection of incidentally found Meckel's diverticula. In adults, the decision must be personalised. — Current Surgical Therapy 14e",
0.4, 5.62, 9.2, 0.32, { fs:9.5, italic:true, color:C.ltgray, align:"center" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 21 — LAPAROSCOPIC APPROACH (with Bailey & Love image)
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.background = { color: C.white };
bar(sl,"20 Laparoscopic Approach");
para(sl,
"Laparoscopic resection of Meckel's diverticulum has become the preferred surgical approach in experienced centres. It offers the established advantages of minimally invasive surgery — reduced postoperative pain, shorter hospital stay, faster return to activity, and smaller incisions — without compromising oncological or surgical principles. Retrospective studies have demonstrated equivalent outcomes compared with open resection.",
0.4, 0.85, 5.2, 1.2, { fs:12 });
para(sl,
"Technique: Three or four ports are typically placed. The terminal ileum is identified and run proximally to locate the diverticulum. The diverticulum is elevated laparoscopically and its base examined for width and palpable induration. Diverticulectomy can be performed using an endoscopic linear stapler applied diagonally across the base, or by exteriorising the bowel segment through a small port-site extension for open stapling or hand-sewn closure. When segmental resection is required, a small incision may be made to exteriorise the segment, perform resection, and create the anastomosis.",
0.4, 2.1, 5.2, 1.65, { fs:12 });
para(sl,
"Conversion to open surgery may be required in the setting of peritonitis (with soiling), dense adhesions, massive haemorrhage preventing laparoscopic control, or when a neoplasm is suspected requiring a wider margin. The threshold for conversion should be low in the emergency setting.\n\nDiagnostic laparoscopy is also valuable when the preoperative diagnosis is uncertain — it allows systematic inspection of the entire distal small bowel when the appendix is found to be normal.",
0.4, 3.82, 5.2, 1.62, { fs:12 });
// Right image
sl.addImage({ data:img4, x:5.65, y:0.82, w:4.0, h:4.15 });
cap(sl,"Fig. 5 — Operative photograph of a Meckel's diverticulum projecting from the antimesenteric ileal border, displaying its own blood supply running in the wall. (Bailey & Love's Short Practice of Surgery, 28th ed.)", 5.65, 4.99, 4.0);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 22 — SUMMARY & KEY POINTS
// ═══════════════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect,{ x:0,y:0,w:10,h:5.625, fill:{color:C.ink}, line:{color:C.ink} });
sl.addText("SUMMARY & KEY POINTS", { x:0.3,y:0.12,w:9.4,h:0.6,
fontSize:24, bold:true, color:C.white, fontFace:"Calibri", align:"center", charSpacing:5 });
sl.addShape(pres.ShapeType.rect,{ x:0.3,y:0.76,w:9.4,h:0.025, fill:{color:C.silver}, line:{color:C.silver} });
const pts = [
"Meckel's diverticulum is the most common congenital GI anomaly (1–3% prevalence), arising from incomplete obliteration of the vitelline duct by 7–8 weeks gestation.",
"It is a TRUE diverticulum — contains all three bowel wall layers. Always arises from the ANTIMESENTERIC border of the ileum, typically within 60 cm of the ileocaecal valve.",
"The 'Rule of 2's': 2% prevalence · 2 feet from ICV · 2 inches long · 2:1 male:female · Symptomatic before age 2 · Two types of heterotopic tissue · 2% complication rate.",
"Heterotopic gastric mucosa (80–85% of ectopic tissue) secretes acid → marginal ulcer at gastric-ileal junction → PAINLESS rectal bleeding. This is the most common complication in children <2 years.",
"Intestinal obstruction (30–35%) occurs via: intussusception (dominant in children >4 yr, usually secondary to Meckel's), volvulus around a fibrous band, internal herniation, or Littre's hernia.",
"Meckel's diverticulitis (20–25%) is clinically indistinguishable from appendicitis. Always inspect the distal ileum when a normal appendix is found. Perforation complicates ~1/3 of cases.",
"Neoplasms occur in 0.5–3.2%; NET/carcinoid most common (33–44%), followed by leiomyosarcoma, adenocarcinoma, GIST.",
"Investigation of choice for bleeding: 99mTc-pertechnetate Meckel scan (sensitivity 85–90% in children; ~63% in adults). CT for obstruction/diverticulitis. Capsule endoscopy/DBE for obscure bleeding.",
"Treatment: ALL symptomatic diverticula → surgical resection. For bleeding → segmental ileal resection (ulcer is in adjacent ileum, not the diverticulum). For other indications → diverticulectomy or segmental resection. Laparoscopic approach is preferred.",
"Incidental discovery: Children — resect. Adults — individualise based on age <50, male sex, length >2 cm, palpable ectopic tissue, mesodiverticular band.",
];
pts.forEach((pt, i) => {
const y = 0.87 + i * 0.46;
sl.addShape(pres.ShapeType.rect,{ x:0.3,y:y+0.04,w:0.22,h:0.28, fill:{color:C.silver}, line:{color:C.silver} });
sl.addText(`${i+1}`, { x:0.3,y:y+0.02,w:0.22,h:0.3, fontSize:9, bold:true, color:C.ink, fontFace:"Calibri", align:"center", valign:"middle" });
sl.addText(pt, { x:0.58,y:y+0.02,w:9.1,h:0.42, fontSize:10, color:C.offwht, fontFace:"Calibri", wrap:true, valign:"top" });
});
}
// ─────────────────── WRITE FILE ───────────────────────────────────────────
const out = "/home/daytona/workspace/meckel-diverticulum-ppt/Meckel_Diverticulum_Detailed.pptx";
pres.writeFile({ fileName: out })
.then(() => console.log("SUCCESS: " + out))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/meckel-diverticulum-ppt && node build2.js
Meckel Diverticulum Detailed
Presentation · PPTX
| # | Slide Title | Highlights |
|---|---|---|
| 1 | Title Slide | Black background, all 6 source textbooks listed |
| 2 | Table of Contents | All 22 topics indexed |
| 3 | Historical Background | Hildanus 1598, Meckel 1809, Soltero & Bill 1976; milestone timeline |
| 4 | Embryology & Vitelline Duct | 5–8 week obliteration, SOX2/CDX2 molecular basis |
| 5 | Epidemiology & Rule of 2's | Visual 8-cell grid with each "2" explained |
| 6 | Gross Anatomy | Antimesenteric location, size, blood supply, fibrous bands — with Robbins gross specimen photo |
| 7 | Histology & Heterotopic Tissue | Gastric (80–85%), pancreatic, others; marginal ulcer mechanism — with Sabiston surgical specimen photo |
| 8 | Omphalomesenteric Duct Remnants Spectrum | 6 remnant types: Meckel's, fistula, fibrous cord, cyst, umbilical sinus, mesodiverticular band |
| 9 | Clinical Presentations Overview | Full frequency table by complication type |
| 10 | GI Haemorrhage | Pathomechanism, character of bleeding, spectrum, clinical clues |
| 11 | Intestinal Obstruction | 4 mechanisms: intussusception, volvulus, internal herniation, Littre's hernia |
| 12 | Meckel's Diverticulitis | Pathogenesis, clinical features, perforation, surgical implications |
| 13 | Neoplasms | 5 tumour types with frequency: NET, leiomyosarcoma, adenocarcinoma, GIST, lymphoma |
| 14 | Approach to Diagnosis | Algorithm by presenting complaint (bleeding / obstruction / diverticulitis / incidental) |
| 15 | Meckel Scan (99mTc) | Sensitivity/specificity, enhancement strategies, false negatives — with scintigram image |
| 16 | Plain Radiography & CT | AXR findings, CT enterography, barium studies — with abdominal radiograph |
| 17 | Advanced Investigations | Angiography, RBC scan, capsule endoscopy, DBE, intraoperative enteroscopy, surgical exploration |
| 18 | Differential Diagnosis | 8 clinical scenarios, each with full differential list |
| 19 | Surgical Management - Symptomatic | Diverticulectomy vs. segmental resection; indications, preoperative steps, intraoperative tips |
| 20 | Incidental Discovery - Controversies | For vs. against prophylactic resection; 5 high-risk factors for resection |
| 21 | Laparoscopic Approach | Technique, ports, stapling, conversion criteria — with operative specimen photo |
| 22 | Summary & Key Points | 10-point recap on black background |
Try once again to make a ppt
ls /home/daytona/workspace/meckel-diverticulum-ppt/ && echo "---" && ls -lh /home/daytona/workspace/meckel-diverticulum-ppt/*.b64 2>/dev/null | awk '{print $5, $9}'
~/meckel-diverticulum-ppt/build3.js
"use strict";
const pptxgen = require("pptxgenjs");
const fs = require("fs");
// ── Load images ─────────────────────────────────────────────────────────────
const IMG = {
gross1 : fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img0.b64','utf8'), // Robbins gross
gross2 : fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img1.b64','utf8'), // Sabiston gross
axr : fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img2.b64','utf8'), // Plain AXR
scan : fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img3.b64','utf8'), // 99mTc scan
op : fs.readFileSync('/home/daytona/workspace/meckel-diverticulum-ppt/img4.b64','utf8'), // Bailey & Love op photo
};
// ── Palette (strict B&W) ────────────────────────────────────────────────────
const P = {
black : "000000",
ink : "101010",
dkgray : "1E1E1E",
midgray : "3C3C3C",
gray : "666666",
silver : "BBBBBB",
ltgray : "DEDEDE",
offwht : "F5F5F5",
white : "FFFFFF",
};
// ── Presentation setup ───────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9"; // 10 × 5.625 inches
pres.title = "Meckel's Diverticulum – Comprehensive Review";
// ════════════════════════════════════════════════════════════════════════════
// UTILITY FUNCTIONS
// ════════════════════════════════════════════════════════════════════════════
/** Solid rectangle */
const rect = (sl, x, y, w, h, fill, stroke) =>
sl.addShape(pres.ShapeType.rect, {
x, y, w, h,
fill : { color: fill || P.white },
line : { color: stroke || fill || P.white },
});
/** Top heading bar – full width */
function headBar(sl, title, sub) {
rect(sl, 0, 0, 10, 0.78, P.black);
sl.addText(title, {
x:0.28, y:0.05, w:9.44, h:0.44,
fontSize:20, bold:true, color:P.white, fontFace:"Calibri",
valign:"middle", margin:0,
});
if (sub) sl.addText(sub, {
x:0.28, y:0.49, w:9.44, h:0.24,
fontSize:9.5, italic:true, color:P.silver, fontFace:"Calibri", valign:"middle", margin:0,
});
}
/** Thin horizontal rule */
const hrule = (sl, y, color) =>
rect(sl, 0.28, y, 9.44, 0.018, color || P.ltgray);
/** Body paragraph */
function txt(sl, text, x, y, w, h, opts) {
const o = opts || {};
sl.addText(text, {
x, y, w, h,
fontSize : o.fs || 11.2,
color : o.color || P.midgray,
fontFace : "Calibri",
align : o.align || "left",
valign : "top",
bold : !!o.bold,
italic : !!o.italic,
wrap : true,
});
}
/** Small italic caption */
const cap = (sl, t, x, y, w) =>
sl.addText(t, {
x, y, w, h:0.6,
fontSize:8, italic:true, color:P.gray,
fontFace:"Calibri", align:"center", wrap:true,
});
/** Section-divider slide (big number + title) */
function secSlide(numStr, titleStr, subtitleStr) {
const sl = pres.addSlide();
rect(sl, 0, 0, 10, 5.625, P.ink);
rect(sl, 0, 2.55, 10, 0.03, P.gray);
sl.addText(numStr, {
x:0.5, y:0.55, w:9, h:1.4,
fontSize:72, bold:true, color:"2B2B2B", fontFace:"Calibri", align:"center",
});
sl.addText(titleStr, {
x:0.5, y:2.65, w:9, h:0.85,
fontSize:28, bold:true, color:P.white, fontFace:"Calibri", align:"center",
});
sl.addText(subtitleStr||"", {
x:0.5, y:3.55, w:9, h:0.55,
fontSize:13, italic:true, color:P.silver, fontFace:"Calibri", align:"center",
});
return sl;
}
/** Shaded info-box */
function ibox(sl, title, body, x, y, w, h, dark) {
const bg = dark ? P.dkgray : P.offwht;
const tc = dark ? P.white : P.black;
const bc = dark ? P.silver : P.gray;
rect(sl, x, y, w, h, bg, P.silver);
sl.addText(title, { x:x+0.12, y:y+0.07, w:w-0.24, h:0.28,
fontSize:11, bold:true, color:tc, fontFace:"Calibri", margin:0 });
sl.addText(body, { x:x+0.12, y:y+0.37, w:w-0.24, h:h-0.46,
fontSize:10, color:bc, fontFace:"Calibri", wrap:true, valign:"top" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
rect(sl, 0, 0, 10, 5.625, P.black);
rect(sl, 0.6, 0.75, 8.8, 4.1, "0A0A0A", P.silver);
rect(sl, 0.6, 0.75, 8.8, 0.04, P.silver);
sl.addText("MECKEL'S DIVERTICULUM", {
x:0.8, y:1.05, w:8.4, h:1.1,
fontSize:36, bold:true, color:P.white, fontFace:"Calibri",
align:"center", charSpacing:4,
});
rect(sl, 1.8, 2.25, 6.4, 0.025, P.gray);
sl.addText("A Comprehensive Textbook Review", {
x:0.8, y:2.35, w:8.4, h:0.5,
fontSize:16, italic:true, color:P.silver, fontFace:"Calibri", align:"center",
});
sl.addText("Embryology · Anatomy · Pathology · Clinical Features · Diagnosis · Surgical Management", {
x:0.8, y:2.92, w:8.4, h:0.4,
fontSize:11, color:"505050", fontFace:"Calibri", align:"center",
});
sl.addText("Sources: Robbins & Cotran Pathologic Basis of Disease | Sabiston Textbook of Surgery\nSleisenger & Fordtran GI & Liver Disease | Bailey & Love's Short Practice of Surgery (28e)\nYamada's Textbook of Gastroenterology | Grainger & Allison's Diagnostic Radiology | Current Surgical Therapy 14e", {
x:0.8, y:3.65, w:8.4, h:0.82,
fontSize:8.5, italic:true, color:"484848", fontFace:"Calibri", align:"center",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – TABLE OF CONTENTS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "Table of Contents");
const items = [
"01 Historical Background",
"02 Embryology & the Vitelline Duct",
"03 Epidemiology & the Rule of 2's",
"04 Gross Anatomy",
"05 Histology & Heterotopic Tissue",
"06 Spectrum of Omphalomesenteric Remnants",
"07 Clinical Presentations – Overview",
"08 Gastrointestinal Haemorrhage",
"09 Intestinal Obstruction",
"10 Meckel's Diverticulitis",
"11 Neoplasms in Meckel's Diverticulum",
"12 Littre's Hernia & Rare Presentations",
"13 Approach to Diagnosis",
"14 Meckel Scan – 99mTc Scintigraphy",
"15 Plain Radiography & CT Imaging",
"16 Advanced Investigations",
"17 Differential Diagnosis",
"18 Surgical Management – Symptomatic",
"19 Diverticulectomy vs. Segmental Resection",
"20 Incidental Discovery – Controversies",
"21 Laparoscopic Approach",
"22 Summary & Key Points",
];
const half = Math.ceil(items.length / 2);
items.forEach((item, i) => {
const col = i < half ? 0 : 1;
const row = i < half ? i : i - half;
const x = col === 0 ? 0.28 : 5.12;
const y = 0.9 + row * 0.218;
sl.addText(item, {
x, y, w:4.6, h:0.2,
fontSize:10.5, color:P.midgray, fontFace:"Calibri",
});
if (row < half - 1 || col === 1) {
rect(sl, x, y + 0.2, 4.6, 0.008, P.ltgray);
}
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – HISTORICAL BACKGROUND
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "01 Historical Background", "From Hildanus (1598) to modern molecular understanding");
txt(sl,
"Meckel's diverticulum carries one of medicine's most recognisable eponyms, yet its history spans more than four centuries of anatomical observation. The structure was first noted in 1598 by Fabricius Hildanus, a Swiss surgeon, who described a blind intestinal outpouching during autopsy. For over two hundred years the finding remained an anatomical curiosity without clinical context.",
0.28, 0.88, 9.44, 0.95, { fs:12.2 });
txt(sl,
"The definitive account came in 1809 when Johann Friedrich Meckel the Younger, a German anatomist at the University of Halle, provided a systematic embryological and morphological description of the anomaly. Meckel correctly identified it as a persistent remnant of the vitelline (omphalomesenteric) duct, distinguished it from acquired diverticula, and recognised its developmental significance. His meticulous work earned the eponym that has persisted to this day.",
0.28, 1.9, 9.44, 1.05, { fs:12.2 });
hrule(sl, 3.05);
rect(sl, 0.28, 3.12, 9.44, 2.32, P.offwht, P.silver);
sl.addText("Key Historical Milestones", {
x:0.42, y:3.16, w:9.0, h:0.3,
fontSize:12.5, bold:true, color:P.black, fontFace:"Calibri", margin:0,
});
const milestones = [
["1598", "Fabricius Hildanus", "First description of a blind intestinal pouch at autopsy"],
["1809", "Johann F. Meckel the Younger", "Definitive anatomical and embryological characterisation; eponym established"],
["1904", "MacMahon & colleagues", "Clinical correlation of symptomatic presentations and complications"],
["1976", "Soltero & Bill", "Landmark paper defining surgical management of incidentally found diverticula in adults"],
["Modern era", "Molecular studies", "SOX2 / CDX2 transcription factor dysregulation identified as basis for ectopic gastric tissue"],
];
milestones.forEach(([yr, name, desc], i) => {
const y = 3.52 + i * 0.37;
sl.addText(yr, { x:0.42, y, w:1.05, h:0.32, fontSize:10.5, bold:true, color:P.black, fontFace:"Calibri" });
sl.addText(name,{ x:1.55, y, w:2.5, h:0.32, fontSize:10.5, italic:true,color:P.midgray, fontFace:"Calibri" });
sl.addText(desc,{ x:4.18, y, w:5.46, h:0.32, fontSize:10.5, color:P.gray, fontFace:"Calibri", wrap:true });
if (i < milestones.length-1) rect(sl, 0.42, y+0.35, 9.12, 0.008, P.ltgray);
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – EMBRYOLOGY
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "02 Embryology & the Vitelline Duct", "Normal development and mechanism of anomaly formation");
txt(sl,
"During the first weeks of fetal life, the omphalomesenteric (vitelline) duct serves as a critical nutritional conduit connecting the lumen of the primitive gut to the yolk sac. Under normal developmental conditions this structure undergoes progressive obliteration in a proximal-to-distal direction and is entirely absent by 7–8 weeks of gestation. Failure of this process — at the intestinal end of the duct — results in Meckel's diverticulum.",
0.28, 0.88, 9.44, 1.05, { fs:12.2 });
txt(sl,
"The cells that line the vitelline duct are pluripotent, carrying the capacity to differentiate into multiple epithelial lineages. This explains why heterotopic tissue of gastric, pancreatic, colonic, or hepatobiliary origin may be found within the resulting diverticulum. The persistence and extent of the duct remnant determine which of the several omphalomesenteric anomaly subtypes develops.",
0.28, 1.99, 9.44, 0.95, { fs:12.2 });
hrule(sl, 3.02);
ibox(sl, "Normal Obliteration",
"The vitelline duct normally obliterates between weeks 5 and 8 of gestation. Obliteration proceeds from the intestinal end toward the umbilicus. Complete obliteration leaves no residual structure. Any arrest in this process produces a remnant whose morphology depends on which segment remains patent.",
0.28, 3.1, 4.62, 1.45);
ibox(sl, "Molecular Basis of Ectopic Gastric Tissue",
"Proper gut patterning requires balanced expression of SOX2 (proximal gut / gastric specification) and CDX2 (intestinal specification). In Meckel diverticula with gastric heteroplasia, aberrant SOX2 expression is demonstrable in the ectopic gastric epithelium. It is this inappropriate proximal-gut transcription factor expression — rather than simple absence of CDX2 — that drives ectopic gastric differentiation within the diverticulum.",
5.1, 3.1, 4.62, 1.45);
rect(sl, 0.28, 4.65, 9.44, 0.82, P.offwht, P.ltgray);
sl.addText("Meckel's diverticulum accounts for approximately 67% of all omphalomesenteric duct remnants. The remaining 33% include patent vitelline fistula, fibrous cord, vitelline cyst, umbilical sinus, and umbilical polyp. All represent varying degrees of failed duct obliteration.", {
x:0.44, y:4.7, w:9.1, h:0.72,
fontSize:10.5, italic:true, color:P.gray, fontFace:"Calibri", wrap:true,
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – EPIDEMIOLOGY & RULE OF 2's
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "03 Epidemiology & the Rule of 2's", "Prevalence, demographics and the classic teaching mnemonic");
txt(sl,
"Meckel's diverticulum is the most common congenital anomaly of the gastrointestinal tract. Large autopsy series report a prevalence of 1–3% in the general population, most consistently cited as approximately 2%. The anomaly is 2–3 times more frequent in males. The lifetime risk of any complication is estimated at 2–6%, and this risk decreases substantially with advancing age, particularly after 50 years.",
0.28, 0.88, 9.44, 1.0, { fs:12.2 });
hrule(sl, 1.97);
sl.addText("THE RULE OF 2's", {
x:0.28, y:2.04, w:9.44, h:0.38,
fontSize:15, bold:true, color:P.black, fontFace:"Calibri",
});
const rules = [
["2%", "Prevalence in the general population"],
["2 feet", "Distance from the ileocaecal valve (60 cm)"],
["2 inches","Typical length of the diverticulum (5 cm)"],
["2 : 1", "Male to female ratio"],
["Age 2", "Most commonly symptomatic before age 2 years"],
["2 types", "Two main heterotopic tissues — gastric & pancreatic"],
["2%", "Lifetime risk of complications becoming symptomatic"],
["2 types", "Two primary symptom categories — bleeding & obstruction"],
];
rules.forEach(([num, desc], i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.28 : 5.12;
const y = 2.52 + row * 0.74;
rect(sl, x, y, 4.64, 0.66, col===0 ? P.offwht : "F0F0F0", P.silver);
sl.addText(num, {
x:x+0.14, y:y+0.06, w:1.3, h:0.54,
fontSize:17, bold:true, color:P.black, fontFace:"Calibri", align:"center", valign:"middle",
});
rect(sl, x+1.52, y+0.14, 0.02, 0.38, P.silver);
sl.addText(desc, {
x:x+1.64, y:y+0.10, w:2.88, h:0.5,
fontSize:10.8, color:P.midgray, fontFace:"Calibri", valign:"middle", wrap:true,
});
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – GROSS ANATOMY (with Robbins image)
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "04 Gross Anatomy", "Structural features of Meckel's diverticulum");
// ── Left text ──
txt(sl,
"Meckel's diverticulum is a TRUE diverticulum: it contains all three layers of the intestinal wall — mucosa, muscularis propria, and serosa. It arises exclusively from the antimesenteric border of the ileum. This distinguishes it from enteric duplication cysts, which arise from the mesenteric border.",
0.28, 0.88, 5.05, 0.95, { fs:11.8 });
txt(sl, "Location", 0.28, 1.89, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
txt(sl,
"Most diverticula lie within 45–100 cm of the ileocaecal valve; the classic teaching places this at 60 cm (2 feet). Rare cases are found more proximally in the ileum or even the jejunum.",
0.28, 2.17, 5.05, 0.65, { fs:11.5 });
txt(sl, "Size", 0.28, 2.89, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
txt(sl,
"Typical length is 1–10 cm (mean 3–6 cm). Diverticula exceeding 5 cm are termed 'giant'. Type I giant diverticula are long with calibre similar to the ileum; Type II (ovoid) are wide and saccular.",
0.28, 3.17, 5.05, 0.72, { fs:11.5 });
txt(sl, "Blood supply", 0.28, 3.96, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
txt(sl,
"A persistent vitelline artery (branch of the superior mesenteric artery) runs in the wall of the diverticulum and constitutes its dedicated blood supply — an important surgical landmark during resection.",
0.28, 4.24, 5.05, 0.72, { fs:11.5 });
// ── Right image ──
sl.addImage({ data:IMG.gross1, x:5.55, y:0.85, w:4.1, h:4.0 });
cap(sl,
"Fig. 1 — Gross specimen: blind pouch on the antimesenteric border of the ileum with scale bar. (Robbins & Cotran Pathologic Basis of Disease)",
5.55, 4.87, 4.1);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – HISTOLOGY & HETEROTOPIC TISSUE (with Sabiston image)
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "05 Histology & Heterotopic Tissue", "Mucosal architecture and mechanism of ectopic acid secretion");
// ── Left text ──
txt(sl,
"The diverticulum may be lined by normal small intestinal mucosa, but heterotopic tissue is identified in approximately 50% of all diverticula and in up to 70–80% of those that become symptomatic. The mucosal composition has direct clinical relevance: gastric heterotopia is responsible for almost all haemorrhagic complications.",
0.28, 0.88, 5.05, 1.1, { fs:11.8 });
txt(sl, "Types of heterotopic tissue (descending frequency):", 0.28, 2.06, 5.05, 0.28, { fs:11.8, bold:true, color:P.black });
const tissues = [
["Gastric mucosa","80–85%","Oxyntic (parietal cell) mucosa secretes HCl. Causes peptic ulceration of adjacent ileal mucosa at the gastric-ileal junction — the 'marginal ulcer'. Nearly all bleeding diverticula contain gastric mucosa."],
["Pancreatic tissue","~10%","Exocrine (acinar) or endocrine tissue. Functional complications are rare; mainly of academic and surgical importance."],
["Others","Rare","Colonic mucosa, Brunner's glands, jejunal tissue, hepatobiliary epithelium. Found in individual case reports."],
];
tissues.forEach(([type, freq, desc], i) => {
const y = 2.42 + i * 0.82;
rect(sl, 0.28, y, 5.05, 0.75, i%2===0 ? P.offwht : P.white, P.silver);
sl.addText(`${type} (${freq})`, { x:0.4,y:y+0.06,w:4.82,h:0.26, fontSize:11, bold:true, color:P.black, fontFace:"Calibri", margin:0 });
sl.addText(desc, { x:0.4,y:y+0.33,w:4.82,h:0.38, fontSize:10, color:P.gray, fontFace:"Calibri", wrap:true });
});
// ── Right image ──
sl.addImage({ data:IMG.gross2, x:5.55, y:0.85, w:4.1, h:3.6 });
cap(sl,
"Fig. 2 — Surgical specimen: rounded blind diverticular end projecting from the antimesenteric border. (Current Surgical Therapy 14e / Sabiston Textbook of Surgery)",
5.55, 4.47, 4.1);
txt(sl,
"Note: H. pylori has been identified in diverticular gastric mucosa in isolated reports; a direct causal link to haemorrhage remains unproven. SOX2 transcription factor (normally gastric-specific) shows aberrant expression in ectopic gastric tissue, explaining its presence in the intestine.",
0.28, 5.02, 9.44, 0.52, { fs:10, italic:true, color:P.gray });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – SPECTRUM OF OMPHALOMESENTERIC REMNANTS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "06 Spectrum of Omphalomesenteric Duct Remnants",
"Six distinct anomalies arising from incomplete vitelline duct obliteration");
txt(sl,
"Meckel's diverticulum is only the most common of several anomalies that result from failure of complete obliteration of the omphalomesenteric duct. Each entity reflects a different extent or location of duct persistence. Recognition of the full spectrum is important because several forms present with distinct clinical features that differ markedly from Meckel's diverticulum.",
0.28, 0.88, 9.44, 0.9, { fs:12 });
const rem = [
{ t:"Meckel's Diverticulum (67%)",
b:"Persistence of the intestinal end of the duct as a true diverticulum of the ileum. Contains all bowel wall layers. May contain heterotopic tissue. Complications: haemorrhage, obstruction, diverticulitis, neoplasm." },
{ t:"Patent Vitelline Fistula (6–15%)",
b:"Complete failure of obliteration — a patent fistula connects the ileum to the umbilicus. Presents neonatally as foul-smelling discharge from the umbilicus. Male:female ratio 5:1. Treated by surgical excision." },
{ t:"Fibrous Omphalomesenteric Band (25%)",
b:"Avascular or vascular cord connecting ileum to umbilicus or abdominal wall. No lumen remains. Clinically silent until it causes obstruction by internal herniation or serves as the axis of a volvulus." },
{ t:"Vitelline (Omphalomesenteric) Cyst",
b:"A mucosa-lined cystic remnant within a fibrous cord, attached to neither bowel nor umbilicus. Presents as a palpable intra-abdominal or periumbilical mass. Susceptible to torsion and infection." },
{ t:"Umbilical Sinus & Umbilical Polyp",
b:"Partial obliteration leaving only an umbilical opening (sinus) or a small mucosa-covered nodule (polyp) at the umbilicus. An umbilical polyp is bright red and easily mistaken for granulation tissue; a key distinction is its resistance to silver nitrate cauterisation." },
{ t:"Mesodiverticular Band",
b:"A fibrous or vascular band arising from the tip of a Meckel's diverticulum and attaching to the mesentery or peritoneum. Acts as a fulcrum for volvulus or permits internal herniation of adjacent bowel loops." },
];
rem.forEach((r, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.28 : 5.12;
const y = 1.9 + row * 1.22;
ibox(sl, r.t, r.b, x, y, 4.64, 1.1, false);
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – CLINICAL PRESENTATIONS OVERVIEW
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "07 Clinical Presentations – Overview",
"The vast majority are asymptomatic; complications differ by age group");
txt(sl,
"Only 2–4% of individuals with a Meckel's diverticulum are ever symptomatic. The lifetime risk of complications is 2–6%, with risk declining sharply after the age of 50 years. When complications do arise, the pattern differs by age: haemorrhage predominates in children under 2 years, while obstruction and diverticulitis are more common in older children and adults.",
0.28, 0.88, 9.44, 1.0, { fs:12.2 });
hrule(sl, 1.97);
// ── Frequency table ──
sl.addText("Approximate Frequency of Symptomatic Presentations (Mulholland & Greenfield's Surgery)", {
x:0.28, y:2.04, w:9.44, h:0.3,
fontSize:11, bold:true, color:P.black, fontFace:"Calibri",
});
const rows = [
["Clinical Presentation", "Frequency (%)", "Predominant Age Group", "Key Feature"],
["GI Haemorrhage", "30–35", "Children < 2 yr", "Painless maroon rectal bleeding"],
["Small Bowel Obstruction", "30–35", "Any age; older children", "Bilious vomiting, distension"],
["Meckel's Diverticulitis", "20–25", "Older children & adults", "Mimics acute appendicitis"],
["Umbilical Fistula / Sinus", "~10", "Neonates", "Drainage from umbilicus"],
["Intussusception", "5–12", "Children 4–10 yr", "Colicky pain, currant jelly stool"],
["Littre's Hernia", "Rare", "Adults", "Diverticulum in hernia sac"],
["Neoplasm", "0.5–3.2", "Adults", "NET most common (33–44%)"],
];
rows.forEach((row, ri) => {
const widths = [2.8, 1.35, 2.2, 3.01];
const xs = [0.28, 3.1, 4.47, 6.69];
row.forEach((cell, ci) => {
const y = 2.42 + ri * 0.36;
const bg = ri===0 ? P.dkgray : (ri%2===0 ? P.offwht : P.white);
const fc = ri===0 ? P.white : P.gray;
rect(sl, xs[ci], y, widths[ci], 0.34, bg, P.silver);
sl.addText(cell, {
x:xs[ci]+0.08, y:y+0.04, w:widths[ci]-0.16, h:0.26,
fontSize:ri===0?10.2:10, bold:ri===0, color:fc, fontFace:"Calibri", valign:"middle", wrap:true,
});
});
});
txt(sl,
"Note: In a single-centre paediatric series, of all known Meckel's diverticula — 19% were incidental; 35% GI bleeding; 20% diverticulitis/perforation; 14% obstruction; 12% intussusception. (Current Surgical Therapy 14e)",
0.28, 5.28, 9.44, 0.34, { fs:9.5, italic:true, color:P.silver });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – GASTROINTESTINAL HAEMORRHAGE
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "08 Gastrointestinal Haemorrhage",
"Most common complication in children; mechanism, character, clinical clues");
txt(sl,
"Painless rectal bleeding is the most common clinical manifestation of Meckel's diverticulum and accounts for 30–35% of all symptomatic presentations. It is the dominant complication in children under 2 years. The fundamental mechanism is acid secretion by heterotopic gastric (oxyntic) mucosa within the diverticulum, producing peptic ulceration of the normal ileal mucosa at the gastric-ileal mucosal junction — the 'marginal ulcer'. Erosion of this ulcer into submucosal vessels generates bleeding that ranges from minor and intermittent to acute, massive, and life-threatening.",
0.28, 0.88, 9.44, 1.2, { fs:12.2 });
hrule(sl, 2.18);
ibox(sl, "Character of Bleeding",
"Blood in the stool is typically maroon or brick-red, even during massive haemorrhage with hypovolaemic shock. Bright red blood per rectum (BRBPR) — characteristic of left colonic bleeding — is almost never seen. Melaena may occur with slower, intermittent episodes. The volume of blood loss can be deceptive.",
0.28, 2.26, 4.62, 1.22);
ibox(sl, "Why Children Survive Massive Bleeding",
"Despite potentially massive haemorrhage, fatal outcomes are rare in children. Hypovolaemia triggers intense splanchnic vasoconstriction via sympathetic reflex, causing bleeding vessels to contract and temporarily cease. Children also rarely carry the comorbidities that impair haemostatic compensation. Prompt diagnosis remains essential nonetheless.",
5.1, 2.26, 4.62, 1.22);
ibox(sl, "Spectrum of Presentation",
"Three patterns are recognised:\n• Acute massive haemorrhage — sudden-onset large-volume rectal blood loss with haemodynamic compromise\n• Recurrent episodic bleeding — self-limited bouts with spontaneous resolution between episodes\n• Chronic occult bleeding — iron-deficiency anaemia with positive faecal occult blood; no acute event",
0.28, 3.58, 4.62, 1.42);
ibox(sl, "Clinical Clues Suggesting Meckel's Diverticulum",
"• Any infant or child with significant PAINLESS rectal bleeding\n• Young patient (< 30 yr) with lower GI bleeding after negative upper + lower endoscopy\n• Recurrent episodic haemorrhage without identifiable source\n• H. pylori-negative peptic-pattern bleeding in a child\n• The absence of abdominal pain during active bleeding is a key distinguishing feature",
5.1, 3.58, 4.62, 1.42);
txt(sl, "Almost all diverticula that bleed contain heterotopic gastric mucosa. — Sleisenger & Fordtran's Gastrointestinal and Liver Disease",
0.28, 5.1, 9.44, 0.38, { fs:10, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – INTESTINAL OBSTRUCTION
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "09 Intestinal Obstruction",
"Second most common complication; four distinct mechanisms");
txt(sl,
"Intestinal obstruction accounts for 30–35% of all symptomatic presentations of Meckel's diverticulum and occurs at any age, though it is most common in older children and adults. Bilious vomiting, colicky abdominal pain, and progressive abdominal distension are the cardinal clinical features. CT scanning is the investigation of choice in suspected obstruction. Four mechanistically distinct causes are recognised:",
0.28, 0.88, 9.44, 1.05, { fs:12.2 });
hrule(sl, 2.02);
const mechs = [
{ t:"Intussusception",
b:"A broad-based diverticulum invaginates into the ileal lumen and is carried distally by peristalsis, acting as a pathological lead point for ileoileal or ileocolic intussusception. This is the dominant obstructive mechanism in children aged 4–10 years — in this age group, intussusception is almost always attributable to a Meckel's diverticulum. Classical features include colicky pain, vomiting, a palpable right-sided mass, and 'currant jelly' stools. Enema reduction has a lower success rate than for idiopathic intussusception; surgical resection is required to prevent recurrence." },
{ t:"Volvulus around a Persistent Band",
b:"A mesodiverticular or omphalomesenteric fibrous cord connecting the diverticulum tip to the abdominal wall or umbilicus serves as a fixed pivot point around which bowel loops rotate. Volvulus is an acute event that rapidly progresses to intestinal ischaemia and gangrene if not promptly relieved. It can occur at any age, including the neonatal period, and requires urgent surgical exploration." },
{ t:"Internal Herniation",
b:"Loops of small bowel may herniate through an aperture created by a mesodiverticular band or between the band and the abdominal wall, resulting in closed-loop or strangulating obstruction. This is less common than intussusception or volvulus but is an important cause of small bowel ischaemia in patients known to have a Meckel's diverticulum." },
{ t:"Littre's Hernia (Incarceration in Hernia Sac)",
b:"A Meckel's diverticulum may enter an inguinal or femoral hernia sac and become incarcerated or strangulated within it, constituting 'Littre's hernia'. The diagnosis is almost always made intraoperatively. Management requires reduction and resection of the diverticulum in addition to standard hernia repair. Femoral Littre's hernia is the rarest but carries a high strangulation risk." },
];
mechs.forEach((m, i) => {
const y = 2.1 + i * 0.84;
rect(sl, 0.28, y, 9.44, 0.77, i%2===0 ? P.offwht : P.white, P.silver);
sl.addText(m.t, { x:0.4,y:y+0.06,w:2.3,h:0.64, fontSize:10.8, bold:true, color:P.black, fontFace:"Calibri", wrap:true, valign:"top" });
rect(sl, 2.74, y+0.1, 0.02, 0.56, P.silver);
sl.addText(m.b, { x:2.84,y:y+0.04,w:6.8,h:0.69, fontSize:10, color:P.gray, fontFace:"Calibri", wrap:true, valign:"top" });
});
txt(sl, "In children > 4 years, intussusception is almost always secondary to Meckel's diverticulum. — Sleisenger & Fordtran",
0.28, 5.48, 9.44, 0.3, { fs:10, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – MECKEL'S DIVERTICULITIS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "10 Meckel's Diverticulitis",
"Clinical mimic of appendicitis; pathogenesis and surgical implications");
txt(sl,
"Meckel's diverticulitis accounts for 20–25% of symptomatic presentations and is more prevalent in adults than children. It is clinically and radiologically indistinguishable from acute appendicitis and is almost invariably diagnosed at exploratory laparotomy. The cardinal rule is: when a normal appendix is found at operation for suspected appendicitis — especially if free fluid or peritoneal soiling is present — the distal ileum must be inspected for an inflamed Meckel's diverticulum.",
0.28, 0.88, 9.44, 1.1, { fs:12.2 });
hrule(sl, 2.07);
ibox(sl, "Pathogenesis — Two Mechanisms",
"1. Intraluminal obstruction: Obstruction at the neck of the diverticulum by a faecolith, enterolith, or mucosal swelling causes bacterial proliferation, rising intraluminal pressure, mural ischaemia, and ultimately gangrene — identical to the pathogenesis of appendicitis.\n\n2. Peptic perforation: Acid from heterotopic gastric mucosa erodes through the full thickness of the diverticular wall, causing localised or generalised peritonitis.",
0.28, 2.15, 4.62, 1.6);
ibox(sl, "Clinical Features",
"• Periumbilical or central abdominal pain migrating to the right iliac fossa or mid-abdomen\n• Fever, tachycardia, anorexia, nausea\n• Point tenderness and guarding — may be midline or right-sided\n• Raised WBC count and CRP\n• Perforation in ~1/3 of cases — may produce generalised peritonitis resembling perforated peptic ulcer\n• Chronic form (Meckel's ileitis) mimics Crohn's disease",
5.1, 2.15, 4.62, 1.6);
ibox(sl, "Perforation & Peritonitis",
"Perforation complicates approximately one-third of cases of acute Meckel's diverticulitis. Contained perforation produces a localised peri-ileal abscess. Free perforation causes generalised peritonitis with diffuse rigidity, rebound tenderness, and systemic sepsis. The presentation may clinically resemble a perforated peptic ulcer rather than appendicitis, reflecting the acid-driven pathogenesis.",
0.28, 3.85, 4.62, 1.35);
ibox(sl, "Surgical Management of Diverticulitis",
"Resection of the inflamed diverticulum is mandatory at the time of surgical exploration. Simple diverticulectomy is appropriate when the base is narrow and uninvolved. When the surrounding ileum is gangrenous, perforated, or infiltrated, segmental bowel resection with primary anastomosis is required. If the appendix appears grossly normal and the patient's condition permits, incidental appendicectomy should be considered to prevent future diagnostic confusion.",
5.1, 3.85, 4.62, 1.35);
txt(sl, "'Meckel diverticulitis is clinically indistinguishable from appendicitis, and exploration is both diagnostic and therapeutic.' — Sabiston Textbook of Surgery",
0.28, 5.3, 9.44, 0.38, { fs:10, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – NEOPLASMS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "11 Neoplasms Arising in Meckel's Diverticulum",
"Uncommon but clinically important — often found on histological examination of resected specimens");
txt(sl,
"Neoplasms occur in approximately 0.5–3.2% of Meckel's diverticula and represent the malignant potential of the pluripotent vitelline duct epithelium as well as the chronic mucosal injury from heterotopic acid secretion. The diagnosis is almost always made postoperatively on histological examination. Their existence is an argument in favour of resecting incidentally found diverticula, particularly in younger patients.",
0.28, 0.88, 9.44, 1.0, { fs:12.2 });
hrule(sl, 1.97);
sl.addText("Histological Types — Sabiston Textbook of Surgery", {
x:0.28, y:2.04, w:9.44, h:0.3,
fontSize:11.5, bold:true, color:P.black, fontFace:"Calibri",
});
const tumours = [
["Neuroendocrine Tumour (NET / Carcinoid)","33–44%",
"Most common malignancy of Meckel's diverticulum. Arises from enterochromaffin cells. Most are small and discovered incidentally. Carcinoid syndrome occurs only with hepatic metastasis. Generally good prognosis for localised lesions."],
["Leiomyosarcoma","18–25%",
"Smooth muscle tumour. May present as an abdominal mass, GI bleeding from mucosal ulceration, or obstruction. Histological grade determines behaviour. High-grade variants have poor prognosis; complete resection is essential."],
["Adenocarcinoma","12–16%",
"Arises predominantly from areas of heterotopic gastric mucosa — typically at sites of chronic peptic ulceration. Risk may be increased by long-standing gastric heterotopia and chronic mucosal injury. Treated by segmental resection."],
["GIST (Gastrointestinal Stromal Tumour)","~12%",
"Arises from interstitial cells of Cajal (ICC). KIT or PDGFRA mutation-driven. May be discovered incidentally as a mural nodule on imaging, or may cause bleeding or obstruction. Management follows standard GIST protocols."],
["Lymphoma & Others","Rare",
"Primary GI lymphoma rarely involves the diverticulum as part of generalised small bowel disease. Pancreatic malignancies and other unusual histologies have been reported individually in the literature."],
];
tumours.forEach(([type, freq, desc], i) => {
const y = 2.42 + i * 0.595;
const bg = i%2===0 ? P.offwht : P.white;
rect(sl, 0.28, y, 9.44, 0.55, bg, P.silver);
sl.addText(type, { x:0.4,y:y+0.06,w:3.1,h:0.43, fontSize:10.5, bold:true, color:P.black, fontFace:"Calibri", wrap:true, valign:"top" });
rect(sl, 3.53, y+0.1, 0.02, 0.34, P.silver);
sl.addText(freq, { x:3.6,y:y+0.08,w:0.96,h:0.4, fontSize:12, bold:true, color:P.dkgray, fontFace:"Calibri", align:"center", valign:"middle" });
rect(sl, 4.6, y+0.1, 0.02, 0.34, P.silver);
sl.addText(desc, { x:4.7,y:y+0.06,w:4.94,h:0.44, fontSize:10, color:P.gray, fontFace:"Calibri", wrap:true, valign:"top" });
});
txt(sl, "Recent studies argue for resection of incidentally found diverticula because of their propensity to harbour malignancies. — Sabiston Textbook of Surgery",
0.28, 5.42, 9.44, 0.3, { fs:9.5, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – APPROACH TO DIAGNOSIS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "12 Approach to Diagnosis",
"Investigation strategy tailored to the presenting complication");
txt(sl,
"No single investigation reliably detects Meckel's diverticulum in all clinical situations, and the choice of investigation must be guided by the presenting complication. Standard plain radiographs, routine barium studies, and ultrasound are seldom directly diagnostic; investigations should be targeted at confirming the diverticulum as the source of the complication rather than establishing anatomy alone.",
0.28, 0.88, 9.44, 1.0, { fs:12.2 });
hrule(sl, 1.97);
const algos = [
{ pres:"Painless rectal bleeding (child / young adult)",
inv: "1st line: 99mTc-pertechnetate Meckel scan. If negative and bleeding persists: 99mTc-labelled RBC scan and/or mesenteric angiography. If stable: wireless capsule endoscopy or double-balloon enteroscopy. CT angiography increasingly used in adults. In haemodynamic instability: do not delay surgery for imaging." },
{ pres:"Intestinal obstruction",
inv: "CT abdomen: preferred first-line — may reveal a tubular blind-ending structure, intussusception, fat-stranding, free fluid. Contrast enema may reduce intussusception under radiological guidance (surgical backup essential). Volvulus and internal herniation require urgent operative exploration." },
{ pres:"Right iliac fossa pain / suspected diverticulitis",
inv: "CT abdomen: first-line — may show peri-ileal inflammatory mass, fat stranding, free fluid, localised pneumoperitoneum. Radiological distinction from appendicitis is often impossible. Diagnosis confirmed at laparoscopy or laparotomy when appendix is found to be normal." },
{ pres:"Incidental discovery",
inv: "No pre-operative investigation required. Decision for resection based on individualised risk stratification: age, sex, diverticulum length, palpable ectopic tissue, presence of a fibrous band." },
];
algos.forEach((a, i) => {
const y = 2.04 + i * 0.84;
rect(sl, 0.28, y, 9.44, 0.77, i%2===0 ? P.offwht : P.white, P.silver);
sl.addText("Presentation:", { x:0.4,y:y+0.03,w:4.5,h:0.18, fontSize:8.5, bold:true, color:P.silver, fontFace:"Calibri" });
sl.addText(a.pres, { x:0.4,y:y+0.22,w:3.1,h:0.5, fontSize:10.5, bold:true, color:P.black, fontFace:"Calibri", wrap:true, valign:"top" });
rect(sl, 3.55, y+0.1, 0.02, 0.56, P.silver);
sl.addText("Investigations:", { x:3.65,y:y+0.03,w:6.0,h:0.18, fontSize:8.5, bold:true, color:P.silver, fontFace:"Calibri" });
sl.addText(a.inv, { x:3.65,y:y+0.22,w:6.0,h:0.52, fontSize:10, color:P.gray, fontFace:"Calibri", wrap:true, valign:"top" });
});
txt(sl, "Standard abdominal plain films, barium contrast studies, and ultrasound are seldom helpful in making the diagnosis. — Sleisenger & Fordtran",
0.28, 5.42, 9.44, 0.3, { fs:9.5, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – MECKEL SCAN (with scan image)
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "13 Meckel Scan — 99mTc-Pertechnetate Scintigraphy",
"Investigation of choice for suspected bleeding Meckel's diverticulum");
// ── Left text ──
txt(sl,
"Technetium-99m pertechnetate ('Meckel scan') is the single most accurate diagnostic test for Meckel's diverticulum in children. Pertechnetate is taken up preferentially by the mucus-secreting cells of gastric mucosa — including ectopic gastric mucosa within the diverticulum — allowing focal uptake to be detected in the mid-abdomen.",
0.28, 0.88, 5.05, 1.0, { fs:11.8 });
txt(sl, "Performance characteristics:", 0.28, 1.95, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
const perf = [
"Sensitivity: 85–90% in children; falls to ~63% in adults",
"Specificity: ~95%",
"Accuracy: ~90% in paediatric age group",
"A negative scan does NOT exclude Meckel's diverticulum",
];
perf.forEach((p, i) => {
sl.addText("• "+p, { x:0.28, y:2.24+i*0.26, w:5.05, h:0.24, fontSize:11, color:P.gray, fontFace:"Calibri" });
});
txt(sl, "Enhancement strategies:", 0.28, 3.32, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
txt(sl,
"H2 receptor antagonists (cimetidine / ranitidine) — inhibit peptic secretion, retain pertechnetate in the diverticular wall. Glucagon — inhibits peristalsis, reduces washout. Pentagastrin — stimulates mucus-cell metabolism (rarely used; risk of perforation).",
0.28, 3.6, 5.05, 0.72, { fs:11.5 });
txt(sl,
"False negatives occur with: absent gastric mucosa, inflammatory oedema masking uptake, diverticular outlet obstruction, severe anaemia. In these cases: 99mTc-RBC scan, angiography, or surgical exploration.",
0.28, 4.38, 5.05, 0.78, { fs:11, italic:true, color:P.gray });
// ── Right image ──
sl.addImage({ data:IMG.scan, x:5.55, y:0.85, w:4.1, h:4.0 });
cap(sl,
"Fig. 3 — 99mTc-pertechnetate scintigram showing focal uptake in the mid-abdomen (Meckel's diverticulum, left), stomach (upper), and bladder (lower right). (Current Surgical Therapy 14e)",
5.55, 4.87, 4.1);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – AXR & CT (with AXR image)
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "14 Plain Radiography & CT Imaging",
"First-line cross-sectional investigations — findings and limitations");
// ── Left image ──
sl.addImage({ data:IMG.axr, x:0.28, y:0.86, w:4.1, h:4.15 });
cap(sl,
"Fig. 4 — Abdominal radiograph of a 2-year-old with peritonitis: dilated bowel loops, gas-fluid levels, and a saccular soft-tissue shadow of the diverticulum in the mid-abdomen (white arrows). (Grainger & Allison's Diagnostic Radiology)",
0.28, 5.03, 4.1);
// ── Right text ──
txt(sl, "Plain Abdominal Radiography", 4.65, 0.88, 5.05, 0.3, { fs:12, bold:true, color:P.black });
txt(sl,
"Rarely diagnostic but may show: dilated bowel loops with gas-fluid levels (obstruction or peritonitis), a saccular soft-tissue shadow in the mid-abdomen (inflamed diverticulum), an enterolith (radiodense, resembles appendicolith), and free intraperitoneal gas if perforation has occurred.",
4.65, 1.2, 5.05, 0.95, { fs:11.5 });
txt(sl, "CT Abdomen", 4.65, 2.22, 5.05, 0.28, { fs:12, bold:true, color:P.black });
txt(sl,
"CT is the imaging of choice for suspected obstruction, diverticulitis, or perforation. The diverticulum appears as a tubular, blind-ending structure on the antimesenteric border of the terminal ileum, with surrounding fat stranding when inflamed. It may be indistinguishable from a normal small bowel loop when non-inflamed. CT enterography (with luminal distension) substantially improves detection of the diverticulum itself.",
4.65, 2.52, 5.05, 1.15, { fs:11.5 });
txt(sl, "Barium Studies", 4.65, 3.74, 5.05, 0.28, { fs:12, bold:true, color:P.black });
txt(sl,
"Useful in patients with chronic symptoms after negative cross-sectional imaging. The characteristic finding is a saccular, blind-ending pouch on the antimesenteric border of the ileum with a triradiate mucosal fold pattern converging with the ileal lumen. However, barium studies have poor sensitivity for active complications.",
4.65, 4.04, 5.05, 0.95, { fs:11.5 });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – ADVANCED INVESTIGATIONS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "15 Advanced Investigations",
"When first-line investigations are negative or equivocal");
txt(sl,
"When Meckel scan and CT are inconclusive and clinical suspicion remains high, advanced endoscopic, angiographic, and nuclear medicine techniques are available. The choice depends on the urgency of the clinical situation, the patient's age and haemodynamic status, and the primary presenting complication.",
0.28, 0.88, 9.44, 0.88, { fs:12.2 });
const adv = [
{ t:"Mesenteric Angiography",
b:"Indicated in active or recent significant haemorrhage when Meckel scan is negative. Selective superior mesenteric artery catheterisation may identify the bleeding vessel and permit therapeutic embolisation. Requires active bleeding at ≥0.5–1 mL/min for a positive result." },
{ t:"99mTc-Labelled Red Blood Cell Scan",
b:"Detects active bleeding at rates as low as 0.1 mL/min. Images acquired over several hours. Localises bleeding to a bowel segment to guide surgical exploration. Less anatomically precise than angiography but useful for slower or intermittent bleeding." },
{ t:"CT Angiography",
b:"Increasingly used in adults with GI bleeding, particularly when Meckel scan sensitivity is limited. Can detect active haemorrhage and localise the bleeding vessel in the mesentery. Non-invasive; rapidly available in most emergency settings." },
{ t:"Wireless Capsule Endoscopy (WCE)",
b:"Has successfully detected Meckel's diverticula — including the diverticular orifice, marginal ulcer, and active bleeding. Useful in obscure GI bleeding after negative standard endoscopy. Contraindicated when obstruction is suspected." },
{ t:"Double-Balloon Enteroscopy (DBE)",
b:"Allows deep small bowel intubation with direct visualisation, biopsy capability, and potential therapeutic intervention. Both anterograde and retrograde approaches reach the mid-small bowel. Can directly visualise and sample the diverticular mucosa." },
{ t:"Intraoperative & Surgical Exploration",
b:"When all investigations are inconclusive and clinical urgency demands action, surgical exploration is both diagnostic and therapeutic. Intraoperative enteroscopy through a port-site or enterotomy allows full mucosal inspection. The entire small bowel from Treitz to the ileocaecal valve must be systematically examined." },
];
adv.forEach((a, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col===0 ? 0.28 : 5.12;
const y = 1.88 + row * 1.22;
ibox(sl, a.t, a.b, x, y, 4.64, 1.1, false);
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 18 – DIFFERENTIAL DIAGNOSIS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "16 Differential Diagnosis",
"Meckel's diverticulum is a great mimic — consider it in all the scenarios below");
txt(sl,
"Because Meckel's diverticulum can present as painless bleeding, obstruction, right-sided peritonism, or peritonitis, it enters the differential diagnosis across a wide range of conditions. Failure to consider it is the most common reason for preoperative misdiagnosis. The most important differential is acute appendicitis.",
0.28, 0.88, 9.44, 0.82, { fs:12.2 });
const diffs = [
{ pres:"Painless rectal bleeding\n(infant / child)", dd:"Intussusception · Juvenile polyp · Anal fissure · Allergic colitis · Infectious colitis · Milk protein allergy" },
{ pres:"GI bleeding\n(young adult < 30 yr)", dd:"Peptic ulcer disease · Inflammatory bowel disease · AVM / angiodysplasia · Small bowel tumour · HHT" },
{ pres:"Right iliac fossa pain\n(any age)", dd:"Acute appendicitis (most important) · Mesenteric adenitis · Right-sided colonic diverticulitis · Crohn's disease · Ovarian pathology · Renal colic" },
{ pres:"Small bowel obstruction", dd:"Adhesive obstruction · Hernia · Crohn's stricture · Small bowel tumour · Gallstone ileus · Intussusception (idiopathic)" },
{ pres:"Peritonitis / acute abdomen", dd:"Perforated appendicitis · Perforated peptic ulcer · Ischaemic bowel · Perforated Crohn's · Gynaecological emergencies" },
{ pres:"Umbilical anomaly\n(neonate)", dd:"Umbilical granuloma · Urachal fistula · Umbilical polyp · Omphalitis · Patent urachus · Vitello-intestinal fistula (other remnant)" },
{ pres:"Chronic periumbilical\n/ central abdominal pain", dd:"Irritable bowel syndrome · Crohn's disease · Chronic Meckel's ileitis (Crohn's mimic) · Adhesions · Mesenteric ischaemia" },
{ pres:"Incidental mid-abdominal\nmass on imaging", dd:"Enteric duplication cyst · Small bowel diverticulum · Appendix mucocoele · Mesenteric cyst · Small bowel GIST" },
];
diffs.forEach((d, i) => {
const y = 1.78 + i * 0.47;
const bg = i%2===0 ? P.offwht : P.white;
rect(sl, 0.28, y, 9.44, 0.43, bg, P.silver);
sl.addText(d.pres, { x:0.4,y:y+0.04,w:2.6,h:0.36, fontSize:10, bold:true, color:P.black, fontFace:"Calibri", wrap:true, valign:"middle" });
rect(sl, 3.04, y+0.08, 0.02, 0.27, P.silver);
sl.addText(d.dd, { x:3.12,y:y+0.04,w:6.52,h:0.36, fontSize:10, color:P.gray, fontFace:"Calibri", wrap:true, valign:"middle" });
});
txt(sl, "Always inspect the distal ileum when a normal appendix is found at laparotomy — particularly if free fluid or pus is present.",
0.28, 5.56, 9.44, 0.3, { fs:10, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 19 – SURGICAL MANAGEMENT: SYMPTOMATIC
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "17 Surgical Management — Symptomatic Meckel's Diverticulum",
"All symptomatic diverticula require prompt operative intervention");
txt(sl,
"The treatment of a symptomatic Meckel's diverticulum is surgical resection. The goals are to remove the diverticulum (and, when appropriate, the adjacent ileum), restore intestinal continuity, and address the complication that prompted surgery. Resuscitation must precede or run concurrently with operative intervention; haemodynamic instability should not be allowed to delay surgery beyond what is necessary for initial stabilisation.",
0.28, 0.88, 9.44, 1.05, { fs:12.2 });
hrule(sl, 2.02);
ibox(sl, "Diverticulectomy",
"Indicated for non-bleeding Meckel's diverticulitis with a narrow neck, and for incidental resection when the base is uninvolved. The diverticulum is excised at its base; the ileal defect is closed transversely (to prevent stenosis) by hand-sewn technique or stapling applied diagonally across the base. Widely accepted as safe for most presentations except haemorrhage.",
0.28, 2.1, 4.62, 1.48, false);
ibox(sl, "Segmental Ileal Resection & Anastomosis",
"REQUIRED for: (1) haemorrhage — the bleeding marginal ulcer lies in the adjacent ileum, not the diverticulum itself; diverticulectomy alone will leave the ulcer in situ. (2) Broad diverticular base precluding safe closure. (3) Palpable ectopic tissue at or near the base. (4) Gangrenous surrounding bowel. (5) Suspected neoplasm. End-to-end anastomosis follows resection.",
5.1, 2.1, 4.62, 1.48, false);
ibox(sl, "Preoperative & Intraoperative Steps",
"Pre-op: IV resuscitation (fluids / blood products); NG tube for obstruction; broad-spectrum antibiotics for diverticulitis or perforation. Intraop: systematically examine 60–100 cm of ileum from the ileocaecal valve. Palpate the diverticulum for thickening (suggests neoplasm). Inspect mesentery for fibrous bands. Consider incidental appendicectomy if appendix is normal.",
0.28, 3.68, 4.62, 1.42);
ibox(sl, "Special Considerations",
"• Haemodynamic instability: never delay exploration for imaging\n• Intussusception: air-enema reduction may be attempted but surgical resection of diverticulum remains necessary to prevent recurrence\n• Littre's hernia: resect diverticulum and repair hernia in same operation\n• Neoplasm suspected: oncological resection margins; formal segmental resection",
5.1, 3.68, 4.62, 1.42);
rect(sl, 0.28, 5.2, 9.44, 0.3, P.dkgray, P.dkgray);
sl.addText([
{ text:"Key principle: ", options:{ bold:true, color:P.white } },
{ text:"Segmental resection — not diverticulectomy — is required for haemorrhage. The marginal ulcer is in the adjacent ileum, not the diverticulum. — Sabiston Textbook of Surgery",
options:{ italic:true, color:P.silver } },
], { x:0.42, y:5.22, w:9.1, h:0.26, fontSize:10.2, fontFace:"Calibri", valign:"middle" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 20 – INCIDENTAL DISCOVERY & CONTROVERSIES
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "18 Incidentally Discovered Meckel's Diverticulum — Controversies",
"One of the most debated questions in GI surgery");
txt(sl,
"The management of an incidentally found Meckel's diverticulum has been debated for over 50 years. The landmark paper by Soltero and Bill (1976) estimated the lifetime complication risk in adults at less than 2% and recommended against routine prophylactic resection, given that the operative morbidity at the time reached 12%. This policy shaped surgical practice for decades. More recent data — improved surgical safety, risk of malignancy, and refined risk stratification — have reopened the debate.",
0.28, 0.88, 9.44, 1.12, { fs:12.2 });
hrule(sl, 2.1);
ibox(sl, "Arguments AGAINST Prophylactic Resection (Adults)",
"• Lifetime complication risk is low (2–6%); most diverticula remain asymptomatic\n• No reliable marker predicts which will become symptomatic\n• Adds operative time and risk to the index surgery\n• Morbidity of incidental resection historically ~12% (Soltero & Bill), though lower with modern technique\n• Mortality from elective diverticulectomy is non-zero",
0.28, 2.18, 4.62, 1.55, false);
ibox(sl, "Arguments FOR Prophylactic Resection (Adults)",
"• Complications can be life-threatening (obstruction, massive haemorrhage, perforation)\n• Modern laparoscopic technique has dramatically reduced operative morbidity\n• Risk of malignancy (0.5–3.2%) — often unsuspected from external examination alone\n• Risk is unevenly distributed — younger, male patients with palpable ectopic tissue at greatest risk\n• Net benefit may outweigh risk in appropriately selected patients",
5.1, 2.18, 4.62, 1.55, false);
hrule(sl, 3.84);
sl.addText("High-Risk Features Favouring Resection (Sabiston Textbook of Surgery)", {
x:0.28, y:3.9, w:9.44, h:0.3,
fontSize:11.5, bold:true, color:P.black, fontFace:"Calibri",
});
const factors = [
["Age < 50 years", "Risk of complications declines sharply after the fifth decade; younger patients derive greater benefit from prophylactic resection"],
["Male sex", "Male sex carries 2–3 times higher complication risk; independent risk factor in most series"],
["Length > 2 cm", "Longer diverticula are disproportionately represented in symptomatic series; a length threshold of 2 cm is widely cited"],
["Palpable ectopic tissue","Thickening or nodularity at the base suggests heterotopic mucosa and/or occult neoplasm; external palpation has moderate sensitivity"],
["Mesodiverticular band", "A persistent fibrous band confers ongoing risk of volvulus and internal herniation regardless of other features"],
];
factors.forEach(([f, d], i) => {
const y = 4.26 + i * 0.25;
sl.addText(`• ${f}: `, { x:0.4,y,w:2.2,h:0.22, fontSize:10.5, bold:true, color:P.black, fontFace:"Calibri" });
sl.addText(d, { x:2.3,y,w:7.35,h:0.22, fontSize:10.5, color:P.gray, fontFace:"Calibri", wrap:true });
});
txt(sl, "In children: most authorities recommend resection. In adults: individualise decision. — Current Surgical Therapy 14e",
0.28, 5.54, 9.44, 0.3, { fs:9.5, italic:true, color:P.silver, align:"center" });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 21 – LAPAROSCOPIC APPROACH (with operative image)
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: P.white };
headBar(sl, "19 Laparoscopic Approach",
"Preferred technique in experienced centres — equivalent outcomes to open surgery");
// ── Left text ──
txt(sl,
"Laparoscopic resection of Meckel's diverticulum has become the standard surgical approach in experienced centres. Retrospective studies consistently demonstrate equivalent oncological and functional outcomes compared with open resection, with the established benefits of minimally invasive surgery: reduced postoperative pain, shorter hospital stay, faster return to normal activity, and improved cosmesis.",
0.28, 0.88, 5.05, 1.1, { fs:11.8 });
txt(sl, "Operative steps:", 0.28, 2.04, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
txt(sl,
"Typically 3–4 ports are placed. The terminal ileum is identified at the ileocaecal valve and run proximally until the diverticulum is found. The diverticulum is elevated and its base assessed for width and induration. Diverticulectomy is performed with a linear endoscopic stapler applied diagonally across the base. When segmental resection is required, a small extension of one port site allows exteriorisation for open stapling or hand-sewn anastomosis.",
0.28, 2.32, 5.05, 1.3, { fs:11.5 });
txt(sl, "Conversion to open:", 0.28, 3.7, 5.05, 0.26, { fs:11.8, bold:true, color:P.black });
txt(sl,
"Required in the setting of: generalised peritonitis with faecal contamination, dense adhesions, massive uncontrolled haemorrhage, or suspected neoplasm requiring an oncological margin. The threshold for conversion should be low in emergency presentations.",
0.28, 3.98, 5.05, 0.92, { fs:11.5 });
txt(sl,
"Diagnostic laparoscopy is valuable when the preoperative diagnosis is uncertain: it permits systematic inspection of the entire distal small bowel from the ileocaecal valve when the appendix is found normal at laparoscopy for suspected appendicitis.",
0.28, 4.97, 5.05, 0.72, { fs:11.5, italic:true, color:P.gray });
// ── Right image ──
sl.addImage({ data:IMG.op, x:5.55, y:0.85, w:4.1, h:4.2 });
cap(sl,
"Fig. 5 — Operative photograph of Meckel's diverticulum showing the diverticulum projecting from the antimesenteric border of the ileum with its dedicated vitelline blood supply running in the wall. (Bailey & Love's Short Practice of Surgery, 28th ed.)",
5.55, 5.07, 4.1);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 22 – SUMMARY & KEY POINTS
// ════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
rect(sl, 0, 0, 10, 5.625, P.ink);
rect(sl, 0, 0, 10, 0.72, P.black);
sl.addText("SUMMARY & KEY POINTS", {
x:0.3, y:0.1, w:9.4, h:0.52,
fontSize:22, bold:true, color:P.white, fontFace:"Calibri", align:"center", charSpacing:5,
});
rect(sl, 0.28, 0.76, 9.44, 0.025, P.gray);
const pts = [
"Meckel's diverticulum is the most common congenital GI anomaly — prevalence ~2%, arising from failed involution of the vitelline duct at 5–8 weeks gestation.",
"It is a TRUE diverticulum (all three bowel wall layers), always on the ANTIMESENTERIC border of the ileum, within 60 cm of the ileocaecal valve.",
"Rule of 2's: 2% prevalence · 2 feet from ICV · 2 inches long · 2:1 M:F ratio · symptomatic before age 2 · two types of heterotopic tissue · 2% complication rate · two symptom types.",
"Heterotopic gastric mucosa (80–85% of ectopic tissue) → HCl secretion → marginal ulcer at gastric–ileal junction → PAINLESS rectal bleeding (most common complication in children < 2 yr).",
"Obstruction (30–35%): four mechanisms — intussusception (dominant in children >4 yr), volvulus around fibrous band, internal herniation, and Littre's hernia (incarceration in inguinal/femoral sac).",
"Meckel's diverticulitis (20–25%) is clinically identical to appendicitis. Perforation occurs in ~1/3. Always inspect the ileum when appendix is normal at laparotomy.",
"Neoplasms in 0.5–3.2%: NET/carcinoid (33–44%) > leiomyosarcoma > adenocarcinoma > GIST > lymphoma.",
"Investigation of choice for bleeding: 99mTc-pertechnetate Meckel scan (sensitivity 85–90% children, ~63% adults). CT for obstruction / diverticulitis. Capsule endoscopy / DBE for obscure bleeding.",
"Symptomatic diverticula → always operate. For haemorrhage → SEGMENTAL resection (ulcer in adjacent ileum). For other indications → diverticulectomy or segmental resection as appropriate. Laparoscopic preferred.",
"Incidental in adults → individualise: resect if age < 50, male sex, length > 2 cm, ectopic tissue palpable, or fibrous band present. Children → resect routinely.",
];
pts.forEach((pt, i) => {
const y = 0.87 + i * 0.475;
rect(sl, 0.28, y+0.04, 0.22, 0.27, P.gray, P.gray);
sl.addText(`${i+1}`, { x:0.28,y:y+0.02,w:0.22,h:0.3, fontSize:9, bold:true, color:P.ink, fontFace:"Calibri", align:"center", valign:"middle" });
sl.addText(pt, { x:0.56,y:y+0.02,w:9.1,h:0.44, fontSize:10, color:P.offwht, fontFace:"Calibri", wrap:true, valign:"top" });
});
}
// ════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ════════════════════════════════════════════════════════════════════════════
const outPath = "/home/daytona/workspace/meckel-diverticulum-ppt/Meckel_Diverticulum_v3.pptx";
pres.writeFile({ fileName: outPath })
.then(() => console.log("SUCCESS: " + outPath))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
Try once again to make a ppt
ls /home/daytona/workspace/meckel-diverticulum-ppt/ && echo "---" && node /home/daytona/workspace/meckel-diverticulum-ppt/build3.js 2>&1
Meckel Diverticulum v3
Presentation · PPTX
| Slides | Topics Covered |
|---|---|
| 1–2 | Title + Table of Contents |
| 3–4 | Historical Background · Embryology & Vitelline Duct |
| 5–6 | Epidemiology & Rule of 2's · Gross Anatomy (with Robbins gross specimen photo) |
| 7–8 | Histology & Heterotopic Tissue (with Sabiston surgical specimen photo) · Spectrum of Omphalomesenteric Remnants |
| 9–10 | Clinical Presentations Overview (frequency table) · GI Haemorrhage |
| 11–12 | Intestinal Obstruction (4 mechanisms) · Meckel's Diverticulitis |
| 13–14 | Neoplasms (NET, leiomyosarcoma, adenocarcinoma, GIST) · Approach to Diagnosis |
| 15–16 | Meckel Scan / 99mTc scintigraphy (with scan image) · AXR & CT Imaging (with plain radiograph) |
| 17–18 | Advanced Investigations · Differential Diagnosis |
| 19–20 | Surgical Management — Symptomatic · Incidental Discovery & Controversies |
| 21–22 | Laparoscopic Approach (with operative photo) · Summary & 10 Key Points |