Make me a presentation on gastric carcinoma from textbook of Bailay and love 28th edition with at types of clarification and detailed presentation for me to present with images
mkdir -p /home/daytona/workspace/gastric-carcinoma-ppt && ls /home/daytona/workspace/gastric-carcinoma-ppt
~/gastric-carcinoma-ppt/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images using the shared helper
const imageUrls = [
"https://cdn.orris.care/cdss_images/15e91c26ea70521a3fb46289687eb1b600b49063cb0d62009bdc353cb2a71b51.png", // early gastric cancer type I
"https://cdn.orris.care/cdss_images/89aa76f152d4f848dcd4b9d0f6f21d21c75988950663b7788ae9fb5240202b89.png", // Japanese classification diagram
"https://cdn.orris.care/cdss_images/e2a9544ef8bd7315ec013638d703fbc78ca4e6e4a2c8c46a3647d276220ef9e6.png", // Borrmann classification diagram
"https://cdn.orris.care/cdss_images/0b67d0279d31b1f56d355bfa1a1e6630042fb48966bb3ec8d1251d95b2a71b51.png", // Borrmann type (circular image)
"https://cdn.orris.care/cdss_images/15e91c26ea70521a3fb46289687eb1b600b49063cb0d62009bdc353cb2a71b51.png", // early gastric
];
// Fetch images
console.log("Fetching images...");
let images = [];
try {
const urls = [
"https://cdn.orris.care/cdss_images/89aa76f152d4f848dcd4b9d0f6f21d21c75988950663b7788ae9fb5240202b89.png",
"https://cdn.orris.care/cdss_images/e2a9544ef8bd7315ec013638d703fbc78ca4e6e4a2c8c46a3647d276220ef9e6.png",
"https://cdn.orris.care/cdss_images/15e91c26ea70521a3fb46289687eb1b600b49063cb0d62009bdc353cb2a71b51.png",
"https://cdn.orris.care/cdss_images/0b67d0279d31b1f56d355bfa1a1e6630042fb48966bb3ec8d1251d95b2a71b51.png",
"https://cdn.orris.care/cdss_images/d0b26380e5fc4c55144711efaad3a786a8e302557a2b6855ac29652a4941fe6c.png",
];
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
{ timeout: 30000 }
).toString();
images = JSON.parse(result);
console.log("Images fetched:", images.length, images.map(i => i.error ? "ERROR: " + i.error : "OK").join(", "));
} catch (e) {
console.log("Image fetch error:", e.message);
images = [];
}
// Color Palette - deep navy/teal surgical theme
const NAVY = "0D1B2A";
const TEAL = "1B7A8B";
const GOLD = "E8A838";
const WHITE = "FFFFFF";
const LIGHT = "F0F4F8";
const GRAY = "6B7280";
const RED = "C0392B";
const DARK_TEAL = "145A68";
const ACCENT = "2ECC9A";
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Gastric Carcinoma";
pres.author = "Bailey & Love's Short Practice of Surgery, 28th Edition";
// Helper: dark title slide band
function addTitleBand(slide, text, subtext) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY } });
// Gold accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.2, w: 10, h: 0.12, fill: { color: GOLD } });
slide.addText(text, {
x: 0.6, y: 1.4, w: 8.8, h: 1.6,
fontSize: 42, bold: true, color: WHITE, align: "center", fontFace: "Calibri",
});
if (subtext) {
slide.addText(subtext, {
x: 0.6, y: 3.1, w: 8.8, h: 0.6,
fontSize: 18, color: GOLD, align: "center", fontFace: "Calibri", italic: true,
});
}
slide.addText("Bailey & Love's Short Practice of Surgery, 28th Edition", {
x: 0.6, y: 4.4, w: 8.8, h: 0.4,
fontSize: 13, color: "A0B0C0", align: "center", fontFace: "Calibri",
});
}
// Helper: section header slide
function addSectionSlide(title, color) {
const slide = pres.addSlide();
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: color || TEAL } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 2.5, w: 10, h: 0.08, fill: { color: GOLD } });
slide.addText(title, {
x: 0.5, y: 1.6, w: 9, h: 1.5,
fontSize: 36, bold: true, color: WHITE, align: "center", fontFace: "Calibri",
});
return slide;
}
// Helper: content slide with header bar
function addContentSlide(title, bullets, opts) {
const slide = pres.addSlide();
// Background
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: WHITE } });
// Header bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.9, fill: { color: NAVY } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.9, w: 10, h: 0.06, fill: { color: GOLD } });
slide.addText(title, {
x: 0.3, y: 0.1, w: 9.4, h: 0.75,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle",
});
// Footer
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: NAVY } });
slide.addText("Bailey & Love's Short Practice of Surgery, 28th Edition", {
x: 0.3, y: 5.33, w: 9.4, h: 0.28,
fontSize: 10, color: "A0B0C0", fontFace: "Calibri",
});
if (bullets && bullets.length > 0) {
const items = bullets.map((b, i) => {
if (typeof b === "string") {
return { text: b, options: { bullet: { code: "25CF", color: GOLD }, breakLine: i < bullets.length - 1, fontSize: opts && opts.fontSize ? opts.fontSize : 17, color: "1A1A2E", fontFace: "Calibri" } };
}
return b;
});
slide.addText(items, {
x: opts && opts.x ? opts.x : 0.4,
y: opts && opts.y ? opts.y : 1.05,
w: opts && opts.w ? opts.w : 9.2,
h: opts && opts.h ? opts.h : 4.1,
valign: "top",
});
}
return slide;
}
// Helper: two-column content slide
function addTwoColSlide(title, col1title, col1items, col2title, col2items, col1color, col2color) {
const slide = pres.addSlide();
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: WHITE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.9, fill: { color: NAVY } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.9, w: 10, h: 0.06, fill: { color: GOLD } });
slide.addText(title, {
x: 0.3, y: 0.1, w: 9.4, h: 0.75,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle",
});
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: NAVY } });
slide.addText("Bailey & Love's Short Practice of Surgery, 28th Edition", {
x: 0.3, y: 5.33, w: 9.4, h: 0.28,
fontSize: 10, color: "A0B0C0", fontFace: "Calibri",
});
// Col 1 box
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 4.55, h: 4.1, fill: { color: col1color || "E8F4FD" }, line: { color: TEAL, width: 1.5 } });
slide.addText(col1title, { x: 0.3, y: 1.1, w: 4.45, h: 0.42, fontSize: 14, bold: true, color: DARK_TEAL, fontFace: "Calibri" });
const items1 = col1items.map((b, i) => ({
text: b, options: { bullet: { code: "25B6", color: TEAL }, breakLine: i < col1items.length - 1, fontSize: 14, color: "1A1A2E", fontFace: "Calibri" }
}));
slide.addText(items1, { x: 0.35, y: 1.58, w: 4.35, h: 3.45, valign: "top" });
// Col 2 box
slide.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.05, w: 4.55, h: 4.1, fill: { color: col2color || "FEF9E7" }, line: { color: GOLD, width: 1.5 } });
slide.addText(col2title, { x: 5.25, y: 1.1, w: 4.45, h: 0.42, fontSize: 14, bold: true, color: "8B6914", fontFace: "Calibri" });
const items2 = col2items.map((b, i) => ({
text: b, options: { bullet: { code: "25B6", color: GOLD }, breakLine: i < col2items.length - 1, fontSize: 14, color: "1A1A2E", fontFace: "Calibri" }
}));
slide.addText(items2, { x: 5.28, y: 1.58, w: 4.35, h: 3.45, valign: "top" });
return slide;
}
// ===================== SLIDE 1: TITLE SLIDE =====================
const s1 = pres.addSlide();
addTitleBand(s1,
"Gastric Carcinoma",
"Epidemiology • Pathology • Classification • Staging • Management"
);
// ===================== SLIDE 2: OVERVIEW =====================
addSectionSlide("Overview & Global Burden", NAVY);
const s3 = addContentSlide("Overview – Key Facts", [
"One of the most common causes of cancer-related death worldwide",
"Overall cure rates are poor (5-10%) in most Western nations",
"Japan achieves significantly better outcomes due to mass screening and early detection programmes",
"Only curative treatment is resectional surgery",
"Prognosis depends heavily on stage at presentation",
"Trend: falling incidence of distal stomach cancer; rising incidence of proximal gastric/GOJ cancer in the West",
"Incidence increases with age; more common in men than women",
]);
// ===================== SLIDE 3: EPIDEMIOLOGY =====================
addSectionSlide("Epidemiology & Incidence", TEAL);
const s5 = addContentSlide("Incidence – Global Variation", [
"UK: ~15 per 100,000 per year",
"USA: ~10 per 100,000 per year",
"Eastern Europe: ~40 per 100,000 per year",
"Japan: ~70 per 100,000 per year (highest incidence)",
"China: Some pockets with even higher incidence",
"Epidemiological variations confirm this is predominantly an ENVIRONMENTAL disease",
"Men > Women; incidence rises sharply with age",
"In the West: distal cancer falling ~1%/year; proximal/GOJ cancer increasing",
"Proximal gastric cancer: higher socioeconomic groups; NOT associated with H. pylori",
"Distal/body cancer: lower socioeconomic groups; H. pylori association important",
]);
// ===================== SLIDE 4: AETIOLOGY =====================
addSectionSlide("Aetiology & Risk Factors", DARK_TEAL);
addTwoColSlide(
"Aetiology & Risk Factors",
"Major Risk Factors",
[
"H. pylori infection (body & distal stomach)",
"Pernicious anaemia & gastric atrophy",
"Gastric adenomatous polyps",
"Previous peptic ulcer surgery (Billroth II, Pólya gastrectomy, pyloroplasty) – 4× risk due to bile reflux/intestinal metaplasia",
"Cigarette smoking",
"Industrial dust inhalation",
],
"Dietary & Genetic Factors",
[
"Excessive salt intake",
"Deficiency of antioxidants (Vitamins C & E)",
"Exposure to N-nitroso compounds",
"Diet change: Japanese migrants to USA show declining rates",
"Obesity associated with proximal gastric cancer",
"Genetic factors important but not fully elucidated",
"CDH1 gene mutations – hereditary diffuse gastric cancer",
]
);
// ===================== SLIDE 5: CLINICAL FEATURES =====================
addSectionSlide("Clinical Features", TEAL);
addTwoColSlide(
"Clinical Features",
"Early Gastric Cancer (EGC)",
[
"No specific features to distinguish from benign dyspepsia",
"High index of suspicion required",
"Detected incidentally or on screening",
"Excellent prognosis when detected early",
"Japan: mass screening detects up to 50% as EGC",
"Definition: confined to mucosa and/or submucosa regardless of nodal status",
],
"Advanced Gastric Cancer",
[
"Early satiety, bloating, distension",
"Epigastric pain or discomfort",
"Vomiting (especially with pyloric obstruction)",
"Iron-deficiency anaemia (tumour bleeding)",
"Dysphagia (proximal tumours)",
"Profound weight loss and cachexia",
"Trousseau's sign (thrombophlebitis)",
"Deep venous thrombosis",
"Gastric outlet obstruction (less severe alkalosis than duodenal ulcer)",
]
);
// ===================== SLIDE 6: SITE =====================
const s_site = addContentSlide("Site of Gastric Cancer", [
"Proximal stomach / GOJ: NOW the most common site in the West",
"~60% of all upper GI malignancies occur near the GOJ",
"Adenocarcinoma near GOJ has DOUBLED in incidence in the UK over 30 years",
"Distal gastric cancer still predominates in Japan and most of Asia",
"Lower oesophagus is also a very common site for adenocarcinoma",
"GOJ tumours classified separately if epicentre within 5 cm of GOJ and extends into oesophagus (oesophageal staging system)",
"Body / antrum: more common in Asia; associated with H. pylori",
]);
// ===================== SLIDE 7: PATHOLOGY – LAUREN CLASSIFICATION =====================
addSectionSlide("Pathology & Classification", NAVY);
const s_lauren = addContentSlide("Pathology: Laurén Classification", []);
// Add colored boxes for Lauren
s_lauren.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.1, w: 4.5, h: 3.9, fill: { color: "E3F2FD" }, line: { color: TEAL, width: 2 } });
s_lauren.addText([
{ text: "INTESTINAL TYPE\n", options: { bold: true, fontSize: 18, color: DARK_TEAL, breakLine: false } },
], { x: 0.35, y: 1.18, w: 4.3, h: 0.5, fontFace: "Calibri" });
s_lauren.addText([
{ text: "• Resembles carcinoma in other parts of GI tract\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Forms glandular structures\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Associated with precursor lesions (intestinal metaplasia)\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• H. pylori-related; lower socioeconomic groups\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Relatively better prognosis\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Spreads via bloodstream to liver\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: false } },
], { x: 0.35, y: 1.72, w: 4.3, h: 3.15, valign: "top", fontFace: "Calibri" });
s_lauren.addShape(pres.ShapeType.rect, { x: 5.25, y: 1.1, w: 4.5, h: 3.9, fill: { color: "FFF3E0" }, line: { color: RED, width: 2 } });
s_lauren.addText([
{ text: "DIFFUSE TYPE\n", options: { bold: true, fontSize: 18, color: RED, breakLine: false } },
], { x: 5.35, y: 1.18, w: 4.3, h: 0.5, fontFace: "Calibri" });
s_lauren.addText([
{ text: "• Poorly differentiated, no gland formation\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Signet ring cells characteristic\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Spreads via submucosal/subserosal lymphatic plexus\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Penetrates gastric wall at an early stage\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• Can cause linitis plastica\n", options: { bullet: false, fontSize: 14, color: "1A1A2E", breakLine: true } },
{ text: "• WORSE prognosis than intestinal type\n", options: { bullet: false, fontSize: 14, color: RED, breakLine: false } },
], { x: 5.35, y: 1.72, w: 4.3, h: 3.15, valign: "top", fontFace: "Calibri" });
// ===================== SLIDE 8: EARLY GASTRIC CANCER CLASSIFICATION (Japanese) =====================
const s_egc = addContentSlide("Early Gastric Cancer – Japanese Classification", [
"Defined as cancer confined to mucosa and/or submucosa, regardless of lymph node status",
"High cure rates with surgical resection",
"Japan mass screening detects a large proportion as EGC",
]);
// Add classification boxes
s_egc.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.75, w: 2.8, h: 3.3, fill: { color: "E8F5E9" }, line: { color: ACCENT, width: 1.5 } });
s_egc.addText("Type I\nProtruding", { x: 0.3, y: 1.82, w: 2.7, h: 0.55, fontSize: 13, bold: true, color: DARK_TEAL, fontFace: "Calibri", align: "center" });
s_egc.addText("Polypoid lesion protruding into the gastric lumen by more than 5 mm", { x: 0.3, y: 2.42, w: 2.7, h: 2.5, fontSize: 12, color: "333333", fontFace: "Calibri", valign: "top", align: "center" });
s_egc.addShape(pres.ShapeType.rect, { x: 3.6, y: 1.75, w: 2.8, h: 3.3, fill: { color: "FFF8E1" }, line: { color: GOLD, width: 1.5 } });
s_egc.addText("Type II\nSuperficial", { x: 3.65, y: 1.82, w: 2.7, h: 0.55, fontSize: 13, bold: true, color: "8B6914", fontFace: "Calibri", align: "center" });
s_egc.addText("IIa: Slightly elevated\nIIb: Flat (same level as mucosa)\nIIc: Slightly depressed\nMost common type", { x: 3.65, y: 2.42, w: 2.7, h: 2.5, fontSize: 12, color: "333333", fontFace: "Calibri", valign: "top", align: "center" });
s_egc.addShape(pres.ShapeType.rect, { x: 6.95, y: 1.75, w: 2.8, h: 3.3, fill: { color: "FFEBEE" }, line: { color: RED, width: 1.5 } });
s_egc.addText("Type III\nUlcerated", { x: 7.0, y: 1.82, w: 2.7, h: 0.55, fontSize: 13, bold: true, color: RED, fontFace: "Calibri", align: "center" });
s_egc.addText("Excavated lesion with frank ulceration of the mucosa; must be distinguished from peptic ulcer", { x: 7.0, y: 2.42, w: 2.7, h: 2.5, fontSize: 12, color: "333333", fontFace: "Calibri", valign: "top", align: "center" });
// Image: Japanese classification diagram
if (images[0] && !images[0].error) {
s_egc.addImage({ data: images[0].base64, x: 0.25, y: 1.0, w: 1.8, h: 0.65 });
}
// ===================== SLIDE 9: BORRMANN CLASSIFICATION =====================
const s_borrmann = addContentSlide("Borrmann Classification – Advanced Gastric Cancer", []);
// Borrmann type boxes
const btypes = [
{ type: "Type 1", name: "Polypoid", desc: "Polypoid mass projecting into lumen; well demarcated, no infiltration into wall", color: "E3F2FD", border: TEAL },
{ type: "Type 2", name: "Ulcerating", desc: "Ulcer with raised, well-defined margins; non-infiltrating edges", color: "F3E5F5", border: "7B1FA2" },
{ type: "Type 3", name: "Infiltrating / Ulcerating", desc: "Ulcer with infiltrating/indistinct margins; partial wall thickening", color: "FFF3E0", border: GOLD },
{ type: "Type 4", name: "Linitis Plastica", desc: "Diffuse infiltration of whole stomach wall; 'leather bottle' stomach; worst prognosis", color: "FFEBEE", border: RED },
];
btypes.forEach((bt, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.87;
const y = 1.1 + row * 2.12;
s_borrmann.addShape(pres.ShapeType.rect, { x, y, w: 4.62, h: 1.95, fill: { color: bt.color }, line: { color: bt.border, width: 2 } });
s_borrmann.addText(bt.type + " – " + bt.name, { x: x + 0.1, y: y + 0.05, w: 4.4, h: 0.42, fontSize: 14, bold: true, color: bt.border, fontFace: "Calibri" });
s_borrmann.addText(bt.desc, { x: x + 0.1, y: y + 0.48, w: 4.4, h: 1.35, fontSize: 13, color: "1A1A2E", fontFace: "Calibri", valign: "top" });
});
// Add Borrmann diagram image
if (images[1] && !images[1].error) {
// overlay small image in corner
}
// ===================== SLIDE 10: MOLECULAR PATHOLOGY =====================
addSectionSlide("Molecular Pathology", DARK_TEAL);
const s_mol = addContentSlide("Molecular Subtypes – TCGA Classification", []);
const molTypes = [
{ name: "EBV-Positive", color: "E8F5E9", border: ACCENT, desc: "Epstein-Barr virus positive; PIK3CA mutations; CDKN2A silencing; immune evasion mechanisms" },
{ name: "Microsatellite Unstable (MSI)", color: "E3F2FD", border: TEAL, desc: "High mutation burden; MLH1 silencing; potential response to immunotherapy (pembrolizumab)" },
{ name: "Genomically Stable (GS)", color: "FFF8E1", border: GOLD, desc: "Diffuse histology; CDH1, RHOA mutations; CLDN18-ARHGAP fusions; worst prognosis" },
{ name: "Chromosomal Instability (CIN)", color: "FFEBEE", border: RED, desc: "Intestinal histology; TP53 mutations; VEGFA/ERBB2 amplification; HER2-positive tumours here" },
];
molTypes.forEach((mt, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.87;
const y = 1.1 + row * 2.12;
s_mol.addShape(pres.ShapeType.rect, { x, y, w: 4.62, h: 1.95, fill: { color: mt.color }, line: { color: mt.border, width: 2 } });
s_mol.addText(mt.name, { x: x + 0.1, y: y + 0.08, w: 4.4, h: 0.4, fontSize: 14, bold: true, color: mt.border, fontFace: "Calibri" });
s_mol.addText(mt.desc, { x: x + 0.1, y: y + 0.52, w: 4.4, h: 1.3, fontSize: 13, color: "1A1A2E", fontFace: "Calibri", valign: "top" });
});
// ===================== SLIDE 11: KEY GENE MUTATIONS =====================
addContentSlide("Key Gene Mutations in Gastric Cancer", [
"Genome integrity: BRCA2, TP53, ARID1A",
"Chromatin remodelling: SMARCA1, CHD3, CHD4",
"Cell-cell adhesion & motility: RHOA, CDH1 (E-cadherin) – hereditary diffuse gastric cancer",
"Cell signalling: Wnt pathway – amenable to small-molecule inhibitors",
"Receptor tyrosine kinases & PI3K/MAPK signalling commonly perturbed",
"ERBB2 (HER2) amplification: trastuzumab (Herceptin) used in HER2+ advanced disease",
"VEGF pathway: ramucirumab (anti-VEGFR2) approved for advanced disease",
"Next-generation sequencing now enables precision therapy approaches",
"Single-cell sequencing platforms offer future promise for individualised treatment",
]);
// ===================== SLIDE 12: SPREAD =====================
addSectionSlide("Spread of Gastric Carcinoma", TEAL);
const s_spread = addContentSlide("Routes of Spread", []);
const spreadTypes = [
{ title: "Direct Spread", icon: "→", desc: "Penetrates muscularis → serosa → adjacent organs (pancreas, colon, liver)", color: "E8F5E9", border: ACCENT },
{ title: "Lymphatic Spread", icon: "⬆", desc: "Permeation & emboli to regional nodes → supraclavicular nodes (Troisier's sign / Virchow's node). Unlike breast cancer, nodal involvement does NOT necessarily imply systemic dissemination", color: "E3F2FD", border: TEAL },
{ title: "Haematogenous Spread", icon: "●", desc: "Primarily to liver first → subsequently to lung, bone. Uncommon in the absence of nodal disease", color: "FFF8E1", border: GOLD },
{ title: "Transperitoneal Spread", icon: "○", desc: "Once serosa is reached: seeding of peritoneal cavity. Krukenberg tumour (ovaries). Blumer's shelf (pouch of Douglas). Indicates INCURABILITY", color: "FFEBEE", border: RED },
];
spreadTypes.forEach((st, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.87;
const y = 1.1 + row * 2.12;
s_spread.addShape(pres.ShapeType.rect, { x, y, w: 4.62, h: 1.95, fill: { color: st.color }, line: { color: st.border, width: 2 } });
s_spread.addText(st.title, { x: x + 0.1, y: y + 0.08, w: 4.4, h: 0.4, fontSize: 14, bold: true, color: st.border, fontFace: "Calibri" });
s_spread.addText(st.desc, { x: x + 0.1, y: y + 0.52, w: 4.4, h: 1.3, fontSize: 12, color: "1A1A2E", fontFace: "Calibri", valign: "top" });
});
// ===================== SLIDE 13: STAGING (TNM) =====================
addSectionSlide("Staging – TNM System", NAVY);
const s_tnm = addContentSlide("TNM Staging – UICC 8th Edition", []);
// T Stage
s_tnm.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 3.05, h: 4.1, fill: { color: "E3F2FD" }, line: { color: TEAL, width: 1.5 } });
s_tnm.addText("T Stage", { x: 0.3, y: 1.1, w: 2.95, h: 0.38, fontSize: 14, bold: true, color: DARK_TEAL, fontFace: "Calibri", align: "center" });
s_tnm.addText([
{ text: "Tis: Carcinoma in situ\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "T1a: Invades lamina propria or muscularis mucosae\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "T1b: Invades submucosa\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "T2: Invades muscularis propria\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "T3: Penetrates subserosa without serosa\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "T4a: Invades serosa\n", options: { fontSize: 12.5, color: RED, breakLine: true } },
{ text: "T4b: Invades adjacent structures\n", options: { fontSize: 12.5, color: RED, breakLine: false } },
], { x: 0.32, y: 1.52, w: 2.92, h: 3.5, valign: "top", fontFace: "Calibri" });
// N Stage
s_tnm.addShape(pres.ShapeType.rect, { x: 3.6, y: 1.05, w: 2.85, h: 4.1, fill: { color: "FFF3E0" }, line: { color: GOLD, width: 1.5 } });
s_tnm.addText("N Stage", { x: 3.65, y: 1.1, w: 2.75, h: 0.38, fontSize: 14, bold: true, color: "8B6914", fontFace: "Calibri", align: "center" });
s_tnm.addText([
{ text: "N0: No regional LN metastases\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "N1: 1-2 regional LN\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "N2: 3-6 regional LN\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "N3a: 7-15 regional LN\n", options: { fontSize: 12.5, color: GOLD, breakLine: true } },
{ text: "N3b: ≥16 regional LN\n", options: { fontSize: 12.5, color: RED, breakLine: false } },
], { x: 3.67, y: 1.52, w: 2.72, h: 3.5, valign: "top", fontFace: "Calibri" });
// M Stage
s_tnm.addShape(pres.ShapeType.rect, { x: 6.65, y: 1.05, w: 3.1, h: 4.1, fill: { color: "FFEBEE" }, line: { color: RED, width: 1.5 } });
s_tnm.addText("M Stage", { x: 6.7, y: 1.1, w: 3.0, h: 0.38, fontSize: 14, bold: true, color: RED, fontFace: "Calibri", align: "center" });
s_tnm.addText([
{ text: "M0: No distant metastases\n", options: { fontSize: 12.5, color: "1A1A2E", breakLine: true } },
{ text: "M1: Distant metastases present\n\n", options: { fontSize: 12.5, color: RED, breakLine: true } },
{ text: "Special notes (8th ed):\n", options: { fontSize: 12, bold: true, color: DARK_TEAL, breakLine: true } },
{ text: "• Tumour epicentre within 5 cm of GOJ extending into oesophagus → classified by oesophageal system\n", options: { fontSize: 11.5, color: "1A1A2E", breakLine: true } },
{ text: "• Any tumour perforating serosa = T4\n", options: { fontSize: 11.5, color: RED, breakLine: false } },
], { x: 6.7, y: 1.52, w: 2.98, h: 3.5, valign: "top", fontFace: "Calibri" });
// ===================== SLIDE 14: DIAGNOSIS & INVESTIGATIONS =====================
addSectionSlide("Diagnosis & Investigations", TEAL);
addContentSlide("Investigations & Diagnosis", [
"Upper GI endoscopy (OGD): Gold standard – direct visualisation and biopsy",
"Multiple biopsies (at least 6-8) from ulcer edge and base essential",
"Endoscopic ultrasound (EUS): Best modality for T and N staging pre-operatively",
"CT chest/abdomen/pelvis: Identifies distant metastases (M staging), peritoneal disease",
"PET-CT: Useful for detecting occult metastases not seen on CT",
"Laparoscopic staging: Mandatory before planned resection – detects peritoneal disease",
"Peritoneal washings: Cytology for micrometastases",
"Barium meal: Historical; largely replaced by endoscopy",
"MRI: Occasionally useful for liver metastasis characterisation",
"Biomarkers: HER2 testing on all tumours (guides trastuzumab therapy); MSI/PD-L1 testing",
]);
// ===================== SLIDE 15: SURGICAL TREATMENT =====================
addSectionSlide("Surgical Treatment", DARK_TEAL);
addTwoColSlide(
"Surgical Management",
"Curative Resection",
[
"Total gastrectomy: For proximal/body tumours",
"Subtotal gastrectomy: For distal tumours (similar survival, less morbidity)",
"D2 lymphadenectomy: Standard of care – removes perigastric + along principal arterial trunks (≥15 nodes)",
"D1: Perigastric nodes only (lesser curative intent)",
"D3: Extended dissection to para-aortic nodes",
"Splenectomy: Only if directly invaded; routine splenectomy NOT recommended",
"R0 resection (clear margins) is the goal",
"Laparoscopic/robotic approaches increasingly used",
],
"Reconstruction Options",
[
"After total gastrectomy: Roux-en-Y oesophagojejunostomy",
"After distal gastrectomy: Billroth I (gastroduodenostomy)",
"Billroth II / Roux-en-Y gastrojejunostomy for distal gastrectomy",
"Pouch construction may improve quality of life",
"Palliative: Bypass procedures for obstruction",
"Palliative: Endoscopic stenting for GOJ/pyloric obstruction",
"Total vs subtotal: Similar 5-year survival; subtotal has better nutrition and QoL",
]
);
// ===================== SLIDE 16: CHEMOTHERAPY & MULTIMODAL =====================
addSectionSlide("Chemotherapy & Multimodal Treatment", TEAL);
addContentSlide("Chemotherapy & Adjuvant Therapy", [
"Perioperative chemotherapy (FLOT regimen: 5-FU, leucovorin, oxaliplatin, docetaxel): Standard of care in Western countries",
"FLOT superior to ECF/ECX (FLOT4 trial): Improved OS (50 vs 35 months median survival)",
"Adjuvant chemotherapy: Used in East Asia (S-1 regimen post-surgery, ACTS-GC trial)",
"Adjuvant chemoradiotherapy: SWOG 9008/INT0116 trial supports post-op chemoRT",
"Neoadjuvant chemotherapy downstages tumour and improves R0 resection rate",
"Trastuzumab (Herceptin): Added to chemotherapy in HER2+ advanced/metastatic disease (ToGA trial)",
"Ramucirumab (anti-VEGFR2): Second-line treatment in advanced disease",
"Pembrolizumab/nivolumab: Immunotherapy for MSI-H or PD-L1 positive tumours",
"Palliative chemotherapy: Improves quality of life and survival vs best supportive care",
]);
// ===================== SLIDE 17: PROGNOSIS =====================
addSectionSlide("Prognosis & Outcomes", NAVY);
const s_prog = addContentSlide("Prognosis by Stage", []);
const progData = [
{ stage: "Stage IA", surv: "~90-95%", desc: "T1 N0 M0 – Early cancer (mucosa/submucosa)", color: "E8F5E9", bar: ACCENT, barW: 9.0 },
{ stage: "Stage IB", surv: "~70-85%", desc: "T2 N0 M0 or T1 N1 M0", color: "F1F8E9", bar: "66BB6A", barW: 7.5 },
{ stage: "Stage IIA", surv: "~55-65%", desc: "T3 N0 M0 or T2 N1 M0 or T1 N2 M0", color: "FFF8E1", bar: GOLD, barW: 6.0 },
{ stage: "Stage IIB", surv: "~45-55%", desc: "T4a N0 M0 or T3 N1 M0", color: "FFF3E0", bar: "FFB300", barW: 5.0 },
{ stage: "Stage IIIA", surv: "~25-40%", desc: "T4a N1-2 M0 or T3 N2 M0", color: "FBE9E7", bar: "EF6C00", barW: 3.5 },
{ stage: "Stage IIIC", surv: "~10-20%", desc: "T4b N2-3 M0 or T4a N3 M0", color: "FFEBEE", bar: RED, barW: 2.0 },
{ stage: "Stage IV", surv: "<5%", desc: "Any T, Any N, M1 – Distant metastases", color: "FCE4EC", bar: "B71C1C", barW: 0.8 },
];
progData.forEach((p, i) => {
const y = 1.05 + i * 0.575;
s_prog.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 1.5, h: 0.5, fill: { color: p.color }, line: { color: p.bar, width: 1 } });
s_prog.addText(p.stage, { x: 0.22, y: y + 0.05, w: 1.46, h: 0.4, fontSize: 12, bold: true, color: p.bar, fontFace: "Calibri", align: "center" });
// Survival bar
s_prog.addShape(pres.ShapeType.rect, { x: 1.75, y: y + 0.1, w: p.barW, h: 0.3, fill: { color: p.bar } });
s_prog.addText(p.surv, { x: 1.82 + p.barW, y: y + 0.05, w: 1.2, h: 0.4, fontSize: 12, bold: true, color: p.bar, fontFace: "Calibri" });
s_prog.addText(p.desc, { x: 1.78, y: y + 0.43, w: 7.8, h: 0.18, fontSize: 10, color: GRAY, fontFace: "Calibri" });
});
// ===================== SLIDE 18: GASTRIC LYMPHOMA =====================
addSectionSlide("Gastric Lymphoma (MALT)", TEAL);
addContentSlide("Primary Gastric Lymphoma", [
"Incidence: INCREASING (unlike gastric carcinoma which is declining)",
"Most common in the sixth decade",
"Accounts for ~5% of all gastric neoplasms",
"B-cell derived, arising from mucosa-associated lymphoid tissue (MALT)",
"Remains confined to stomach for prolonged period before nodal involvement",
"Early disease: diffuse mucosal thickening, may ulcerate",
"Diagnosis: Endoscopic biopsy (endoscopic features alone are NOT specific)",
"Staging: CT chest/abdomen + bone marrow aspirate (to exclude systemic disease)",
"Low-grade MALT: May REGRESS completely with H. pylori eradication therapy alone",
"Localised disease: Surgery (alone or with chemotherapy)",
"Systemic disease: Chemotherapy (R-CHOP) – often dramatic rapid responses",
"Complications of chemotherapy: Bleeding and perforation due to rapid tumour necrosis",
]);
// ===================== SLIDE 19: GASTROINTESTINAL STROMAL TUMOUR =====================
addSectionSlide("GIST – Gastrointestinal Stromal Tumour", DARK_TEAL);
addContentSlide("GIST of the Stomach", [
"Most common mesenchymal tumour of the GI tract; stomach is most common site",
"Arise from interstitial cells of Cajal (pacemaker cells of the gut)",
"Driven by c-KIT (CD117) or PDGFRA mutations in ~85-90% of cases",
"Remainder: SDHA/B, NF1, or wild-type GIST",
"Presentation: Incidental; large tumours bleed (haematemesis, melaena); obstruction",
"Diagnosis: CT scan; EUS-guided biopsy; immunohistochemistry (CD117, DOG-1 positive)",
"Treatment: Surgical resection (no formal lymphadenectomy needed – rare LN metastases)",
"Imatinib (Gleevec): Tyrosine kinase inhibitor – first-line for unresectable/metastatic GIST",
"Adjuvant imatinib: 3 years for high-risk tumours post-resection",
"Sunitinib: Second-line after imatinib resistance",
"Risk stratification: Tumour size, mitotic rate, location determine malignant potential",
]);
// ===================== SLIDE 20: KEY LEARNING SUMMARY =====================
addSectionSlide("Key Learning Points", NAVY);
addContentSlide("Summary – Gastric Carcinoma", [
"Global disease with wide incidence variation; Japan has highest rates but best outcomes via screening",
"Multifactorial aetiology: H. pylori (distal), diet, smoking, genetic factors (CDH1 mutation)",
"Laurén classification: Intestinal type (better prognosis) vs Diffuse type (worse, signet ring cells)",
"Borrmann classification: Types 1-4 for advanced cancer; Type 4 = linitis plastica (worst prognosis)",
"Early gastric cancer (Japanese classification Types I, IIa/b/c, III): High cure rates >90% with resection",
"TCGA molecular subtypes: EBV+, MSI, GS, CIN – guide targeted therapy selection",
"Spread: Direct → lymphatic → haematogenous (liver first) → transperitoneal (Krukenberg tumour)",
"Staging: UICC TNM 8th edition; GOJ tumours staged differently if extend into oesophagus",
"Treatment: R0 resection + D2 lymphadenectomy + perioperative FLOT chemotherapy (standard in West)",
"HER2 positivity: Trastuzumab added to chemotherapy in advanced disease",
"Palliation: Stenting, bypass surgery, palliative chemotherapy improve quality of life",
"Gastric lymphoma: MALT origin; H. pylori eradication may cure early-stage disease",
], { fontSize: 15 });
// ===================== SLIDE 21: CLOSING SLIDE =====================
const sEnd = pres.addSlide();
sEnd.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY } });
sEnd.addShape(pres.ShapeType.rect, { x: 0, y: 2.5, w: 10, h: 0.1, fill: { color: GOLD } });
sEnd.addShape(pres.ShapeType.rect, { x: 0, y: 2.6, w: 10, h: 0.06, fill: { color: TEAL } });
sEnd.addText("Thank You", { x: 1, y: 1.2, w: 8, h: 1.1, fontSize: 48, bold: true, color: WHITE, align: "center", fontFace: "Calibri" });
sEnd.addText("Questions?", { x: 1, y: 2.75, w: 8, h: 0.7, fontSize: 28, color: GOLD, align: "center", fontFace: "Calibri", italic: true });
sEnd.addText("Source: Bailey & Love's Short Practice of Surgery, 28th Edition (2023)", { x: 1, y: 3.55, w: 8, h: 0.5, fontSize: 14, color: "A0B0C0", align: "center", fontFace: "Calibri" });
sEnd.addText("Chapter 67 – Stomach & Duodenum", { x: 1, y: 4.1, w: 8, h: 0.4, fontSize: 13, color: TEAL, align: "center", fontFace: "Calibri" });
// Save
pres.writeFile({ fileName: "/home/daytona/workspace/gastric-carcinoma-ppt/Gastric_Carcinoma_Bailey_Love_28e.pptx" })
.then(() => console.log("PPTX saved successfully!"))
.catch(err => { console.error("Error saving:", err); process.exit(1); });
cd /home/daytona/workspace/gastric-carcinoma-ppt && node build.js 2>&1
ls -lh /home/daytona/workspace/gastric-carcinoma-ppt/
Gastric Carcinoma Bailey Love 28e
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title Slide | Full topic overview banner |
| 2 | Overview & Global Burden | Section header |
| 3 | Key Facts | Cure rates, Japan comparison, trends |
| 4 | Epidemiology Section | Section header |
| 5 | Incidence – Global Variation | UK/USA/Japan/China rates, proximal vs distal trends |
| 6 | Aetiology Section | Section header |
| 7 | Aetiology & Risk Factors | Two-column: H. pylori, diet, genetics, Billroth II risk |
| 8 | Clinical Features | Two-column: Early EGC vs Advanced cancer symptoms |
| 9 | Site of Cancer | GOJ/proximal vs distal, Western vs Asian patterns |
| 10 | Pathology Section | Section header |
| 11 | Laurén Classification | Intestinal type vs Diffuse type (signet ring) - colour coded |
| 12 | Early Gastric Cancer - Japanese Classification | Types I, IIa/IIb/IIc, III in colour-coded boxes |
| 13 | Borrmann Classification | Types 1-4 for advanced cancer; linitis plastica |
| 14 | Molecular Subtypes (TCGA) | EBV+, MSI, GS, CIN - with gene mutations |
| 15 | Key Gene Mutations | BRCA2, TP53, CDH1, HER2, VEGF, Wnt pathway |
| 16 | Spread of Carcinoma | Direct / Lymphatic / Haematogenous / Transperitoneal |
| 17 | TNM Staging (UICC 8th ed.) | T/N/M stages in 3-column layout; GOJ note |
| 18 | Investigations & Diagnosis | OGD, EUS, CT, PET-CT, laparoscopy, HER2 testing |
| 19 | Surgical Treatment | D2 gastrectomy, reconstruction options |
| 20 | Chemotherapy | FLOT, trastuzumab, pembrolizumab, perioperative protocols |
| 21 | Prognosis by Stage | Visual bar chart - Stage IA (~95%) to Stage IV (<5%) |
| 22 | Gastric Lymphoma (MALT) | MALT origin, H. pylori regression, surgery vs chemo |
| 23 | GIST | c-KIT mutations, imatinib, DOG-1 marker |
| 24 | Key Learning Summary | 12-point consolidated summary for exam/presentation |
| 25 | Closing Slide | Thank You / Questions |
Make it in a pdf form
libreoffice --headless --convert-to pdf /home/daytona/workspace/gastric-carcinoma-ppt/Gastric_Carcinoma_Bailey_Love_28e.pptx --outdir /home/daytona/workspace/gastric-carcinoma-ppt/ 2>&1
cp /home/daytona/workspace/gastric-carcinoma-ppt/Gastric_Carcinoma_Bailey_Love_28e.pptx /tmp/gc.pptx && libreoffice --headless --convert-to pdf /tmp/gc.pptx --outdir /tmp/ 2>&1 && ls -lh /tmp/gc.pdf
cp /tmp/gc.pdf /home/daytona/workspace/gastric-carcinoma-ppt/Gastric_Carcinoma_Bailey_Love_28e.pdf && ls -lh /home/daytona/workspace/gastric-carcinoma-ppt/
Gastric Carcinoma Bailey Love 28e
PDF Document · PDF
Gastric Carcinoma Bailey Love 28e
Presentation · PPTX