Describe the clinical features, investigations and principles and management of disorders of large intestine including neonatal obstruction Create a powerpoint presentation surgery class Add relevant pictures from authorised textbooks with reference
mkdir -p /home/daytona/workspace/large-intestine-pptx && ls /home/daytona/worksp…
~/large-intestine-pptx/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// --- colour palette ---
const DARK_BG = "1A2340"; // deep navy
const MID_BG = "243050"; // navy mid
const ACCENT = "E8A020"; // amber gold
const ACCENT2 = "3CB4E5"; // sky blue
const WHITE = "FFFFFF";
const LIGHT_TXT = "D0D8F0";
const PALE = "EEF2FA";
const ORANGE = "E05C1A";
const GREEN = "27AE60";
const RED = "C0392B";
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Disorders of the Large Intestine";
pres.author = "Surgery Class";
// ── helper: standard content slide (dark header bar + white body) ──
function contentSlide(title, bodyFn) {
const sld = pres.addSlide();
sld.background = { color: PALE };
// Header bar
sld.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:1.0, fill:{color: DARK_BG}, line:{color: DARK_BG} });
sld.addText(title, { x:0.35, y:0.08, w:12.6, h:0.84, fontSize:22, bold:true, color:WHITE, valign:"middle" });
bodyFn(sld);
// footer
sld.addShape(pres.ShapeType.rect, { x:0, y:7.3, w:13.3, h:0.2, fill:{color: ACCENT}, line:{color: ACCENT} });
sld.addText("Bailey & Love | Sabiston | Greenfield Surgery | Grainger Radiology", {
x:0.2, y:7.3, w:13.0, h:0.18, fontSize:7, color:DARK_BG, italic:true, valign:"middle"
});
return sld;
}
// ══════════════════════════════
// SLIDE 1 — TITLE
// ══════════════════════════════
{
const sld = pres.addSlide();
sld.background = { color: DARK_BG };
sld.addShape(pres.ShapeType.rect, { x:0, y:5.6, w:13.3, h:0.15, fill:{color: ACCENT}, line:{color: ACCENT} });
sld.addText("DISORDERS OF THE LARGE INTESTINE", {
x:0.8, y:0.8, w:11.7, h:1.4, fontSize:36, bold:true, color:WHITE,
align:"center", charSpacing:3
});
sld.addText("Including Neonatal Intestinal Obstruction", {
x:0.8, y:2.3, w:11.7, h:0.7, fontSize:22, color:ACCENT,
align:"center", italic:true
});
sld.addShape(pres.ShapeType.rect, { x:4.0, y:3.1, w:5.3, h:0.04, fill:{color: ACCENT2}, line:{color: ACCENT2} });
sld.addText([
{ text: "Clinical Features • Investigations • Management Principles", options:{breakLine:true} },
{ text: "Surgery Class — General Surgery" }
], { x:0.8, y:3.3, w:11.7, h:0.9, fontSize:14, color:LIGHT_TXT, align:"center" });
sld.addText("Sources: Bailey & Love's Short Practice of Surgery (28e) | Sabiston Textbook of Surgery | Mulholland & Greenfield's Surgery (7e) | Grainger & Allison's Diagnostic Radiology | Robbins Pathology", {
x:0.5, y:6.8, w:12.3, h:0.45, fontSize:8, color:ACCENT, align:"center", italic:true
});
}
// ══════════════════════════════
// SLIDE 2 — OVERVIEW / OUTLINE
// ══════════════════════════════
contentSlide("Contents Overview", sld => {
const topics = [
["01", "Anatomy & Function of the Large Intestine"],
["02", "Colorectal Cancer (CRC)"],
["03", "Sigmoid Volvulus"],
["04", "Large Bowel Obstruction — Clinical Features & Investigations"],
["05", "Principles of Management — Large Bowel Obstruction"],
["06", "Diverticular Disease"],
["07", "Hirschsprung Disease"],
["08", "Neonatal Intestinal Obstruction — Overview"],
["09", "Specific Neonatal Conditions"],
["10", "Key Take-Home Points"],
];
topics.forEach(([num, text], i) => {
const col = i < 5 ? 0 : 5;
const row = i < 5 ? i : i - 5;
const x = 0.4 + col * 6.5;
const y = 1.1 + row * 1.1;
sld.addShape(pres.ShapeType.rect, { x, y, w:0.7, h:0.55, fill:{color:ACCENT}, line:{color:ACCENT}, rounding:true });
sld.addText(num, { x, y, w:0.7, h:0.55, fontSize:13, bold:true, color:DARK_BG, align:"center", valign:"middle" });
sld.addText(text, { x: x+0.8, y, w:5.0, h:0.55, fontSize:12.5, color:DARK_BG, valign:"middle" });
});
});
// ══════════════════════════════
// SLIDE 3 — ANATOMY
// ══════════════════════════════
contentSlide("Anatomy & Function of the Large Intestine", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:7.8, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:8.35, y:1.05, w:4.65, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Segments", { x:0.5, y:1.1, w:7.4, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const segments = [
"Caecum & appendix — right iliac fossa",
"Ascending colon — right flank",
"Transverse colon — crosses abdomen",
"Descending colon — left flank",
"Sigmoid colon — pelvis (S-shaped loop)",
"Rectum — 12–15 cm, ampulla stores faeces",
"Anal canal — ~4 cm, internal/external sphincters",
];
segments.forEach((t, i) => {
sld.addText([
{ text:"• ", options:{bold:true, color:ACCENT} },
{ text:t }
], { x:0.5, y:1.55 + i*0.68, w:7.4, h:0.6, fontSize:11.5, color:DARK_BG });
});
sld.addText("Key Functions", { x:8.45, y:1.1, w:4.4, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const funcs = [
"Water & electrolyte absorption",
"Mucus secretion / lubrication",
"Bacterial fermentation of fibre",
"Vitamin K & B12 synthesis",
"Storage & controlled expulsion",
"Haustral contractions (mixing)",
"Mass movements (propulsion)",
];
funcs.forEach((t, i) => {
sld.addText([
{ text:"▸ ", options:{bold:true, color:ACCENT2} },
{ text:t }
], { x:8.45, y:1.55 + i*0.68, w:4.4, h:0.6, fontSize:11, color:DARK_BG });
});
sld.addText("Ref: Gray's Anatomy for Students", { x:0.4, y:7.0, w:6, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 4 — COLORECTAL CANCER
// ══════════════════════════════
contentSlide("Colorectal Cancer (CRC) — Overview & Risk Factors", sld => {
// left box
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:5.9, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.4, y:1.05, w:6.6, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Epidemiology & Risk Factors", { x:0.5, y:1.1, w:5.5, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const risk = [
"Greatest cancer mortality in non-smokers — Europe, N. America, Australasia",
"Incidence ↑ with advancing age",
"High-meat, low-fibre diet",
"Heredity in ~10% cases",
"Familial Adenomatous Polyposis (FAP) — hundreds of adenomatous polyps → inevitable CRC → prophylactic colectomy",
"Hereditary Non-Polyposis CRC (Lynch syndrome) — MLH1/MSH2 mutations",
"Inflammatory bowel disease (UC > Crohn's)",
"Previous colorectal polyps",
];
risk.forEach((t, i) => {
sld.addText([
{ text:"• ", options:{bold:true, color:RED} },
{ text:t }
], { x:0.5, y:1.55 + i*0.63, w:5.5, h:0.56, fontSize:10.5, color:DARK_BG });
});
sld.addText("Dukes' Staging & Survival (Pye's Surgical Handicraft, 22e)", { x:6.55, y:1.1, w:6.2, h:0.4, fontSize:12, bold:true, color:DARK_BG });
const stages = [
["Stage A", "Tumour confined to mucosa", "95%"],
["Stage B", "Invades muscularis propria", "68%"],
["Stage C", "Regional lymph node metastases", "34%"],
["Stage D", "Distant metastases (e.g. liver)", "<10%"],
];
stages.forEach(([stg, desc, surv], i) => {
const bgc = [ACCENT, ACCENT2, ORANGE, RED][i];
sld.addShape(pres.ShapeType.rect, { x:6.55, y:1.58 + i*1.0, w:1.2, h:0.75, fill:{color:bgc}, line:{color:bgc} });
sld.addText(stg, { x:6.55, y:1.58 + i*1.0, w:1.2, h:0.75, fontSize:12, bold:true, color:WHITE, align:"center", valign:"middle" });
sld.addText(desc, { x:7.85, y:1.58 + i*1.0, w:3.8, h:0.75, fontSize:11, color:DARK_BG, valign:"middle" });
sld.addText(surv, { x:11.7, y:1.58 + i*1.0, w:1.1, h:0.75, fontSize:12, bold:true, color:bgc, align:"center", valign:"middle" });
});
sld.addText("Adenoma → Carcinoma Sequence:", { x:6.55, y:5.65, w:6.2, h:0.35, fontSize:11.5, bold:true, color:DARK_BG });
sld.addText("Normal epithelium → Hyperproliferative epithelium → Adenomatous polyp → Dysplasia → Invasive carcinoma\n(Colonoscopic removal at polyp stage is curative)", {
x:6.55, y:6.0, w:6.2, h:0.85, fontSize:10, color:DARK_BG, italic:false
});
});
// ══════════════════════════════
// SLIDE 5 — CRC Clinical Features + Image
// ══════════════════════════════
contentSlide("Colorectal Cancer — Clinical Features & Investigations", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.5, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:7.05, y:1.05, w:5.95, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Clinical Features", { x:0.5, y:1.1, w:6.1, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const cf = [
["Right-sided (ascending) colon:", "Occult bleeding → iron-deficiency anaemia, palpable mass, vague abdominal pain"],
["Left-sided (descending/sigmoid):", "Change in bowel habit, rectal bleeding (bright red), tenesmus, mucus PR"],
["Rectal cancer:", "Rectal bleeding, tenesmus, feeling of incomplete evacuation"],
["General:", "Weight loss, anorexia, fatigue (anaemia)"],
["Obstruction:", "Absolute constipation, distension, vomiting (late)"],
["Perforation:", "Peritonitis — rigid abdomen, sepsis"],
];
cf.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT} },
{ text:body }
], { x:0.5, y:1.55 + i*0.83, w:6.1, h:0.75, fontSize:10.5, color:DARK_BG });
});
sld.addText("Investigations", { x:7.2, y:1.1, w:5.6, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const inv = [
"Full Blood Count — microcytic anaemia",
"LFTs, CEA (carcinoembryonic antigen)",
"Colonoscopy + biopsy — gold standard",
"Flexible sigmoidoscopy + barium enema",
"CT colonography (virtual colonoscopy)",
"CT chest/abdomen/pelvis — staging",
"MRI pelvis — local rectal cancer staging",
"PET-CT — metastatic disease",
"TRUS — rectal cancer T-staging",
"Faecal Immunochemical Test (FIT) — screening",
];
inv.forEach((t, i) => {
sld.addText([
{ text:"▸ ", options:{bold:true, color:GREEN} },
{ text:t }
], { x:7.2, y:1.55 + i*0.58, w:5.6, h:0.52, fontSize:10.5, color:DARK_BG });
});
sld.addText("Ref: Pye's Surgical Handicraft 22e | Grainger & Allison's Diagnostic Radiology", { x:0.4, y:7.0, w:8, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 6 — CRC image + management
// ══════════════════════════════
contentSlide("Colorectal Cancer — Management Principles", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.2, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.75, y:1.05, w:6.25, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Surgical Management", { x:0.5, y:1.1, w:5.8, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const mgmt = [
["Right hemicolectomy:", "Caecal, ascending, hepatic flexure tumours"],
["Extended right hemicolectomy:", "Transverse colon tumours"],
["Left hemicolectomy:", "Descending colon tumours"],
["Sigmoid colectomy:", "Sigmoid tumours"],
["Anterior resection:", "Upper & mid rectal cancers — anastomosis preserved"],
["Abdominoperineal resection (APR):", "Low rectal tumours — permanent colostomy"],
["Hartmann's procedure:", "Obstructed / perforated cases — reversal later"],
["Laparoscopic / robotic:", "Preferred where possible — faster recovery"],
];
mgmt.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT2} },
{ text:body }
], { x:0.5, y:1.55 + i*0.72, w:5.8, h:0.65, fontSize:10.5, color:DARK_BG });
});
sld.addText("Adjuvant & Other Therapies", { x:6.9, y:1.1, w:5.8, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const adj = [
["Neoadjuvant chemo-radiotherapy:", "Locally advanced rectal cancer (LARC) — downstage before surgery"],
["Adjuvant chemotherapy (FOLFOX):", "Stage III CRC; consider Stage II high-risk"],
["Targeted therapy:", "Bevacizumab (anti-VEGF), Cetuximab (anti-EGFR for RAS wild-type)"],
["Liver metastases:", "Resection if technically feasible — 30-40% 5yr survival"],
["Palliative stenting:", "Self-expanding metallic stents for obstructing CRC"],
["Screening:", "FIT, colonoscopy (50–75 yr); earlier if FH or FAP"],
];
adj.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT} },
{ text:body }
], { x:6.9, y:1.55 + i*0.85, w:5.8, h:0.78, fontSize:10.5, color:DARK_BG });
});
// Colonoscopic polyp image
const imgUrl = "https://cdn.orris.care/cdss_images/9b6363662e7ed9573b0c0d06fcce7e3e633a6353f9f99d3b3fc6bcf8a8ee0a9e.png";
try {
const result = JSON.parse(execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js "${imgUrl}"`
).toString());
if (result[0] && result[0].base64) {
sld.addImage({ data: result[0].base64, x:0.5, y:6.1, w:1.5, h:0.85 });
sld.addText("Colonoscopic view of pedunculated adenomatous polyp\n(Pye's Surgical Handicraft 22e, Fig 18.4)", {
x:2.1, y:6.15, w:4.0, h:0.75, fontSize:8, italic:true, color:"7080A0"
});
}
} catch(e) {}
});
// ══════════════════════════════
// SLIDE 7 — SIGMOID VOLVULUS
// ══════════════════════════════
contentSlide("Sigmoid Volvulus — Pathology & Clinical Features", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.0, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.55, y:1.05, w:6.45, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Pathophysiology & Epidemiology", { x:0.5, y:1.1, w:5.6, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const path = [
"Rotation of sigmoid loop around its mesenteric axis — usually ANTICLOCKWISE",
"Most common cause of LBO in indigenous black African population",
"Less common in Europe/USA — seen in elderly, chronic constipation",
"Predisposing factors: long pelvic mesocolon, high-residue diet, chronic psychotropic drug use",
"Younger patients → more acute presentation; prognosis inversely related to duration",
"Classification:",
" Fulminant: sudden onset, severe pain, early vomiting, rapid deterioration",
" Indolent: insidious, slow progressive, less pain, late vomiting",
];
path.forEach((t, i) => {
const isBold = t.startsWith("Classification");
sld.addText([
{ text:(t.startsWith(" ")?"":("• ")), options:{bold:true, color:ACCENT} },
{ text:t, options:{bold:isBold} }
], { x:0.5, y:1.55 + i*0.63, w:5.6, h:0.56, fontSize:10.5, color:DARK_BG });
});
sld.addText("Clinical Features & Signs", { x:6.7, y:1.1, w:6.0, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const clins = [
["Cardinal quartet:", "Pain | Distension | Vomiting | Absolute constipation"],
["Distension:", "Early, progressive — visible through abdominal wall in severe cases"],
["Constipation:", "Absolute (complete obstruction)"],
["Vomiting:", "Later than in SBO; hiccough and retching"],
["Elderly:", "More chronic, insidious form; comorbidities common"],
["Plain AXR:", "Inverted-U or 'coffee bean' sign — grossly dilated sigmoid loop rising from pelvis toward right upper quadrant"],
["CT abdomen:", "Confirms volvulus, assesses viability; 'whirl sign' of mesenteric rotation"],
["Sigmoidoscopy:", "Both diagnostic and therapeutic"],
];
clins.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ORANGE} },
{ text:body }
], { x:6.7, y:1.55 + i*0.72, w:6.0, h:0.65, fontSize:10.5, color:DARK_BG });
});
sld.addText("Ref: Bailey & Love's Short Practice of Surgery 28e, Chapter 78", { x:0.4, y:7.0, w:8, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 8 — VOLVULUS MANAGEMENT
// ══════════════════════════════
contentSlide("Sigmoid Volvulus — Management", sld => {
// AXR image
const imgUrl = "https://cdn.orris.care/cdss_images/fd7023376d6abaee1fc823ec4c68a5fb27410339e02276c38a9e51c800e656b2.png";
try {
const result = JSON.parse(execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js "${imgUrl}"`
).toString());
if (result[0] && result[0].base64) {
sld.addImage({ data: result[0].base64, x:9.5, y:1.1, w:3.5, h:3.8 });
sld.addText("AXR: Gas-filled bowel loops; distended sigmoid\n(Bailey & Love 28e, Fig 78.12)", {
x:9.0, y:4.95, w:4.0, h:0.6, fontSize:8.5, italic:true, color:"7080A0", align:"center"
});
}
} catch(e) {}
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:8.9, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Immediate Management", { x:0.5, y:1.1, w:8.5, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const imm = [
"IV access, IV fluids, urinary catheter, NGT",
"Resuscitation — correct dehydration and electrolytes",
"Sigmoidoscopy / flexible sigmoidoscopy + flatus tube insertion (first-line if no peritonism)",
"Flatus tube secured for 24 hours → repeat radiograph to confirm decompression",
"Success resolves acute problem — if ischaemia excluded, proceed to elective surgery",
];
imm.forEach((t, i) => {
sld.addText([{ text:"• ", options:{bold:true, color:GREEN} }, { text:t }],
{ x:0.5, y:1.55 + i*0.6, w:8.5, h:0.54, fontSize:11, color:DARK_BG });
});
sld.addText("Definitive Surgical Management", { x:0.5, y:4.65, w:8.5, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const def = [
["Viable bowel:", "Elective sigmoid colectomy (fit patients) OR two-point fixation + percutaneous/endoscopic tube in elderly/unfit"],
["Gangrene suspected:", "Paul–Mikulicz procedure OR sigmoid colectomy + Hartmann's procedure (with subsequent reanastomosis)"],
["Ileosigmoid knotting:", "Decompression + resection + anastomosis at laparotomy"],
["Recurrent volvulus:", "Resection preferred; fixation (sigmoidopexy) as alternative"],
];
def.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ORANGE} },
{ text:body }
], { x:0.5, y:5.1 + i*0.72, w:8.5, h:0.65, fontSize:10.5, color:DARK_BG });
});
sld.addText("Ref: Bailey & Love 28e, Current Surgical Therapy 14e", { x:0.4, y:7.0, w:8, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 9 — LBO CLINICAL FEATURES
// ══════════════════════════════
contentSlide("Large Bowel Obstruction — Clinical Features", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:12.7, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("The classic quartet of intestinal obstruction (Bailey & Love 28e):", {
x:0.5, y:1.1, w:12.3, h:0.5, fontSize:12, bold:true, color:DARK_BG
});
const quartet = ["Pain", "Distension", "Vomiting", "Absolute Constipation"];
const qcol = [RED, ORANGE, ACCENT2, GREEN];
quartet.forEach((q, i) => {
sld.addShape(pres.ShapeType.rect, { x:0.5 + i*3.1, y:1.65, w:2.8, h:0.7, fill:{color:qcol[i]}, line:{color:qcol[i]}, rounding:true });
sld.addText(q, { x:0.5 + i*3.1, y:1.65, w:2.8, h:0.7, fontSize:14, bold:true, color:WHITE, align:"center", valign:"middle" });
});
sld.addText("Distinguishing Features of LARGE Bowel Obstruction:", { x:0.5, y:2.5, w:12.3, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const lbo = [
"Often surprising LACK of preceding symptoms in complete LBO",
"Distension is pronounced and develops early — point of greatest distension is the caecum",
"Vomiting is LATE (vs. small bowel obstruction where it is early) → less dehydration",
"Constipation may pre-date acute episode (partial obstruction)",
"Caecal pain signals risk of impending caecal blow-out if ileocaecal valve is competent",
"Peritonism (rigidity, guarding, rebound) → perforation or ischaemia",
"Rectal examination: empty rectum (obstruction proximal to rectum) OR impacted faeces / mass",
"Incomplete / subacute obstruction: intermittent symptoms, may pass flatus",
];
lbo.forEach((t, i) => {
const col = i < 4 ? 0.5 : 6.7;
const row = i < 4 ? i : i - 4;
sld.addText([{ text:"▸ ", options:{bold:true, color:ACCENT} }, { text:t }],
{ x:col, y:2.98 + row*0.85, w:5.9, h:0.78, fontSize:11, color:DARK_BG });
});
sld.addText("Causes of LBO — Remember: VDC-H", { x:0.5, y:6.6, w:12.3, h:0.3, fontSize:12, bold:true, color:DARK_BG });
sld.addText("Volvulus | Diverticulitis (stricture) | Colorectal Cancer (most common) | Hirschsprung's disease / Hernia", {
x:0.5, y:6.92, w:12.3, h:0.25, fontSize:10.5, color:DARK_BG, italic:true
});
});
// ══════════════════════════════
// SLIDE 10 — LBO INVESTIGATIONS
// ══════════════════════════════
contentSlide("Large Bowel Obstruction — Investigations", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.0, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.55, y:1.05, w:6.45, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Laboratory Investigations", { x:0.5, y:1.1, w:5.6, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const labs = [
"FBC — anaemia, leucocytosis (infection/ischaemia)",
"U&E, creatinine — renal function, dehydration",
"LFTs — hepatic metastases",
"CRP, serum lactate — ischaemia / sepsis marker",
"Coagulation studies — pre-operative",
"Group & screen / cross-match",
"ABG — metabolic acidosis in ischaemia",
"Blood cultures if febrile",
"CEA (carcinoembryonic antigen) — if CRC suspected",
];
labs.forEach((t, i) => {
sld.addText([{ text:"• ", options:{bold:true, color:ACCENT2} }, { text:t }],
{ x:0.5, y:1.55 + i*0.6, w:5.6, h:0.54, fontSize:10.5, color:DARK_BG });
});
sld.addText("Imaging Investigations", { x:6.7, y:1.1, w:6.0, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const imgs = [
["Plain AXR (supine):", "Distended large bowel with haustra; coffee-bean sign in sigmoid volvulus; haustral folds (irregular, do not cross full width)"],
["Erect AXR:", "Fluid levels — confirm when doubt exists (less commonly used now)"],
["CT Abdomen/Pelvis (WITH contrast):", "Modality of choice — identifies site, cause, viability; detects perforation, staging of CRC"],
["Water-soluble contrast enema:", "Confirms site; differentiates pseudo-obstruction from mechanical obstruction"],
["Colonoscopy:", "Both diagnostic and therapeutic (stenting in obstructing CRC); avoid in peritonitis"],
["MRI pelvis:", "Staging rectal cancer; T3/T4 assessment, circumferential resection margin"],
];
imgs.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT} },
{ text:body }
], { x:6.7, y:1.55 + i*0.85, w:6.0, h:0.78, fontSize:10.5, color:DARK_BG });
});
sld.addText("Radiological features: Jejunum — valvulae conniventes (cross full width, regular); Large bowel — haustra (irregular, incomplete)", {
x:0.5, y:6.9, w:12.3, h:0.28, fontSize:8.5, italic:true, color:"7080A0"
});
});
// ══════════════════════════════
// SLIDE 11 — LBO MANAGEMENT PRINCIPLES
// ══════════════════════════════
contentSlide("Large Bowel Obstruction — Management Principles", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:5.8, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.35, y:1.05, w:6.65, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Resuscitation (All Patients)", { x:0.5, y:1.1, w:5.4, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const res = [
"IV access × 2 — wide-bore cannulae",
"IV fluid resuscitation (crystalloid / colloid)",
"Urinary catheter — monitor UO",
"Nasogastric tube — decompress, reduce aspiration risk",
"NBM (nil by mouth)",
"Analgesia (IV opioids as needed)",
"Prophylactic anticoagulation (LMWH)",
"Antibiotic prophylaxis pre-operatively",
"Correct electrolytes (K+, Na+, Mg2+)",
];
res.forEach((t, i) => {
sld.addText([{ text:"• ", options:{bold:true, color:GREEN} }, { text:t }],
{ x:0.5, y:1.55 + i*0.62, w:5.4, h:0.56, fontSize:10.5, color:DARK_BG });
});
sld.addText("Definitive Management (by Cause)", { x:6.5, y:1.1, w:6.2, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const def = [
["CRC — emergency:", "Hartmann's resection OR primary resection + anastomosis ± loop colostomy; on-table lavage if contaminated"],
["CRC — elective:", "Bowel prep + definitive resection; laparoscopic preferred"],
["CRC — obstructed:", "Self-expanding metal stent (SEMS) as bridge to surgery OR urgent surgery"],
["Sigmoid volvulus:", "Sigmoidoscopy + flatus tube → elective sigmoid colectomy; Hartmann's if gangrenous"],
["Pseudo-obstruction:", "Neostigmine IV; colonoscopic decompression; treat underlying cause"],
["Diverticular stricture:", "Resection + Hartmann's OR primary anastomosis"],
["Perforation:", "Emergency laparotomy, peritoneal washout, resection, stoma"],
["Caecal blow-out risk:", "Urgent caecostomy or right hemicolectomy"],
];
def.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT2} },
{ text:body }
], { x:6.5, y:1.55 + i*0.72, w:6.2, h:0.65, fontSize:10, color:DARK_BG });
});
});
// ══════════════════════════════
// SLIDE 12 — HIRSCHSPRUNG DISEASE
// ══════════════════════════════
contentSlide("Hirschsprung Disease (Congenital Megacolon)", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.2, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.75, y:1.05, w:6.25, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Pathophysiology", { x:0.5, y:1.1, w:5.8, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const path = [
"Absence of ganglion cells in myenteric (Auerbach) and submucosal (Meissner) plexuses → AGANGLIONIC distal colon",
"Failure of caudal migration of neural crest cells (5th–12th week gestation)",
"Incidence: 1 in 5000 live births; M:F = 4:1",
"RET proto-oncogene mutation (chromosome 10); 3–5% have Down syndrome",
"Absent peristaltic propagation → functional obstruction",
"ABNORMAL bowel = externally normal calibre distal segment; NORMAL bowel = proximal dilated segment",
"Distribution: Rectosigmoid ~80%; Splenic/transverse colon 17%; Total colonic aganglionosis 8%",
"Transition zone = area between aganglionic and ganglionic bowel",
];
path.forEach((t, i) => {
sld.addText([{ text:"• ", options:{bold:true, color:ACCENT} }, { text:t }],
{ x:0.5, y:1.55 + i*0.63, w:5.8, h:0.56, fontSize:10.5, color:DARK_BG });
});
sld.addText("Clinical Presentation", { x:6.9, y:1.1, w:5.8, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const clin = [
["Neonatal (>90%):", "Abdominal distension + bilious emesis + failure to pass meconium within 24 h of birth"],
["Delayed diagnosis:", "Chronic constipation, failure to thrive, persistent abdominal distension"],
["Digital rectal exam:", "Explosive passage of stool + gas on withdrawal of finger (relief)"],
["Hirschsprung enterocolitis:", "Alternating diarrhoea/obstipation + fever + haematochezia + peritonitis + shock → LEADING cause of death; incidence 18–50%"],
["Short segment:", "May be milder; Down syndrome associations"],
["Total colonic aganglionosis (TCA):", "Paradoxically milder early course; diagnosis often delayed"],
];
clin.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ORANGE} },
{ text:body }
], { x:6.9, y:1.55 + i*0.85, w:5.8, h:0.78, fontSize:10.5, color:DARK_BG });
});
sld.addText("Ref: Sabiston Textbook of Surgery | Grainger & Allison | Robbins Pathology", { x:0.4, y:7.0, w:8, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 13 — HIRSCHSPRUNG DIAGNOSIS & MANAGEMENT
// ══════════════════════════════
contentSlide("Hirschsprung Disease — Diagnosis & Management", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.0, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.55, y:1.05, w:6.45, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Diagnosis", { x:0.5, y:1.1, w:5.6, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const diag = [
["Contrast enema (1st-line neonates):", "Narrow aganglionic distal rectum + transition zone + dilated proximal sigmoid; failure to evacuate contrast after 24h suggests HD"],
["Anorectal manometry:", "Failure of internal sphincter to relax on rectal balloon distension — diagnostic in toddlers"],
["Suction rectal biopsy (gold standard):", "≥5 mm above dentate line; absent ganglia + hypertrophied nerve trunks + acetylcholinesterase staining; calretinin IHC now standard adjunct"],
["Full-thickness biopsy:", "Older children — under GA"],
["Abdominal X-ray:", "Dilated proximal bowel; gasless distal colon"],
];
diag.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT2} },
{ text:body }
], { x:0.5, y:1.55 + i*1.08, w:5.6, h:0.98, fontSize:10, color:DARK_BG });
});
sld.addText("Management", { x:6.7, y:1.1, w:6.0, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const mgmt = [
["Medical (interim):", "Daily rectal irrigations with warm NS via soft red rubber catheter (1–3×/day) until clear effluent"],
["Levelling colostomy:", "If irrigations fail, comorbidities present, long-segment disease, or poor family compliance"],
["Pull-through procedures:", ""],
[" Swenson (1949):", "Full-thickness dissection to dentate line; anastomosis"],
[" Soave:", "Endorectal dissection; seromuscular cuff left"],
[" Duhamel:", "Retrorectal pull-through; side-to-side anastomosis"],
[" Transanal (TEPT):", "Now preferred — minimal abdominal incision, shorter hospital stay"],
["Enterocolitis treatment:", "Bowel decompression, IV fluids, antibiotics (metronidazole + ampicillin), rectal irrigations"],
];
mgmt.forEach(([head, body], i) => {
const isBold = head.includes("Pull-through");
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT} },
{ text:body, options:{bold:isBold} }
], { x:6.7, y:1.55 + i*0.63, w:6.0, h:0.56, fontSize:10.5, color:DARK_BG });
});
sld.addText("Ref: Sabiston Textbook of Surgery (Hirschsprung Disease chapter) | Grainger & Allison's Radiology", { x:0.4, y:7.0, w:10, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 14 — NEONATAL OBSTRUCTION OVERVIEW
// ══════════════════════════════
contentSlide("Neonatal Intestinal Obstruction — Overview", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:12.7, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Key Principle (Mulholland & Greenfield's Surgery 7e):", { x:0.5, y:1.1, w:12.3, h:0.4, fontSize:13, bold:true, color:DARK_BG });
sld.addShape(pres.ShapeType.rect, { x:0.5, y:1.55, w:12.3, h:0.75, fill:{color:RED}, line:{color:RED} });
sld.addText("BILIOUS EMESIS IN A NEONATE = ACUTE MECHANICAL INTESTINAL OBSTRUCTION until proven otherwise → Emergent surgical evaluation required!", {
x:0.5, y:1.55, w:12.3, h:0.75, fontSize:12, bold:true, color:WHITE, align:"center", valign:"middle"
});
sld.addText("Clinical Approach:", { x:0.5, y:2.4, w:12.3, h:0.35, fontSize:12, bold:true, color:DARK_BG });
const app = [
"Abdominal distension → distal obstruction (flat abdomen suggests proximal obstruction)",
"Bilious gastric contents → obstruction DISTAL to ampulla of Vater",
"Passed meconium + fed adequately → less likely intestinal atresia; consider malrotation ± midgut volvulus",
"Trisomy 21 → higher probability of duodenal atresia OR Hirschsprung disease",
"Incarcerated inguinal hernia → examine groin as important cause of neonatal bowel obstruction",
];
app.forEach((t, i) => {
sld.addText([{ text:"▸ ", options:{bold:true, color:ACCENT2} }, { text:t }],
{ x:0.5, y:2.8 + i*0.55, w:12.3, h:0.5, fontSize:11, color:DARK_BG });
});
sld.addText("Imaging Algorithm:", { x:0.5, y:5.6, w:12.3, h:0.35, fontSize:12, bold:true, color:DARK_BG });
sld.addText([
{ text:"1. Plain abdominal radiograph (swallowed air = natural contrast agent)", options:{breakLine:true} },
{ text:"2. Contrast enema (retrograde) — if distal obstruction suspected", options:{breakLine:true} },
{ text:"3. Upper GI contrast series — if proximal obstruction or malrotation suspected (MOST USEFUL for malrotation)" },
], { x:0.5, y:5.98, w:12.3, h:0.9, fontSize:10.5, color:DARK_BG });
});
// ══════════════════════════════
// SLIDE 15 — NEONATAL SPECIFIC CONDITIONS TABLE
// ══════════════════════════════
contentSlide("Neonatal Intestinal Obstruction — Specific Conditions", sld => {
// Table header
const headers = ["Condition", "Key History / Features", "Physical Exam", "Key Investigation / Finding"];
const hwidths = [2.5, 3.8, 2.2, 4.5];
const hx = [0.3, 2.85, 6.7, 8.95];
headers.forEach((h, i) => {
sld.addShape(pres.ShapeType.rect, { x:hx[i], y:1.05, w:hwidths[i], h:0.5, fill:{color:DARK_BG}, line:{color:DARK_BG} });
sld.addText(h, { x:hx[i], y:1.05, w:hwidths[i], h:0.5, fontSize:10, bold:true, color:WHITE, align:"center", valign:"middle" });
});
const rows = [
["Intestinal Atresia / Stenosis", "Bilious emesis; failure to pass meconium", "Abdominal distension", "Plain AXR + contrast enema"],
["Duodenal Atresia / Stenosis", "Bilious or non-bilious emesis; Trisomy 21 association", "Gastric distension", "Plain AXR: 'Double-bubble' sign"],
["Malrotation ± Midgut Volvulus", "Bilious emesis + passed meconium + fed; EMERGENCY", "Peritonism if ischaemic", "Upper GI series (most useful); CT"],
["Hirschsprung Disease", "No meconium in 24h; abdominal distension; relief on PR exam", "Distension; explosive stool on withdrawal", "Contrast enema (transition zone); Rectal biopsy (gold standard)"],
["Meconium Ileus (CF)", "Family history CF; no meconium", "Distension; palpable doughy mass", "AXR: ground-glass appearance; Gastrografin enema (diagnostic + therapeutic)"],
["Imperforate Anus", "Failure to pass meconium; visible absent anus", "Absent or ectopic anus; VACTERL association", "Invertogram; MRI pelvis"],
];
const bgc = [PALE, WHITE, PALE, WHITE, PALE, WHITE];
rows.forEach((row, ri) => {
const y = 1.58 + ri * 0.88;
bgc.forEach((bg, ci) => {
sld.addShape(pres.ShapeType.rect, { x:hx[ci], y, w:hwidths[ci], h:0.86, fill:{color:bg}, line:{color:"C0C8E0"} });
sld.addText(row[ci], { x:hx[ci]+0.05, y:y+0.03, w:hwidths[ci]-0.1, h:0.8, fontSize:9.5, color:DARK_BG, valign:"middle", wrap:true });
});
});
sld.addText("Ref: Mulholland & Greenfield's Surgery 7e (Table 101.2) | Harriet Lane Handbook 23e", { x:0.4, y:7.0, w:10, h:0.25, fontSize:8, italic:true, color:"7080A0" });
});
// ══════════════════════════════
// SLIDE 16 — DIVERTICULAR DISEASE
// ══════════════════════════════
contentSlide("Diverticular Disease of the Colon", sld => {
sld.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:6.0, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addShape(pres.ShapeType.rect, { x:6.55, y:1.05, w:6.45, h:5.9, fill:{color:WHITE}, line:{color:"C0C8E0"} });
sld.addText("Overview & Clinical Features", { x:0.5, y:1.1, w:5.6, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const cl = [
"Pulsion diverticula — mucosal herniation through muscularis at vascular entry points",
"Most common in sigmoid colon",
"Diverticulosis: mostly asymptomatic or intermittent left lower quadrant pain",
"Diverticulitis: inflammation/micro-perforation → pain (LLQ), fever, leucocytosis, altered bowel habit",
"Left-sided tenderness ('left-sided appendicitis')",
"Complications: perforation → peritonitis; abscess; fistula (colovesical, colovaginal); stricture → LBO; massive lower GI bleed",
"Modified Hinchey Classification for perforation:",
" I: Pericolic abscess | II: Pelvic abscess | III: Purulent peritonitis | IV: Faeculent peritonitis",
];
cl.forEach((t, i) => {
sld.addText([{ text:"• ", options:{bold:true, color:ACCENT2} }, { text:t }],
{ x:0.5, y:1.55 + i*0.66, w:5.6, h:0.6, fontSize:10.5, color:DARK_BG });
});
sld.addText("Investigations & Management", { x:6.7, y:1.1, w:6.0, h:0.4, fontSize:13, bold:true, color:DARK_BG });
const mg = [
["Investigations:", "FBC (leucocytosis), CRP; CT abdomen/pelvis (gold standard — identifies abscess, perforation, fistula)"],
["Mild diverticulitis:", "Oral antibiotics (e.g. co-amoxiclav or metronidazole + ciprofloxacin); liquid diet; analgesia; outpatient if uncomplicated"],
["Pericolic abscess:", "IV antibiotics; CT-guided percutaneous drainage if >4 cm"],
["Perforation / peritonitis (Hinchey III/IV):", "Emergency laparotomy; Hartmann's procedure (resect + end-colostomy) or primary anastomosis + defunctioning ileostomy"],
["Elective colectomy:", "After 2 or more episodes; Hinchey II recurrence; fistula; stricture"],
["Massive bleeding:", "Colonoscopy ± embolisation; segmental resection if uncontrolled"],
];
mg.forEach(([head, body], i) => {
sld.addText([
{ text:head+" ", options:{bold:true, color:ACCENT} },
{ text:body }
], { x:6.7, y:1.55 + i*0.88, w:6.0, h:0.8, fontSize:10.5, color:DARK_BG });
});
});
// ══════════════════════════════
// SLIDE 17 — KEY TAKE-HOME POINTS
// ══════════════════════════════
{
const sld = pres.addSlide();
sld.background = { color: DARK_BG };
sld.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.9, fill:{color: ACCENT}, line:{color: ACCENT} });
sld.addText("KEY TAKE-HOME POINTS", { x:0.4, y:0.05, w:12.5, h:0.8, fontSize:22, bold:true, color:DARK_BG, valign:"middle", charSpacing:2 });
const points = [
["LBO", "The cardinal quartet: Pain + Distension + Vomiting + Absolute Constipation. LBO has LATE vomiting and profound distension."],
["CRC", "Most common cause of LBO in developed world; Dukes' staging guides prognosis; colonoscopy + biopsy is gold standard."],
["Volvulus", "Sigmoid volvulus → coffee-bean sign on AXR; first-line = sigmoidoscopy + flatus tube; definitive = sigmoid colectomy."],
["Hirschsprung", "Absent ganglion cells in distal colon; no meconium in 24h; gold standard = suction rectal biopsy; definitive = pull-through procedure."],
["Neonatal", "BILIOUS EMESIS = obstruction until proven otherwise → EMERGENT surgical evaluation. Plain AXR → contrast enema or UGI series."],
["Diverticular", "Hinchey III/IV → emergency Hartmann's; uncomplicated → antibiotics; elective resection after 2+ episodes."],
];
points.forEach(([tag, text], i) => {
sld.addShape(pres.ShapeType.rect, { x:0.35, y:0.98 + i*0.98, w:1.5, h:0.78, fill:{color:ACCENT2}, line:{color:ACCENT2}, rounding:true });
sld.addText(tag, { x:0.35, y:0.98 + i*0.98, w:1.5, h:0.78, fontSize:13, bold:true, color:DARK_BG, align:"center", valign:"middle" });
sld.addText(text, { x:2.1, y:0.98 + i*0.98, w:10.8, h:0.78, fontSize:11, color:WHITE, valign:"middle" });
});
sld.addShape(pres.ShapeType.rect, { x:0, y:7.3, w:13.3, h:0.2, fill:{color: ACCENT}, line:{color: ACCENT} });
sld.addText("Bailey & Love 28e | Sabiston Surgery | Mulholland & Greenfield Surgery 7e | Grainger & Allison Radiology | Robbins Pathology", {
x:0.2, y:7.35, w:13.0, h:0.15, fontSize:7, color:DARK_BG, italic:true, valign:"middle"
});
}
// ── write file ──
pres.writeFile({ fileName: "/home/daytona/workspace/large-intestine-pptx/Large_Intestine_Disorders_Surgery.pptx" })
.then(() => console.log("DONE"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/large-intestine-pptx && node build.js 2>&1
ls -lh /home/daytona/workspace/large-intestine-pptx/
Large Intestine Disorders Surgery
Presentation · PPTX
| Slide | Title |
|---|---|
| 1 | Title slide — "Disorders of the Large Intestine" |
| 2 | Contents Overview |
| 3 | Anatomy & Function of the Large Intestine |
| 4 | Colorectal Cancer — Overview & Risk Factors |
| 5 | CRC — Clinical Features & Investigations |
| 6 | CRC — Management Principles (with textbook colonoscopy image) |
| 7 | Sigmoid Volvulus — Pathology & Clinical Features |
| 8 | Sigmoid Volvulus — Management (with AXR image) |
| 9 | Large Bowel Obstruction — Clinical Features |
| 10 | LBO — Investigations |
| 11 | LBO — Management Principles |
| 12 | Hirschsprung Disease — Pathophysiology & Clinical Presentation |
| 13 | Hirschsprung Disease — Diagnosis & Management (all pull-through procedures) |
| 14 | Neonatal Intestinal Obstruction — Overview |
| 15 | Neonatal Obstruction — Specific Conditions Table |
| 16 | Diverticular Disease |
| 17 | Key Take-Home Points |