Staging of stomach cancer and types
"gastric cancer" AND staging
| Type | Features | Behaviour |
|---|---|---|
| Intestinal type | Cohesive cells forming gland-like structures; often well-differentiated; associated with H. pylori, atrophic gastritis, intestinal metaplasia | Tends to form a discrete mass; haematogenous spread; better prognosis |
| Diffuse type | Poorly cohesive cells (signet ring cells); lack of cell adhesion molecules (e-cadherin/CDH1); infiltrates widely | Spreads via submucosal and subserosal lymphatics; penetrates gastric wall early; worse prognosis; associated with CDH1 germline mutation |
| Type | Description |
|---|---|
| Type I | Protruded / polypoid |
| Type IIa | Superficial elevated |
| Type IIb | Flat |
| Type IIc | Superficial depressed |
| Type III | Excavated / ulcerated |

| Type | Description |
|---|---|
| Type 1 | Polypoid - well-defined, protruding mass |
| Type 2 | Ulcerating with sharp margins - crater with raised edges |
| Type 3 | Infiltrating and ulcerating - ulcer with ill-defined infiltrating margins |
| Type 4 | Diffuse infiltrating (Linitis plastica / "leather bottle stomach") - no clear margin, diffuse wall thickening |
| Stage | Description |
|---|---|
| Tx | Primary tumour cannot be assessed |
| T0 | No evidence of primary tumour |
| Tis | Carcinoma in situ: intraepithelial tumour without invasion of lamina propria; high-grade dysplasia |
| T1 | Tumour involves lamina propria, muscularis mucosae, or submucosa |
| T1a | Invades lamina propria or muscularis mucosae |
| T1b | Invades submucosa |
| T2 | Invades muscularis propria |
| T3 | Involves subserosa (subserosal connective tissue) |
| T4 | Perforates serosa or invades adjacent structures |
| T4a | Perforates serosa (visceral peritoneum) |
| T4b | Invades adjacent structures (pancreas, colon, liver, etc.) |
| Stage | Description |
|---|---|
| Nx | Cannot be assessed |
| N0 | No regional lymph node metastasis |
| N1 | Metastasis in 1-2 regional lymph nodes |
| N2 | Metastasis in 3-6 regional lymph nodes |
| N3 | Metastasis in 7+ regional lymph nodes |
| N3a | 7-15 lymph nodes involved |
| N3b | 16 or more lymph nodes involved |
| Stage | Description |
|---|---|
| M0 | No distant metastasis |
| M1 | Distant metastasis present (includes retropancreatic, mesenteric, para-aortic nodes; liver metastases; peritoneal seedlings) |
| Stage | T | N | M |
|---|---|---|---|
| IA | T1 | N0 | M0 |
| IB | T1 / T2 | N1 / N0 | M0 |
| IIA | T1 / T2 / T3 | N2 / N1 / N0 | M0 |
| IIB | T1 / T2 / T3 / T4a | N3 / N2 / N1 / N0 | M0 |
| IIIA | T2 / T3 / T4a | N3 / N2 / N1 | M0 |
| IIIB | T3 / T4a / T4b | N3 / N2 / N0-1 | M0 |
| IIIC | T4a / T4b | N3 / N2-3 | M0 |
| IV | Any T | Any N | M1 |
| Route | Details |
|---|---|
| Direct | Penetrates muscularis → serosa → adjacent organs (pancreas, colon, liver) |
| Lymphatic | To perigastric and then para-aortic nodes; may reach supraclavicular nodes (Troisier's/Virchow's sign) |
| Blood-borne | First to liver, then lung and bone; uncommon without prior nodal disease |
| Transperitoneal | Once serosa is reached; leads to ascites, peritoneal seedlings; ovarian metastases (Krukenberg's tumour); umbilical metastasis (Sister Joseph's nodule); pelvic "shelf" on rectal exam (Blumer's shelf) |
Can you make ppt presentation for the same topic
mkdir -p /home/daytona/workspace/gastric-cancer-ppt && ls /home/daytona/workspace/gastric-cancer-ppt
~/gastric-cancer-ppt/generate.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Stomach Cancer: Types and Staging";
pres.author = "Medical Education";
// ── Color Palette ──────────────────────────────────────
const C = {
darkBg: "0D1B2A", // deep navy - title/section slides
midBg: "1B3A5C", // medium navy
accent: "E63946", // vivid red (oncology feel)
accentSoft:"C1121F", // darker red
gold: "F4A261", // warm gold for highlights
white: "FFFFFF",
offWhite: "F1F1F1",
lightGray: "D8DEE9",
textDark: "0D1B2A",
teal: "2A9D8F",
tealLight: "52B788",
};
// ── Helper: slide background ───────────────────────────
function darkSlide(pres) {
const s = pres.addSlide();
s.background = { color: C.darkBg };
return s;
}
function lightSlide(pres) {
const s = pres.addSlide();
s.background = { color: C.offWhite };
return s;
}
function midSlide(pres) {
const s = pres.addSlide();
s.background = { color: C.midBg };
return s;
}
// ── SLIDE 1: Title ─────────────────────────────────────
{
const s = darkSlide(pres);
// Red accent bar left
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.accent }, line: { type: "none" } });
// Red diagonal top-right accent
s.addShape(pres.shapes.RECTANGLE, { x: 7.5, y: 0, w: 2.5, h: 0.12, fill: { color: C.accent }, line: { type: "none" } });
// Main title
s.addText("STOMACH CANCER", {
x: 0.4, y: 1.0, w: 9.2, h: 1.2,
fontSize: 48, bold: true, color: C.white,
fontFace: "Calibri", charSpacing: 4,
});
// Subtitle
s.addText("Types & Staging", {
x: 0.4, y: 2.25, w: 7, h: 0.7,
fontSize: 28, bold: false, color: C.gold,
fontFace: "Calibri",
});
// Divider
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 3.05, w: 5.5, h: 0.05, fill: { color: C.lightGray }, line: { type: "none" } });
// Subtext
s.addText("AJCC/UICC TNM Classification (8th Edition) · Lauren Classification · Borrmann System", {
x: 0.4, y: 3.2, w: 9.2, h: 0.5,
fontSize: 12, color: C.lightGray, fontFace: "Calibri", italic: true,
});
// Bottom tag
s.addText("Based on Harrison's | Bailey & Love | Grainger & Allison", {
x: 0.4, y: 5.0, w: 9.2, h: 0.4,
fontSize: 10, color: C.lightGray, fontFace: "Calibri",
});
}
// ── SLIDE 2: Overview / Epidemiology ──────────────────
{
const s = lightSlide(pres);
// Top bar
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("OVERVIEW", { x: 0.4, y: 0.08, w: 9, h: 0.55, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 3 });
// Stat boxes
const stats = [
{ val: "1.7M", label: "Global cases (2020)" },
{ val: "1.3M", label: "Annual deaths" },
{ val: ">95%", label: "Adenocarcinoma" },
{ val: "#5", label: "Worldwide cancer" },
];
stats.forEach((st, i) => {
const x = 0.3 + i * 2.4;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y: 0.95, w: 2.1, h: 1.4, fill: { color: C.accent }, line: { type: "none" }, rectRadius: 0.08 });
s.addText(st.val, { x, y: 1.0, w: 2.1, h: 0.8, fontSize: 28, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(st.label, { x, y: 1.8, w: 2.1, h: 0.45, fontSize: 11, color: C.white, align: "center", fontFace: "Calibri" });
});
// Key facts
const facts = [
"Incidence has steadily declined since the 1920s in Western countries",
"GEJ (gastroesophageal junction) adenocarcinomas are markedly increasing",
"H. pylori infection is the leading causative factor",
"Tumours with epicentre >2 cm into the proximal stomach are staged as GASTRIC cancer (8th Ed.)",
"Important risk genes: CDH1 (diffuse type), Lynch syndrome, FAP, Peutz-Jeghers",
"Molecular biomarkers (HER2, PD-L1, MSI, Claudin 18.2) now guide therapy",
];
s.addText(facts.map((f, i) => ({
text: f,
options: { bullet: { type: "bullet" }, breakLine: i < facts.length - 1, fontSize: 13, color: C.textDark, fontFace: "Calibri" }
})), { x: 0.4, y: 2.55, w: 9.2, h: 2.8, valign: "top" });
}
// ── SLIDE 3: Section Divider – Types ──────────────────
{
const s = midSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.22, h: 5.625, fill: { color: C.gold }, line: { type: "none" } });
s.addText("SECTION 1", { x: 0.5, y: 1.3, w: 9, h: 0.5, fontSize: 14, bold: false, color: C.gold, fontFace: "Calibri", charSpacing: 4 });
s.addText("Types of\nStomach Cancer", { x: 0.5, y: 1.85, w: 9, h: 1.8, fontSize: 42, bold: true, color: C.white, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.7, w: 4, h: 0.05, fill: { color: C.gold }, line: { type: "none" } });
s.addText("Histological · Macroscopic · Molecular", { x: 0.5, y: 3.85, w: 9, h: 0.4, fontSize: 14, color: C.lightGray, fontFace: "Calibri", italic: true });
}
// ── SLIDE 4: By Histology – Lauren Classification ─────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("HISTOLOGICAL CLASSIFICATION — LAUREN SYSTEM", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
// Intestinal box
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.9, w: 4.4, h: 4.4, fill: { color: C.midBg }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.2 } });
s.addText("INTESTINAL TYPE", { x: 0.3, y: 0.9, w: 4.4, h: 0.55, fontSize: 15, bold: true, color: C.gold, align: "center", fontFace: "Calibri" });
const intFacts = [
"Cohesive gland-forming cells",
"Well-differentiated",
"Associated with H. pylori, atrophic gastritis, intestinal metaplasia",
"More common in older males",
"Distal stomach predominance",
"Haematogenous spread (liver first)",
"Better prognosis",
"Incidence declining globally",
];
s.addText(intFacts.map((f, i) => ({ text: f, options: { bullet: true, breakLine: i < intFacts.length - 1, fontSize: 12, color: C.white, fontFace: "Calibri" } })),
{ x: 0.45, y: 1.5, w: 4.1, h: 3.6, valign: "top" });
// Diffuse box
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 0.9, w: 4.4, h: 4.4, fill: { color: C.accentSoft }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.2 } });
s.addText("DIFFUSE TYPE", { x: 5.3, y: 0.9, w: 4.4, h: 0.55, fontSize: 15, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
const difFacts = [
"Poorly cohesive cells (signet ring cells)",
"Lack of e-cadherin (CDH1 mutation)",
"Diffuse wall infiltration",
"Spreads via submucosal/subserosal lymphatics",
"Penetrates gastric wall early",
"Any age; often younger patients",
"Associated with hereditary CDH1 mutations",
"Worse prognosis; harder to resect",
];
s.addText(difFacts.map((f, i) => ({ text: f, options: { bullet: true, breakLine: i < difFacts.length - 1, fontSize: 12, color: C.white, fontFace: "Calibri" } })),
{ x: 5.45, y: 1.5, w: 4.1, h: 3.6, valign: "top" });
// VS badge
s.addShape(pres.shapes.OVAL, { x: 4.6, y: 2.7, w: 0.8, h: 0.8, fill: { color: C.gold }, line: { type: "none" } });
s.addText("VS", { x: 4.6, y: 2.7, w: 0.8, h: 0.8, fontSize: 14, bold: true, color: C.darkBg, align: "center", valign: "middle", fontFace: "Calibri" });
}
// ── SLIDE 5: Other Rare Histological Types ─────────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("OTHER TYPES OF GASTRIC TUMOURS", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
const types = [
{ name: "MALT Lymphoma", color: C.teal, facts: ["Mucosa-Associated Lymphoid Tissue", "Linked to H. pylori infection", "Can regress with H. pylori eradication", "Low-grade B-cell lymphoma"] },
{ name: "GIST", color: C.midBg, facts: ["Gastrointestinal Stromal Tumour", "Arises from interstitial cells of Cajal", "KIT / PDGFRA mutations", "Targeted therapy: Imatinib"] },
{ name: "Carcinoid / NETs", color: C.accentSoft, facts: ["Neuroendocrine tumours", "From enterochromaffin-like cells", "Often associated with hypergastrinaemia", "Usually indolent; graded G1-G3"] },
{ name: "Squamous Cell Ca.", color: "5A5A8A", facts: ["Very rare in the stomach", "Most arise at cardia/GEJ", "Similar features to oesophageal SCC", "Poor prognosis"] },
];
types.forEach((t, i) => {
const x = 0.25 + (i % 2) * 4.9;
const y = 0.95 + Math.floor(i / 2) * 2.3;
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.5, h: 2.1, fill: { color: t.color }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.18 } });
s.addText(t.name, { x, y, w: 4.5, h: 0.5, fontSize: 14, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(t.facts.map((f, fi) => ({ text: f, options: { bullet: true, breakLine: fi < t.facts.length - 1, fontSize: 11.5, color: C.white, fontFace: "Calibri" } })),
{ x: x + 0.1, y: y + 0.5, w: 4.3, h: 1.5, valign: "top" });
});
}
// ── SLIDE 6: Borrmann Classification ──────────────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("BORRMANN CLASSIFICATION — Advanced Gastric Cancer", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 17, bold: true, color: C.white, fontFace: "Calibri" });
const borrmann = [
{ type: "Type I", name: "Polypoid", desc: "Well-defined protruding mass. Sharp margins. No surrounding infiltration. Best prognosis among advanced types.", color: C.teal },
{ type: "Type II", name: "Ulcerating", desc: "Crater ulcer with raised, clearly defined margins. Tumour confined and well demarcated.", color: "3A86FF" },
{ type: "Type III", name: "Infiltrating + Ulcerating", desc: "Ulcer with ill-defined, infiltrating edges. Margins merge with surrounding gastric wall.", color: C.gold + "CC" },
{ type: "Type IV", name: "Linitis Plastica", desc: "Diffuse infiltration of all layers. 'Leather bottle stomach'. Worst prognosis. Often inoperable at diagnosis.", color: C.accent },
];
borrmann.forEach((b, i) => {
const x = 0.2 + i * 2.42;
s.addShape(pres.shapes.RECTANGLE, { x, y: 0.9, w: 2.2, h: 4.45, fill: { color: b.color }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 } });
s.addText(b.type, { x, y: 0.9, w: 2.2, h: 0.55, fontSize: 16, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(b.name, { x, y: 1.45, w: 2.2, h: 0.45, fontSize: 12, bold: false, color: C.white, align: "center", italic: true, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.1, y: 1.9, w: 2.0, h: 0.03, fill: { color: "FFFFFF" }, line: { type: "none" } });
s.addText(b.desc, { x: x + 0.1, y: 2.0, w: 2.0, h: 3.2, fontSize: 11.5, color: C.white, fontFace: "Calibri", valign: "top" });
});
s.addText("Note: Types III & IV carry significantly worse prognosis due to deeper invasion and diffuse spread.", {
x: 0.3, y: 5.3, w: 9.4, h: 0.25, fontSize: 10, color: C.textDark, italic: true, fontFace: "Calibri",
});
}
// ── SLIDE 7: Early Gastric Cancer Classification ──────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("EARLY GASTRIC CANCER — Japanese Endoscopic Classification", { x: 0.3, y: 0.1, w: 9.4, h: 0.5, fontSize: 17, bold: true, color: C.white, fontFace: "Calibri" });
// Definition box
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.85, w: 9.4, h: 0.6, fill: { color: C.midBg }, line: { type: "none" } });
s.addText("Definition: Cancer limited to mucosa or submucosa, regardless of lymph node status", {
x: 0.3, y: 0.85, w: 9.4, h: 0.6, fontSize: 13, color: C.gold, bold: true, align: "center", valign: "middle", fontFace: "Calibri",
});
const egc = [
{ type: "Type I", name: "Protruded", desc: "Polypoid lesion projecting into the lumen. Clearly elevated above surrounding mucosa.", color: C.teal },
{ type: "Type IIa", name: "Superficial Elevated", desc: "Slightly raised lesion, less than twice the height of surrounding mucosa.", color: "3A86FF" },
{ type: "Type IIb", name: "Flat", desc: "No elevation or depression. Detected by colour change or mucosal texture only.", color: "6A5ACD" },
{ type: "Type IIc", name: "Superficial Depressed", desc: "Slightly depressed. Most common subtype. Often with minimal ulceration.", color: C.gold },
{ type: "Type III", name: "Excavated", desc: "Deep ulcer/excavation. Must be distinguished from benign peptic ulceration.", color: C.accent },
];
egc.forEach((e, i) => {
const x = 0.2 + i * 1.93;
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.55, w: 1.78, h: 3.8, fill: { color: e.color }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.18 } });
s.addText(e.type, { x, y: 1.55, w: 1.78, h: 0.5, fontSize: 15, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(e.name, { x, y: 2.05, w: 1.78, h: 0.4, fontSize: 11, italic: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.1, y: 2.5, w: 1.58, h: 0.03, fill: { color: "FFFFFF" }, line: { type: "none" } });
s.addText(e.desc, { x: x + 0.08, y: 2.6, w: 1.62, h: 2.6, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top" });
});
}
// ── SLIDE 8: Section Divider – Staging ────────────────
{
const s = darkSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.22, h: 5.625, fill: { color: C.accent }, line: { type: "none" } });
s.addText("SECTION 2", { x: 0.5, y: 1.3, w: 9, h: 0.5, fontSize: 14, bold: false, color: C.accent, fontFace: "Calibri", charSpacing: 4 });
s.addText("Staging of\nStomach Cancer", { x: 0.5, y: 1.85, w: 9, h: 1.8, fontSize: 42, bold: true, color: C.white, fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.7, w: 4, h: 0.05, fill: { color: C.accent }, line: { type: "none" } });
s.addText("AJCC/UICC TNM 8th Edition (2017)", { x: 0.5, y: 3.85, w: 9, h: 0.4, fontSize: 14, color: C.lightGray, fontFace: "Calibri", italic: true });
}
// ── SLIDE 9: T Staging ────────────────────────────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("T STAGING — PRIMARY TUMOUR DEPTH", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
const tStages = [
{ stage: "Tis", depth: "Carcinoma in situ", detail: "Intraepithelial, no invasion of lamina propria. High-grade dysplasia.", color: C.teal },
{ stage: "T1a", depth: "Lamina propria / Muscularis mucosae", detail: "Invasion into lamina propria or muscularis mucosae.", color: C.tealLight },
{ stage: "T1b", depth: "Submucosa", detail: "Tumour invades submucosa.", color: "57CC99" },
{ stage: "T2", depth: "Muscularis propria", detail: "Tumour invades muscularis propria.", color: C.gold },
{ stage: "T3", depth: "Subserosa", detail: "Tumour involves subserosal connective tissue without serosa perforation.", color: "F4A261" },
{ stage: "T4a", depth: "Serosa perforated", detail: "Tumour perforates serosa (visceral peritoneum).", color: C.accent },
{ stage: "T4b", depth: "Adjacent structures", detail: "Tumour directly invades pancreas, colon, liver, spleen, or abdominal wall.", color: C.accentSoft },
];
tStages.forEach((t, i) => {
const y = 0.88 + i * 0.67;
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 1.0, h: 0.55, fill: { color: t.color }, line: { type: "none" } });
s.addText(t.stage, { x: 0.2, y, w: 1.0, h: 0.55, fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 1.3, y, w: 3.6, h: 0.55, fill: { color: C.lightGray }, line: { type: "none" } });
s.addText(t.depth, { x: 1.35, y, w: 3.5, h: 0.55, fontSize: 13, bold: true, color: C.textDark, valign: "middle", fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y, w: 4.8, h: 0.55, fill: { color: C.white }, line: { color: C.lightGray, pt: 1 } });
s.addText(t.detail, { x: 5.1, y, w: 4.6, h: 0.55, fontSize: 11.5, color: C.textDark, valign: "middle", fontFace: "Calibri" });
});
}
// ── SLIDE 10: N & M Staging ───────────────────────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("N STAGING & M STAGING — Nodes & Metastasis", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
// N Staging box
s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.85, w: 5.5, h: 4.55, fill: { color: C.midBg }, line: { type: "none" } });
s.addText("N — NODAL STATUS", { x: 0.25, y: 0.85, w: 5.5, h: 0.5, fontSize: 14, bold: true, color: C.gold, align: "center", fontFace: "Calibri" });
const nStages = [
{ stage: "N0", label: "No nodal metastasis" },
{ stage: "N1", label: "1-2 regional lymph nodes" },
{ stage: "N2", label: "3-6 regional lymph nodes" },
{ stage: "N3a", label: "7-15 regional lymph nodes" },
{ stage: "N3b", label: "≥16 regional lymph nodes" },
];
nStages.forEach((n, i) => {
const y = 1.5 + i * 0.7;
s.addShape(pres.shapes.RECTANGLE, { x: 0.45, y, w: 0.9, h: 0.52, fill: { color: C.accent }, line: { type: "none" } });
s.addText(n.stage, { x: 0.45, y, w: 0.9, h: 0.52, fontSize: 15, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(n.label, { x: 1.5, y, w: 4.1, h: 0.52, fontSize: 13, color: C.white, valign: "middle", fontFace: "Calibri" });
});
s.addText("⚑ At least 15 nodes must be examined for adequate staging", {
x: 0.3, y: 5.1, w: 5.3, h: 0.38, fontSize: 10.5, color: C.gold, fontFace: "Calibri", italic: true,
});
// M Staging box
s.addShape(pres.shapes.RECTANGLE, { x: 5.9, y: 0.85, w: 3.85, h: 4.55, fill: { color: C.accentSoft }, line: { type: "none" } });
s.addText("M — DISTANT METASTASIS", { x: 5.9, y: 0.85, w: 3.85, h: 0.5, fontSize: 13, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 6.1, y: 1.5, w: 1.0, h: 0.5, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("M0", { x: 6.1, y: 1.5, w: 1.0, h: 0.5, fontSize: 15, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText("No distant metastasis", { x: 7.25, y: 1.5, w: 2.3, h: 0.5, fontSize: 12, color: C.white, valign: "middle", fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 6.1, y: 2.15, w: 1.0, h: 0.5, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("M1", { x: 6.1, y: 2.15, w: 1.0, h: 0.5, fontSize: 15, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText("Distant metastasis present", { x: 7.25, y: 2.15, w: 2.3, h: 0.5, fontSize: 12, color: C.white, valign: "middle", fontFace: "Calibri" });
const m1sites = [
"Retropancreatic / mesenteric / para-aortic lymph nodes",
"Liver metastases",
"Peritoneal seedlings / ascites",
"Lung, bone (late haematogenous)",
];
s.addText(m1sites.map((m, i) => ({ text: m, options: { bullet: true, breakLine: i < m1sites.length - 1, fontSize: 11, color: C.white, fontFace: "Calibri" } })),
{ x: 6.0, y: 2.75, w: 3.6, h: 2.5, valign: "top" });
}
// ── SLIDE 11: Overall Stage Grouping ─────────────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("OVERALL STAGE GROUPING — UICC 8th Edition", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
const stageGroups = [
{ stage: "IA", tnm: "T1 · N0 · M0", color: C.teal, prognosis: "~94% 5yr" },
{ stage: "IB", tnm: "T1N1 or T2N0 · M0", color: C.tealLight, prognosis: "~88% 5yr" },
{ stage: "IIA", tnm: "T1N2, T2N1, T3N0 · M0", color: "57CC99", prognosis: "~72% 5yr" },
{ stage: "IIB", tnm: "T1N3, T2N2, T3N1, T4aN0 · M0", color: C.gold, prognosis: "~54% 5yr" },
{ stage: "IIIA", tnm: "T2N3, T3N2, T4aN1 · M0", color: "F4A261", prognosis: "~37% 5yr" },
{ stage: "IIIB", tnm: "T3N3, T4aN2, T4bN0-1 · M0", color: C.accent, prognosis: "~23% 5yr" },
{ stage: "IIIC", tnm: "T4aN3, T4bN2-3 · M0", color: C.accentSoft, prognosis: "~15% 5yr" },
{ stage: "IV", tnm: "Any T · Any N · M1", color: "6B2737", prognosis: "<5% 5yr" },
];
stageGroups.forEach((sg, i) => {
const y = 0.85 + i * 0.595;
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 1.2, h: 0.52, fill: { color: sg.color }, line: { type: "none" } });
s.addText(`Stage ${sg.stage}`, { x: 0.2, y, w: 1.2, h: 0.52, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addShape(pres.shapes.RECTANGLE, { x: 1.5, y, w: 6.3, h: 0.52, fill: { color: C.lightGray }, line: { type: "none" } });
s.addText(sg.tnm, { x: 1.6, y, w: 6.1, h: 0.52, fontSize: 12.5, color: C.textDark, valign: "middle", fontFace: "Calibri", bold: true });
s.addShape(pres.shapes.RECTANGLE, { x: 7.9, y, w: 1.9, h: 0.52, fill: { color: sg.color }, line: { type: "none" } });
s.addText(sg.prognosis, { x: 7.9, y, w: 1.9, h: 0.52, fontSize: 12, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
});
}
// ── SLIDE 12: Routes of Spread ────────────────────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("ROUTES OF SPREAD & CLINICAL SIGNS", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
const routes = [
{
route: "Direct Extension",
color: C.midBg,
pts: ["Penetrates muscularis → serosa", "Adjacent organs: pancreas, colon, liver", "May cause fistulae or obstruction"],
},
{
route: "Lymphatic Spread",
color: C.teal,
pts: ["Perigastric → para-aortic nodes", "Troisier's sign: left supraclavicular node (Virchow's node)", "Nodal positivity does not always imply systemic spread"],
},
{
route: "Haematogenous",
color: C.gold,
pts: ["First to liver (portal drainage)", "Then lung, bone, adrenal", "Uncommon in absence of nodal disease"],
},
{
route: "Transperitoneal",
color: C.accent,
pts: [
"Once serosa is breached",
"Krukenberg tumour (ovarian metastasis)",
"Sister Joseph's nodule (umbilicus)",
"Blumer's shelf (pelvic 'shelf' on rectal exam)",
"Ascites; most effectively detected by laparoscopy",
],
},
];
routes.forEach((r, i) => {
const x = 0.2 + (i % 2) * 5.0;
const y = 0.9 + Math.floor(i / 2) * 2.35;
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.6, h: 2.15, fill: { color: r.color }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.18 } });
s.addText(r.route, { x, y, w: 4.6, h: 0.48, fontSize: 14, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(r.pts.map((p, pi) => ({ text: p, options: { bullet: true, breakLine: pi < r.pts.length - 1, fontSize: 11.5, color: C.white, fontFace: "Calibri" } })),
{ x: x + 0.12, y: y + 0.5, w: 4.36, h: 1.55, valign: "top" });
});
}
// ── SLIDE 13: Imaging & Work-up for Staging ───────────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("STAGING WORK-UP — Imaging Modalities", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
const modalities = [
{
name: "MDCT",
role: "Primary modality",
color: C.midBg,
pts: [
"Revised CT criteria align with 8th ed. TNM",
"Assesses T, N, and M stages",
"Abnormal wall thickening ≥6 mm",
"Loss of trilaminar appearance",
"Detects distant metastases (liver, lung)",
],
},
{
name: "EUS",
role: "Endoscopic Ultrasound",
color: C.teal,
pts: [
"Best for T1-T2 staging (local depth)",
"Useful for N1 assessment",
"FNA of suspicious nodes possible",
"Limited for T4 (suboptimal for distant disease)",
],
},
{
name: "FDG-PET",
role: "Positron Emission Tomography",
color: "6C63FF",
pts: [
"Detects occult distant metastases",
"Useful for re-staging after neoadjuvant therapy",
"Signet ring / diffuse type: often FDG-negative",
"Combined PET-CT preferred",
],
},
{
name: "MRI",
role: "Limited use; adjunct",
color: C.gold,
pts: [
"T1 WI: intermediate signal in carcinoma",
"T2 WI: low signal intensity",
"Useful for liver metastasis characterisation",
"Not routine for primary staging",
],
},
{
name: "Laparoscopy",
role: "For peritoneal staging",
color: C.accent,
pts: [
"Most sensitive for peritoneal seedlings",
"Peritoneal washings / cytology",
"Performed before neoadjuvant therapy",
"Stage IV peritoneal disease = M1",
],
},
];
modalities.forEach((m, i) => {
const col = i < 3 ? i : i - 3;
const row = i < 3 ? 0 : 1;
const w = i < 3 ? 3.1 : 4.6;
const x = i < 3 ? 0.2 + col * 3.27 : 0.2 + col * 4.85;
const y = 0.9 + row * 2.4;
const h = i < 3 ? 2.2 : 2.2;
s.addShape(pres.shapes.RECTANGLE, { x, y, w, h, fill: { color: m.color }, line: { type: "none" },
shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.18 } });
s.addText(m.name, { x, y, w, h: 0.45, fontSize: 14, bold: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(m.role, { x, y: y + 0.45, w, h: 0.35, fontSize: 11, italic: true, color: C.white, align: "center", fontFace: "Calibri" });
s.addText(m.pts.map((p, pi) => ({ text: p, options: { bullet: true, breakLine: pi < m.pts.length - 1, fontSize: 10.5, color: C.white, fontFace: "Calibri" } })),
{ x: x + 0.1, y: y + 0.85, w: w - 0.2, h: h - 0.9, valign: "top" });
});
}
// ── SLIDE 14: Molecular Markers & Targeted Therapy ────
{
const s = lightSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText("MOLECULAR BIOMARKERS & TARGETED THERAPY", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri" });
s.addText("Routine molecular testing required in all metastatic/advanced gastric cancers", {
x: 0.4, y: 0.85, w: 9.2, h: 0.4, fontSize: 13, color: C.accentSoft, bold: true, fontFace: "Calibri",
});
const markers = [
{ marker: "HER2 / ERBB2", freq: "20-25%", assay: "IHC / FISH / NGS", therapy: "Trastuzumab + chemo ± Pembrolizumab; Trastuzumab-deruxtecan", color: C.midBg },
{ marker: "PD-L1", freq: "Variable", assay: "IHC (CPS score)", therapy: "Pembrolizumab / Nivolumab (first & second line)", color: C.teal },
{ marker: "MSI-H / dMMR", freq: "~5-10%", assay: "IHC / NGS", therapy: "Pembrolizumab monotherapy; Nivolumab + Ipilimumab", color: "6C63FF" },
{ marker: "Claudin 18.2", freq: "~40%", assay: "IHC", therapy: "Zolbetuximab (investigational) + FOLFOX/CAPOX", color: C.gold },
{ marker: "CDH1 (germline)", freq: "Hereditary", assay: "Germline sequencing", therapy: "Prophylactic gastrectomy; increased surveillance", color: C.accent },
];
// Header row
["BIOMARKER", "PREVALENCE", "ASSAY", "THERAPY IMPLICATION"].forEach((h, i) => {
const xs = [0.2, 2.5, 3.85, 5.5];
const ws = [2.2, 1.25, 1.55, 4.35];
s.addShape(pres.shapes.RECTANGLE, { x: xs[i], y: 1.35, w: ws[i], h: 0.42, fill: { color: C.darkBg }, line: { type: "none" } });
s.addText(h, { x: xs[i], y: 1.35, w: ws[i], h: 0.42, fontSize: 11, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri" });
});
markers.forEach((m, i) => {
const y = 1.85 + i * 0.7;
const rowBg = i % 2 === 0 ? C.lightGray : "E8ECF2";
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 9.6, h: 0.62, fill: { color: rowBg }, line: { type: "none" } });
// Marker name badge
s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 2.2, h: 0.62, fill: { color: m.color }, line: { type: "none" } });
s.addText(m.marker, { x: 0.2, y, w: 2.2, h: 0.62, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(m.freq, { x: 2.5, y, w: 1.25, h: 0.62, fontSize: 12, color: C.textDark, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(m.assay, { x: 3.85, y, w: 1.55, h: 0.62, fontSize: 11, color: C.textDark, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(m.therapy, { x: 5.5, y, w: 4.35, h: 0.62, fontSize: 11, color: C.textDark, valign: "middle", fontFace: "Calibri" });
});
}
// ── SLIDE 15: Key Points Summary ─────────────────────
{
const s = darkSlide(pres);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.accent }, line: { type: "none" } });
s.addText("KEY TAKE-HOME POINTS", { x: 0.4, y: 0.1, w: 9, h: 0.5, fontSize: 20, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 3 });
const points = [
{ num: "01", text: "Adenocarcinoma accounts for >95% of gastric cancers; subclassified by Lauren (intestinal vs. diffuse) and Borrmann systems." },
{ num: "02", text: "Diffuse type is aggressive with early wall penetration via submucosal lymphatics; strongly linked to CDH1 mutations." },
{ num: "03", text: "Staging uses AJCC/UICC TNM 8th Ed. Key change: EGJ tumours with epicentre >2 cm into stomach = gastric cancer." },
{ num: "04", text: "T stage (depth of invasion) and N stage (number of nodes) are the dominant prognostic factors in resectable disease." },
{ num: "05", text: "≥15 lymph nodes must be examined from resected specimens for adequate nodal staging." },
{ num: "06", text: "Peritoneal spread (M1) is best detected by laparoscopy + cytology; renders the tumour incurable." },
{ num: "07", text: "Molecular testing (HER2, PD-L1, MSI, Claudin 18.2) is mandatory in all advanced/metastatic gastric cancers to guide systemic therapy." },
];
points.forEach((p, i) => {
const y = 0.9 + i * 0.66;
s.addShape(pres.shapes.OVAL, { x: 0.25, y, w: 0.5, h: 0.5, fill: { color: C.accent }, line: { type: "none" } });
s.addText(p.num, { x: 0.25, y, w: 0.5, h: 0.5, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(p.text, { x: 0.88, y: y + 0.02, w: 8.9, h: 0.5, fontSize: 12.5, color: C.white, fontFace: "Calibri", valign: "middle" });
});
}
// ── WRITE FILE ─────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/gastric-cancer-ppt/Stomach_Cancer_Types_Staging.pptx" })
.then(() => console.log("✅ Done: Stomach_Cancer_Types_Staging.pptx"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });
cd /home/daytona/workspace/gastric-cancer-ppt && node generate.js 2>&1
~/gastric-cancer-ppt/generate.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/gastric-cancer-ppt/generate.js'
cd /home/daytona/workspace/gastric-cancer-ppt && node generate.js 2>&1
ls -lh /home/daytona/workspace/gastric-cancer-ppt/Stomach_Cancer_Types_Staging.pptx
Stomach Cancer Types Staging
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Epidemiology & overview (stat boxes) |
| 3 | Section divider - Types |
| 4 | Lauren Classification - Intestinal vs. Diffuse (side-by-side comparison) |
| 5 | Other tumour types: MALT lymphoma, GIST, NETs, SCC |
| 6 | Borrmann Classification (Types I-IV, visual columns) |
| 7 | Early Gastric Cancer - Japanese endoscopic classification (Types I, IIa, IIb, IIc, III) |
| 8 | Section divider - Staging |
| 9 | T Staging - tumour depth with colour-coded rows |
| 10 | N & M Staging |
| 11 | Overall Stage Grouping (IA → IV with 5-year survival estimates) |
| 12 | Routes of spread + clinical signs (Krukenberg, Virchow, Blumer, etc.) |
| 13 | Staging imaging modalities (MDCT, EUS, PET, MRI, Laparoscopy) |
| 14 | Molecular biomarkers & targeted therapy table (HER2, PD-L1, MSI, Claudin 18.2, CDH1) |
| 15 | Key take-home points summary |