Topic is Describe the clinical features, investigations and principles of management of disorders of small and large intestine including neonatal obstruction and Short gut syndrome Help me to prepare surgery presentation on this topic
mkdir -p /home/daytona/workspace/intestine-surgery-ppt && ls /home/daytona/works…
~/intestine-surgery-ppt/make_pptx.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.title = 'Disorders of Small & Large Intestine';
// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
navy: '0D2B55',
teal: '1A7A8C',
sky: '3AAED8',
gold: 'F5A623',
white: 'FFFFFF',
offwhite:'F0F4F8',
light: 'D6E8F0',
dark: '0A1E3A',
gray: '64748B',
lightgray:'B0C4CE',
red: 'C0392B',
green: '1E8449',
};
// ─── HELPERS ─────────────────────────────────────────────────────────────────
function addBg(slide, color) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:'100%', fill:{color} });
}
function header(slide, text, y=0.18, color=C.white, size=13, bold=false) {
slide.addText(text, { x:0.4, y, w:9.2, h:0.35, fontSize:size, bold, color, fontFace:'Calibri', margin:0 });
}
function sectionTag(slide, text) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:0.55, fill:{color:C.teal} });
slide.addText(text, { x:0.4, y:0.07, w:9.2, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', margin:0 });
}
function divider(slide, y=0.58, color=C.gold) {
slide.addShape(pres.ShapeType.line, { x:0.4, y, w:9.2, h:0, line:{color, width:1.5} });
}
function title2(slide, text, y=0.62) {
slide.addText(text, { x:0.4, y, w:9.2, h:0.55, fontSize:20, bold:true, color:C.navy, fontFace:'Calibri', margin:0 });
}
function bullets(slide, items, x, y, w, h, size=12, color=C.dark) {
const arr = items.map((it, i) => {
if (typeof it === 'object') {
return { text: it.text, options: { bullet: it.sub ? {indent:20} : {indent:8}, fontSize: it.sub ? size-1 : size, color: it.sub ? C.gray : color, bold: !!it.bold, breakLine: true } };
}
return { text: it, options: { bullet:{indent:8}, fontSize:size, color, breakLine: true } };
});
arr[arr.length-1].options.breakLine = false;
slide.addText(arr, { x, y, w, h, fontFace:'Calibri', valign:'top' });
}
function box(slide, x, y, w, h, fill, text, tsize=11, tcolor=C.white, bold=false) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill:{color:fill}, line:{color:fill} });
slide.addText(text, { x, y, w, h, fontSize:tsize, bold, color:tcolor, fontFace:'Calibri', align:'center', valign:'middle', margin:4 });
}
function twoCol(slide, leftTitle, leftItems, rightTitle, rightItems, yStart=1.25) {
const h = 3.6;
slide.addShape(pres.ShapeType.rect, { x:0.3, y:yStart, w:4.5, h, fill:{color:C.offwhite}, line:{color:C.light} });
slide.addShape(pres.ShapeType.rect, { x:5.1, y:yStart, w:4.5, h, fill:{color:C.offwhite}, line:{color:C.light} });
slide.addText(leftTitle, { x:0.3, y:yStart, w:4.5, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
slide.addText(rightTitle, { x:5.1, y:yStart, w:4.5, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(slide, leftItems, 0.35, yStart+0.45, 4.35, h-0.5, 11);
bullets(slide, rightItems, 5.15, yStart+0.45, 4.35, h-0.5, 11);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 - TITLE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.navy);
// decorative top bar
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:1.1, fill:{color:C.teal} });
s.addShape(pres.ShapeType.rect, { x:0, y:1.05, w:'100%', h:0.08, fill:{color:C.gold} });
// title
s.addText('Disorders of', { x:0.5, y:0.08, w:9, h:0.5, fontSize:18, bold:false, color:C.light, fontFace:'Calibri', margin:0 });
s.addText('Small & Large Intestine', { x:0.5, y:0.55, w:9, h:0.55, fontSize:26, bold:true, color:C.white, fontFace:'Calibri', margin:0 });
s.addText('Including Neonatal Obstruction & Short Gut Syndrome', {
x:0.5, y:1.3, w:9, h:0.5, fontSize:17, bold:false, color:C.light, fontFace:'Calibri', align:'center', margin:0
});
// subtitle box
s.addShape(pres.ShapeType.rect, { x:2.5, y:2.1, w:5, h:0.55, fill:{color:C.gold}, line:{color:C.gold} });
s.addText('General Surgery | Academic Presentation', { x:2.5, y:2.1, w:5, h:0.55, fontSize:13, bold:true, color:C.dark, fontFace:'Calibri', align:'center', valign:'middle', margin:0 });
// bottom section boxes
const topics = ['Small Intestine Disorders','Large Intestine Disorders','Neonatal Obstruction','Short Gut Syndrome'];
topics.forEach((t, i) => {
box(s, 0.3 + i*2.4, 3.1, 2.2, 0.7, i%2===0 ? C.teal : C.sky, t, 10, C.white, true);
});
// source note
s.addText('Sources: Bailey & Love 28e | Mulholland & Greenfield Surgery 7e | Harriet Lane Handbook 23e', {
x:0.3, y:4.9, w:9.4, h:0.3, fontSize:8, color:C.lightgray, fontFace:'Calibri', align:'center', margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 - OUTLINE / CONTENTS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'OVERVIEW');
divider(s);
title2(s, 'Lecture Outline', 0.65);
const cols = [
['Small Intestine Disorders',
'Intestinal Obstruction', 'Crohn\'s Disease', 'Malabsorption Syndromes',
'Mesenteric Ischaemia', 'Fistulae & Tumours'],
['Large Intestine Disorders',
'Colorectal Cancer', 'Diverticular Disease', 'Ulcerative Colitis',
'Volvulus', 'Hirschsprung Disease'],
['Neonatal Obstruction',
'Intestinal Atresia', 'Duodenal Atresia', 'Malrotation & Volvulus',
'Meconium Ileus', 'Hirschsprung Disease'],
['Short Gut Syndrome',
'Definition & Causes', 'Pathophysiology', 'Clinical Features',
'Medical Management', 'Surgical Options'],
];
cols.forEach((col, i) => {
const x = 0.25 + i*2.45;
s.addShape(pres.ShapeType.rect, { x, y:1.25, w:2.25, h:3.8, fill:{color:i%2===0?C.teal:C.navy}, line:{color:C.white} });
s.addText(col[0], { x, y:1.25, w:2.25, h:0.55, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle', margin:4 });
const items = col.slice(1).map(t => ({ text: t, options: { bullet:{indent:8}, fontSize:10, color:C.white, breakLine:true } }));
items[items.length-1].options.breakLine = false;
s.addText(items, { x:x+0.1, y:1.82, w:2.1, h:3.1, fontFace:'Calibri', valign:'top' });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 - SMALL INTESTINE: ANATOMY & OVERVIEW
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 1 | SMALL INTESTINE DISORDERS');
divider(s);
title2(s, 'Anatomy & Overview', 0.65);
twoCol(s,
'Anatomical Features',
[
'Length: ~6–7 m (living) or ~3 m (cadaver)',
'Segments: Duodenum, Jejunum, Ileum',
'Duodenum: C-shaped, retroperitoneal, 25 cm',
'Jejunum: Upper 2/5 of post-duodenal small bowel',
'Ileum: Lower 3/5; ileocaecal valve terminates it',
'Blood supply: Superior mesenteric artery (SMA)',
'Lymphatics: Lacteals drain into cisterna chyli',
],
'Functions',
[
'Digestion: Brush border enzymes, pancreatic juice',
'Absorption: Nutrients, vitamins, water, electrolytes',
'Jejunum absorbs: sugars, amino acids, fatty acids',
'Ileum absorbs: Vitamin B12, bile salts (terminal)',
'Immune: Peyer\'s patches (lymphoid tissue)',
'Endocrine: Secretin, CCK, GIP, GLP-1 secretion',
'Motility: Segmentation + peristalsis',
],
1.22
);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 - INTESTINAL OBSTRUCTION (Small Bowel)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 1 | SMALL INTESTINE DISORDERS');
divider(s);
title2(s, 'Small Bowel Obstruction (SBO)', 0.65);
// Causes box
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:3.2, h:3.8, fill:{color:C.light}, line:{color:C.teal} });
s.addText('CAUSES', { x:0.3, y:1.22, w:3.2, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
{text:'Mechanical (80%)', bold:true},
'Adhesions (post-op) - most common',
'Hernias (inguinal, femoral, incisional)',
'Neoplasms (intraluminal / extrinsic)',
'Crohn\'s disease (strictures)',
'Gallstone ileus',
'Volvulus',
{text:'Paralytic (Functional)', bold:true},
'Post-surgery ileus',
'Peritonitis, Hypokalaemia',
'Mesenteric ischaemia',
], 0.35, 1.65, 3.05, 3.3, 10.5);
// Clinical Features box
s.addShape(pres.ShapeType.rect, { x:3.7, y:1.22, w:2.9, h:3.8, fill:{color:C.light}, line:{color:C.navy} });
s.addText('CLINICAL FEATURES', { x:3.7, y:1.22, w:2.9, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
{text:'Cardinal symptoms:', bold:true},
'Colicky abdominal pain',
'Vomiting (early, bilious)',
'Abdominal distention',
'Absolute constipation',
{text:'Signs:', bold:true},
'Visible peristalsis',
'High-pitched bowel sounds',
'Succussion splash',
'Dehydration / tachycardia',
{text:'Strangulation signs:', bold:true},
'Continuous severe pain',
'Fever, peritonism, shock',
], 3.75, 1.65, 2.8, 3.3, 10.5);
// Investigations + Management box
s.addShape(pres.ShapeType.rect, { x:6.75, y:1.22, w:3.0, h:3.8, fill:{color:'FFF8EC'}, line:{color:C.gold} });
s.addText('INVESTIGATIONS', { x:6.75, y:1.22, w:3.0, h:0.38, fontSize:11, bold:true, color:C.dark, fontFace:'Calibri', align:'center', fill:{color:C.gold} });
bullets(s, [
{text:'Radiological:', bold:true},
'X-ray abdomen: dilated loops, air-fluid levels, no gas in colon',
'CT abdomen: Gold standard - point of transition, strangulation',
'USG: limited role',
{text:'Labs:', bold:true},
'FBC, U&E, ABG',
'Raised WCC, lactate - strangulation',
{text:'Management:', bold:true},
'Drip & suck (IV fluids + NG)',
'Monitor vitals & urine output',
'Early surgery if strangulation',
'Surgery: adhesiolysis, resection',
], 6.8, 1.65, 2.85, 3.3, 10);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 - CROHN'S DISEASE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 1 | SMALL INTESTINE DISORDERS');
divider(s);
title2(s, "Crohn's Disease", 0.65);
twoCol(s,
'Clinical Features',
[
'Transmural granulomatous inflammation',
'Skip lesions; any part of GI tract',
'Most common: terminal ileum (ileocolitis)',
'Cramping abdominal pain (RIF)',
'Diarrhoea (non-bloody or bloody)',
'Weight loss, fever, malaise',
'RIF mass (thickened ileum)',
'Perianal disease: fistulae, tags, abscesses',
'Extra-intestinal: uveitis, arthritis, erythema nodosum',
],
'Investigations & Management',
[
'Colonoscopy + biopsy: cobblestone, fissuring ulcers',
'Histology: non-caseating granulomas',
'MRI enterography: bowel wall thickening, fistulae',
'CT scan: abscesses, complications',
'CRP, ESR, FBC, albumin',
'─── MANAGEMENT ───',
'Medical: steroids, azathioprine, biologics (anti-TNF)',
'5-ASA for mild disease',
'Surgery: reserved for complications',
'Strictureplasty / resection',
'Avoid excess resection (short gut risk)',
],
1.22
);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 - MESENTERIC ISCHAEMIA & OTHER CONDITIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 1 | SMALL INTESTINE DISORDERS');
divider(s);
title2(s, 'Mesenteric Ischaemia & Other Conditions', 0.65);
// Mesenteric Ischaemia
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.25, w:4.65, h:3.8, fill:{color:C.offwhite}, line:{color:C.red} });
s.addText('MESENTERIC ISCHAEMIA', { x:0.3, y:1.25, w:4.65, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.red} });
bullets(s, [
{text:'Causes:', bold:true},
'SMA embolism (AF - most common)',
'SMA thrombosis (atherosclerosis)',
'Non-occlusive (low-flow states)',
'Mesenteric vein thrombosis',
{text:'Features: "Pain out of proportion"', bold:true},
'Severe periumbilical pain, N&V',
'Bright red blood per rectum (late)',
'Signs of peritonitis (bowel infarction)',
{text:'Investigations:', bold:true},
'CT angiography: diagnostic',
'Raised lactate, WCC, amylase',
{text:'Management:', bold:true},
'Resuscitation, anticoagulation',
'Surgical embolectomy / resection',
'Endovascular options',
], 0.35, 1.7, 4.45, 3.3, 10.5);
// Other conditions
s.addShape(pres.ShapeType.rect, { x:5.25, y:1.25, w:4.5, h:3.8, fill:{color:C.offwhite}, line:{color:C.teal} });
s.addText('OTHER SMALL INTESTINE CONDITIONS', { x:5.25, y:1.25, w:4.5, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
{text:'Malabsorption Syndromes:', bold:true},
'Coeliac disease: gluten-sensitive enteropathy',
'Villous atrophy, anti-TTG antibodies',
'Gluten-free diet; duodenal biopsy (gold std)',
{text:'Enterocutaneous Fistula:', bold:true},
'Connects bowel to skin surface',
'Causes: Crohn\'s, post-op, radiation',
'Mx: SNAP (Sepsis, Nutrition, Anatomy, Procedure)',
{text:'Small Bowel Tumours:', bold:true},
'Rare; adenocarcinoma, GIST, lymphoma, carcinoid',
'Present with obstruction, bleeding, weight loss',
{text:'Meckel\'s Diverticulum:', bold:true},
'Rule of 2s: 2% pop, 2 feet from IC valve, 2 inches',
'Complications: bleeding, obstruction, diverticulitis',
], 5.3, 1.7, 4.35, 3.3, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 - LARGE INTESTINE: OVERVIEW
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.dark);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:0.55, fill:{color:C.navy} });
s.addText('SECTION 2 | LARGE INTESTINE DISORDERS', { x:0.4, y:0.08, w:9.2, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', margin:0 });
s.addText('Large Intestine: Overview & Anatomy', { x:0.4, y:0.7, w:9.2, h:0.55, fontSize:22, bold:true, color:C.white, fontFace:'Calibri', margin:0 });
s.addShape(pres.ShapeType.line, { x:0.4, y:1.28, w:9.2, h:0, line:{color:C.gold, width:1.5} });
const segments = [
['Caecum','Contains appendix; right iliac fossa'],
['Ascending\nColon','Retroperitoneal; right side'],
['Transverse\nColon','Mobile; most common volvulus'],
['Descending\nColon','Retroperitoneal; left side'],
['Sigmoid\nColon','Mobile; prone to volvulus & diverticulosis'],
['Rectum','12-15 cm; no taenia coli; extraperitoneal lower 1/3'],
];
segments.forEach((seg, i) => {
const x = 0.25 + (i%3)*3.25;
const y = 1.45 + Math.floor(i/3)*1.85;
s.addShape(pres.ShapeType.rect, { x, y, w:3.1, h:1.65, fill:{color:C.navy}, line:{color:C.teal} });
s.addText(seg[0], { x, y, w:3.1, h:0.45, fontSize:12, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle', margin:0 });
s.addText(seg[1], { x:x+0.1, y:y+0.5, w:2.9, h:1.1, fontSize:11, color:C.light, fontFace:'Calibri', valign:'top', margin:4 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 - COLORECTAL CANCER
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 2 | LARGE INTESTINE DISORDERS');
divider(s);
title2(s, 'Colorectal Cancer (CRC)', 0.65);
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:2.8, h:3.8, fill:{color:C.offwhite}, line:{color:C.navy} });
s.addText('RISK FACTORS & FEATURES', { x:0.3, y:1.22, w:2.8, h:0.4, fontSize:10, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
{text:'Risk Factors:', bold:true},
'Age >50, male sex',
'FAP (APC gene)',
'HNPCC / Lynch syndrome',
'IBD (UC > Crohn\'s)',
'Diet: high red/processed meat',
{text:'Clinical Features:', bold:true},
'Change in bowel habit',
'Rectal bleeding / dark stool',
'Tenesmus (rectal tumours)',
'Abdominal mass / distension',
'Weight loss, iron-def anaemia',
{text:'Left vs Right:', bold:true},
'Right: occult bleeding, anaemia',
'Left: obstruction, PR bleeding',
], 0.35, 1.65, 2.65, 3.3, 10.5);
s.addShape(pres.ShapeType.rect, { x:3.25, y:1.22, w:2.9, h:3.8, fill:{color:C.offwhite}, line:{color:C.teal} });
s.addText('INVESTIGATIONS', { x:3.25, y:1.22, w:2.9, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
'Colonoscopy + biopsy (gold std)',
'CT colonography (virtual)',
'CT chest/abdomen/pelvis (staging)',
'MRI pelvis (rectal cancer)',
'PET scan (mets assessment)',
'CEA: monitoring, not diagnosis',
'FBC: iron-deficiency anaemia',
{text:'Duke\'s / TNM Staging:', bold:true},
'A: Mucosa/submucosa',
'B: Muscle, no nodes',
'C: Node positive',
'D: Distant metastases',
'5yr survival: A=83%, D=5%',
], 3.3, 1.65, 2.75, 3.3, 10.5);
s.addShape(pres.ShapeType.rect, { x:6.3, y:1.22, w:3.45, h:3.8, fill:{color:'FFF8EC'}, line:{color:C.gold} });
s.addText('MANAGEMENT', { x:6.3, y:1.22, w:3.45, h:0.4, fontSize:11, bold:true, color:C.dark, fontFace:'Calibri', align:'center', fill:{color:C.gold} });
bullets(s, [
{text:'Surgical (curative intent):', bold:true},
'Right hemicolectomy (caecum/ascending)',
'Left hemicolectomy (descending)',
'Sigmoid colectomy',
'Anterior resection (upper rectum)',
'Abdominoperineal resection (low rectum)',
'TME (Total Mesorectal Excision)',
{text:'Adjuvant Therapy:', bold:true},
'Colon: FOLFOX chemo (stage III/IV)',
'Rectum: Neoadjuvant CRT (staging T3/4)',
{text:'Emergency (obstruction):', bold:true},
'Hartmann\'s procedure',
'Stenting as bridge to surgery',
], 6.35, 1.65, 3.3, 3.3, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 - DIVERTICULAR DISEASE & VOLVULUS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 2 | LARGE INTESTINE DISORDERS');
divider(s);
title2(s, 'Diverticular Disease & Colonic Volvulus', 0.65);
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:4.6, h:3.8, fill:{color:C.offwhite}, line:{color:C.teal} });
s.addText('DIVERTICULAR DISEASE', { x:0.3, y:1.22, w:4.6, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
{text:'Definition:', bold:true},
'Pulsion diverticula in sigmoid colon (most common)',
'False diverticula: mucosa + submucosa herniate',
{text:'Clinical Spectrum:', bold:true},
'Diverticulosis: asymptomatic (80%)',
'Diverticulitis: inflamed - LIF pain, fever, WCC',
'Pericolic abscess: swinging fever, tender mass',
'Perforation: peritonitis',
'Fistula: colovesical (pneumaturia)',
'Haemorrhage: painless PR bleeding',
{text:'Investigations:', bold:true},
'CT abdomen: choice for acute diverticulitis',
'Colonoscopy after resolution (exclude cancer)',
{text:'Management:', bold:true},
'Uncomplicated: high-fibre diet, antispasmodics',
'Acute: NBM, IV antibiotics (Augmentin / metronidazole)',
'Abscess: CT-guided drainage',
'Perforation: Hartmann\'s or primary anastomosis',
], 0.35, 1.65, 4.45, 3.35, 10.5);
s.addShape(pres.ShapeType.rect, { x:5.1, y:1.22, w:4.65, h:3.8, fill:{color:C.offwhite}, line:{color:C.navy} });
s.addText('COLONIC VOLVULUS', { x:5.1, y:1.22, w:4.65, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
{text:'Sigmoid Volvulus (most common):', bold:true},
'Twisting on mesosigmoid pedicle',
'Elderly, constipated, institutionalised',
'Massively distended abdomen, absolute constipation',
'AXR: "coffee bean" / inverted U sign',
'Management: rigid sigmoidoscopy + flatus tube',
'Elective resection after decompression',
{text:'Caecal Volvulus:', bold:true},
'Mobile caecum with incomplete fixation',
'Younger patients',
'AXR: kidney-shaped mass in LUQ',
'CT confirms diagnosis',
'Management: right hemicolectomy',
{text:'Transverse Colon Volvulus:', bold:true},
'Rare; conservative + surgical as needed',
], 5.15, 1.65, 4.5, 3.35, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 - ULCERATIVE COLITIS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 2 | LARGE INTESTINE DISORDERS');
divider(s);
title2(s, 'Ulcerative Colitis (UC)', 0.65);
twoCol(s,
'Clinical Features & Investigations',
[
'Mucosal inflammation from rectum upwards',
'Continuous (no skip lesions)',
'Bloody diarrhoea (hallmark)',
'Urgency, tenesmus, mucus PR',
'Fever, weight loss, anaemia',
'Toxic megacolon: severe, life-threatening',
'─── Investigations ───',
'Colonoscopy: granular mucosa, pseudopolyps',
'Biopsy: crypt abscesses, goblet cell depletion',
'AXR: mucosal thickening, toxic megacolon',
'CT: toxic megacolon or perforation',
'ANCA positive (p-ANCA)',
'FBC, CRP, ESR, albumin, stool cultures',
],
'Management Principles',
[
'─── Medical ───',
'Mild-moderate: oral/topical 5-ASA (mesalazine)',
'Moderate-severe: oral steroids',
'Refractory: azathioprine, ciclosporin',
'Biologics: infliximab (anti-TNF)',
'─── Surgical (25% need surgery) ───',
'Indications: toxic megacolon, perforation,',
' haemorrhage, dysplasia, failed medical Rx',
'Proctocolectomy with ileal pouch-anal anastomosis',
' (IPAA / J-pouch): curative',
'Panproctocolectomy + ileostomy (Brooke)',
'─── Cancer Risk ───',
'Duration >10y: annual colonoscopy surveillance',
'UC is a significant CRC risk factor',
],
1.22
);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 - NEONATAL OBSTRUCTION OVERVIEW
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.dark);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:0.55, fill:{color:'1A3A5C'} });
s.addText('SECTION 3 | NEONATAL INTESTINAL OBSTRUCTION', { x:0.4, y:0.08, w:9.2, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', margin:0 });
s.addText('Neonatal Intestinal Obstruction: Overview', { x:0.4, y:0.7, w:9.2, h:0.55, fontSize:22, bold:true, color:C.white, fontFace:'Calibri', margin:0 });
s.addShape(pres.ShapeType.line, { x:0.4, y:1.28, w:9.2, h:0, line:{color:C.gold, width:1.5} });
// Key principle box
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.35, w:9.4, h:0.65, fill:{color:C.red}, line:{color:C.red} });
s.addText('KEY PRINCIPLE: Bilious vomiting in a neonate = mechanical intestinal obstruction until proven otherwise. Requires EMERGENT surgical evaluation.', {
x:0.3, y:1.35, w:9.4, h:0.65, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', valign:'middle', margin:4
});
// Clinical approach
s.addShape(pres.ShapeType.rect, { x:0.3, y:2.1, w:4.5, h:2.8, fill:{color:'0D2B55'}, line:{color:C.teal} });
s.addText('CLINICAL ASSESSMENT', { x:0.3, y:2.1, w:4.5, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle' });
bullets(s, [
'Bilious emesis: cardinal symptom',
'Abdominal distension (distal > proximal obstruction)',
'Failure to pass meconium within 48h',
'Flat abdomen suggests proximal obstruction',
'Incarcerated inguinal hernia: physical exam',
'Trisomy 21 → suspect duodenal atresia / Hirschsprung',
'Passage of meconium + bilious emesis → malrotation/volvulus',
], 0.35, 2.55, 4.35, 2.3, 11, C.light);
// Imaging approach
s.addShape(pres.ShapeType.rect, { x:5.0, y:2.1, w:4.7, h:2.8, fill:{color:'0D2B55'}, line:{color:C.teal} });
s.addText('DIAGNOSTIC APPROACH', { x:5.0, y:2.1, w:4.7, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle' });
bullets(s, [
'Step 1: Plain abdominal X-ray (gas as natural contrast)',
'Double-bubble → duodenal atresia',
'Multiple dilated loops + no distal gas → jejunoileal atresia',
'Gasless colon → Hirschsprung / Meconium ileus',
'Step 2: Contrast enema (retrograde)',
'Microcolon → unused (proximal obstruction / meconium ileus)',
'Transition zone → Hirschsprung disease',
'Step 3: Upper GI contrast study',
'Best for malrotation',
'Ligament of Treitz position assessment',
], 5.05, 2.55, 4.55, 2.3, 11, C.light);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 - INTESTINAL ATRESIA
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 3 | NEONATAL INTESTINAL OBSTRUCTION');
divider(s);
title2(s, 'Intestinal Atresia / Stenosis', 0.65);
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:9.4, h:0.85, fill:{color:C.light}, line:{color:C.teal} });
s.addText([
{text:'Types: ', options:{bold:true, color:C.navy}},
{text:'Type I', options:{bold:true, color:C.teal}},
{text:' (Intraluminal web) | ', options:{color:C.gray}},
{text:'Type II', options:{bold:true, color:C.teal}},
{text:' (Cord-like atresia) | ', options:{color:C.gray}},
{text:'Type IIIa', options:{bold:true, color:C.teal}},
{text:' (Mesenteric gap) | ', options:{color:C.gray}},
{text:'Type IIIb', options:{bold:true, color:C.red}},
{text:' (Apple-peel / Christmas tree) | ', options:{color:C.gray}},
{text:'Type IV', options:{bold:true, color:C.red}},
{text:' (Multiple atresias)', options:{color:C.gray}},
], { x:0.35, y:1.25, w:9.3, h:0.75, fontFace:'Calibri', fontSize:11, valign:'middle', margin:4 });
s.addShape(pres.ShapeType.rect, { x:0.3, y:2.18, w:4.55, h:2.8, fill:{color:C.offwhite}, line:{color:C.navy} });
s.addText('DUODENAL ATRESIA', { x:0.3, y:2.18, w:4.55, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
'Incidence: 1 in 5000 births',
'30% associated with Trisomy 21 (Down syndrome)',
'Failure of recanalization at 8-10 weeks gestation',
{text:'Features:', bold:true},
'Bilious or non-bilious vomiting',
'Gastric / proximal duodenal distension',
'AXR: DOUBLE-BUBBLE SIGN (classic)',
' Dilated stomach + dilated proximal duodenum',
{text:'Management:', bold:true},
'NG decompression + IV fluids',
'Cardiac echo (associated CHD)',
'Surgery: Duodenoduodenostomy (diamond anastomosis)',
'Prognosis excellent with repair',
], 0.35, 2.62, 4.4, 2.35, 10.5);
s.addShape(pres.ShapeType.rect, { x:5.05, y:2.18, w:4.7, h:2.8, fill:{color:C.offwhite}, line:{color:C.teal} });
s.addText('JEJUNOILEAL ATRESIA', { x:5.05, y:2.18, w:4.7, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
'Vascular accident in utero (mesenteric interruption)',
'Distal ileum most common site',
'Multiple atresias in 3.6-20% of cases',
{text:'Features:', bold:true},
'Bilious vomiting + failure to pass meconium',
'Progressive abdominal distension',
'Hyperperistaltic bowel loops visible',
{text:'AXR:', bold:true},
'Multiple dilated loops + air-fluid levels',
'Microcolon on contrast enema',
{text:'Management:', bold:true},
'Resection of atretic segment',
'Primary end-to-end anastomosis',
'Short bowel syndrome risk with extensive resection',
], 5.1, 2.62, 4.55, 2.35, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 - MALROTATION & HIRSCHSPRUNG
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 3 | NEONATAL INTESTINAL OBSTRUCTION');
divider(s);
title2(s, 'Malrotation with Volvulus & Hirschsprung Disease', 0.65);
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:4.6, h:3.8, fill:{color:'FFF0F0'}, line:{color:C.red} });
s.addText('MALROTATION & MIDGUT VOLVULUS', { x:0.3, y:1.22, w:4.6, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.red} });
bullets(s, [
{text:'Surgical emergency! Risk of entire midgut necrosis', bold:true},
'Failure of normal 270° counterclockwise rotation',
'DJ flexure fails to cross midline; narrow mesentery',
'Ladd\'s bands compress duodenum',
{text:'Features:', bold:true},
'Term, healthy infant with sudden bilious vomiting',
'No/minimal abdominal distension',
'Haematochezia (late: ischaemia)',
'Shock (when volvulus / ischaemia occurs)',
{text:'Investigations:', bold:true},
'Upper GI series: FIRST CHOICE',
'"Corkscrew" duodenum; DJ flexure right of midline',
{text:'Management:', bold:true},
'Emergent Ladd\'s procedure:',
' 1. Untwist volvulus (counterclockwise)',
' 2. Divide Ladd\'s bands',
' 3. Broaden mesenteric base',
' 4. Appendectomy',
' 5. Colon → left, small bowel → right',
], 0.35, 1.65, 4.45, 3.35, 10.5);
s.addShape(pres.ShapeType.rect, { x:5.1, y:1.22, w:4.65, h:3.8, fill:{color:C.offwhite}, line:{color:C.navy} });
s.addText('HIRSCHSPRUNG DISEASE', { x:5.1, y:1.22, w:4.65, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
'Absence of ganglion cells (aganglionic segment)',
'Affects rectum ± sigmoid (most common)',
'Failure of neural crest cell migration',
'Associated: Trisomy 21, RET proto-oncogene',
{text:'Features:', bold:true},
'Failure to pass meconium within 48 hours (classic)',
'Bilious vomiting, abdominal distension',
'Tight (empty) rectum on digital examination',
'"Squirt sign": explosive release of faeces+gas',
{text:'Investigations:', bold:true},
'Contrast enema: transition zone (cone-shaped)',
'Rectal suction biopsy: GOLD STANDARD',
'Absent ganglion cells + hypertrophied nerve fibres',
'Anorectal manometry: absent RAIR',
{text:'Management:', bold:true},
'Initial: rectal washouts / colostomy',
'Definitive: pull-through operation (Swenson/Soave)',
], 5.15, 1.65, 4.5, 3.35, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 - MECONIUM ILEUS & OTHER NEONATAL
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 3 | NEONATAL INTESTINAL OBSTRUCTION');
divider(s);
title2(s, 'Meconium Ileus & Other Neonatal Conditions', 0.65);
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:4.6, h:3.8, fill:{color:C.offwhite}, line:{color:C.teal} });
s.addText('MECONIUM ILEUS', { x:0.3, y:1.22, w:4.6, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
'90-95% associated with Cystic Fibrosis (CFTR mutation)',
'Inspissated meconium obstructs terminal ileum',
{text:'Simple vs Complex:', bold:true},
'Simple: no perforation; viscid meconium pellets',
'Complex: perforation, volvulus, atresia, peritonitis',
{text:'Features:', bold:true},
'Failure to pass meconium',
'Bilious vomiting',
'Doughy-feeling abdomen',
'Palpable loops ("sausage-like masses")',
{text:'Investigations:', bold:true},
'AXR: ground-glass / "soap bubble" appearance',
'No air-fluid levels (sticky meconium)',
'Gastrografin enema: microcolon + meconium pellets',
{text:'Management:', bold:true},
'Non-surgical: Gastrografin enema (water-soluble contrast)',
' Acts as hypertonic solution to draw water into bowel',
'Surgical: if failed / complex (Bishop-Koop procedure)',
'Sweat test + genetic testing for CF',
], 0.35, 1.65, 4.45, 3.35, 10.5);
s.addShape(pres.ShapeType.rect, { x:5.1, y:1.22, w:4.65, h:3.8, fill:{color:C.offwhite}, line:{color:C.navy} });
s.addText('OTHER NEONATAL CONDITIONS', { x:5.1, y:1.22, w:4.65, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
{text:'Imperforate Anus:', bold:true},
'Failure to pass meconium; absent anus on exam',
'Associated with VACTERL anomalies',
'Low vs high anomalies (pubococcygeal line)',
'Low: perineal anoplasty',
'High: colostomy then PSARP repair',
{text:'Colonic Atresia:', bold:true},
'Rare (~1/20 intestinal atresias)',
'Similar mechanism to small bowel atresia',
'Features: abdominal distension, failure to pass meconium',
'AXR: dilated loops; contrast enema shows obstruction',
'Management: resection + primary anastomosis',
{text:'Neonatal Sepsis (Functional Ileus):', bold:true},
'Bilious vomiting without mechanical cause',
'Associated: fever, hypotension, positive blood cultures',
'Management: treat underlying sepsis; no surgery',
{text:'Congenital Hypothyroidism:', bold:true},
'Delayed intestinal motility; treat medically (thyroxine)',
], 5.15, 1.65, 4.5, 3.35, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 - SHORT GUT SYNDROME
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.dark);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:0.55, fill:{color:'1A3A5C'} });
s.addText('SECTION 4 | SHORT GUT SYNDROME', { x:0.4, y:0.08, w:9.2, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', margin:0 });
s.addText('Short Gut Syndrome (SGS) / Intestinal Failure', { x:0.4, y:0.68, w:9.2, h:0.55, fontSize:21, bold:true, color:C.white, fontFace:'Calibri', margin:0 });
s.addShape(pres.ShapeType.line, { x:0.4, y:1.26, w:9.2, h:0, line:{color:C.gold, width:1.5} });
// Definition box
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.33, w:9.4, h:0.72, fill:{color:'1A3A5C'}, line:{color:C.teal} });
s.addText([
{text:'Definition: ', options:{bold:true, color:C.gold}},
{text:'Intractable diarrhoea with impaired absorption following resection/bypass of small intestine → progressive malnutrition. Intestinal Failure = inability to maintain fluid/electrolyte/nutritional homeostasis without IV support. (Bailey & Love 28e)', options:{color:C.light}},
], { x:0.35, y:1.35, w:9.3, h:0.68, fontFace:'Calibri', fontSize:11, valign:'middle', margin:4 });
// Causes
s.addShape(pres.ShapeType.rect, { x:0.3, y:2.13, w:3.0, h:2.8, fill:{color:'0D2B55'}, line:{color:C.teal} });
s.addText('CAUSES', { x:0.3, y:2.13, w:3.0, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle' });
bullets(s, [
'Crohn\'s disease (largest group ~50%)',
'Mesenteric vascular thrombosis',
'Radiation enteritis',
'Small bowel tumours / resection',
'Neonatal: volvulus, atresia, NEC',
'Trauma',
], 0.35, 2.58, 2.85, 2.3, 11, C.light);
// Thresholds
s.addShape(pres.ShapeType.rect, { x:3.5, y:2.13, w:3.1, h:2.8, fill:{color:'0D2B55'}, line:{color:C.teal} });
s.addText('CRITICAL LENGTH', { x:3.5, y:2.13, w:3.1, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle' });
bullets(s, [
'Normal small bowel: 6-7 m',
'<200 cm: SGS features appear',
{text:'With intact colon:', bold:true},
'100-200 cm jejunum: possible independence',
'50-100 cm + colon: some failure',
'<50 cm + colon: intestinal failure',
{text:'Without colon (stoma):', bold:true},
'<200 cm: likely intestinal failure',
'<100 cm: definite intestinal failure',
'Ileum better than jejunum at adaptation',
'Colon absorbs fluid, electrolytes, energy',
], 3.55, 2.58, 2.95, 2.3, 11, C.light);
// Pathophysiology
s.addShape(pres.ShapeType.rect, { x:6.8, y:2.13, w:2.95, h:2.8, fill:{color:'0D2B55'}, line:{color:C.teal} });
s.addText('PATHOPHYSIOLOGY', { x:6.8, y:2.13, w:2.95, h:0.4, fontSize:11, bold:true, color:C.gold, fontFace:'Calibri', align:'center', valign:'middle' });
bullets(s, [
'Phase 1 (acute): massive diarrhoea, dehydration',
'Phase 2 (adaptation): villous hypertrophy, adaptation',
'Phase 3 (maintenance): stable or permanent dependence',
'Gastric hypersecretion (loss of "brake")',
'Bile salt deficiency → fat malabsorption',
'B12 deficiency (ileal loss)',
'Metabolic acidosis, oxalate stones',
'D-lactic acidosis (short bowel + colon)',
], 6.85, 2.58, 2.8, 2.3, 11, C.light);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 - SHORT GUT: CLINICAL FEATURES & MANAGEMENT
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SECTION 4 | SHORT GUT SYNDROME');
divider(s);
title2(s, 'SGS: Clinical Features & Management', 0.65);
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.22, w:2.85, h:3.8, fill:{color:C.offwhite}, line:{color:C.navy} });
s.addText('CLINICAL FEATURES', { x:0.3, y:1.22, w:2.85, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.navy} });
bullets(s, [
'Profuse watery diarrhoea',
'Steatorrhoea (fatty stools)',
'Dehydration, electrolyte loss',
'Progressive malnutrition',
'Weight loss',
'Deficiencies:',
{text:' Fat-soluble vitamins (A,D,E,K)', sub:true},
{text:' Vitamin B12 (terminal ileum)', sub:true},
{text:' Iron, zinc, magnesium', sub:true},
{text:' Calcium', sub:true},
'Metabolic acidosis',
'Renal oxalate stones (colon present)',
'D-lactic acidosis (neurological sx)',
'TPN-related liver disease',
'Loss of venous access (long-term)',
], 0.35, 1.65, 2.7, 3.35, 10.5);
s.addShape(pres.ShapeType.rect, { x:3.3, y:1.22, w:3.0, h:3.8, fill:{color:C.offwhite}, line:{color:C.teal} });
s.addText('MEDICAL MANAGEMENT', { x:3.3, y:1.22, w:3.0, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', fill:{color:C.teal} });
bullets(s, [
{text:'Antidiarrhoeals:', bold:true},
'Loperamide (first line)',
'Codeine phosphate',
{text:'Reduce secretion:', bold:true},
'PPI: reduces gastric hypersecretion',
'Cholestyramine: bile salt diarrhoea',
{text:'Nutritional support:', bold:true},
'Oral nutritional supplements',
'Enteral nutrition (tube feeding)',
'Home Parenteral Nutrition (HPN): mainstay',
{text:'Promoting adaptation:', bold:true},
'Glutamine (mucosal trophic factor)',
'Growth hormone',
'GLP-2 agonist (Teduglutide): reduces',
' parenteral nutrition requirements',
'Soluble fibre (short-chain fatty acids)',
], 3.35, 1.65, 2.85, 3.35, 10.5);
s.addShape(pres.ShapeType.rect, { x:6.45, y:1.22, w:3.3, h:3.8, fill:{color:'FFF8EC'}, line:{color:C.gold} });
s.addText('SURGICAL OPTIONS', { x:6.45, y:1.22, w:3.3, h:0.4, fontSize:11, bold:true, color:C.dark, fontFace:'Calibri', align:'center', fill:{color:C.gold} });
bullets(s, [
{text:'Bowel-Lengthening Procedures:', bold:true},
'STEP (Serial Transverse Enteroplasty)',
'Bianchi Procedure (LILT)',
' - Longitudinal intestinal lengthening',
' - Better results in children',
{text:'Bowel-Slowing Procedures:', bold:true},
'Reversed intestinal segments',
'Colon interposition',
'Artificial valves',
{text:'Small Bowel Transplantation:', bold:true},
'Indications:',
' Loss of venous access',
' TPN-related liver failure',
' Recurrent catheter sepsis',
'5-year patient survival >80% in top centres',
'Requires lifelong immunosuppression',
{text:'Prevent SGS:', bold:true},
'Minimise bowel resection (strictureplasty)',
], 6.5, 1.65, 3.15, 3.35, 10.5);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 - COMPARATIVE TABLE: NEONATAL OBSTRUCTION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'SUMMARY | NEONATAL OBSTRUCTION DIFFERENTIAL');
divider(s);
title2(s, 'Neonatal Obstruction: Differential at a Glance', 0.65);
const headers = ['Condition', 'Key Feature', 'AXR Finding', 'Investigation', 'Surgery'];
const rows = [
['Duodenal Atresia', 'Bilious/non-bilious emesis, Trisomy 21', 'Double-bubble sign', 'Upper GI study', 'Duodenoduodenostomy'],
['Jejunoileal Atresia', 'Bilious vomiting, distension', 'Multiple dilated loops, microcolon', 'Contrast enema', 'Resection + anastomosis'],
['Malrotation/Volvulus', 'Bilious emesis, healthy term infant', 'Normal / paucity of gas', 'Upper GI (first!)', 'Emergent Ladd\'s procedure'],
['Hirschsprung', 'Delayed meconium, tight rectum', 'Gasless rectum, transition zone', 'Rectal suction biopsy', 'Pull-through (Swenson/Soave)'],
['Meconium Ileus', 'Cystic fibrosis, doughy abdomen', 'Ground-glass / soap-bubble', 'Gastrografin enema', 'Gastrografin enema / Bishop-Koop'],
['Imperforate Anus', 'No anus, VACTERL', 'Variable', 'Clinical exam + invertogram', 'Perineal anoplasty / PSARP'],
];
const colW = [1.7, 2.1, 1.8, 1.95, 2.1];
const colX = [0.25, 1.95, 4.05, 5.85, 7.8];
const rowH = 0.52;
const startY = 1.28;
// Header
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x:colX[i], y:startY, w:colW[i], h:0.48, fill:{color:C.navy}, line:{color:C.white} });
s.addText(h, { x:colX[i], y:startY, w:colW[i], h:0.48, fontSize:10, bold:true, color:C.white, fontFace:'Calibri', align:'center', valign:'middle' });
});
rows.forEach((row, ri) => {
const y = startY + 0.48 + ri * rowH;
const fill = ri % 2 === 0 ? C.offwhite : C.light;
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x:colX[ci], y, w:colW[ci], h:rowH, fill:{color:fill}, line:{color:C.lightgray} });
s.addText(cell, { x:colX[ci]+0.05, y, w:colW[ci]-0.1, h:rowH, fontSize:9, color:C.dark, fontFace:'Calibri', valign:'middle', bold: ci===0, color: ci===0 ? C.navy : C.dark });
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 - KEY SURGICAL PRINCIPLES
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.offwhite);
sectionTag(s, 'PRINCIPLES OF SURGICAL MANAGEMENT');
divider(s);
title2(s, 'Key Principles in Intestinal Surgery', 0.65);
const principles = [
{ title:'Resuscitation First', body:'IV access, fluid resuscitation (crystalloid), correct electrolytes\nNG tube decompression\nUrinary catheter for monitoring output\nBlood cultures if sepsis suspected' },
{ title:'Damage Control', body:'Control contamination first\nPack and temporary closure if unstable\n"Second-look" laparotomy at 48-72h\nAvoid over-resection in compromised patient' },
{ title:'Bowel Viability', body:'Doppler / fluorescein / clinical assessment\nWarm saline wraps to borderline bowel\nResect non-viable bowel; preserve ileocaecal valve\nHesitate before stoma in neonates' },
{ title:'Anastomosis Safety', body:'Optimise nutrition pre-operatively\nAvoid anastomosis in contaminated field\nConsider defunctioning stoma\nHand-sewn vs stapled equivalent' },
{ title:'Stoma Management', body:'Inform patient about stoma pre-op\nMark site with stoma therapist\nHigh-output stoma: fluid/electrolyte replacement\nPlan reversal 3-6 months post-op' },
{ title:'Neonatal Principles', body:'NICU support post-operatively\nTotal parenteral nutrition (TPN) bridge\nMinimise bowel resection (short gut risk)\nDelay definitive surgery if possible' },
];
principles.forEach((p, i) => {
const x = 0.25 + (i%3)*3.3;
const y = 1.25 + Math.floor(i/3)*2.0;
s.addShape(pres.ShapeType.rect, { x, y, w:3.1, h:1.85, fill:{color:i%2===0?C.offwhite:C.light}, line:{color:C.teal} });
s.addShape(pres.ShapeType.rect, { x, y, w:3.1, h:0.4, fill:{color:i%2===0?C.teal:C.navy}, line:{color:C.white} });
s.addText(p.title, { x, y, w:3.1, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:'Calibri', align:'center', valign:'middle' });
s.addText(p.body, { x:x+0.1, y:y+0.45, w:2.9, h:1.35, fontSize:10, color:C.dark, fontFace:'Calibri', valign:'top' });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 - SUMMARY & CONCLUSION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, C.navy);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:'100%', h:1.0, fill:{color:C.teal} });
s.addShape(pres.ShapeType.rect, { x:0, y:0.97, w:'100%', h:0.08, fill:{color:C.gold} });
s.addText('SUMMARY', { x:0.4, y:0.1, w:9.2, h:0.8, fontSize:28, bold:true, color:C.white, fontFace:'Calibri', align:'center', valign:'middle', margin:0 });
const points = [
['Small Intestine', 'SBO: adhesions commonest; CT is gold standard; drip-and-suck + surgery if strangulation\nCrohn\'s: transmural, skip lesions, non-caseating granulomas; biologics + conservative surgery\nMesenteric ischaemia: "pain out of proportion"; CT angiography; surgical emergency'],
['Large Intestine', 'CRC: colonoscopy + CT staging; TME for rectal cancer; FOLFOX adjuvant chemo\nDiverticular disease: high-fibre diet; antibiotics for acute; Hartmann for perforation\nUC: mucosal, rectum upwards; 5-ASA; proctocolectomy if medically refractory'],
['Neonatal Obstruction', 'Bilious vomiting = surgical emergency; AXR first then UGI/contrast enema\nDouble-bubble = duodenal atresia; Corkscrew duodenum = malrotation (Ladd emergency)\nHirschsprung: rectal biopsy; meconium ileus: test for CF; Gastrografin enema'],
['Short Gut Syndrome', 'SGS: <200 cm small bowel; intestinal failure if unable to maintain homeostasis without IV\nTreatment: loperamide, PPI, HPN (mainstay); GLP-2 agonist (teduglutide)\nSurgery: STEP/Bianchi; small bowel transplant when access lost or TPN liver failure'],
];
points.forEach((p, i) => {
const y = 1.15 + i * 1.0;
s.addShape(pres.ShapeType.rect, { x:0.25, y, w:1.55, h:0.88, fill:{color:C.gold}, line:{color:C.gold} });
s.addText(p[0], { x:0.25, y, w:1.55, h:0.88, fontSize:11, bold:true, color:C.dark, fontFace:'Calibri', align:'center', valign:'middle', margin:4 });
s.addShape(pres.ShapeType.rect, { x:1.9, y, w:7.85, h:0.88, fill:{color:'0D2B55'}, line:{color:C.teal} });
s.addText(p[1], { x:2.0, y, w:7.65, h:0.88, fontSize:10, color:C.light, fontFace:'Calibri', valign:'middle', margin:4 });
});
s.addText('Sources: Bailey & Love 28e | Mulholland & Greenfield Surgery 7e | Harriet Lane Handbook 23e | Current Surgical Therapy 14e', {
x:0.3, y:5.2, w:9.4, h:0.25, fontSize:8, color:C.lightgray, fontFace:'Calibri', align:'center'
});
}
// ─── WRITE ───────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: '/home/daytona/workspace/intestine-surgery-ppt/Intestine_Disorders_Surgery.pptx' })
.then(() => console.log('SUCCESS: /home/daytona/workspace/intestine-surgery-ppt/Intestine_Disorders_Surgery.pptx'))
.catch(e => { console.error('ERROR:', e); process.exit(1); });
cd /home/daytona/workspace/intestine-surgery-ppt && node make_pptx.js 2>&1
ls -lh /home/daytona/workspace/intestine-surgery-ppt/Intestine_Disorders_Surgery…
Intestine Disorders Surgery
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - topic overview with section cards |
| 2 | Lecture Outline - 4-column topic map |
| 3 | Small Intestine: Anatomy & Functions - two-column layout |
| 4 | Small Bowel Obstruction - causes, clinical features, investigations & management |
| 5 | Crohn's Disease - features, endoscopy, MRI, medical & surgical Rx |
| 6 | Mesenteric Ischaemia & Other Conditions - Meckel's, fistula, malabsorption, tumours |
| 7 | Large Intestine: Anatomy Overview - 6 segments with dark background |
| 8 | Colorectal Cancer - risk factors, Dukes staging, TME, adjuvant therapy |
| 9 | Diverticular Disease & Colonic Volvulus - sigmoid/caecal/transverse |
| 10 | Ulcerative Colitis - medical ladder, IPAA surgery, cancer surveillance |
| 11 | Neonatal Obstruction: Overview - red alert box + diagnostic algorithm |
| 12 | Intestinal Atresia - Types I-IV, duodenal double-bubble, jejunoileal |
| 13 | Malrotation/Volvulus & Hirschsprung - Ladd's procedure steps, pull-through |
| 14 | Meconium Ileus & Others - CF link, Gastrografin enema, imperforate anus |
| 15 | Short Gut Syndrome: Definition & Pathophysiology - critical length thresholds |
| 16 | SGS: Clinical Features & Management - HPN, GLP-2 agonist, STEP, transplant |
| 17 | Neonatal Differential Table - all 6 conditions side-by-side |
| 18 | Key Surgical Principles - resuscitation, bowel viability, anastomosis, stoma |
| 19 | Summary - 4-row take-home points for each section |