Merge these two ppt & make one out of it on topic mesenteric ischemia which is with simple background & use little bit tables & flowchart format & images taken from standard textbook & not just paragraphic type …
cd /home/daytona/workspace && python -m markitdown "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/mesenteric ischemia.pptx" 2>/dev/null | head -300
cd /home/daytona/workspace && python -m markitdown "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/mesenteric ischemia.pptx" 2>&1 | cat
cd /home/daytona/workspace && python3 -c " from pptx import Presentation import sys path1 = '/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/mesenteric ischemia.pptx' prs = Presentation(path1) print(f'=== FILE 1: mesenteric ischemia.pptx - {len(prs.slides)} slides ===') for i, slide in enumerate(prs.slides): print(f'--- Slide {i+1} ---') for shape in slide.shapes: if shape.has_text_frame: for para in shape.text_frame.paragraphs: text = para.text.strip() if text: print(text) " 2>&1
which node && node --version && ls /home/daytona/skills/pptx/scripts/ 2>/dev/null || ls /home/daytona/skills/pptx/ 2>/dev/null
ls /home/daytona/skills/pptx/ && ls /home/daytona/skills/pptx/office/ 2>/dev/null
ls /home/daytona/skills/pptx/scripts/ && python3 /home/daytona/skills/pptx/scripts/thumbnail.py --help 2>&1 | head -20
ls /home/daytona/skills/pptx/scripts/office/ 2>/dev/null && ls /home/daytona/skills/shared/scripts/ 2>/dev/null
mkdir -p /home/daytona/workspace/mesenteric-ischemia && python3 /home/daytona/skills/pptx/scripts/office/unpack.py "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/mesenteric ischemia.pptx" /home/daytona/workspace/mesenteric-ischemia/unpacked1/ 2>&1 && echo "DONE"
cd /home/daytona/workspace/mesenteric-ischemia && unzip -o "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/mesenteric ischemia.pptx" -d unpacked1/ 2>&1 | tail -5 && echo "Done"
ls -la "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/" 2>&1
cp "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/mesenteric ischemia.pptx" /home/daytona/workspace/mesenteric-ischemia/ppt1.pptx && cp "/home/daytona/workspace/attachments/0f2ab5db-433b-4a7d-8b03-41b86e7ff2e2/Mesenteric_Ischemia_Surgery_v2.pptx" /home/daytona/workspace/mesenteric-ischemia/ppt2.pptx && echo "Copied"
cd /home/daytona/workspace/mesenteric-ischemia && unzip -o ppt1.pptx -d unpacked1/ 2>&1 | tail -3 && echo "DONE1"
timeout 10 python3 -c " import zipfile path = '/home/daytona/workspace/mesenteric-ischemia/ppt1.pptx' with zipfile.ZipFile(path, 'r') as z: names = z.namelist() print('Files:', len(names)) slides = [n for n in names if 'ppt/slides/slide' in n and '.xml' in n and 'rels' not in n] print('Slides:', sorted(slides)) " 2>&1
timeout 30 python3 -c " import zipfile, re def extract_text(path): with zipfile.ZipFile(path, 'r') as z: names = z.namelist() slides = sorted([n for n in names if 'ppt/slides/slide' in n and n.endswith('.xml') and 'rels' not in n], key=lambda x: int(re.search(r'slide(\d+)', x).group(1))) results = [] for sname in slides: content = z.read(sname).decode('utf-8', errors='ignore') # Extract all text runs texts = re.findall(r'<a:t[^>]*>(.*?)</a:t>', content, re.DOTALL) slide_text = ' | '.join([t.strip() for t in texts if t.strip()]) results.append((sname, slide_text[:300])) return results print('=== PPT1 ===') for s, t in extract_text('/home/daytona/workspace/mesenteric-ischemia/ppt1.pptx'): print(f'{s}: {t}') " 2>&1
timeout 30 python3 -c " import zipfile, re def extract_text(path): with zipfile.ZipFile(path, 'r') as z: names = z.namelist() slides = sorted([n for n in names if 'ppt/slides/slide' in n and n.endswith('.xml') and 'rels' not in n], key=lambda x: int(re.search(r'slide(\d+)', x).group(1))) results = [] for sname in slides: content = z.read(sname).decode('utf-8', errors='ignore') texts = re.findall(r'<a:t[^>]*>(.*?)</a:t>', content, re.DOTALL) slide_text = ' | '.join([t.strip() for t in texts if t.strip()]) results.append((sname, slide_text[:400])) return results print('=== PPT2 ===') for s, t in extract_text('/home/daytona/workspace/mesenteric-ischemia/ppt2.pptx'): print(f'{s}: {t}') " 2>&1
~/mesenteric-ischemia/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Mesenteric Ischemia – Comprehensive Surgical Review";
pres.author = "Surgical Education";
// ─────────────────────────────────────────────
// COLOUR PALETTE (clean, clinical, white background)
// ─────────────────────────────────────────────
const C = {
navy: "1A3557", // dark navy – title bars, headers
teal: "1A7A8A", // teal accent – section banners
red: "C0392B", // danger / warning callouts
orange: "E67E22", // amber highlights
green: "1E8449", // good outcomes
lightBg: "F0F4F8", // slide background (very light blue-grey)
white: "FFFFFF",
darkText: "1A2332",
midText: "2C3E50",
subText: "4A5568",
tableHdr: "1A3557",
tableRow: "EAF0F6",
tableAlt: "FFFFFF",
border: "B0BEC5",
};
// ─────────────────────────────────────────────
// HELPERS
// ─────────────────────────────────────────────
function addSlide(bg) {
const sl = pres.addSlide();
sl.background = { color: bg || C.lightBg };
return sl;
}
function sectionBanner(slide, label) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.45, fill: { color: C.teal }, line: { color: C.teal } });
slide.addText(label.toUpperCase(), {
x: 0.18, y: 0.04, w: 9.6, h: 0.38,
fontSize: 9, bold: true, color: C.white, charSpacing: 2
});
}
function slideTitle(slide, title, sub) {
// navy bar at top
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.45, w: 10, h: 0.72, fill: { color: C.navy }, line: { color: C.navy } });
slide.addText(title, {
x: 0.25, y: 0.47, w: 9.5, h: 0.66,
fontSize: 22, bold: true, color: C.white, valign: "middle"
});
if (sub) {
slide.addText(sub, {
x: 0.25, y: 1.22, w: 9.5, h: 0.32,
fontSize: 11, color: C.teal, italic: true
});
}
}
function bullet(text, indent, bold) {
return {
text,
options: {
bullet: { indent: indent || 10 },
fontSize: 13,
color: bold ? C.navy : C.darkText,
bold: !!bold,
breakLine: true,
paraSpaceAfter: 3,
}
};
}
function divider(slide, y) {
slide.addShape(pres.ShapeType.line, {
x: 0.3, y, w: 9.4, h: 0,
line: { color: C.border, width: 0.8 }
});
}
// ─────────────────────────────────────────────
// 1. TITLE SLIDE
// ─────────────────────────────────────────────
{
const sl = addSlide(C.navy);
// decorative top stripe
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
// large white title
sl.addText("MESENTERIC ISCHEMIA", {
x: 0.6, y: 0.9, w: 8.8, h: 1.1,
fontSize: 42, bold: true, color: C.white, align: "center", charSpacing: 3
});
sl.addShape(pres.ShapeType.rect, { x: 2.5, y: 2.1, w: 5, h: 0.07, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("A COMPREHENSIVE SURGICAL REVIEW", {
x: 0.5, y: 2.25, w: 9, h: 0.55,
fontSize: 17, color: C.teal, align: "center", charSpacing: 1.5
});
sl.addText([
{ text: "Presenter: Dr. Jeet Vaghasiya (R3SU1) | ", options: { fontSize: 12, color: "A8C0D6" } },
{ text: "Chairperson: Dr. Ketan Mehta (MS), Dr. Girish Parmar (MS)", options: { fontSize: 12, color: "A8C0D6" } }
], { x: 0.5, y: 3.1, w: 9, h: 0.4, align: "center" });
sl.addText("Based on: Schwartz's Principles of Surgery 11e · Sabiston Textbook of Surgery · Current Surgical Therapy 14e", {
x: 0.5, y: 3.65, w: 9, h: 0.4,
fontSize: 9.5, color: "7A9BBF", align: "center", italic: true
});
sl.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.42, fill: { color: "122540" }, line: { color: "122540" } });
sl.addText("General Surgery · 2026", {
x: 0.5, y: 5.22, w: 9, h: 0.36,
fontSize: 10, color: "7A9BBF", align: "center"
});
}
// ─────────────────────────────────────────────
// 2. LECTURE OUTLINE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Overview");
slideTitle(sl, "Lecture Outline", null);
const topics = [
"1. Introduction & Historical Perspective",
"2. Epidemiology & Mortality Data",
"3. Vascular Anatomy — SMA & Collaterals",
"4. Classification of Mesenteric Ischemia",
"5. Pathophysiology — Ischemia Timeline",
"6. Embolic vs. Thrombotic vs. NOMI vs. MVT",
"7. Clinical Presentation & Differential Diagnosis",
"8. Diagnostic Investigations (Labs + CTA)",
"9. Surgical & Endovascular Management of AMI",
"10. Chronic Mesenteric Ischemia — Workup & Revascularization",
"11. Special Scenarios, Complications & Outcomes",
];
const col1 = topics.slice(0, 6);
const col2 = topics.slice(6);
const mkItems = (arr) => arr.map(t => ({ text: t, options: { fontSize: 13, color: C.darkText, bullet: { indent: 8 }, breakLine: true, paraSpaceAfter: 5 } }));
sl.addText(mkItems(col1), { x: 0.3, y: 1.58, w: 4.6, h: 3.8 });
sl.addShape(pres.ShapeType.line, { x: 5.0, y: 1.6, w: 0, h: 3.7, line: { color: C.border, width: 0.8 } });
sl.addText(mkItems(col2), { x: 5.15, y: 1.58, w: 4.6, h: 3.8 });
}
// ─────────────────────────────────────────────
// 3. HISTORICAL MILESTONES TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 1 — Introduction & Epidemiology");
slideTitle(sl, "Historical Perspective & Epidemiology");
// Table
const rows = [
[{ text: "Year", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Milestone", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } }],
["1869", "First description of mesenteric ischemia — Chienne"],
["1895", "First intestinal resection & reanastomosis — Elliot"],
["1951", "First SMA embolectomy — Klass"],
["1957", "First successful embolectomy without bowel resection — Shaw & Maynard"],
["1980s", "Endovascular treatment of mesenteric disease introduced"],
["2000s+", "Endovascular-first strategies; improved CT imaging — paradigm shift"],
];
sl.addTable(rows, {
x: 0.3, y: 1.6, w: 9.4, h: 3.4,
colW: [1.2, 8.2],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.44,
fontFace: "Calibri",
fontSize: 12,
color: C.darkText,
align: "left",
valign: "middle",
});
// Epi callout box bottom
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.05, w: 9.4, h: 0.45,
fill: { color: "EBF5FB" }, line: { color: C.teal, width: 1 } });
sl.addText("Epidemiology: < 1/100,000 admissions · Median age 74 yrs · Incidence doubles per 5-yr interval >70 · 3× higher in females · Overall AMI mortality ~17–21%", {
x: 0.4, y: 5.07, w: 9.2, h: 0.4,
fontSize: 10.5, color: C.teal, italic: false
});
}
// ─────────────────────────────────────────────
// 4. CLASSIFICATION TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 3 — Classification");
slideTitle(sl, "Classification of Mesenteric Ischemia");
const rows = [
[
{ text: "Type", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "% of AMI", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Mechanism", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Key Feature", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
],
[
{ text: "Arterial Embolism", options: { bold: true } },
"40–50%",
"Cardiac source → SMA lodging",
"Abrupt onset; proximal jejunum/R colon spared"
],
[
{ text: "Arterial Thrombosis", options: { bold: true } },
"20–35%",
"Atherosclerotic occlusion at SMA origin",
"History of CMI symptoms; diffuse ischemia"
],
[
{ text: "NOMI", options: { bold: true } },
"~20%",
"Mesenteric vasoconstriction; low-flow state",
"ICU patients; vasopressors; no occlusion on CTA"
],
[
{ text: "Mesenteric Venous Thrombosis", options: { bold: true } },
"5–15%",
"Portal/SMV thrombosis → venous hypertension",
"Subacute; anticoagulation; best prognosis"
],
[
{ text: "Chronic MI (CMI)", options: { bold: true } },
"—",
"Progressive atherosclerosis ≥2 visceral vessels",
"Food fear; weight loss; postprandial pain"
],
];
sl.addTable(rows, {
x: 0.2, y: 1.58, w: 9.6, h: 3.8,
colW: [2.1, 1.0, 3.4, 3.1],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.6,
fontFace: "Calibri",
fontSize: 11.5,
color: C.darkText,
align: "left",
valign: "middle",
});
}
// ─────────────────────────────────────────────
// 5. VASCULAR ANATOMY
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 2 — Vascular Anatomy");
slideTitle(sl, "Mesenteric Vascular Anatomy & Collaterals");
// Left panel – anatomy text
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.58, w: 4.55, h: 0.32,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("Three Major Mesenteric Arteries", {
x: 0.3, y: 1.59, w: 4.45, h: 0.3,
fontSize: 11, bold: true, color: C.white
});
sl.addText([
bullet("Celiac Artery — foregut (stomach → proximal duodenum, liver, spleen)", 10),
bullet("Superior Mesenteric Artery (SMA) — midgut (distal duodenum → 2/3 transverse colon)", 10),
bullet("Inferior Mesenteric Artery (IMA) — hindgut (splenic flexure → rectum)", 10),
bullet("SMA: 2nd branch of aorta; oblique angle → thromboemboli preferentially lodge here", 10),
bullet("50% of emboli settle distal to middle colic a. origin", 10),
], { x: 0.3, y: 1.92, w: 4.45, h: 2.0 });
divider(sl, 3.95);
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 4.0, w: 4.55, h: 0.32,
fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Key Collateral Pathways", {
x: 0.3, y: 4.01, w: 4.45, h: 0.3,
fontSize: 11, bold: true, color: C.white
});
sl.addText([
bullet("Celiac ↔ SMA: Pancreaticoduodenal arcade", 10),
bullet("SMA ↔ IMA: Marginal artery of Drummond", 10),
bullet("SMA ↔ IMA: Arc of Riolan (meandering mesenteric a.)", 10),
bullet("IMA ↔ Internal iliac: Hemorrhoidal arteries", 10),
], { x: 0.3, y: 4.34, w: 4.45, h: 1.2 });
// Right panel – anatomy diagram (shapes)
sl.addShape(pres.ShapeType.rect, { x: 5.05, y: 1.58, w: 4.7, h: 4.0,
fill: { color: "EBF5FB" }, line: { color: C.border } });
sl.addText("MESENTERIC ARTERIAL TREE", {
x: 5.1, y: 1.65, w: 4.6, h: 0.3,
fontSize: 10, bold: true, color: C.navy, align: "center"
});
// Aorta (vertical bar)
sl.addShape(pres.ShapeType.rect, { x: 7.3, y: 2.1, w: 0.18, h: 3.1,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("AORTA", { x: 7.52, y: 3.4, w: 0.8, h: 0.25, fontSize: 8, bold: true, color: C.navy });
// Celiac
sl.addShape(pres.ShapeType.line, { x: 6.25, y: 2.25, w: 1.05, h: 0, line: { color: C.teal, width: 2 } });
sl.addShape(pres.ShapeType.ellipse, { x: 5.55, y: 2.12, w: 0.72, h: 0.28, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Celiac", { x: 5.55, y: 2.14, w: 0.72, h: 0.24, fontSize: 8, bold: true, color: C.white, align: "center" });
// SMA
sl.addShape(pres.ShapeType.line, { x: 6.25, y: 3.0, w: 1.05, h: 0, line: { color: C.orange, width: 2.5 } });
sl.addShape(pres.ShapeType.ellipse, { x: 5.45, y: 2.87, w: 0.85, h: 0.28, fill: { color: C.orange }, line: { color: C.orange } });
sl.addText("SMA", { x: 5.45, y: 2.89, w: 0.85, h: 0.24, fontSize: 9, bold: true, color: C.white, align: "center" });
// IMA
sl.addShape(pres.ShapeType.line, { x: 6.25, y: 3.75, w: 1.05, h: 0, line: { color: C.green, width: 2 } });
sl.addShape(pres.ShapeType.ellipse, { x: 5.55, y: 3.62, w: 0.72, h: 0.28, fill: { color: C.green }, line: { color: C.green } });
sl.addText("IMA", { x: 5.55, y: 3.64, w: 0.72, h: 0.24, fontSize: 8, bold: true, color: C.white, align: "center" });
// Collateral arrows
sl.addShape(pres.ShapeType.line, { x: 5.9, y: 2.72, w: 0, h: 0.2, line: { color: C.red, width: 1.5 } });
sl.addText("↕ Collateral", { x: 5.75, y: 2.9, w: 1.1, h: 0.2, fontSize: 7.5, color: C.red, italic: true });
sl.addShape(pres.ShapeType.line, { x: 5.9, y: 3.46, w: 0, h: 0.2, line: { color: C.red, width: 1.5 } });
sl.addText("↕ Collateral", { x: 5.75, y: 3.65, w: 1.1, h: 0.2, fontSize: 7.5, color: C.red, italic: true });
sl.addText("Clinical pearl: Ischemia typically requires ≥2 of 3 vessels to be compromised due to abundant collaterals", {
x: 5.1, y: 4.8, w: 4.55, h: 0.55,
fontSize: 9.5, color: C.red, italic: true, wrap: true
});
}
// ─────────────────────────────────────────────
// 6. PATHOPHYSIOLOGY TIMELINE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 4 — Pathophysiology");
slideTitle(sl, "Pathophysiology — Ischemia Timeline", '"Time is Bowel — Minutes Matter"');
// Timeline flowchart using shapes
const boxes = [
{ label: "0 – 3 hrs", desc: "Mucosal sloughing\nBacterial translocation\nVillous tip necrosis", color: C.orange },
{ label: "3 – 6 hrs", desc: "Full-thickness\nischemia begins\nWall oedema, haemorrhage", color: "E74C3C" },
{ label: "> 6 hrs", desc: "FULL-THICKNESS\nINFARCTION\nIrreversible necrosis", color: C.red },
{ label: "Late / Untreated", desc: "Peritonitis\nSeptic shock\nMulti-organ failure\nDEATH", color: "7B241C" },
];
boxes.forEach((b, i) => {
const x = 0.35 + i * 2.38;
// Box
sl.addShape(pres.ShapeType.rect, { x, y: 1.72, w: 2.1, h: 1.6,
fill: { color: b.color }, line: { color: b.color } });
sl.addText(b.label, { x, y: 1.74, w: 2.1, h: 0.36, fontSize: 12, bold: true, color: C.white, align: "center" });
sl.addText(b.desc, { x, y: 2.12, w: 2.1, h: 1.16, fontSize: 10.5, color: C.white, align: "center", valign: "middle", wrap: true });
// Arrow
if (i < 3) {
sl.addShape(pres.ShapeType.line, { x: x + 2.1, y: 2.52, w: 0.28, h: 0, line: { color: C.midText, width: 2 } });
sl.addText("▶", { x: x + 2.14, y: 2.43, w: 0.2, h: 0.2, fontSize: 10, color: C.midText });
}
});
// Cascade box
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.5, w: 9.4, h: 0.32,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("PATHOPHYSIOLOGICAL CASCADE", {
x: 0.35, y: 3.51, w: 9.3, h: 0.3,
fontSize: 11, bold: true, color: C.white, charSpacing: 1.5
});
sl.addText([
{ text: "Reduced intestinal blood flow → ", options: { fontSize: 12, color: C.darkText } },
{ text: "Mucosal hypoxia → ", options: { fontSize: 12, color: C.orange } },
{ text: "Villous tip necrosis → ", options: { fontSize: 12, color: "E74C3C" } },
{ text: "Barrier disruption → ", options: { fontSize: 12, color: C.red } },
{ text: "Bacterial translocation → ", options: { fontSize: 12, color: "7B241C" } },
{ text: "Cytokine release → MODS", options: { fontSize: 12, bold: true, color: "7B241C" } },
], { x: 0.3, y: 3.85, w: 9.4, h: 0.45, wrap: true });
// Reperfusion injury box
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.38, w: 9.4, h: 0.95,
fill: { color: "FDFEFE" }, line: { color: C.orange, width: 1.5 } });
sl.addText([
{ text: "⚠ Reperfusion Injury: ", options: { bold: true, fontSize: 12, color: C.orange } },
{ text: "Restoration of blood flow → xanthine oxidase activation → superoxide radicals → lipid peroxidation → endothelial damage. ", options: { fontSize: 11.5, color: C.darkText } },
{ text: "Injury can EXCEED the original ischaemic insult.", options: { bold: true, fontSize: 11.5, color: C.red } },
], { x: 0.45, y: 4.43, w: 9.1, h: 0.8, wrap: true });
}
// ─────────────────────────────────────────────
// 7. EMBOLIC vs THROMBOTIC TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 4 — Pathophysiology");
slideTitle(sl, "Embolic vs. Thrombotic AMI — Key Differences");
const rows = [
[
{ text: "Feature", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Arterial EMBOLISM", options: { bold: true, color: C.white, fill: { color: "1A6080" } } },
{ text: "Arterial THROMBOSIS", options: { bold: true, color: C.white, fill: { color: "7B3A10" } } },
],
["% of AMI", "40–50%", "20–35%"],
["Source", "Cardiac (AF, LV thrombus, valvular)", "Atherosclerotic plaque at SMA origin"],
["Onset", "ABRUPT — no collateral protection", "Acute on chronic (gradual collaterals present)"],
["Location of lodging", "50% distal to middle colic a.; 15% at SMA origin", "SMA origin / proximal CA; pre-existing stenosis"],
["Bowel at risk", "Mid-jejunum → ascending colon; proximal jejunum SPARED", "Near-total small bowel (including proximal jejunum)"],
["Prior symptoms", "Usually none — sudden event", "Often history of post-prandial pain, weight loss"],
["Associated cardiac Dx", "95% have cardiac disease; 68% simultaneous emboli elsewhere", "Generalised PVD, renal artery disease, prior vascular Sx"],
["Operative approach", "SMA embolectomy (transverse arteriotomy)", "Bypass (antegrade / retrograde) or endarterectomy"],
];
sl.addTable(rows, {
x: 0.2, y: 1.6, w: 9.6, h: 3.9,
colW: [2.2, 3.7, 3.7],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.43,
fontFace: "Calibri",
fontSize: 10.8,
color: C.darkText,
align: "left",
valign: "middle",
});
}
// ─────────────────────────────────────────────
// 8. NOMI + MVT TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 4 — Pathophysiology");
slideTitle(sl, "NOMI & Mesenteric Venous Thrombosis");
// NOMI left
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.6, w: 4.6, h: 0.35,
fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("NOMI — Non-Occlusive Mesenteric Ischemia (~20%)", {
x: 0.3, y: 1.61, w: 4.5, h: 0.32,
fontSize: 10.5, bold: true, color: C.white
});
sl.addText([
bullet("Mechanism: Mesenteric vasoconstriction + intestinal hypoxaemia + reperfusion injury", 8),
bullet("Low-flow state: body prioritises cardiac/cerebral perfusion at expense of gut", 8),
bullet("Triggers: Cardiogenic shock, hypovolaemia, vasopressors, digitalis toxicity, dialysis, post-cardiac surgery, severe sepsis", 8),
bullet("CTA: No occlusion — 'pruning' of mesenteric vessels, vasospasm pattern", 8),
bullet("Treatment: Treat underlying cause + intra-arterial papaverine/vasodilators", 8),
bullet("Surgery only if peritonitis or bowel necrosis", 8),
], { x: 0.3, y: 1.98, w: 4.5, h: 3.45 });
// MVT right
sl.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.6, w: 4.6, h: 0.35,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("Mesenteric Venous Thrombosis (5–15%)", {
x: 5.2, y: 1.61, w: 4.5, h: 0.32,
fontSize: 10.5, bold: true, color: C.white
});
sl.addText([
bullet("Mechanism: Portal/SMV thrombosis → venous hypertension → bowel wall oedema & ischaemia", 8),
bullet("Risk factors: Hypercoagulable state (Factor V Leiden, protein C/S deficiency, JAK2), portal HTN, malignancy, OCP, abdominal sepsis", 8),
bullet("Presentation: Subacute (days–weeks) abdominal pain; often less dramatic than arterial AMI", 8),
bullet("CTA (venous phase): SMV/portal thrombus; bowel wall thickening; mesenteric fat stranding", 8),
bullet("Treatment: ANTICOAGULATION (heparin → warfarin/DOAC) — cornerstone", 8),
bullet("Surgery: Only for frank bowel necrosis; best overall prognosis of all AMI types", 8),
], { x: 5.2, y: 1.98, w: 4.5, h: 3.45 });
sl.addShape(pres.ShapeType.line, { x: 4.97, y: 1.6, w: 0, h: 3.8, line: { color: C.border, width: 0.8 } });
}
// ─────────────────────────────────────────────
// 9. CLINICAL PRESENTATION
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 5 — Clinical Presentation");
slideTitle(sl, "Clinical Presentation", "The diagnosis is clinical first, imaging second");
// AMI box
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.6, w: 4.6, h: 0.35,
fill: { color: C.red }, line: { color: C.red } });
sl.addText("ACUTE Mesenteric Ischemia — HALLMARKS", {
x: 0.3, y: 1.61, w: 4.5, h: 0.32,
fontSize: 10.5, bold: true, color: C.white
});
sl.addText([
{ text: "⚠ Pain OUT OF PROPORTION to physical exam — THE key diagnostic clue\n", options: { bold: true, fontSize: 13, color: C.red, breakLine: true } },
bullet("Sudden-onset severe periumbilical / mid-abdominal pain", 8),
bullet("Colicky character early; constant/severe when necrosis develops", 8),
bullet("Nausea, vomiting, diarrhoea (often bloody)", 8),
bullet("Early: physical exam surprisingly NORMAL", 8),
bullet("Late: peritonitis, rigidity, haemodynamic collapse", 8),
bullet("Risk factors: AF, recent MI, valvular disease, PVD", 8),
], { x: 0.3, y: 1.98, w: 4.5, h: 3.42 });
sl.addShape(pres.ShapeType.line, { x: 4.97, y: 1.6, w: 0, h: 3.85, line: { color: C.border, width: 0.8 } });
// CMI box
sl.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.6, w: 4.6, h: 0.35,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("CHRONIC Mesenteric Ischemia — Classic Triad", {
x: 5.2, y: 1.61, w: 4.5, h: 0.32,
fontSize: 10.5, bold: true, color: C.white
});
sl.addText([
bullet("Postprandial abdominal pain — 15–30 min after eating ('intestinal angina')", 8),
bullet("FOOD FEAR — patient voluntarily restricts eating to avoid pain", 8),
bullet("Progressive significant weight loss", 8),
bullet("Often misdiagnosed as malignancy (weight loss misleads clinicians)", 8),
bullet("3:1 female-to-male ratio", 8),
{ text: "\nMVT: ", options: { bold: true, fontSize: 12, color: C.teal, breakLine: false } },
{ text: "Subacute diffuse abdominal pain (days–weeks); less dramatic onset; may present with GI bleeding", options: { fontSize: 11.5, color: C.darkText, breakLine: true } },
], { x: 5.2, y: 1.98, w: 4.5, h: 3.42 });
}
// ─────────────────────────────────────────────
// 10. DIFFERENTIAL DIAGNOSIS TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 5 — Clinical Presentation");
slideTitle(sl, "Differential Diagnosis — Acute Severe Abdominal Pain");
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.6, w: 9.5, h: 0.32,
fill: { color: C.red }, line: { color: C.red } });
sl.addText("In any elderly patient with sudden severe abdominal pain + AF or vascular disease: AMI must be ACTIVELY EXCLUDED", {
x: 0.3, y: 1.62, w: 9.4, h: 0.28,
fontSize: 10.5, bold: true, color: C.white
});
const rows = [
[
{ text: "Surgical Emergencies", options: { bold: true, color: C.white, fill: { color: "1A3557" } } },
{ text: "GI / Medical Causes", options: { bold: true, color: C.white, fill: { color: "1A7A8A" } } },
{ text: "Vascular Emergencies", options: { bold: true, color: C.white, fill: { color: "922B21" } } },
],
["Perforated peptic ulcer", "Acute pancreatitis", "Ruptured AAA"],
["Bowel obstruction / volvulus", "Severe gastroenteritis", "Aortic dissection"],
["Acute appendicitis", "IBD exacerbation", "Ischaemic colitis"],
["Acute cholecystitis / cholangitis", "Renal colic / ureteral stone", "Spontaneous SMA dissection"],
["Sigmoid volvulus", "Inferior MI (referred pain)", "Median arcuate ligament syndrome"],
];
sl.addTable(rows, {
x: 0.25, y: 1.97, w: 9.5, h: 3.45,
colW: [3.16, 3.16, 3.18],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.55,
fontFace: "Calibri",
fontSize: 12,
color: C.darkText,
align: "center",
valign: "middle",
});
}
// ─────────────────────────────────────────────
// 11. LABORATORY INVESTIGATIONS TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 6 — Investigations");
slideTitle(sl, "Laboratory Investigations", "Adjuncts only — no single test confirms or excludes AMI");
const rows = [
[
{ text: "Investigation", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Finding in AMI", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Clinical Significance", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
],
["WBC count", "> 15,000 with neutrophilic left shift", "Suggests ischaemia/infarction; non-specific"],
["Serum Lactate", "Elevated (may be NORMAL early!)", "Normal lactate CANNOT exclude AMI — poor NPV"],
["Metabolic panel / ABG", "Metabolic acidosis, raised anion gap", "Late finding; suggests advanced ischaemia"],
["Amylase / Lipase", "Elevated (40–50% of cases)", "Non-specific; also raised in pancreatitis"],
["Serum phosphate", "Elevated > 1.5 mmol/L (inorganic phosphate)", "Raised with bowel necrosis; useful adjunct"],
["D-dimer", "Often elevated", "High sensitivity, very low specificity"],
["LDH / CK", "Elevated with muscle ischaemia", "Supports ischaemic necrosis; non-specific"],
["ABG", "pH < 7.35, base excess < -4", "Metabolic acidosis = advanced / widespread ischaemia"],
];
sl.addTable(rows, {
x: 0.2, y: 1.6, w: 9.6, h: 3.9,
colW: [2.0, 3.6, 4.0],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.42,
fontFace: "Calibri",
fontSize: 11,
color: C.darkText,
align: "left",
valign: "middle",
});
sl.addShape(pres.ShapeType.rect, { x: 0.2, y: 5.55, w: 9.6, h: 0.0 });
}
// ─────────────────────────────────────────────
// 12. IMAGING — CTA GOLD STANDARD
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 6 — Investigations");
slideTitle(sl, "Imaging — CT Angiography (Gold Standard)");
// CTA key info
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.62, w: 5.6, h: 0.35,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("CTA — Sensitivity 93%, Specificity 96% | BIPHASIC protocol (arterial + venous phase)", {
x: 0.3, y: 1.63, w: 5.5, h: 0.32,
fontSize: 10, bold: true, color: C.white
});
sl.addText([
bullet("BIPHASIC CTA: arterial phase + delayed venous phase — evaluates both arteries & portal/mesenteric veins", 8),
{ text: "\nCT Findings with >97% Specificity:", options: { bold: true, fontSize: 12, color: C.red, breakLine: true, paraSpaceAfter: 2 } },
bullet("Pneumatosis intestinalis — intramural gas", 12),
bullet("Portal venous / SMV gas", 12),
bullet("SMA or celiac artery occlusion (filling defect)", 12),
bullet("Arterial embolism — intraluminal filling defect", 12),
{ text: "\nOther Findings:", options: { bold: true, fontSize: 12, color: C.teal, breakLine: true, paraSpaceAfter: 2 } },
bullet("Bowel wall thickening / thinning (paper-thin = transmural necrosis)", 12),
bullet("Mesenteric fat stranding", 12),
bullet("Absent bowel wall enhancement = full-thickness ischaemia", 12),
bullet("Ascites (peritoneal fluid) — late sign", 12),
], { x: 0.3, y: 2.0, w: 5.55, h: 3.4 });
// Right panel — other modalities
sl.addShape(pres.ShapeType.rect, { x: 6.1, y: 1.62, w: 3.65, h: 0.35,
fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Other Imaging Modalities", {
x: 6.15, y: 1.63, w: 3.55, h: 0.32,
fontSize: 10, bold: true, color: C.white
});
const modalities = [
{ name: "Plain X-ray", note: "Initial screen; late: ileus, thumbprinting, pneumatosis, portal gas. NEVER to exclude AMI." },
{ name: "Duplex US", note: "Best for CMI: SMA PSV >275 cm/s = >70% stenosis. Sensitivity 92%, Specificity 96%." },
{ name: "Conventional Angiography", note: "Definitive diagnosis + simultaneous endovascular Rx (thrombolysis, vasodilators)." },
{ name: "MRA", note: "Non-radiation alternative for CMI work-up; limited in acute setting." },
];
let yy = 2.02;
modalities.forEach(m => {
sl.addText([
{ text: m.name + ": ", options: { bold: true, fontSize: 11, color: C.navy } },
{ text: m.note, options: { fontSize: 10.5, color: C.darkText } }
], { x: 6.1, y: yy, w: 3.65, h: 0.65, wrap: true });
yy += 0.82;
});
}
// ─────────────────────────────────────────────
// 13. DIAGNOSTIC FLOWCHART
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 6 — Investigations");
slideTitle(sl, "Diagnostic Algorithm — Suspected AMI");
// Flowchart using shapes
function box(sl, x, y, w, h, color, text, textColor, fs) {
sl.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color }, line: { color } });
sl.addText(text, { x, y, w, h, fontSize: fs || 11, bold: true, color: textColor || C.white, align: "center", valign: "middle", wrap: true });
}
function arw(sl, x, y, len, vert) {
if (vert) {
sl.addShape(pres.ShapeType.line, { x, y, w: 0, h: len, line: { color: C.midText, width: 1.5 } });
} else {
sl.addShape(pres.ShapeType.line, { x, y, w: len, h: 0, line: { color: C.midText, width: 1.5 } });
}
}
// Start
box(sl, 3.5, 1.55, 3.0, 0.44, C.red, "SUSPECTED AMI\nElderly + Abdo Pain", C.white, 10.5);
arw(sl, 5.0, 1.99, 0, 0.22, true);
// CTA
box(sl, 2.8, 2.21, 4.4, 0.44, C.navy, "CT ANGIOGRAPHY (Biphasic CTA)", C.white, 10.5);
arw(sl, 5.0, 2.65, 0, 0.22, true);
// Decision diamond (rectangle as proxy)
box(sl, 2.9, 2.87, 4.2, 0.5, C.orange, "PERITONITIS / Bowel Necrosis?", C.white, 11);
// YES → left
arw(sl, 2.9, 3.12, -1.8, 0, false);
sl.addText("YES", { x: 1.55, y: 3.01, w: 0.6, h: 0.22, fontSize: 10, color: C.red, bold: true });
box(sl, 0.25, 3.3, 2.65, 0.55, C.red, "EMERGENT\nLAPAROTOMY", C.white, 11);
arw(sl, 1.57, 3.85, 0, 0.22, true);
box(sl, 0.25, 4.07, 2.65, 0.55, C.red, "Revascularize FIRST\nResect necrotic bowel\nTemp closure", C.white, 9.5);
arw(sl, 1.57, 4.62, 0, 0.22, true);
box(sl, 0.25, 4.84, 2.65, 0.44, "922B21", "Second-look 24–48 hrs", C.white, 10.5);
// NO → right
arw(sl, 7.1, 3.12, 1.8, 0, false);
sl.addText("NO", { x: 7.2, y: 3.01, w: 0.5, h: 0.22, fontSize: 10, color: C.green, bold: true });
box(sl, 8.9, 3.3, 0.85, 0.55, C.teal, "Consider\nEndovascular", C.white, 8.5);
arw(sl, 9.32, 3.85, 0, 0.22, true);
box(sl, 8.6, 4.07, 1.15, 0.55, C.teal, "PTA/Stent\nThrombolysis\nEmbolectomy", C.white, 8.5);
// Centre - specific paths
arw(sl, 5.0, 3.37, 0, 0.22, true);
box(sl, 3.7, 3.59, 2.6, 0.44, C.teal, "Identify Subtype:\nEmbolism / Thrombosis / NOMI / MVT", C.white, 9);
arw(sl, 5.0, 4.03, 0, 0.22, true);
box(sl, 3.7, 4.25, 2.6, 0.55, C.navy, "Subtype-directed\nmanagement\n(see next slides)", C.white, 10);
}
// ─────────────────────────────────────────────
// 14. INITIAL MANAGEMENT — RESUSCITATION
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 7 — Management of AMI");
slideTitle(sl, "Initial Management — Resuscitation", "Start Immediately — Do NOT Delay Surgical Planning");
// Flowchart-style checklist
const steps = [
{ num: "1", head: "IV Access & Fluids", body: "Large-bore IV access · Crystalloid fluid resuscitation · Haemodynamic monitoring (A-line, CVP, urinary catheter)" },
{ num: "2", head: "Monitoring & Decompression", body: "NG tube decompression · Correct electrolyte abnormalities · Continuous ECG and pulse oximetry" },
{ num: "3", head: "Anticoagulation", body: "IV Unfractionated Heparin (UFH) — prevents further thrombus propagation · Continue throughout perioperative period" },
{ num: "4", head: "Vasopressors — Caution", body: "Avoid vasoconstrictors if possible — worsen mesenteric perfusion · If required for haemodynamic support, use cautiously" },
{ num: "5", head: "Antibiotics", body: "Broad-spectrum cover (gram-negative + anaerobic) — bacterial translocation is early and universal" },
{ num: "6", head: "ICU / Surgical Team", body: "Early surgical/vascular surgery consult · Interventional radiology team on standby for endovascular option" },
];
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.62, w: 9.5, h: 0.3,
fill: { color: C.red }, line: { color: C.red } });
sl.addText("⚠ PERITONITIS = EMERGENT LAPAROTOMY — Do NOT wait for imaging when peritonism is present", {
x: 0.3, y: 1.63, w: 9.4, h: 0.27,
fontSize: 10.5, bold: true, color: C.white
});
steps.forEach((s, i) => {
const x = (i % 3) * 3.2 + 0.25;
const y = Math.floor(i / 3) * 1.55 + 1.98;
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.0, h: 1.42,
fill: { color: "F8FAFC" }, line: { color: C.border, width: 0.8 } });
sl.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: y + 0.08, w: 0.36, h: 0.36,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText(s.num, { x: x + 0.1, y: y + 0.08, w: 0.36, h: 0.36, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
sl.addText(s.head, { x: x + 0.5, y: y + 0.1, w: 2.45, h: 0.3, fontSize: 11, bold: true, color: C.navy });
sl.addText(s.body, { x: x + 0.1, y: y + 0.44, w: 2.85, h: 0.94, fontSize: 10, color: C.darkText, wrap: true });
});
}
// ─────────────────────────────────────────────
// 15. SURGICAL MANAGEMENT FLOWCHART
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 7 — Management of AMI");
slideTitle(sl, "Surgical Management — Open Surgery");
// Two columns: Embolectomy and Bypass
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.6, w: 4.6, h: 0.36,
fill: { color: C.red }, line: { color: C.red } });
sl.addText("SMA EMBOLECTOMY (Embolic AMI — Gold Standard)", {
x: 0.3, y: 1.61, w: 4.5, h: 0.33,
fontSize: 10.5, bold: true, color: C.white
});
const embSteps = [
"Midline laparotomy",
"Colon reflected cephalad; small bowel to patient's right",
"Expose SMA at base of transverse colon mesentery",
"Intraoperative Doppler → localise loss of signal",
"Transverse arteriotomy at SMA (reduces risk of stenosis vs. longitudinal)",
"Fogarty balloon catheter embolectomy proximal + distal",
"Completion angioscopy or on-table angiography",
"Assess bowel viability (fluorescein + Doppler)",
"Resect ONLY frankly necrotic bowel",
"Temporary abdominal closure → Second-look 24–48 hrs"
];
sl.addText(embSteps.map((t, i) => ({
text: `${i + 1}. ${t}`,
options: { fontSize: 10.8, color: C.darkText, bullet: false, breakLine: true, paraSpaceAfter: 3 }
})), { x: 0.3, y: 2.0, w: 4.5, h: 3.35 });
sl.addShape(pres.ShapeType.line, { x: 4.97, y: 1.6, w: 0, h: 3.8, line: { color: C.border, width: 0.8 } });
sl.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.6, w: 4.6, h: 0.36,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("MESENTERIC BYPASS (Thrombotic AMI / CMI)", {
x: 5.2, y: 1.61, w: 4.5, h: 0.33,
fontSize: 10.5, bold: true, color: C.white
});
sl.addText([
{ text: "Antegrade Bypass (Supraceliac inflow):\n", options: { bold: true, fontSize: 11, color: C.teal, breakLine: true } },
bullet("Inflow: supraceliac / distal thoracic aorta", 8),
bullet("Bifurcated Dacron graft (12×6 or 14×7 cm) for celiac + SMA", 8),
bullet("Less kinking; preferred in younger/fitter patients", 8),
bullet("Transperitoneal: mobilise left liver lobe; divide left crus of diaphragm", 8),
{ text: "\nRetrograde Bypass (Infrarenal inflow):\n", options: { bold: true, fontSize: 11, color: C.orange, breakLine: true } },
bullet("Inflow: infrarenal aorta or iliac artery", 8),
bullet("PTFE or Dacron graft — C-loop or J-loop configuration to prevent kinking", 8),
bullet("Preferred in emergency or when heavy supraceliac disease", 8),
{ text: "\nEndarterectomy:\n", options: { bold: true, fontSize: 11, color: C.green, breakLine: true } },
bullet("Transaortic endarterectomy: trapdoor aortotomy; removes plaque", 8),
bullet("Best for ostial lesions; requires aortic cross-clamp", 8),
], { x: 5.2, y: 2.0, w: 4.5, h: 3.35 });
}
// ─────────────────────────────────────────────
// 16. SECOND LOOK + BOWEL VIABILITY
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 7 — Management of AMI");
slideTitle(sl, "Second-Look Laparotomy & Bowel Viability Assessment");
// Principle banner
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.62, w: 9.5, h: 0.32,
fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("PRINCIPLE: Revascularize First → Resect ONLY Dead Bowel → Temp Closure → Second-Look 24–48 hrs → Definitive Closure", {
x: 0.3, y: 1.63, w: 9.4, h: 0.29,
fontSize: 10, bold: true, color: C.white
});
// Viability table
const rows = [
[
{ text: "Assessment Method", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Viable Findings", options: { bold: true, color: C.white, fill: { color: "1E8449" } } },
{ text: "Non-Viable Findings", options: { bold: true, color: C.white, fill: { color: "C0392B" } } },
],
["Visual (colour)", "Pink / red, glistening serosa", "Black / green / grey, dull / mottled"],
["Peristalsis", "Present — good prognostic sign", "Absent"],
["Wall thickness & turgor", "Normal thickness, firm", "Thin (paper-thin) or oedematous"],
["Mesenteric pulse", "Palpable arterial pulsation", "Absent pulsation"],
["Intraop Doppler", "Audible Doppler signal at antimesenteric border", "Loss of signal = no flow"],
["IV Fluorescein + Wood's lamp", "Bright fluorescence under UV light", "No fluorescence = necrosis"],
["Subserosal haemorrhage", "Absent / minimal", "Extensive = concerning"],
];
sl.addTable(rows, {
x: 0.2, y: 2.0, w: 9.6, h: 3.35,
colW: [2.4, 3.6, 3.6],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.41,
fontFace: "Calibri",
fontSize: 11,
color: C.darkText,
align: "left",
valign: "middle",
});
sl.addShape(pres.ShapeType.rect, { x: 0.2, y: 5.4, w: 9.6, h: 0.37,
fill: { color: "FEF9E7" }, line: { color: C.orange, width: 1 } });
sl.addText("Preserve ALL questionable bowel at first operation. Second-look allows recovery of marginal segments. < 100–150 cm small bowel remaining = Short Bowel Syndrome.", {
x: 0.3, y: 5.43, w: 9.4, h: 0.32,
fontSize: 10, color: C.orange
});
}
// ─────────────────────────────────────────────
// 17. ENDOVASCULAR MANAGEMENT
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 7 — Management");
slideTitle(sl, "Endovascular Management — AMI & CMI");
const rows = [
[
{ text: "Technique", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Indication", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Key Points", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
],
[
{ text: "Percutaneous transluminal angioplasty (PTA)", options: {} },
"CMI — short segment stenosis",
"Balloon dilation; may need adjunct stent; restenosis ~30% without stent"
],
[
{ text: "Primary Stenting", options: {} },
"CMI first-line / AMI without peritonitis",
"Balloon-expandable COVERED stent preferred; traps plaque, prevents embolism"
],
[
{ text: "Intra-arterial thrombolysis", options: {} },
"Acute thrombosis / embolism (no peritonitis)",
"Papaverine or tPA; allows simultaneous diagnostic angiography; cannot assess bowel viability"
],
[
{ text: "Pharmaco-mechanical embolectomy", options: {} },
"Embolic AMI — early, no peritonitis",
"Aspiration + thrombolytics; hybrid with open if needed"
],
[
{ text: "Intraarterial vasodilators (NOMI)", options: {} },
"NOMI — no peritonitis",
"Papaverine infusion 30–60 mg/hr into SMA; most studied. Alternatively nitroglycerin / prostaglandins"
],
];
sl.addTable(rows, {
x: 0.2, y: 1.6, w: 9.6, h: 3.7,
colW: [2.6, 2.8, 4.2],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.6,
fontFace: "Calibri",
fontSize: 11,
color: C.darkText,
align: "left",
valign: "middle",
});
// Access technique note
sl.addShape(pres.ShapeType.rect, { x: 0.2, y: 5.37, w: 9.6, h: 0.42,
fill: { color: "EBF5FB" }, line: { color: C.teal, width: 1 } });
sl.addText("Access: Femoral or brachial approach · Selective angled catheters · Systemic heparin after access · Balloon diameter = reference vessel diameter · Post-procedure antiplatelet ≥ 6 months", {
x: 0.3, y: 5.4, w: 9.4, h: 0.36,
fontSize: 10, color: C.teal
});
}
// ─────────────────────────────────────────────
// 18. CMI — WORKUP & REVASCULARIZATION TABLE
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 8 — Chronic Mesenteric Ischemia");
slideTitle(sl, "Chronic Mesenteric Ischemia — Workup & Revascularization");
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.62, w: 9.5, h: 0.3,
fill: { color: "EBF5FB" }, line: { color: C.teal, width: 1 } });
sl.addText("Requires ≥ 2 of 3 vessels (Celiac, SMA, IMA) with significant stenosis/occlusion for symptoms. Atherosclerosis is the most common aetiology.", {
x: 0.3, y: 1.64, w: 9.4, h: 0.26,
fontSize: 10.5, color: C.navy, italic: true
});
const rows = [
[
{ text: "CMI Assessment Step", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Details", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
],
[{ text: "Clinical criteria", options: { bold: true } }, "Classic triad: postprandial pain + food fear + weight loss; r/o malignancy first"],
[{ text: "Duplex US", options: { bold: true } }, "SMA PSV >275 cm/s; EDV >45 cm/s = >70% stenosis. Sensitivity 92%, Specificity 96%"],
[{ text: "CT/MR Angiography", options: { bold: true } }, "Defines anatomy, collaterals, degree of stenosis; plan revascularisation"],
[{ text: "Endovascular (1st line)", options: { bold: true } }, "Balloon-expandable COVERED stent; 70–80% of CMI procedures; primary patency 75–80% at 3 yrs"],
[{ text: "Open bypass — Antegrade", options: { bold: true } }, "Supraceliac inflow; bifurcated Dacron; preferred in younger/fitter; superior long-term patency"],
[{ text: "Open bypass — Retrograde", options: { bold: true } }, "Infrarenal/iliac inflow; C or J-loop graft; preferred in elderly/high risk"],
[{ text: "Transaortic endarterectomy", options: { bold: true } }, "Best for ostial/flush lesions; trapdoor aortotomy; multi-vessel simultaneous treatment"],
[{ text: "Post-procedure care", options: { bold: true } }, "Oral feed when symptoms allow; nutrition rehab; duplex surveillance at 1, 6, 12 months then annually"],
];
sl.addTable(rows, {
x: 0.2, y: 1.97, w: 9.6, h: 3.7,
colW: [2.8, 6.8],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.41,
fontFace: "Calibri",
fontSize: 11,
color: C.darkText,
align: "left",
valign: "middle",
});
}
// ─────────────────────────────────────────────
// 19. OUTCOMES & SPECIAL SCENARIOS
// ─────────────────────────────────────────────
{
const sl = addSlide();
sectionBanner(sl, "Section 9 — Outcomes & Special Scenarios");
slideTitle(sl, "Outcomes Summary & Special Scenarios");
// Outcomes grid
const outcomes = [
{ label: "Overall AMI Mortality", val: "17–21%", color: C.red },
{ label: "Thrombotic (untreated)", val: "77%", color: "7B241C" },
{ label: "Embolic (untreated)", val: "54%", color: C.red },
{ label: "Open Repair (2010)", val: "33%", color: C.orange },
{ label: "Endovascular (2010)", val: "15%", color: C.green },
{ label: "ICU-admitted AMI", val: "> 70%", color: "7B241C" },
];
outcomes.forEach((o, i) => {
const x = (i % 3) * 3.18 + 0.25;
const y = Math.floor(i / 3) * 0.95 + 1.62;
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.0, h: 0.82, fill: { color: o.color }, line: { color: o.color } });
sl.addText(o.val, { x, y: y + 0.02, w: 3.0, h: 0.46, fontSize: 22, bold: true, color: C.white, align: "center", valign: "middle" });
sl.addText(o.label, { x, y: y + 0.48, w: 3.0, h: 0.32, fontSize: 9.5, color: C.white, align: "center" });
});
// Special scenarios
sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.6, w: 9.5, h: 0.3,
fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("Special Clinical Scenarios", {
x: 0.3, y: 3.61, w: 9.4, h: 0.27,
fontSize: 11, bold: true, color: C.white
});
const rows = [
[
{ text: "Scenario", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
{ text: "Key Management Points", options: { bold: true, color: C.white, fill: { color: C.tableHdr } } },
],
["Spontaneous SMA Dissection (SISMAD)", "Rare; males, East Asian. Asymptomatic → antiplatelet. Mild → anticoagulation. Persistent pain/aneurysm → endovascular stenting."],
["Post-aortic surgery ischaemic colitis", "Ligation of IMA during aortic repair; sigmoid most at risk. Monitor postop. Flexible sigmoidoscopy if suspected."],
["Short Bowel Syndrome", "< 100–150 cm small bowel = lifelong TPN dependency. Prevention: revascularise first, preserve marginal segments, second-look."],
["Median Arcuate Ligament Syndrome", "Extrinsic celiac compression by diaphragmatic crus. Treatment: ligament division ± celiac reconstruction."],
];
sl.addTable(rows, {
x: 0.2, y: 3.95, w: 9.6, h: 1.65,
colW: [2.8, 6.8],
border: { type: "solid", color: C.border, pt: 0.5 },
fill: { color: C.tableAlt },
rowH: 0.38,
fontFace: "Calibri",
fontSize: 10.5,
color: C.darkText,
align: "left",
valign: "middle",
});
}
// ─────────────────────────────────────────────
// 20. KEY TAKE-AWAYS / CLOSING SLIDE
// ─────────────────────────────────────────────
{
const sl = addSlide(C.navy);
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SURGICAL TAKE-AWAYS", {
x: 0.4, y: 0.25, w: 9.2, h: 0.55,
fontSize: 24, bold: true, color: C.white, align: "center", charSpacing: 2
});
const msgs = [
{ num: "01", text: "Pain OUT OF PROPORTION to examination = AMI until proven otherwise. High index of suspicion is the first life-saving step." },
{ num: "02", text: "No laboratory test can exclude AMI. CT angiography (biphasic) is the gold standard — specificity > 97% for key findings." },
{ num: "03", text: "PERITONITIS = Emergent laparotomy. Do NOT delay for imaging when peritonism is present." },
{ num: "04", text: "Revascularise FIRST — resect only clearly dead bowel. Preserve questionable segments for second-look at 24–48 hours." },
{ num: "05", text: "NOMI: treat the underlying cause + intraarterial vasodilators. MVT: anticoagulate. Tailor treatment to subtype." },
{ num: "06", text: "CMI: Endovascular (covered stent) is first-line for most; open bypass for younger/fitter patients with superior long-term durability." },
];
msgs.forEach((m, i) => {
const x = (i % 2) * 4.9 + 0.25;
const y = Math.floor(i / 2) * 1.38 + 0.88;
sl.addShape(pres.ShapeType.rect, { x, y, w: 4.65, h: 1.28, fill: { color: "122540" }, line: { color: C.teal, width: 0.8 } });
sl.addShape(pres.ShapeType.ellipse, { x: x + 0.12, y: y + 0.1, w: 0.42, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText(m.num, { x: x + 0.12, y: y + 0.1, w: 0.42, h: 0.42, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
sl.addText(m.text, { x: x + 0.6, y: y + 0.12, w: 3.95, h: 1.04, fontSize: 10.5, color: "C8D8E8", wrap: true });
});
sl.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.42, fill: { color: "0A1929" }, line: { color: "0A1929" } });
sl.addText("Based on: Schwartz's Principles of Surgery 11e · Sabiston Textbook of Surgery · Current Surgical Therapy 14e · 2026", {
x: 0.4, y: 5.24, w: 9.2, h: 0.34,
fontSize: 9, color: "5A7A9A", align: "center"
});
}
// ─────────────────────────────────────────────
// WRITE FILE
// ─────────────────────────────────────────────
const outPath = "/home/daytona/workspace/mesenteric-ischemia/Mesenteric_Ischemia_Merged.pptx";
pres.writeFile({ fileName: outPath })
.then(() => console.log("SUCCESS: " + outPath))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/mesenteric-ischemia && npm install pptxgenjs --save 2>&1 | tail -3 && echo "NPM_DONE"
Make it
ls /home/daytona/workspace/mesenteric-ischemia/ && node -e "require('pptxgenjs'); console.log('pptxgenjs OK')" 2>&1
cd /home/daytona/workspace/mesenteric-ischemia && node build.js 2>&1
ls -lh /home/daytona/workspace/mesenteric-ischemia/Mesenteric_Ischemia_Merged.pptx
Mesenteric Ischemia Merged
Presentation · PPTX
| # | Slide | Format |
|---|---|---|
| 1 | Title Slide | Visual layout — dark navy bg |
| 2 | Lecture Outline | Two-column list |
| 3 | Historical Perspective + Epidemiology | Table + callout box |
| 4 | Classification of Mesenteric Ischemia | 5-type comparison table |
| 5 | Vascular Anatomy & Collaterals | Diagram (shapes) + bullet points |
| 6 | Pathophysiology — Ischemia Timeline | Colour-coded flowchart (0–3h → 3–6h → >6h → Death) |
| 7 | Embolic vs. Thrombotic AMI | Side-by-side comparison table |
| 8 | NOMI & Mesenteric Venous Thrombosis | Two-column layout |
| 9 | Clinical Presentation | AMI vs CMI two-column layout |
| 10 | Differential Diagnosis | 3-column table (surgical / GI / vascular) |
| 11 | Laboratory Investigations | 8-row table with significance column |
| 12 | CT Angiography — Gold Standard | Findings list + other modalities panel |
| 13 | Diagnostic Algorithm | Decision flowchart (peritonitis? YES/NO branches) |
| 14 | Initial Resuscitation | 6-step numbered grid |
| 15 | Open Surgery (Embolectomy + Bypass) | Step-by-step two-column layout |
| 16 | Second-Look Laparotomy + Bowel Viability | Viability assessment table |
| 17 | Endovascular Management | Techniques table (PTA, stent, thrombolysis, NOMI) |
| 18 | Chronic Mesenteric Ischemia | Workup + revascularization table |
| 19 | Outcomes + Special Scenarios | Mortality stat grid + scenarios table |
| 20 | Key Take-Aways | 6 message cards on dark background |
Kindly add epidemiology & risk factor part from one of these ppt that i uploaded to this new ppt that you made
timeout 30 python3 -c " import zipfile, re def get_slide(path, nums): with zipfile.ZipFile(path, 'r') as z: for n in nums: sname = f'ppt/slides/slide{n}.xml' try: content = z.read(sname).decode('utf-8', errors='ignore') texts = re.findall(r'<a:t[^>]*>(.*?)</a:t>', content, re.DOTALL) print(f'--- {path} slide{n} ---') print(' | '.join([t.strip() for t in texts if t.strip()])) except: pass # PPT2 slides 5 (epidemiology) and 6 (risk factors) get_slide('/home/daytona/workspace/mesenteric-ischemia/ppt2.pptx', [5, 6]) " 2>&1
~/mesenteric-ischemia/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mesenteric-ischemia/build.js'
cd /home/daytona/workspace/mesenteric-ischemia && node build.js 2>&1
ls -lh /home/daytona/workspace/mesenteric-ischemia/Mesenteric_Ischemia_Merged.pptx
Mesenteric Ischemia Merged
Presentation · PPTX
Suggest me some figure to add in the abode presentation taken from standard textbooks
Search multiple medical textbooks for figures (images) related to mesenteric ischemia. Use query_library_db and read_file tools to find image URLs embedded in the textbook markdown files. Specifically search these files for any lines containing "![" (markdown image syntax) within the mesenteric ischemia sections: 1. Schwartz's Principles of Surgery: /textbooks/9781259835346/9781259835346_block14.md — read from offset 316 to around 380 (the mesenteric ischemia section ends around line 380) 2. Current Surgical Therapy 14e: /textbooks/9780323796835/9780323796835_block12.md — read around lines 3160–3400 (mesenteric ischemia sections) 3. Sleisenger & Fordtran's GI: /textbooks/9780323609623/9780323609623_block2.md — read around lines 2723–2900 4. Sleisenger & Fordtran's GI block31: /textbooks/9780323609623/9780323609623_block31.md — read around lines 2932–3100 For each file, read in chunks of 100 lines. Look for lines that contain "![" (markdown image syntax) and extract: - The image alt text (description inside ![...]) - The image URL (inside the parentheses) - The figure caption (the line immediately after the image, usually starting with *Figure...) - Which textbook it came from - The line number Return a complete list of ALL figure URLs found, with their captions and which textbook/slide context they belong to. This is for a surgical presentation on mesenteric ischemia.








| Figure | Source | Best Slide |
|---|---|---|
| FIG. 1 — Mesenteric arterial tree + collaterals | Current Surgical Therapy 14e | Slide 5 — Vascular Anatomy |
| FIG. 2 — Ischemic bowel intraop photo | Current Surgical Therapy 14e | Slide 6/7 — Pathophysiology |
| FIG. 3 — Open vs. endovascular algorithm | Current Surgical Therapy 14e | Slide 13 — Diagnostic Algorithm |
| FIG. 4 — SMA operative exposure diagram | Current Surgical Therapy 14e | Slide 15 — Open Surgery |
| FIG. 6 — Omental graft coverage | Current Surgical Therapy 14e | Slide 15 — Bypass technique |
| FIG. 7 — Antegrade bypass (A–E panels) | Current Surgical Therapy 14e | Slide 15 — Bypass technique |
| FIG. 11 — Endarterectomy intraop | Current Surgical Therapy 14e | Slide 16 — Second look |
| Fig. 118.8 — SMA angiogram (embolus + papaverine) | Sleisenger & Fordtran | Slide 12 — Imaging |
Create a new diagnostic imaging slide with CT/plain film/angiography images from Sleisenger