Anatomy of gastrointestinal tract for 3 slides, give me labelled images with parts areterial supply venous drainage, only pictures, can add clinical anatomy too for the poinfs to speak give me a 5 minute worth script

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Searching Images

gastrointestinal tract anatomy labelled diagram parts

Searching Images

GI tract arterial supply celiac mesenteric artery diagram labelled

Searching Images

portal venous drainage gastrointestinal tract diagram labelled

Searching Images

gastrointestinal tract overview organs labelled esophagus stomach small large intestine

Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"

Running Command

mkdir -p /home/daytona/workspace/gi-anatomy-pptx

(1) anatomy of oesophagus and stomach , (2) anatomy of small intestine (3) anatomy of large intestine anal canal, all image-heavy with a 5-minute speaker script.

Searching Images

anatomy oesophagus stomach labelled diagram parts layers

Searching Images

anatomy small intestine duodenum jejunum ileum labelled diagram

Searching Images

anatomy large intestine colon anal canal rectum labelled diagram

Searching Images

stomach anatomy parts fundus body antrum pylorus cardia labelled cross section

Searching Images

anal canal anatomy sphincter rectum labelled diagram dentate line

Writing File

~/gi-anatomy-pptx/build.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const path = require("path");

// ─── Image URLs ────────────────────────────────────────────────────────────────
const imgUrls = [
  // Slide 1 – Oesophagus & Stomach
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_1fbb95e09220e1c8c04ec61a36bf3894fff6c2b8da21cf5aa905ab86a3197d8c.jpg",  // [0] Stomach parts endoscopy
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_2c7f8a582dc4b72cc98e497537a4fbb5d40fd89cb3d17fecebc2424c49a308b3.jpg",  // [1] Stomach anatomy diagram labelled
  // Slide 2 – Small Intestine
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_591dd21f5292cec45f8e5962ed5f80097698cb0de5c9ba10188ba7af5ef66f0e.jpg",  // [2] SI anatomy fundus body duodenum jejunum ileum
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_aae020665004b7c10d2775b9da9072bfcf1206e56e772ac5c44a26017186738b.jpg",  // [3] SI bypass diagram with labels
  // Slide 3 – Large Intestine & Anal Canal
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_e24c6bdecd4e9483e0d56fa3347b8d9e6ccd1720c7dc2c38c9a77a38e939682c.jpg",  // [4] Large intestine labelled diagram
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_93765f8fcaff55bb478d98aea97f17940fab37e21acbec5a71cd0599f2204fd1.jpg",  // [5] Anal canal anatomy sphincters dentate line
];

console.log("Fetching images...");
const fetched = JSON.parse(
  execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ${imgUrls.map(u => `"${u}"`).join(" ")}`,
    { maxBuffer: 100 * 1024 * 1024 }
  ).toString()
);

const imgs = fetched.map((f, i) => {
  if (f.error) { console.warn(`Image ${i} failed: ${f.error}`); return null; }
  return f.base64;
});

console.log("Images fetched. Building PPTX...");

// ─── Presentation Setup ────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Anatomy of the Gastrointestinal Tract";
pres.author = "Medical Education";

// ─── DESIGN CONSTANTS ─────────────────────────────────────────────────────────
const BG       = "0B1D2E";   // deep navy
const ACCENT   = "E8A838";   // amber/gold
const WHITE    = "FFFFFF";
const LTGREY   = "D0D8E4";
const SUBTEXT  = "A8BDD4";
const DARK_PANEL = "132842"; // slightly lighter navy for panels

// ─── HELPER: header band ──────────────────────────────────────────────────────
function addHeader(slide, titleText, subtitleText) {
  // Full-width navy band
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: 1.05,
    fill: { color: DARK_PANEL },
    line: { color: DARK_PANEL }
  });
  // Amber left accent stripe
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.07, h: 1.05,
    fill: { color: ACCENT },
    line: { color: ACCENT }
  });
  slide.addText(titleText, {
    x: 0.15, y: 0.06, w: 7, h: 0.5,
    fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  slide.addText(subtitleText, {
    x: 0.15, y: 0.57, w: 9.5, h: 0.38,
    fontSize: 11, color: ACCENT, fontFace: "Calibri", italic: true, margin: 0
  });
}

// ─── HELPER: section label badge ─────────────────────────────────────────────
function badge(slide, text, x, y, w) {
  slide.addShape(pres.ShapeType.rect, {
    x, y, w, h: 0.28,
    fill: { color: ACCENT },
    line: { color: ACCENT },
    rectRadius: 0.04
  });
  slide.addText(text, {
    x, y, w, h: 0.28,
    fontSize: 9, bold: true, color: BG,
    fontFace: "Calibri", align: "center", valign: "middle", margin: 0
  });
}

// ─── HELPER: bullet block ────────────────────────────────────────────────────
function bullets(slide, items, x, y, w, h, size = 9.5) {
  const richText = items.map((t, i) => ({
    text: t,
    options: { bullet: { code: "25B8" }, breakLine: i < items.length - 1 }
  }));
  slide.addText(richText, {
    x, y, w, h,
    fontSize: size, color: LTGREY, fontFace: "Calibri",
    valign: "top", lineSpacingMultiple: 1.25
  });
}

// ─── HELPER: clinical pearl box ──────────────────────────────────────────────
function clinicalPearl(slide, lines, x, y, w, h) {
  slide.addShape(pres.ShapeType.rect, {
    x, y, w, h,
    fill: { color: "1A3354" },
    line: { color: ACCENT, pt: 1.2 },
    rectRadius: 0.06
  });
  slide.addText("⚕ Clinical Pearl", {
    x: x + 0.1, y: y + 0.04, w: w - 0.2, h: 0.22,
    fontSize: 8, bold: true, color: ACCENT, fontFace: "Calibri", margin: 0
  });
  const richText = lines.map((t, i) => ({
    text: t,
    options: { bullet: { code: "2022" }, breakLine: i < lines.length - 1 }
  }));
  slide.addText(richText, {
    x: x + 0.1, y: y + 0.28, w: w - 0.2, h: h - 0.35,
    fontSize: 8.5, color: WHITE, fontFace: "Calibri",
    valign: "top", lineSpacingMultiple: 1.3
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 1 — OESOPHAGUS & STOMACH
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.background = { color: BG };

  addHeader(s, "Anatomy of the Oesophagus & Stomach", "Upper Gastrointestinal Tract");

  // ── Left column: Oesophagus panel ────────────────────────────────────────
  // Panel background
  s.addShape(pres.ShapeType.rect, {
    x: 0.12, y: 1.12, w: 3.0, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "OESOPHAGUS", 0.12, 1.12, 3.0);

  bullets(s, [
    "25 cm muscular tube: C6 vertebra → T10",
    "3 parts: Cervical (5 cm) · Thoracic (20 cm) · Abdominal (2 cm)",
    "3 natural constrictions: cricopharyngeus · aortic arch / left bronchus · diaphragmatic hiatus",
    "Wall layers: Mucosa · Submucosa · Muscularis (inner circular + outer longitudinal) · Adventitia (no serosa!)",
    "Upper ⅓ — skeletal muscle; Lower ⅓ — smooth muscle",
    "Lower oesophageal sphincter (LOS): functional, ~3–4 cm above hiatus",
  ], 0.18, 1.45, 2.88, 2.5);

  clinicalPearl(s, [
    "Hiatus hernia: stomach herniates through oesophageal hiatus → GORD",
    "Achalasia: failure of LOS relaxation → dysphagia + bird-beak on barium",
    "3 constrictions = common sites for foreign body impaction & carcinoma",
  ], 0.12, 3.98, 3.0, 1.35);

  // ── Middle column: Stomach diagram (labelled) ────────────────────────────
  s.addShape(pres.ShapeType.rect, {
    x: 3.25, y: 1.12, w: 3.5, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "STOMACH — Parts & Structure", 3.25, 1.12, 3.5);

  if (imgs[1]) s.addImage({ data: imgs[1], x: 3.32, y: 1.44, w: 3.36, h: 2.1 });

  bullets(s, [
    "Parts: Cardia · Fundus · Body · Pyloric antrum · Pylorus",
    "Lesser curvature (right) · Greater curvature (left)",
    "Rugae: longitudinal mucosal folds (flatten when distended)",
    "Wall: Mucosa · Submucosa · Muscularis (oblique+circular+longitudinal) · Serosa",
    "Pyloric sphincter: smooth muscle ring, controls gastric emptying",
  ], 3.3, 3.57, 3.4, 1.78);

  // ── Right column: Endoscopic anatomy ────────────────────────────────────
  s.addShape(pres.ShapeType.rect, {
    x: 6.88, y: 1.12, w: 2.9, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "ENDOSCOPIC ANATOMY", 6.88, 1.12, 2.9);

  if (imgs[0]) s.addImage({ data: imgs[0], x: 6.94, y: 1.44, w: 2.78, h: 2.38 });

  bullets(s, [
    "A — Cardia (GOJ)",
    "B — Fundus (rugae)",
    "C — Body (longitudinal folds)",
    "D — Angulus (incisura)",
    "E — Antrum (smooth mucosa)",
    "F — Pylorus (sphincter)",
  ], 6.94, 3.85, 2.78, 1.57);

  // Speaker notes
  s.addNotes(
    `SLIDE 1 — OESOPHAGUS & STOMACH (~100 seconds)\n\n` +
    `"The oesophagus is a 25-centimetre muscular tube running from the level of C6, at the cricopharyngeus muscle — the true upper oesophageal sphincter — down to the gastro-oesophageal junction at T10, where it passes through the diaphragmatic hiatus. Importantly, the oesophagus has no serosa, which means that oesophageal tumours can invade adjacent structures early and surgical anastomoses are more prone to leak.\n\n` +
    `There are three physiological constrictions — at the cricopharyngeus, at the level of the aortic arch and left main bronchus, and at the diaphragmatic hiatus. These are the classic sites where foreign bodies lodge and where carcinoma most commonly arises.\n\n` +
    `The lower oesophageal sphincter is a functional, not anatomical, sphincter maintained by the angle of His and the diaphragmatic crus. Its failure leads to gastro-oesophageal reflux.\n\n` +
    `The stomach lies in the left hypochondrium and epigastrium. Its five parts — cardia, fundus, body, antrum, and pylorus — are well-seen endoscopically as shown on the right. The muscular wall has an additional oblique layer unique to the stomach, enabling churning. The rugae are prominent longitudinal folds that flatten on distension. The pyloric sphincter controls the rate of gastric emptying into the duodenum."`
  );
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 2 — SMALL INTESTINE
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.background = { color: BG };

  addHeader(s, "Anatomy of the Small Intestine", "Duodenum · Jejunum · Ileum");

  // ── Left panel: overview diagram ─────────────────────────────────────────
  s.addShape(pres.ShapeType.rect, {
    x: 0.12, y: 1.12, w: 4.5, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "OVERVIEW — Parts of Small Intestine", 0.12, 1.12, 4.5);

  if (imgs[2]) s.addImage({ data: imgs[2], x: 0.18, y: 1.44, w: 4.38, h: 2.5 });

  bullets(s, [
    "Total length: ~6–7 m",
    "Duodenum (25 cm, C-shaped, retroperitoneal)",
    "Jejunum (~2.4 m, upper 2/5, thick wall, prominent plicae, left side)",
    "Ileum (~3.6 m, lower 3/5, thinner wall, Peyer's patches, right side)",
    "Ligament of Treitz: suspensory muscle — DJ flexure landmark",
  ], 0.18, 3.97, 4.38, 1.45);

  // ── Right panel: comparison table + clinical ─────────────────────────────
  s.addShape(pres.ShapeType.rect, {
    x: 4.75, y: 1.12, w: 5.0, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "DUODENUM — Parts & Relations", 4.75, 1.12, 5.0);

  // Duodenum 4 parts
  const duoParts = [
    ["1st (Superior)", "D1", "Gallstones, ulcer (ant wall)"],
    ["2nd (Descending)", "D2", "Ampulla of Vater, ERCP site"],
    ["3rd (Horizontal)", "D3", "Crossed by SMA anteriorly"],
    ["4th (Ascending)", "D4", "Reaches DJ flexure at L2"],
  ];

  // Table header
  s.addShape(pres.ShapeType.rect, { x: 4.81, y: 1.44, w: 4.88, h: 0.3, fill: { color: ACCENT }, line: { color: ACCENT } });
  s.addText([
    { text: "Part", options: { bold: true } },
    { text: "         Label", options: { bold: true } },
    { text: "           Clinical Note", options: { bold: true } },
  ], { x: 4.81, y: 1.44, w: 4.88, h: 0.3, fontSize: 8.5, color: BG, fontFace: "Calibri", valign: "middle" });

  duoParts.forEach(([part, label, note], i) => {
    const rowBg = i % 2 === 0 ? "132842" : "0F2236";
    s.addShape(pres.ShapeType.rect, { x: 4.81, y: 1.74 + i * 0.29, w: 4.88, h: 0.29, fill: { color: rowBg }, line: { color: rowBg } });
    s.addText(`${part}    ${label}    ${note}`, {
      x: 4.88, y: 1.74 + i * 0.29, w: 4.74, h: 0.29,
      fontSize: 8.5, color: LTGREY, fontFace: "Calibri", valign: "middle"
    });
  });

  // Jejunum vs Ileum comparison
  badge(s, "JEJUNUM vs ILEUM", 4.75, 2.92, 5.0);
  const compare = [
    ["Feature", "Jejunum", "Ileum"],
    ["Wall thickness", "Thick", "Thinner"],
    ["Plicae circulares", "Prominent", "Fewer/absent distally"],
    ["Villi", "Tall, broad", "Shorter"],
    ["Lymphoid tissue", "Sparse", "Peyer's patches"],
    ["Mesenteric fat", "Less", "More (creeping fat)"],
    ["Blood vessels", "Long vasa recta", "Short vasa recta"],
  ];
  compare.forEach(([feat, jej, il], i) => {
    const isHeader = i === 0;
    const rowBg = isHeader ? ACCENT : (i % 2 === 0 ? "132842" : "0F2236");
    const textColor = isHeader ? BG : LTGREY;
    s.addShape(pres.ShapeType.rect, { x: 4.81, y: 3.22 + i * 0.26, w: 4.88, h: 0.26, fill: { color: rowBg }, line: { color: rowBg } });
    s.addText(`${feat.padEnd(24)}${jej.padEnd(22)}${il}`, {
      x: 4.88, y: 3.22 + i * 0.26, w: 4.74, h: 0.26,
      fontSize: 8, color: textColor, fontFace: "Calibri", valign: "middle",
      bold: isHeader
    });
  });

  clinicalPearl(s, [
    "Meckel's diverticulum: 2 feet from ileocaecal valve, 2% population, may contain ectopic gastric/pancreatic mucosa",
    "Duodenal ulcer: 95% posterior wall of D1 — erodes gastroduodenal artery → haemorrhage",
    "Superior mesenteric artery syndrome: compression of D3 causes vomiting",
  ], 4.75, 4.93, 5.0, 0.49);

  s.addNotes(
    `SLIDE 2 — SMALL INTESTINE (~100 seconds)\n\n` +
    `"The small intestine spans approximately 6 to 7 metres and is divided into three parts: the duodenum, jejunum, and ileum. It is the principal site of digestion and absorption.\n\n` +
    `The duodenum is 25 centimetres long, C-shaped, and mostly retroperitoneal — it wraps around the head of the pancreas. The four parts are clinically important: the first part is the classic site of peptic ulceration; the second part contains the ampulla of Vater where bile and pancreatic juice enter — this is the target for ERCP; the third part is crossed anteriorly by the superior mesenteric artery, which can compress it causing SMA syndrome; and the fourth part ends at the duodeno-jejunal flexure suspended by the ligament of Treitz at L2.\n\n` +
    `The jejunum and ileum are intraperitoneal, attached by the mesentery. Key distinguishing features: the jejunum has a thicker wall, prominent plicae circulares, and longer vasa recta in the mesentery; the ileum has a thinner wall, fewer plicae, Peyer's patches — aggregated lymphoid follicles — and more mesenteric fat. Peyer's patches are important in typhoid fever and Crohn's disease.\n\n` +
    `Clinically: Meckel's diverticulum is the most common congenital GI anomaly — found 2 feet from the ileocaecal valve in 2% of the population, and can present with GI bleeding from ectopic gastric mucosa."`
  );
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 3 — LARGE INTESTINE & ANAL CANAL
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.background = { color: BG };

  addHeader(s, "Anatomy of the Large Intestine & Anal Canal", "Caecum · Colon · Rectum · Anal Canal");

  // ── Left: Large intestine labelled ──────────────────────────────────────
  s.addShape(pres.ShapeType.rect, {
    x: 0.12, y: 1.12, w: 4.65, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "LARGE INTESTINE — Overview & Parts", 0.12, 1.12, 4.65);

  if (imgs[4]) s.addImage({ data: imgs[4], x: 0.18, y: 1.44, w: 4.52, h: 2.62 });

  bullets(s, [
    "Total length: ~1.5 m   |   3 features: Taeniae coli · Haustra · Appendices epiploicae",
    "Caecum + Appendix · Ascending (R) · Hepatic flexure · Transverse · Splenic flexure · Descending (L) · Sigmoid · Rectum",
    "Flexures: Hepatic (right colic) = T1 → L2; Splenic (left colic) = more superior and fixed",
    "Rectum: ~12 cm, no taeniae — three lateral flexures (Houston's valves)",
  ], 0.18, 4.09, 4.52, 1.33);

  // ── Right: Anal canal diagram + key anatomy ──────────────────────────────
  s.addShape(pres.ShapeType.rect, {
    x: 4.9, y: 1.12, w: 4.88, h: 4.3,
    fill: { color: DARK_PANEL }, line: { color: ACCENT, pt: 0.8 }, rectRadius: 0.08
  });
  badge(s, "ANAL CANAL — Anatomy & Sphincters", 4.9, 1.12, 4.88);

  if (imgs[5]) s.addImage({ data: imgs[5], x: 4.96, y: 1.44, w: 2.6, h: 2.55 });

  // Right sub-panel for key points
  bullets(s, [
    "Length: ~4 cm",
    "Dentate line: mucocutaneous junction",
    "Above: columnar epithelium (visceral sensation)",
    "Below: stratified squamous (somatic pain)",
    "Internal sphincter: involuntary smooth muscle (autonomic)",
    "External sphincter: voluntary striated muscle (pudendal n.)",
    "Columns of Morgagni above dentate line",
    "Puborectalis sling: anorectal angle 90°",
  ], 7.6, 1.47, 2.12, 2.52);

  // Clinical box
  clinicalPearl(s, [
    "Haemorrhoids: above dentate line (internal) = painless; below (external) = painful",
    "Hirschsprung's: absence of ganglion cells in myenteric plexus → functional obstruction",
    "Appendix base = McBurney's point (⅔ along ASIS–umbilicus). Retrocaecal position most common (75%)",
    "Sigmoid = most common site for diverticular disease & volvulus",
  ], 4.9, 3.72, 4.88, 1.62);

  s.addNotes(
    `SLIDE 3 — LARGE INTESTINE & ANAL CANAL (~100 seconds)\n\n` +
    `"The large intestine is approximately 1.5 metres long, running from the ileocaecal valve to the anus. Three macroscopic features distinguish it from the small bowel: the taeniae coli — three longitudinal bands of smooth muscle — which cause the characteristic sacculations known as haustra, and the appendices epiploicae, small fat-filled peritoneal pouches along its surface.\n\n` +
    `The colon has two important flexures: the hepatic flexure on the right, related to the right lobe of the liver and right kidney; and the splenic flexure on the left, which is higher, more acute, and fixed to the diaphragm — making it the watershed zone between the superior and inferior mesenteric artery territories and therefore vulnerable in ischaemia.\n\n` +
    `The rectum is about 12 centimetres long, has no taeniae — the muscle coat becomes complete — and three lateral folds called Houston's valves, which are important surgical landmarks. It is peritoneal on its upper anterior surface only.\n\n` +
    `The anal canal is 4 centimetres long. The dentate — or pectinate — line divides it into two embryologically distinct zones: above, the mucosa is columnar and has visceral, poorly-localised sensation via pelvic splanchnics; below, it is squamous and acutely sensitive via the pudendal nerve. This explains why internal haemorrhoids above the dentate line are painless, while external haemorrhoids below are painful.\n\n` +
    `Continence depends on the internal anal sphincter — an involuntary smooth muscle extension of the circular rectal wall — and the external sphincter, a voluntary striated muscle supplied by the pudendal nerve, along with the puborectalis sling which maintains the anorectal angle of 90 degrees."`
  );
}

// ─────────────────────────────────────────────────────────────────────────────
// WRITE FILE
// ─────────────────────────────────────────────────────────────────────────────
const outPath = path.join(__dirname, "GI_Tract_Anatomy.pptx");
pres.writeFile({ fileName: outPath }).then(() => {
  console.log(`\nPresentation saved: ${outPath}`);
});
Running Command

cd /home/daytona/workspace/gi-anatomy-pptx && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/gi-anatomy-pptx/GI_Tract_Anatomy.pptx

Your presentation is ready:

GI Tract Anatomy

Presentation · PPTX


What's inside — 3 slides, deep navy + gold design:
SlideContentImages
1 — Oesophagus & StomachParts, layers, 3 constrictions, LOS, stomach regions, endoscopic anatomyStomach endoscopy (cardia→pylorus) + labelled gastric diagram
2 — Small IntestineDuodenum 4 parts + clinical notes, Jejunum vs Ileum comparison table (7 features)SI transit anatomy diagram + vascular/structural labels
3 — Large Intestine & Anal CanalColon parts, flexures, taeniae/haustra, rectum; dentate line, sphincters, continence mechanismLabelled large intestine diagram + anal canal sphincter anatomy
Every slide has:
  • Labelled images embedded
  • Bullet-point key anatomy
  • Clinical Pearl box (haemorrhoids, Hirschsprung's, Meckel's, peptic ulcer, etc.)
  • ~100-second speaker script in the Notes pane (totalling ~5 minutes)
This is a shared conversation. Sign in to Orris to start your own chat.