I want to make ppt on anatomy of parathyroid gland for presentation. Can you create one for me. Refer Bailey and love, SRB book of Surgery. Ppt should contain diagrams and related photos wherever necessary
parathyroid gland anatomy diagram embryology pharyngeal pouch histology labeled
mkdir -p /home/daytona/workspace/parathyroid-ppt && ls /home/daytona/workspace/p…
~/parathyroid-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Download images as base64
const imageUrls = [
"https://cdn.orris.care/cdss_images/f288b0ae1d68e5702e439df26cea9d6570f4ffa49c86efcd4da836c7157ecf1b.png", // Fig 56.1a inferior parathyroid locations
"https://cdn.orris.care/cdss_images/128d6928ff5e0db3ae81e12d81449549dd1467e831e6c469801e05830cc9b82e.png", // Fig 56.1b superior parathyroid locations
"https://cdn.orris.care/cdss_images/d46d80d669721f76a253d23c0776acab948e41456c9675c3176040dcba7e9f6c.png", // Fig 56.2 PTH actions
"http://teachmephysiology.com/wp-content/uploads/2016/09/parathyroid-histology.jpg", // Histology
"https://www.researchgate.net/publication/372161947/figure/fig6/AS:11431281187145978@1694138121896/Schematic-drawings-of-each-stage-of-development-of-the-pharyngeal-region-and-the.png" // Pharyngeal pouch embryology
];
console.log("Downloading images...");
let images;
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
);
images = JSON.parse(result.toString());
} catch(e) {
console.error("Image fetch error:", e.message);
images = imageUrls.map(u => ({ url: u, base64: null, error: "fetch failed" }));
}
images.forEach((img, i) => {
if (img.error) console.log(`Image ${i} failed: ${img.error}`);
else console.log(`Image ${i} OK: ${img.url.substring(0, 60)}`);
});
// ─── Color palette ────────────────────────────────────────────────────────────
const DARK_BG = "1A2744"; // deep navy - title/divider slides
const MID_BG = "1E3A5F"; // mid navy - section headers
const LIGHT_BG = "F0F4FA"; // very light blue-white - content slides
const ACCENT = "E8A020"; // amber/gold accent
const ACCENT2 = "4FC3C1"; // teal accent
const WHITE = "FFFFFF";
const DARK_TEXT = "1A2744";
const BODY_TEXT = "2C3E50";
const BULLET_CLR = "E8A020";
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Medical Anatomy Presentation";
pres.title = "Anatomy of the Parathyroid Gland";
// ─── Helper: slide background ─────────────────────────────────────────────────
function darkSlide(pres) {
let s = pres.addSlide();
s.background = { color: DARK_BG };
return s;
}
function lightSlide(pres) {
let s = pres.addSlide();
s.background = { color: LIGHT_BG };
return s;
}
// ─── Slide 1: Title ───────────────────────────────────────────────────────────
{
let s = darkSlide(pres);
// Decorative left bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: ACCENT } });
// Top accent line
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0, w: 9.82, h: 0.06, fill: { color: ACCENT2 } });
s.addText("ANATOMY OF THE", {
x: 0.4, y: 0.9, w: 9.2, h: 0.65,
fontSize: 22, bold: true, color: ACCENT2, fontFace: "Calibri", charSpacing: 6, align: "left"
});
s.addText("PARATHYROID GLAND", {
x: 0.4, y: 1.5, w: 9.2, h: 1.1,
fontSize: 46, bold: true, color: WHITE, fontFace: "Calibri", align: "left"
});
// Divider line
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 2.72, w: 4.5, h: 0.05, fill: { color: ACCENT } });
s.addText("A Comprehensive Review for Surgical Practice", {
x: 0.4, y: 2.85, w: 9.2, h: 0.5,
fontSize: 16, color: "B0C4DE", fontFace: "Calibri", italic: true, align: "left"
});
s.addText("Reference: Bailey & Love's Short Practice of Surgery, 28th Edition", {
x: 0.4, y: 3.5, w: 9.2, h: 0.35,
fontSize: 12, color: "8899AA", fontFace: "Calibri", align: "left"
});
s.addText("SRB's Manual of Surgery", {
x: 0.4, y: 3.85, w: 9.2, h: 0.35,
fontSize: 12, color: "8899AA", fontFace: "Calibri", align: "left"
});
// Bottom decorative bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.4, w: 10, h: 0.225, fill: { color: MID_BG } });
s.addText("Department of Surgery | Anatomy of the Parathyroid Gland", {
x: 0.3, y: 5.4, w: 9.5, h: 0.225,
fontSize: 9, color: "8899AA", fontFace: "Calibri", align: "left", valign: "middle"
});
}
// ─── Slide 2: Overview / Contents ─────────────────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addText("OVERVIEW", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const topics = [
"1. Historical Background",
"2. Embryological Development",
"3. Gross Anatomy - Number, Size, Weight, Colour",
"4. Anatomical Positions of Parathyroid Glands",
"5. Inferior Parathyroid Glands - Locations & Variations",
"6. Superior Parathyroid Glands - Locations & Variations",
"7. Ectopic & Supernumerary Glands",
"8. Blood Supply & Nerve Supply",
"9. Histology of Parathyroid Gland",
"10. Surgical Relevance & Key Landmarks",
];
topics.forEach((t, i) => {
const col = i < 5 ? 0 : 1;
const row = i < 5 ? i : i - 5;
s.addText(t, {
x: 0.35 + col * 4.8, y: 0.95 + row * 0.88,
w: 4.6, h: 0.72,
fontSize: 13, color: BODY_TEXT, fontFace: "Calibri",
fill: { color: col === 0 ? "E3EBF8" : "EAF5F5" },
line: { color: col === 0 ? "4A6FA5" : "4FC3C1", width: 1.5 },
margin: 8, valign: "middle"
});
});
}
// ─── Slide 3: Historical Background ──────────────────────────────────────────
{
let s = darkSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addText("HISTORICAL BACKGROUND", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
const facts = [
{ year: "1850", event: "Sir Richard Owen first described parathyroid glands during dissection of Indian rhinoceros at London Zoo" },
{ year: "1887", event: "Sandström coined 'glandulae parathyreoidae' after dissection studies in animals and human cadavers" },
{ year: "1890s", event: "Gley associated tetany after thyroidectomy with inadvertent parathyroid removal" },
{ year: "1905", event: "MacCallum relieved postoperative tetany by injection of parathyroid extract" },
{ year: "1907", event: "Association between parathyroid enlargement and bone disease reported" },
{ year: "1925", event: "First parathyroidectomy by Mandl in Vienna for osteitis fibrosa cystica" },
];
facts.forEach((f, i) => {
const row = Math.floor(i / 2);
const col = i % 2;
// Year badge
s.addShape(pres.ShapeType.roundRect, {
x: 0.3 + col * 4.9, y: 0.85 + row * 1.55, w: 1.1, h: 0.48,
fill: { color: ACCENT }, rectRadius: 0.1
});
s.addText(f.year, {
x: 0.3 + col * 4.9, y: 0.85 + row * 1.55, w: 1.1, h: 0.48,
fontSize: 14, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText(f.event, {
x: 1.55 + col * 4.9, y: 0.82 + row * 1.55, w: 3.3, h: 1.2,
fontSize: 11, color: "D0E4F0", fontFace: "Calibri", valign: "top", wrap: true
});
if (i < facts.length - 2) {
s.addShape(pres.ShapeType.line, {
x: 0.3 + col * 4.9, y: 2.05 + row * 1.55, w: 4.5, h: 0,
line: { color: "2A4070", width: 0.75, dashType: "dash" }
});
}
});
s.addText("Source: Bailey & Love's Short Practice of Surgery, 28th Edition, Chapter 56", {
x: 0.3, y: 5.25, w: 9.4, h: 0.25,
fontSize: 9, color: "6080A0", fontFace: "Calibri", italic: true
});
}
// ─── Slide 4: Embryological Development ──────────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addText("EMBRYOLOGICAL DEVELOPMENT", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
// Inferior gland box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.85, w: 4.3, h: 2.1, fill: { color: "E8F4E8" }, line: { color: "3A8A3A", width: 2 } });
s.addText("INFERIOR PARATHYROID", {
x: 0.3, y: 0.85, w: 4.3, h: 0.42,
fontSize: 13, bold: true, color: "1E5C1E", fontFace: "Calibri", align: "center", valign: "middle",
fill: { color: "3A8A3A" }
});
s.addText([
{ text: "Origin: ", options: { bold: true } },
{ text: "3rd Pharyngeal Pouch (dorsal wing)\n", options: {} },
{ text: "Also gives rise to: ", options: { bold: true } },
{ text: "Thymus\n", options: {} },
{ text: "Development: ", options: { bold: true } },
{ text: "5th–12th week of gestation\n", options: {} },
{ text: "Descent: ", options: { bold: true } },
{ text: "Longer embryological descent\n→ More variation in position", options: {} },
], {
x: 0.4, y: 1.35, w: 4.1, h: 1.5,
fontSize: 12, color: BODY_TEXT, fontFace: "Calibri"
});
// Superior gland box
s.addShape(pres.ShapeType.rect, { x: 5.3, y: 0.85, w: 4.3, h: 2.1, fill: { color: "E8EEF8" }, line: { color: "2A5FA5", width: 2 } });
s.addText("SUPERIOR PARATHYROID", {
x: 5.3, y: 0.85, w: 4.3, h: 0.42,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle",
fill: { color: "2A5FA5" }
});
s.addText([
{ text: "Origin: ", options: { bold: true } },
{ text: "4th Pharyngeal Pouch (dorsal portion)\n", options: {} },
{ text: "Also associated with: ", options: { bold: true } },
{ text: "Lateral thyroid anlage / C-cell complex\n", options: {} },
{ text: "Also called: ", options: { bold: true } },
{ text: "Parathyroid IV (PIV)\n", options: {} },
{ text: "Descent: ", options: { bold: true } },
{ text: "Limited descent\n→ More constant in position", options: {} },
], {
x: 5.4, y: 1.35, w: 4.1, h: 1.5,
fontSize: 12, color: BODY_TEXT, fontFace: "Calibri"
});
// Arrow down
s.addShape(pres.ShapeType.rect, { x: 4.63, y: 0.85, w: 0.6, h: 2.1, fill: { color: "EEF2FA" }, line: { color: "EEF2FA", width: 0 } });
s.addText("↓ MIGRATION ↓", {
x: 4.3, y: 1.4, w: 1.4, h: 0.9,
fontSize: 9, color: "6080A0", fontFace: "Calibri", align: "center", bold: true
});
// Pharyngeal pouches note
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.15, w: 9.3, h: 0.7, fill: { color: "FFF3CD" }, line: { color: ACCENT, width: 1.5 } });
s.addText([
{ text: "Key Point: ", options: { bold: true, color: "8B6914" } },
{ text: "Both gland pairs develop from pharyngeal pouches between the 5th and 12th weeks of gestation. The longer embryological descent of the inferior glands (with the thymus) explains their greater positional variability compared to the superior glands.", options: { color: "6B4F10" } },
], {
x: 0.45, y: 3.15, w: 9.0, h: 0.7,
fontSize: 11, fontFace: "Calibri", valign: "middle"
});
// Embryology image
const imgEmbryo = images[4];
if (imgEmbryo && !imgEmbryo.error) {
s.addImage({ data: imgEmbryo.base64, x: 0.3, y: 4.0, w: 9.3, h: 1.4, sizing: { type: "contain", w: 9.3, h: 1.4 } });
s.addText("Pharyngeal pouches & parathyroid embryological development", {
x: 0.3, y: 5.3, w: 9.3, h: 0.2,
fontSize: 8, color: "808080", fontFace: "Calibri", italic: true, align: "center"
});
} else {
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.0, w: 9.3, h: 1.35, fill: { color: "EEF2FA" }, line: { color: "B0C4DE", width: 1 } });
s.addText("Pharyngeal Pouches Diagram\n3rd pouch → Inferior PT + Thymus\n4th pouch → Superior PT + Lateral thyroid complex", {
x: 0.3, y: 4.0, w: 9.3, h: 1.35,
fontSize: 12, color: "4A6FA5", fontFace: "Calibri", align: "center", valign: "middle"
});
}
}
// ─── Slide 5: Gross Anatomy ───────────────────────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addText("GROSS ANATOMY", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
// 4 feature boxes
const features = [
{ label: "Number", icon: "4", detail: "Typically 4 glands\n(2 superior + 2 inferior)\n~13% population have\nabnormal PT tissue\n~5% have true supernumerary gland" },
{ label: "Size", icon: "📏", detail: "Approximately\n6 × 3 × 2 mm\n(bean-shaped / oval / flat)\nSimilar to a split pea" },
{ label: "Weight", icon: "⚖️", detail: "Each gland ~30 mg\n(normal range 10–65 mg)\nCombined weight\n~120–160 mg" },
{ label: "Colour", icon: "🟫", detail: "Described as\n'Portland brick'\nyellow-brown color\nDistinct from surrounding\nyellow fat" },
];
features.forEach((f, i) => {
const x = 0.25 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, { x, y: 0.85, w: 2.2, h: 3.2, fill: { color: "FFFFFF" }, line: { color: ACCENT, width: 2 }, rectRadius: 0.15 });
s.addShape(pres.ShapeType.roundRect, { x, y: 0.85, w: 2.2, h: 0.65, fill: { color: DARK_BG }, rectRadius: 0.15 });
s.addText(f.label, {
x, y: 0.85, w: 2.2, h: 0.65,
fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText(f.icon + "\n\n" + f.detail, {
x: x + 0.1, y: 1.55, w: 2.0, h: 2.4,
fontSize: 11, color: BODY_TEXT, fontFace: "Calibri", align: "center", valign: "top"
});
});
// Symmetry note
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 4.22, w: 9.4, h: 0.65, fill: { color: "E3EBF8" }, line: { color: "4A6FA5", width: 1.5 } });
s.addText([
{ text: "Surgical Pearl: ", options: { bold: true, color: "1A2744" } },
{ text: "There is a degree of bilateral symmetry in parathyroid gland position — this can guide the surgeon when exploring the contralateral side during parathyroidectomy.", options: { color: BODY_TEXT } }
], {
x: 0.35, y: 4.22, w: 9.2, h: 0.65,
fontSize: 11, fontFace: "Calibri", valign: "middle"
});
s.addText("Source: Bailey & Love's Short Practice of Surgery, 28th Ed, Chapter 56", {
x: 0.3, y: 5.3, w: 9.4, h: 0.2,
fontSize: 8, color: "808080", fontFace: "Calibri", italic: true
});
}
// ─── Slide 6: Inferior Parathyroid – Diagram ─────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: "1E5C1E" } });
s.addText("INFERIOR PARATHYROID GLANDS — ANATOMICAL LOCATIONS", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 18, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const imgA = images[0];
if (imgA && !imgA.error) {
s.addImage({ data: imgA.base64, x: 0.3, y: 0.8, w: 4.8, h: 4.5, sizing: { type: "contain", w: 4.8, h: 4.5 } });
}
s.addText("Figure 56.1a (Bailey & Love)\nPotential locations of Inferior Parathyroid Glands\nITA = Inferior Thyroid Artery; RLN = Recurrent Laryngeal Nerve", {
x: 0.3, y: 5.2, w: 5.0, h: 0.35,
fontSize: 8, color: "808080", fontFace: "Calibri", italic: true
});
// Location summary table
s.addText("POSITION FREQUENCY", {
x: 5.35, y: 0.85, w: 4.3, h: 0.4,
fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center"
});
const locations = [
["Related to lower pole of thyroid", "56%"],
["In thyrothymic tract", "28%"],
["Mediastinal (ectopic)", "9%"],
["Below intersection of ITA & RLN", "3%"],
["Undescended (above ITA)", "2%"],
["Intrathyroidal", "2%"],
];
locations.forEach(([loc, pct], i) => {
const bg = i % 2 === 0 ? "EAF5EA" : "FFFFFF";
s.addShape(pres.ShapeType.rect, { x: 5.35, y: 1.3 + i * 0.63, w: 3.2, h: 0.58, fill: { color: bg }, line: { color: "CCCCCC", width: 0.5 } });
s.addText(loc, {
x: 5.45, y: 1.3 + i * 0.63, w: 3.0, h: 0.58,
fontSize: 10.5, color: BODY_TEXT, fontFace: "Calibri", valign: "middle"
});
s.addShape(pres.ShapeType.rect, { x: 8.55, y: 1.3 + i * 0.63, w: 1.1, h: 0.58, fill: { color: "3A8A3A" }, line: { color: "3A8A3A", width: 0 } });
s.addText(pct, {
x: 8.55, y: 1.3 + i * 0.63, w: 1.1, h: 0.58,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
});
s.addShape(pres.ShapeType.rect, { x: 5.35, y: 5.07, w: 4.3, h: 0.45, fill: { color: "FFF3CD" }, line: { color: ACCENT, width: 1 } });
s.addText("→ More variation due to longer embryological descent with thymus", {
x: 5.4, y: 5.07, w: 4.2, h: 0.45,
fontSize: 10, color: "8B6914", fontFace: "Calibri", italic: true, valign: "middle"
});
}
// ─── Slide 7: Superior Parathyroid – Diagram ──────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: "2A5FA5" } });
s.addText("SUPERIOR PARATHYROID GLANDS — ANATOMICAL LOCATIONS", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 18, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle"
});
const imgB = images[1];
if (imgB && !imgB.error) {
s.addImage({ data: imgB.base64, x: 0.3, y: 0.8, w: 4.8, h: 4.5, sizing: { type: "contain", w: 4.8, h: 4.5 } });
}
s.addText("Figure 56.1b (Bailey & Love)\nPotential locations of Superior Parathyroid Glands\nITA = Inferior Thyroid Artery; RLN = Recurrent Laryngeal Nerve", {
x: 0.3, y: 5.2, w: 5.0, h: 0.35,
fontSize: 8, color: "808080", fontFace: "Calibri", italic: true
});
// Location summary table
s.addText("POSITION FREQUENCY", {
x: 5.35, y: 0.85, w: 4.3, h: 0.4,
fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center"
});
const supLocations = [
["Around intersection of ITA & RLN", "77%"],
["Related to upper pole of thyroid", "11%"],
["Paraoesophageal / below ITA", "10%"],
["In carotid sheath", "1%"],
["Intrathyroidal", "1%"],
];
supLocations.forEach(([loc, pct], i) => {
const bg = i % 2 === 0 ? "EBF1FA" : "FFFFFF";
s.addShape(pres.ShapeType.rect, { x: 5.35, y: 1.3 + i * 0.7, w: 3.2, h: 0.65, fill: { color: bg }, line: { color: "CCCCCC", width: 0.5 } });
s.addText(loc, {
x: 5.45, y: 1.3 + i * 0.7, w: 3.0, h: 0.65,
fontSize: 10.5, color: BODY_TEXT, fontFace: "Calibri", valign: "middle"
});
s.addShape(pres.ShapeType.rect, { x: 8.55, y: 1.3 + i * 0.7, w: 1.1, h: 0.65, fill: { color: "2A5FA5" }, line: { color: "2A5FA5", width: 0 } });
s.addText(pct, {
x: 8.55, y: 1.3 + i * 0.7, w: 1.1, h: 0.65,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
});
s.addShape(pres.ShapeType.rect, { x: 5.35, y: 4.95, w: 4.3, h: 0.55, fill: { color: "E8EEF8" }, line: { color: "2A5FA5", width: 1 } });
s.addText("→ Limited descent → More constant position (>80% in 2 cm zone around ITA-RLN junction)", {
x: 5.4, y: 4.95, w: 4.2, h: 0.55,
fontSize: 10, color: "1A3060", fontFace: "Calibri", italic: true, valign: "middle"
});
}
// ─── Slide 8: Ectopic & Supernumerary Glands ──────────────────────────────────
{
let s = darkSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addText("ECTOPIC & SUPERNUMERARY GLANDS", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
// Ectopic sites
s.addText("ECTOPIC SITES", {
x: 0.3, y: 0.85, w: 4.5, h: 0.4,
fontSize: 14, bold: true, color: ACCENT2, fontFace: "Calibri"
});
const ectopicSites = [
"Within thyroid gland (intrathyroidal)",
"Superior mediastinum",
"Posterior mediastinum",
"Thyrothymic tract",
"Retro-oesophageal position",
"Carotid sheath",
"Aortopulmonary window (rare)",
"Undescended (pharyngeal wall)",
];
ectopicSites.forEach((site, i) => {
const col = Math.floor(i / 4);
const row = i % 4;
s.addText("• " + site, {
x: 0.35 + col * 4.5, y: 1.35 + row * 0.55,
w: 4.3, h: 0.5,
fontSize: 11.5, color: "C8DCF0", fontFace: "Calibri"
});
});
// Supernumerary glands
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.6, w: 9.3, h: 0.5, fill: { color: "2A4070" }, line: { color: ACCENT, width: 1 } });
s.addText("SUPERNUMERARY GLANDS", {
x: 0.4, y: 3.6, w: 9.1, h: 0.5,
fontSize: 14, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
s.addText([
{ text: "~13% ", options: { bold: true, color: ACCENT } },
{ text: "of the population have abnormal parathyroid tissue ", options: { color: "D0E4F0" } },
{ text: "~5% ", options: { bold: true, color: ACCENT } },
{ text: "have a true supernumerary (5th or more) gland", options: { color: "D0E4F0" } },
], {
x: 0.4, y: 4.2, w: 9.2, h: 0.5,
fontSize: 13, fontFace: "Calibri"
});
s.addText("Surgical Significance: Ectopic and supernumerary glands are the most common cause of failed or recurrent hyperparathyroidism after surgery. Systematic exploration and knowledge of common ectopic sites is essential.", {
x: 0.3, y: 4.82, w: 9.4, h: 0.65,
fontSize: 11, color: "8BAFD0", fontFace: "Calibri", italic: true
});
}
// ─── Slide 9: Blood Supply & Lymphatics ───────────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addText("BLOOD SUPPLY, NERVE SUPPLY & LYMPHATICS", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
// Arterial supply box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.85, w: 4.5, h: 2.5, fill: { color: "FEF0F0" }, line: { color: "C0392B", width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.85, w: 4.5, h: 0.45, fill: { color: "C0392B" } });
s.addText("ARTERIAL SUPPLY", {
x: 0.3, y: 0.85, w: 4.5, h: 0.45,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText([
{ text: "Primary: ", options: { bold: true } },
{ text: "Inferior thyroid artery (ITA)\n", options: {} },
{ text: "→ Supplies BOTH superior & inferior glands\n\n", options: {} },
{ text: "Occasional: ", options: { bold: true } },
{ text: "Superior thyroid artery\n", options: {} },
{ text: "→ Via anastomotic branch with ITA\n\n", options: {} },
{ text: "Note: ", options: { bold: true } },
{ text: "Terminal end-arteries — vulnerable to ischaemia during surgery", options: {} },
], {
x: 0.45, y: 1.38, w: 4.2, h: 1.9,
fontSize: 11.5, color: BODY_TEXT, fontFace: "Calibri"
});
// Venous drainage
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.85, w: 4.5, h: 2.5, fill: { color: "EEF2FA" }, line: { color: "1A3080", width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.85, w: 4.5, h: 0.45, fill: { color: "1A3080" } });
s.addText("VENOUS DRAINAGE", {
x: 5.2, y: 0.85, w: 4.5, h: 0.45,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText([
{ text: "→ ", options: { bold: true } },
{ text: "Superior, middle and inferior thyroid veins\n\n", options: {} },
{ text: "→ ", options: { bold: true } },
{ text: "Drain into internal jugular vein\n\n", options: {} },
{ text: "→ ", options: { bold: true } },
{ text: "Inferior veins may drain into\nbrachioocephalic veins", options: {} },
], {
x: 5.35, y: 1.38, w: 4.2, h: 1.9,
fontSize: 11.5, color: BODY_TEXT, fontFace: "Calibri"
});
// Nerve supply and lymphatics
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.5, w: 4.5, h: 1.65, fill: { color: "F0FFF0" }, line: { color: "2E8B57", width: 1.5 } });
s.addText("NERVE SUPPLY", {
x: 0.3, y: 3.5, w: 4.5, h: 0.38,
fontSize: 12, bold: true, color: "1A5C32", fontFace: "Calibri", align: "center",
fill: { color: "2E8B57" }, color: WHITE, valign: "middle"
});
s.addText("Vasomotor sympathetic fibres from the cervical sympathetic ganglia. The glands themselves have no secretomotor innervation — secretion is regulated entirely by serum calcium levels.", {
x: 0.45, y: 3.95, w: 4.2, h: 1.1,
fontSize: 11, color: BODY_TEXT, fontFace: "Calibri"
});
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 3.5, w: 4.5, h: 1.65, fill: { color: "FFF8E8" }, line: { color: ACCENT, width: 1.5 } });
s.addText("LYMPHATICS & RLN RELATIONSHIP", {
x: 5.2, y: 3.5, w: 4.5, h: 0.38,
fontSize: 12, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center",
fill: { color: ACCENT }, valign: "middle"
});
s.addText("Lymphatics drain to deep cervical and paratracheal nodes. The superior parathyroid's key surgical landmark is the intersection of the ITA and RLN — the gland lies within 2 cm of this point in >80% of patients.", {
x: 5.35, y: 3.95, w: 4.2, h: 1.1,
fontSize: 11, color: BODY_TEXT, fontFace: "Calibri"
});
}
// ─── Slide 10: Histology ──────────────────────────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addText("HISTOLOGY OF THE PARATHYROID GLAND", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
// Histology image
const imgHisto = images[3];
if (imgHisto && !imgHisto.error) {
s.addImage({ data: imgHisto.base64, x: 0.3, y: 0.82, w: 4.8, h: 3.8, sizing: { type: "contain", w: 4.8, h: 3.8 } });
s.addText("Parathyroid gland histology (H&E stain)\nChief cells and oxyphil cells", {
x: 0.3, y: 4.65, w: 4.8, h: 0.35,
fontSize: 8.5, color: "808080", fontFace: "Calibri", italic: true, align: "center"
});
} else {
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.82, w: 4.8, h: 3.8, fill: { color: "F5EEF8" }, line: { color: "8E44AD", width: 1 } });
s.addText("Histology Image\n(Parathyroid H&E)", {
x: 0.3, y: 0.82, w: 4.8, h: 3.8,
fontSize: 14, color: "8E44AD", fontFace: "Calibri", align: "center", valign: "middle"
});
}
// Cell types
s.addText("CELL TYPES", {
x: 5.35, y: 0.85, w: 4.3, h: 0.4,
fontSize: 14, bold: true, color: DARK_BG, fontFace: "Calibri"
});
const cells = [
{
name: "Chief Cells (Principal Cells)",
color: "8B2FC9", bg: "F5EEF8",
points: ["Most numerous cell type", "Small, polygonal, pale cytoplasm", "Central round nucleus", "Produce PTH", "Two types: light (active) and dark (inactive)"]
},
{
name: "Oxyphil Cells (Acidophilic Cells)",
color: "C0392B", bg: "FEEEEC",
points: ["Fewer in number", "Larger than chief cells", "Abundant acidophilic (pink) cytoplasm", "Appear after puberty", "Function uncertain; may be inactive chief cells"]
},
{
name: "Transitional Cells & Fat Cells",
color: "117A65", bg: "E8F8F5",
points: ["Transitional forms between chief and oxyphil", "Fat cells (~50% of gland volume in adults)", "Decreased fat with hyperplasia or adenoma"]
}
];
cells.forEach((cell, i) => {
s.addShape(pres.ShapeType.rect, { x: 5.35, y: 1.35 + i * 1.4, w: 4.3, h: 1.3, fill: { color: cell.bg }, line: { color: cell.color, width: 1.5 } });
s.addText(cell.name, {
x: 5.4, y: 1.35 + i * 1.4, w: 4.2, h: 0.38,
fontSize: 11, bold: true, color: cell.color, fontFace: "Calibri"
});
s.addText(cell.points.map(p => "• " + p).join("\n"), {
x: 5.4, y: 1.72 + i * 1.4, w: 4.2, h: 0.88,
fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri"
});
});
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.1, w: 9.4, h: 0.35, fill: { color: "E3EBF8" }, line: { color: "4A6FA5", width: 1 } });
s.addText("Each gland is surrounded by a thin fibrous capsule. Septa extend inward, dividing gland into lobules with a rich vascular stroma.", {
x: 0.4, y: 5.1, w: 9.2, h: 0.35,
fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", valign: "middle"
});
}
// ─── Slide 11: PTH & Calcium Regulation ──────────────────────────────────────
{
let s = lightSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: DARK_BG } });
s.addText("PTH & CALCIUM REGULATION", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
const imgPTH = images[2];
if (imgPTH && !imgPTH.error) {
s.addImage({ data: imgPTH.base64, x: 0.3, y: 0.82, w: 5.0, h: 4.0, sizing: { type: "contain", w: 5.0, h: 4.0 } });
s.addText("Figure 56.2 (Bailey & Love) — Actions of Parathyroid Hormone", {
x: 0.3, y: 4.85, w: 5.0, h: 0.25,
fontSize: 8.5, color: "808080", fontFace: "Calibri", italic: true, align: "center"
});
}
// PTH facts
s.addText("PTH — KEY FACTS", {
x: 5.55, y: 0.85, w: 4.0, h: 0.4,
fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri"
});
const pthFacts = [
["Structure", "84-amino acid peptide hormone"],
["Stimulus", "Low serum Ca²⁺ or high serum Mg²⁺"],
["Half-life", "~3-5 minutes (normal renal function)"],
["Metabolism", "Cleaved in liver → inactive C-terminal (cleared by kidney); N-terminal is bioactive"],
["Action on Kidney", "↑ Ca²⁺ resorption from tubules; ↑ hydroxylation of 25-OH Vit D → 1,25(OH)₂D"],
["Action on Bone", "Stimulates osteoblasts & osteoclasts → ↑ bone turnover → ↑ extracellular Ca²⁺"],
["Action on GIT", "Via 1,25(OH)₂D → ↑ Ca²⁺ & phosphorus absorption"],
["Antagonist", "Calcitonin (from parafollicular C cells of thyroid)"],
];
pthFacts.forEach(([label, val], i) => {
const bg = i % 2 === 0 ? "E3EBF8" : "FFFFFF";
s.addShape(pres.ShapeType.rect, { x: 5.55, y: 1.32 + i * 0.52, w: 4.0, h: 0.5, fill: { color: bg }, line: { color: "C8D8F0", width: 0.5 } });
s.addText([
{ text: label + ": ", options: { bold: true, color: DARK_BG } },
{ text: val, options: { color: BODY_TEXT } }
], {
x: 5.65, y: 1.32 + i * 0.52, w: 3.85, h: 0.5,
fontSize: 10, fontFace: "Calibri", valign: "middle"
});
});
}
// ─── Slide 12: Surgical Relevance / Key Landmarks ────────────────────────────
{
let s = darkSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
s.addText("SURGICAL RELEVANCE & KEY LANDMARKS", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: ACCENT, fontFace: "Calibri", valign: "middle"
});
const points = [
{
icon: "🔍",
title: "Superior Gland Landmark",
text: "Located within 2 cm zone centred 1 cm around the junction of ITA and RLN at the cricothyroid junction — present here in >80% of patients."
},
{
icon: "🧭",
title: "Inferior Gland Location",
text: "Most commonly at inferior pole of thyroid (56%) — freely mobile within a globule of fat adjacent to the lower pole; highly variable due to embryological descent with thymus."
},
{
icon: "🩸",
title: "Blood Supply Vulnerability",
text: "Both glands receive blood from inferior thyroid artery via end-arteries. Devascularization during thyroidectomy causes hypoparathyroidism — preserve the ITA branches carefully."
},
{
icon: "⚡",
title: "RLN Relationship",
text: "The recurrent laryngeal nerve is a critical landmark. The superior parathyroid lies posterior and lateral to the RLN; the inferior parathyroid usually lies anterior to it."
},
{
icon: "🔄",
title: "Symmetry Rule",
text: "Bilateral symmetry of gland position is common. When one gland is found, the contralateral gland is often in the same anatomical position — use this during surgical exploration."
},
{
icon: "⚠️",
title: "Ectopic Glands & Failed Surgery",
text: "Ectopic glands (mediastinal, intrathyroidal, retro-oesophageal) are the most common cause of persistent hypercalcaemia after parathyroid surgery."
},
];
points.forEach((pt, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 5.0;
const y = 0.85 + row * 1.55;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.6, h: 1.42, fill: { color: "1E3560" }, line: { color: ACCENT2, width: 1 }, rectRadius: 0.12 });
s.addText(pt.icon + " " + pt.title, {
x: x + 0.12, y: y + 0.08, w: 4.35, h: 0.38,
fontSize: 12, bold: true, color: ACCENT2, fontFace: "Calibri"
});
s.addText(pt.text, {
x: x + 0.12, y: y + 0.46, w: 4.35, h: 0.88,
fontSize: 10, color: "C8DCF0", fontFace: "Calibri"
});
});
}
// ─── Slide 13: Summary ────────────────────────────────────────────────────────
{
let s = darkSlide(pres);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: ACCENT } });
s.addText("SUMMARY", {
x: 0.3, y: 0, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: DARK_BG, fontFace: "Calibri", valign: "middle"
});
const summaryPoints = [
"4 glands, each ~30 mg, yellow-brown 'Portland brick' colour, arising from 3rd (inferior) and 4th (superior) pharyngeal pouches",
"Superior glands are more constant in position (>77% near ITA-RLN intersection); inferior glands are more variable due to longer descent with thymus",
"Blood supply: mainly inferior thyroid artery (both glands); end-arteries — vulnerable to surgical injury",
"No secretomotor innervation — secretion controlled entirely by serum calcium levels via calcium-sensing receptors",
"Histology: chief cells (PTH-secreting), oxyphil cells, transitional cells, and fat cells (~50% in adults)",
"PTH: 84 AA peptide; raises serum Ca²⁺ via kidney, bone, and GIT; antagonised by calcitonin",
"~13% have abnormal PT tissue; ~5% have true supernumerary gland — common cause of failed parathyroid surgery",
"Bilateral symmetry is surgically useful — if one gland is located, look for the other in a mirror-image position",
];
summaryPoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 0.35, y: 0.82 + i * 0.57,
w: 9.3, h: 0.52,
fontSize: 11, color: i % 2 === 0 ? "D0E8F8" : "A8CCE8", fontFace: "Calibri",
valign: "middle"
});
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: MID_BG } });
s.addText("Reference: Bailey & Love's Short Practice of Surgery 28th Ed (Ch.56) | SRB's Manual of Surgery", {
x: 0.3, y: 5.3, w: 9.5, h: 0.325,
fontSize: 9, color: "8899AA", fontFace: "Calibri", valign: "middle", align: "center"
});
}
// ─── Write file ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/parathyroid-ppt/Parathyroid_Gland_Anatomy.pptx" })
.then(() => console.log("PPT created successfully!"))
.catch(e => console.error("Error:", e));
cd /home/daytona/workspace/parathyroid-ppt && node create_ppt.js 2>&1
cd /home/daytona/workspace/parathyroid-ppt && timeout 60 node /home/daytona/skil…
cd /home/daytona/workspace/parathyroid-ppt && timeout 40 node /home/daytona/skil…
How much longer will it take?
ls /home/daytona/workspace/parathyroid-ppt/ && wc -c /home/daytona/workspace/par…
~/parathyroid-ppt/build_ppt.js
const pptxgen = require("pptxgenjs");
const fs = require("fs");
// Load pre-downloaded images
const baileyImgs = JSON.parse(fs.readFileSync("/home/daytona/workspace/parathyroid-ppt/images_bailey.json", "utf8"));
// Try histology from histo file
let histoImg = null;
try {
const histoData = JSON.parse(fs.readFileSync("/home/daytona/workspace/parathyroid-ppt/images_histo.json", "utf8"));
if (histoData[0] && !histoData[0].error) histoImg = histoData[0].base64;
} catch(e) {}
// baileyImgs[0] = inferior parathyroid locations (Fig 56.1a)
// baileyImgs[1] = superior parathyroid locations (Fig 56.1b)
// baileyImgs[2] = PTH actions (Fig 56.2)
const imgInferior = (baileyImgs[0] && !baileyImgs[0].error) ? baileyImgs[0].base64 : null;
const imgSuperior = (baileyImgs[1] && !baileyImgs[1].error) ? baileyImgs[1].base64 : null;
const imgPTH = (baileyImgs[2] && !baileyImgs[2].error) ? baileyImgs[2].base64 : null;
console.log("imgInferior:", imgInferior ? "OK" : "MISSING");
console.log("imgSuperior:", imgSuperior ? "OK" : "MISSING");
console.log("imgPTH:", imgPTH ? "OK" : "MISSING");
console.log("histoImg:", histoImg ? "OK" : "MISSING");
// ── Palette ──────────────────────────────────────────────────────────────────
const DARK_BG = "1A2744";
const MID_BG = "1E3A5F";
const LIGHT_BG = "F0F4FA";
const ACCENT = "E8A020";
const ACCENT2 = "4FC3C1";
const WHITE = "FFFFFF";
const BODY_TEXT= "2C3E50";
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Medical Anatomy Presentation";
pres.title = "Anatomy of the Parathyroid Gland";
function darkSlide() {
let s = pres.addSlide();
s.background = { color: DARK_BG };
return s;
}
function lightSlide() {
let s = pres.addSlide();
s.background = { color: LIGHT_BG };
return s;
}
function addHeader(s, text, bgColor, textColor) {
bgColor = bgColor || DARK_BG;
textColor = textColor || ACCENT;
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.7, fill:{ color: bgColor } });
s.addText(text, { x:0.3, y:0, w:9.5, h:0.7, fontSize:21, bold:true, color:textColor, fontFace:"Calibri", valign:"middle" });
}
function footNote(s, text) {
s.addText(text, { x:0.3, y:5.32, w:9.4, h:0.2, fontSize:8, color:"808080", fontFace:"Calibri", italic:true });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — Title
// ═══════════════════════════════════════════════════════════════════════════
{
let s = darkSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:5.625, fill:{ color: ACCENT } });
s.addShape(pres.ShapeType.rect, { x:0.18, y:0, w:9.82, h:0.055, fill:{ color: ACCENT2 } });
s.addText("ANATOMY OF THE", {
x:0.4, y:0.8, w:9.2, h:0.65,
fontSize:22, bold:true, color:ACCENT2, fontFace:"Calibri", charSpacing:5
});
s.addText("PARATHYROID GLAND", {
x:0.4, y:1.42, w:9.2, h:1.1,
fontSize:46, bold:true, color:WHITE, fontFace:"Calibri"
});
s.addShape(pres.ShapeType.rect, { x:0.4, y:2.65, w:4.5, h:0.05, fill:{ color: ACCENT } });
s.addText("A Comprehensive Review for Surgical Practice", {
x:0.4, y:2.78, w:9.0, h:0.5,
fontSize:16, color:"B0C4DE", fontFace:"Calibri", italic:true
});
s.addText("References:", { x:0.4, y:3.45, w:2.2, h:0.32, fontSize:12, bold:true, color:"8899AA", fontFace:"Calibri" });
s.addText("Bailey & Love's Short Practice of Surgery, 28th Edition (Chapter 56)", {
x:0.4, y:3.75, w:9.0, h:0.32, fontSize:12, color:"8899AA", fontFace:"Calibri"
});
s.addText("SRB's Manual of Surgery", {
x:0.4, y:4.05, w:9.0, h:0.32, fontSize:12, color:"8899AA", fontFace:"Calibri"
});
s.addShape(pres.ShapeType.rect, { x:0, y:5.38, w:10, h:0.245, fill:{ color: MID_BG } });
s.addText("Department of Surgery | Anatomy of the Parathyroid Gland", {
x:0.3, y:5.38, w:9.5, h:0.245,
fontSize:9, color:"6080A0", fontFace:"Calibri", valign:"middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — Contents
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
addHeader(s, "OVERVIEW / CONTENTS", DARK_BG, WHITE);
const topics = [
["1", "Historical Background"],
["2", "Embryological Development"],
["3", "Gross Anatomy"],
["4", "Inferior Parathyroid Glands"],
["5", "Superior Parathyroid Glands"],
["6", "Ectopic & Supernumerary Glands"],
["7", "Blood Supply & Nerve Supply"],
["8", "Histology"],
["9", "PTH & Calcium Regulation"],
["10","Surgical Relevance & Landmarks"],
];
topics.forEach(([num, topic], i) => {
const col = i < 5 ? 0 : 1;
const row = i < 5 ? i : i - 5;
const x = 0.3 + col * 4.85;
const y = 0.88 + row * 0.92;
const bgClr = col === 0 ? "E3EBF8" : "EAF5F5";
const bdrClr= col === 0 ? "4A6FA5" : "4FC3C1";
s.addShape(pres.ShapeType.roundRect, { x, y, w:4.55, h:0.78, fill:{ color: bgClr }, line:{ color: bdrClr, width:1.5 }, rectRadius:0.1 });
s.addShape(pres.ShapeType.roundRect, { x, y, w:0.52, h:0.78, fill:{ color: bdrClr }, rectRadius:0.1 });
s.addText(num, { x, y, w:0.52, h:0.78, fontSize:14, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText(topic, { x:x+0.62, y, w:3.85, h:0.78, fontSize:13, color:BODY_TEXT, fontFace:"Calibri", valign:"middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — Historical Background
// ═══════════════════════════════════════════════════════════════════════════
{
let s = darkSlide();
addHeader(s, "HISTORICAL BACKGROUND", MID_BG, ACCENT);
const milestones = [
["1850", "Sir Richard Owen described parathyroid during dissection of Indian rhinoceros at London Zoo"],
["1887", "Sandström coined 'glandulae parathyreoidae' after cadaver dissection studies"],
["1890s","Gley linked tetany after thyroidectomy to inadvertent parathyroid removal"],
["1905", "MacCallum relieved postoperative tetany by injection of parathyroid extract"],
["1907", "Association between parathyroid enlargement and bone disease reported"],
["1925", "First parathyroidectomy by Mandl in Vienna — patient: Albert Gahne with osteitis fibrosa cystica"],
];
milestones.forEach(([yr, txt], i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 5.0;
const y = 0.88 + row * 1.55;
s.addShape(pres.ShapeType.roundRect, { x, y, w:1.0, h:0.46, fill:{ color: ACCENT }, rectRadius:0.08 });
s.addText(yr, { x, y, w:1.0, h:0.46, fontSize:13, bold:true, color:DARK_BG, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText(txt, { x:x+1.12, y:y+0.04, w:3.7, h:1.15, fontSize:11, color:"D0E4F0", fontFace:"Calibri" });
if (i < 4) {
s.addShape(pres.ShapeType.line, { x:x, y:y+1.3, w:4.6, h:0, line:{ color:"2A4070", width:0.5, dashType:"dash" } });
}
});
footNote(s, "Source: Bailey & Love's Short Practice of Surgery, 28th Edition, Chapter 56");
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — Embryological Development
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
addHeader(s, "EMBRYOLOGICAL DEVELOPMENT", DARK_BG, ACCENT);
// Superior box
s.addShape(pres.ShapeType.rect, { x:0.3, y:0.85, w:4.35, h:2.45, fill:{ color:"E8F4E8" }, line:{ color:"3A8A3A", width:2 } });
s.addShape(pres.ShapeType.rect, { x:0.3, y:0.85, w:4.35, h:0.45, fill:{ color:"3A8A3A" } });
s.addText("INFERIOR PARATHYROID (PIII)", { x:0.3, y:0.85, w:4.35, h:0.45, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Origin: ", options:{ bold:true } }, { text:"3rd Pharyngeal Pouch\n(dorsal wing)\n", options:{} },
{ text:"Co-derivative: ", options:{ bold:true } }, { text:"Thymus (ventral wing)\n", options:{} },
{ text:"Period: ", options:{ bold:true } }, { text:"5th–12th week gestation\n", options:{} },
{ text:"Descent: ", options:{ bold:true } }, { text:"Longer journey → Greater\npositional variability", options:{} },
], { x:0.45, y:1.38, w:4.1, h:1.85, fontSize:12, color:BODY_TEXT, fontFace:"Calibri" });
// Inferior box
s.addShape(pres.ShapeType.rect, { x:5.35, y:0.85, w:4.35, h:2.45, fill:{ color:"E8EEF8" }, line:{ color:"2A5FA5", width:2 } });
s.addShape(pres.ShapeType.rect, { x:5.35, y:0.85, w:4.35, h:0.45, fill:{ color:"2A5FA5" } });
s.addText("SUPERIOR PARATHYROID (PIV)", { x:5.35, y:0.85, w:4.35, h:0.45, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Origin: ", options:{ bold:true } }, { text:"4th Pharyngeal Pouch\n(dorsal portion)\n", options:{} },
{ text:"Also called: ", options:{ bold:true } }, { text:"Parathyroid IV (PIV)\n", options:{} },
{ text:"Associated with: ", options:{ bold:true } }, { text:"C-cell complex /\nlateral thyroid anlage\n", options:{} },
{ text:"Descent: ", options:{ bold:true } }, { text:"Shorter → More constant\nin position", options:{} },
], { x:5.5, y:1.38, w:4.1, h:1.85, fontSize:12, color:BODY_TEXT, fontFace:"Calibri" });
// Centre arrow
s.addText("3rd\nPouch\n↓\n4th\nPouch", { x:4.68, y:1.1, w:0.64, h:1.9, fontSize:9, color:"6080A0", fontFace:"Calibri", align:"center", bold:true });
// Key-point banner
s.addShape(pres.ShapeType.rect, { x:0.3, y:3.45, w:9.4, h:0.75, fill:{ color:"FFF3CD" }, line:{ color:ACCENT, width:1.5 } });
s.addText([
{ text:"Key Point: ", options:{ bold:true, color:"8B6914" } },
{ text:"Both glands develop between the 5th–12th weeks of gestation. The inferior glands descend with the thymus from the 3rd pouch (longer descent → more positional variation). The superior glands descend with the lateral thyroid anlage from the 4th pouch (shorter descent → more constant position).", options:{ color:"6B4F10" } },
], { x:0.45, y:3.45, w:9.1, h:0.75, fontSize:11, fontFace:"Calibri", valign:"middle" });
// Embryology timeline strip
s.addShape(pres.ShapeType.rect, { x:0.3, y:4.35, w:9.4, h:0.55, fill:{ color:"E3EBF8" }, line:{ color:"4A6FA5", width:1 } });
s.addText("Development Timeline: Week 5 → Pouch formation | Week 6–8 → Migration begins | Week 12 → Final positions established", {
x:0.45, y:4.35, w:9.1, h:0.55, fontSize:11, color:"1A2744", fontFace:"Calibri", valign:"middle", bold:false
});
footNote(s, "Source: Bailey & Love 28th Ed, Ch.56 | Embryology: 3rd pouch (PIII + Thymus), 4th pouch (PIV + Lateral thyroid)");
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — Gross Anatomy
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
addHeader(s, "GROSS ANATOMY", DARK_BG, ACCENT);
const cards = [
{ title:"Number", body:"Typically 4 glands\n(2 superior + 2 inferior)\n\n~13% of population have\nabnormal PT tissue\n~5% have true\nsupernumerary gland", hl:"4A6FA5" },
{ title:"Size", body:"Approx. 6 × 3 × 2 mm\nOval / flat /\nbean-shaped\n\nSimilar in size\nto a split pea", hl:"2E8B57" },
{ title:"Weight", body:"Each gland ~30 mg\n(range 10–65 mg)\n\nCombined weight\n~120–160 mg total", hl:"8B2FC9" },
{ title:"Colour", body:"'Portland brick'\nyellow-brown\n\nDistinct from\nsurrounding yellow\nadipose tissue", hl:"C0392B" },
];
cards.forEach((c, i) => {
const x = 0.2 + i * 2.42;
s.addShape(pres.ShapeType.roundRect, { x, y:0.85, w:2.22, h:3.5, fill:{ color:"FFFFFF" }, line:{ color:c.hl, width:2 }, rectRadius:0.14 });
s.addShape(pres.ShapeType.roundRect, { x, y:0.85, w:2.22, h:0.55, fill:{ color:c.hl }, rectRadius:0.14 });
s.addText(c.title, { x, y:0.85, w:2.22, h:0.55, fontSize:15, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText(c.body, { x:x+0.1, y:1.48, w:2.02, h:2.78, fontSize:12, color:BODY_TEXT, fontFace:"Calibri", align:"center", valign:"top" });
});
// Symmetry note
s.addShape(pres.ShapeType.rect, { x:0.2, y:4.5, w:9.6, h:0.68, fill:{ color:"E3EBF8" }, line:{ color:"4A6FA5", width:1.5 } });
s.addText([
{ text:"Surgical Pearl: ", options:{ bold:true, color:"1A2744" } },
{ text:"There is a degree of bilateral symmetry in parathyroid position. When one gland is found, its counterpart on the opposite side is often in a mirror-image location — a very useful intraoperative guide.", options:{ color:BODY_TEXT } }
], { x:0.35, y:4.5, w:9.3, h:0.68, fontSize:11, fontFace:"Calibri", valign:"middle" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — Inferior Parathyroid (with diagram)
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.7, fill:{ color:"1E5C1E" } });
s.addText("INFERIOR PARATHYROID GLANDS — POSITIONS & DIAGRAM", {
x:0.3, y:0, w:9.5, h:0.7, fontSize:19, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle"
});
if (imgInferior) {
s.addImage({ data: imgInferior, x:0.2, y:0.82, w:5.2, h:4.6, sizing:{ type:"contain", w:5.2, h:4.6 } });
} else {
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.82, w:5.2, h:4.6, fill:{ color:"F0F8F0" }, line:{ color:"3A8A3A", width:1 } });
s.addText("Inferior Parathyroid\nLocation Diagram\n(Fig 56.1a)", { x:0.2, y:0.82, w:5.2, h:4.6, fontSize:14, color:"3A8A3A", fontFace:"Calibri", align:"center", valign:"middle" });
}
s.addText("Fig 56.1a (Bailey & Love 28th Ed)\nITA = Inferior Thyroid Artery | RLN = Recurrent Laryngeal Nerve", {
x:0.2, y:5.3, w:5.2, h:0.28, fontSize:8, color:"808080", fontFace:"Calibri", italic:true, align:"center"
});
// Frequency table
s.addText("LOCATION FREQUENCY", {
x:5.55, y:0.85, w:4.15, h:0.38, fontSize:13, bold:true, color:DARK_BG, fontFace:"Calibri", align:"center"
});
const locs = [
["Related to lower pole of thyroid","56%","3A8A3A"],
["In thyrothymic tract","28%","2E7D32"],
["Mediastinal","9%","558B2F"],
["Below ITA-RLN intersection","3%","78909C"],
["Undescended (above ITA)","2%","78909C"],
["Intrathyroidal","2%","78909C"],
];
locs.forEach(([loc, pct, clr], i) => {
const bg = i % 2 === 0 ? "EAF5EA" : "FFFFFF";
s.addShape(pres.ShapeType.rect, { x:5.55, y:1.32+i*0.65, w:3.1, h:0.62, fill:{ color:bg }, line:{ color:"CCCCCC", width:0.5 } });
s.addText(loc, { x:5.62, y:1.32+i*0.65, w:3.0, h:0.62, fontSize:10.5, color:BODY_TEXT, fontFace:"Calibri", valign:"middle" });
s.addShape(pres.ShapeType.rect, { x:8.65, y:1.32+i*0.65, w:1.0, h:0.62, fill:{ color:clr } });
s.addText(pct, { x:8.65, y:1.32+i*0.65, w:1.0, h:0.62, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
});
s.addShape(pres.ShapeType.rect, { x:5.55, y:5.22, w:4.1, h:0.38, fill:{ color:"FFF3CD" }, line:{ color:ACCENT, width:1 } });
s.addText("Longer descent with thymus = more variability", {
x:5.6, y:5.22, w:4.0, h:0.38, fontSize:10, color:"8B6914", fontFace:"Calibri", italic:true, valign:"middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — Superior Parathyroid (with diagram)
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.7, fill:{ color:"1E3A8A" } });
s.addText("SUPERIOR PARATHYROID GLANDS — POSITIONS & DIAGRAM", {
x:0.3, y:0, w:9.5, h:0.7, fontSize:19, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle"
});
if (imgSuperior) {
s.addImage({ data: imgSuperior, x:0.2, y:0.82, w:5.2, h:4.6, sizing:{ type:"contain", w:5.2, h:4.6 } });
} else {
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.82, w:5.2, h:4.6, fill:{ color:"EEF2FA" }, line:{ color:"2A5FA5", width:1 } });
s.addText("Superior Parathyroid\nLocation Diagram\n(Fig 56.1b)", { x:0.2, y:0.82, w:5.2, h:4.6, fontSize:14, color:"2A5FA5", fontFace:"Calibri", align:"center", valign:"middle" });
}
s.addText("Fig 56.1b (Bailey & Love 28th Ed)\nITA = Inferior Thyroid Artery | RLN = Recurrent Laryngeal Nerve", {
x:0.2, y:5.3, w:5.2, h:0.28, fontSize:8, color:"808080", fontFace:"Calibri", italic:true, align:"center"
});
s.addText("LOCATION FREQUENCY", {
x:5.55, y:0.85, w:4.15, h:0.38, fontSize:13, bold:true, color:DARK_BG, fontFace:"Calibri", align:"center"
});
const supLocs = [
["Around ITA-RLN intersection","77%","1E3A8A"],
["Related to upper pole of thyroid","11%","2A5FA5"],
["Paraoesophageal / below ITA","10%","3A6FBB"],
["In carotid sheath","1%","78909C"],
["Intrathyroidal","1%","78909C"],
];
supLocs.forEach(([loc, pct, clr], i) => {
const bg = i % 2 === 0 ? "EBF1FA" : "FFFFFF";
s.addShape(pres.ShapeType.rect, { x:5.55, y:1.32+i*0.72, w:3.1, h:0.68, fill:{ color:bg }, line:{ color:"CCCCCC", width:0.5 } });
s.addText(loc, { x:5.62, y:1.32+i*0.72, w:3.0, h:0.68, fontSize:10.5, color:BODY_TEXT, fontFace:"Calibri", valign:"middle" });
s.addShape(pres.ShapeType.rect, { x:8.65, y:1.32+i*0.72, w:1.0, h:0.68, fill:{ color:clr } });
s.addText(pct, { x:8.65, y:1.32+i*0.72, w:1.0, h:0.68, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
});
s.addShape(pres.ShapeType.rect, { x:5.55, y:4.95, w:4.1, h:0.58, fill:{ color:"E8EEF8" }, line:{ color:"2A5FA5", width:1 } });
s.addText("Shorter descent = More constant (>80% in 2 cm zone at ITA-RLN junction)", {
x:5.6, y:4.95, w:4.0, h:0.58, fontSize:10, color:"1A3060", fontFace:"Calibri", italic:true, valign:"middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — Ectopic & Supernumerary
// ═══════════════════════════════════════════════════════════════════════════
{
let s = darkSlide();
addHeader(s, "ECTOPIC & SUPERNUMERARY PARATHYROID GLANDS", MID_BG, ACCENT);
s.addText("ECTOPIC SITES", { x:0.3, y:0.85, w:4.5, h:0.38, fontSize:13, bold:true, color:ACCENT2, fontFace:"Calibri" });
const ectopicSites = [
"Intrathyroidal (within thyroid gland)",
"Superior mediastinum",
"Posterior mediastinum",
"Thyrothymic tract",
"Retrooesophageal / paratracheal",
"Aortopulmonary window (rare)",
"Carotid sheath",
"Undescended at pharyngeal wall",
];
ectopicSites.forEach((site, i) => {
const col = Math.floor(i / 4);
const row = i % 4;
s.addText("• " + site, {
x:0.35 + col*4.7, y:1.32 + row*0.55,
w:4.5, h:0.5, fontSize:11.5, color:"C8DCF0", fontFace:"Calibri"
});
});
s.addShape(pres.ShapeType.rect, { x:0.3, y:3.62, w:9.3, h:0.5, fill:{ color:"243A60" }, line:{ color:ACCENT, width:1 } });
s.addText("SUPERNUMERARY GLANDS", { x:0.4, y:3.62, w:9.1, h:0.5, fontSize:13, bold:true, color:ACCENT, fontFace:"Calibri", valign:"middle" });
s.addText([
{ text:"~13% ", options:{ bold:true, color:ACCENT } },
{ text:"of population have abnormal PT tissue ", options:{ color:"D0E4F0" } },
{ text:"~5% ", options:{ bold:true, color:ACCENT } },
{ text:"have a true supernumerary (5th+) gland", options:{ color:"D0E4F0" } },
], { x:0.4, y:4.22, w:9.2, h:0.45, fontSize:13, fontFace:"Calibri" });
s.addShape(pres.ShapeType.rect, { x:0.3, y:4.8, w:9.3, h:0.68, fill:{ color:"1E3060" }, line:{ color:ACCENT2, width:1 } });
s.addText([
{ text:"Surgical Significance: ", options:{ bold:true, color:ACCENT2 } },
{ text:"Ectopic and supernumerary glands are the most common cause of persistent hypercalcaemia after parathyroid surgery. Systematic exploration and pre-operative imaging is essential.", options:{ color:"A8CCE8" } }
], { x:0.42, y:4.8, w:9.1, h:0.68, fontSize:11, fontFace:"Calibri", valign:"middle" });
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — Blood Supply & Nerve Supply
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
addHeader(s, "BLOOD SUPPLY, NERVE SUPPLY & LYMPHATICS", DARK_BG, ACCENT);
// Arterial
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.85, w:4.55, h:2.55, fill:{ color:"FEF0F0" }, line:{ color:"C0392B", width:2 } });
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.85, w:4.55, h:0.44, fill:{ color:"C0392B" } });
s.addText("ARTERIAL SUPPLY", { x:0.25, y:0.85, w:4.55, h:0.44, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Primary: ", options:{ bold:true } }, { text:"Inferior thyroid artery (ITA)\n", options:{} },
{ text:"→ Supplies BOTH superior & inferior glands\n\n", options:{} },
{ text:"Variant: ", options:{ bold:true } }, { text:"Superior thyroid artery\n", options:{} },
{ text:" (via anastomotic branch with ITA)\n\n", options:{} },
{ text:"Note: ", options:{ bold:true } }, { text:"Terminal end-arteries — ischaemia\nrisk during surgery", options:{} },
], { x:0.38, y:1.35, w:4.3, h:1.95, fontSize:11.5, color:BODY_TEXT, fontFace:"Calibri" });
// Venous
s.addShape(pres.ShapeType.rect, { x:5.2, y:0.85, w:4.55, h:2.55, fill:{ color:"EEF2FA" }, line:{ color:"1A3080", width:2 } });
s.addShape(pres.ShapeType.rect, { x:5.2, y:0.85, w:4.55, h:0.44, fill:{ color:"1A3080" } });
s.addText("VENOUS DRAINAGE", { x:5.2, y:0.85, w:4.55, h:0.44, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"→ ", options:{ bold:true } }, { text:"Superior, middle & inferior thyroid veins\n\n", options:{} },
{ text:"→ ", options:{ bold:true } }, { text:"Drain into internal jugular vein\n\n", options:{} },
{ text:"→ ", options:{ bold:true } }, { text:"Inferior veins may drain into\nbrachiocephalic veins", options:{} },
], { x:5.35, y:1.35, w:4.3, h:1.95, fontSize:11.5, color:BODY_TEXT, fontFace:"Calibri" });
// Nerve supply
s.addShape(pres.ShapeType.rect, { x:0.25, y:3.54, w:4.55, h:1.75, fill:{ color:"F0FFF0" }, line:{ color:"2E8B57", width:1.5 } });
s.addShape(pres.ShapeType.rect, { x:0.25, y:3.54, w:4.55, h:0.4, fill:{ color:"2E8B57" } });
s.addText("NERVE SUPPLY", { x:0.25, y:3.54, w:4.55, h:0.4, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText("Vasomotor sympathetic fibres from the cervical sympathetic ganglia.\n\nNo secretomotor innervation — PTH secretion is regulated entirely by serum calcium levels via calcium-sensing receptors (CaSR).", {
x:0.38, y:4.0, w:4.3, h:1.2, fontSize:11, color:BODY_TEXT, fontFace:"Calibri"
});
// Lymphatics
s.addShape(pres.ShapeType.rect, { x:5.2, y:3.54, w:4.55, h:1.75, fill:{ color:"FFF8E8" }, line:{ color:ACCENT, width:1.5 } });
s.addShape(pres.ShapeType.rect, { x:5.2, y:3.54, w:4.55, h:0.4, fill:{ color:ACCENT } });
s.addText("LYMPHATICS", { x:5.2, y:3.54, w:4.55, h:0.4, fontSize:12, bold:true, color:DARK_BG, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText("Drain to deep cervical and paratracheal lymph nodes.\n\nSurgical landmark: Superior parathyroid lies within 2 cm of the ITA-RLN junction in >80% of patients.", {
x:5.35, y:4.0, w:4.3, h:1.2, fontSize:11, color:BODY_TEXT, fontFace:"Calibri"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 — Histology
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
addHeader(s, "HISTOLOGY OF THE PARATHYROID GLAND", DARK_BG, ACCENT);
// Histology image (or placeholder)
if (histoImg) {
s.addImage({ data: histoImg, x:0.25, y:0.82, w:4.8, h:3.9, sizing:{ type:"contain", w:4.8, h:3.9 } });
s.addText("Parathyroid H&E histology — chief cells & oxyphil cells", {
x:0.25, y:4.76, w:4.8, h:0.25, fontSize:8.5, color:"808080", fontFace:"Calibri", italic:true, align:"center"
});
} else {
s.addShape(pres.ShapeType.rect, { x:0.25, y:0.82, w:4.8, h:3.9, fill:{ color:"F5EEF8" }, line:{ color:"8E44AD", width:1.5 } });
// Draw a schematic representation
s.addText("HISTOLOGICAL SCHEMATIC", { x:0.25, y:0.82, w:4.8, h:0.5, fontSize:12, bold:true, color:"8E44AD", fontFace:"Calibri", align:"center", valign:"middle" });
s.addText("Chief cells (small, pale, polygonal)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\nOxyphil cells (large, acidophilic, pink)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\nFat cells (~50% in adults)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\nFibrous capsule + septa dividing into lobules\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\nRich vascular stroma\n(sinusoidal capillaries)", {
x:0.35, y:1.38, w:4.6, h:3.26, fontSize:12, color:"6A1E8A", fontFace:"Calibri", valign:"top", align:"center"
});
}
// Cell type cards
const cells = [
{ name:"Chief Cells", sub:"(Principal / Water-clear)", col:"8B2FC9", bg:"F5EEF8",
pts:["Most numerous", "Small, polygonal, pale cytoplasm", "Central round nucleus", "Synthesise & secrete PTH", "Light (active) & dark (inactive) types"] },
{ name:"Oxyphil Cells", sub:"(Acidophilic / Eosinophilic)", col:"C0392B", bg:"FEEEEC",
pts:["Fewer in number", "Larger; abundant pink cytoplasm", "Appear after puberty", "Numerous mitochondria", "Function uncertain; may be exhausted chief cells"] },
{ name:"Fat / Transitional Cells", sub:"", col:"117A65", bg:"E8F8F5",
pts:["Fat cells ~50% volume in adults", "Decrease with hyperplasia/adenoma", "Transitional forms between chief & oxyphil", "Fibrous capsule surrounds each gland"] },
];
cells.forEach((c, i) => {
s.addShape(pres.ShapeType.rect, { x:5.25, y:0.82+i*1.52, w:4.5, h:1.45, fill:{ color:c.bg }, line:{ color:c.col, width:1.5 } });
s.addText(c.name + (c.sub ? " " + c.sub : ""), { x:5.3, y:0.82+i*1.52, w:4.4, h:0.38, fontSize:11.5, bold:true, color:c.col, fontFace:"Calibri" });
s.addText(c.pts.map(p => "• "+p).join("\n"), { x:5.3, y:1.18+i*1.52, w:4.4, h:1.0, fontSize:10, color:BODY_TEXT, fontFace:"Calibri" });
});
s.addShape(pres.ShapeType.rect, { x:0.25, y:5.1, w:9.5, h:0.38, fill:{ color:"E3EBF8" }, line:{ color:"4A6FA5", width:1 } });
s.addText("The gland is enclosed in a thin fibrous capsule; septa divide it into ill-defined lobules with a rich sinusoidal capillary network.", {
x:0.38, y:5.1, w:9.3, h:0.38, fontSize:10, color:BODY_TEXT, fontFace:"Calibri", valign:"middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 — PTH & Calcium Regulation (with diagram)
// ═══════════════════════════════════════════════════════════════════════════
{
let s = lightSlide();
addHeader(s, "PTH & CALCIUM REGULATION", DARK_BG, ACCENT);
if (imgPTH) {
s.addImage({ data: imgPTH, x:0.25, y:0.82, w:5.1, h:4.05, sizing:{ type:"contain", w:5.1, h:4.05 } });
s.addText("Fig 56.2 (Bailey & Love) — Actions of Parathyroid Hormone", {
x:0.25, y:4.9, w:5.1, h:0.25, fontSize:8.5, color:"808080", fontFace:"Calibri", italic:true, align:"center"
});
}
s.addText("PTH — KEY FACTS", { x:5.55, y:0.85, w:4.1, h:0.38, fontSize:13, bold:true, color:DARK_BG, fontFace:"Calibri" });
const pthFacts = [
["Structure", "84-amino acid peptide hormone"],
["Stimulus", "↓ serum Ca²⁺ or ↑ serum Mg²⁺"],
["Half-life", "~3–5 min (normal renal function)"],
["Metabolism", "Cleaved in liver → inactive C-terminal cleared by kidney; N-terminal is bioactive"],
["On Kidney", "↑ Ca²⁺ tubular reabsorption; activates 1,25(OH)₂D"],
["On Bone", "↑ osteoclast & osteoblast activity → ↑ bone turnover → ↑ serum Ca²⁺"],
["On GIT", "Via 1,25(OH)₂D → ↑ Ca²⁺ & PO₄ absorption"],
["Antagonist", "Calcitonin (parafollicular C cells of thyroid)"],
];
pthFacts.forEach(([lbl, val], i) => {
const bg = i%2===0 ? "E3EBF8" : "FFFFFF";
s.addShape(pres.ShapeType.rect, { x:5.55, y:1.3+i*0.52, w:4.1, h:0.5, fill:{ color:bg }, line:{ color:"C8D8F0", width:0.5 } });
s.addText([
{ text:lbl+": ", options:{ bold:true, color:"1A2744" } },
{ text:val, options:{ color:BODY_TEXT } }
], { x:5.65, y:1.3+i*0.52, w:3.95, h:0.5, fontSize:10, fontFace:"Calibri", valign:"middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 — Surgical Relevance
// ═══════════════════════════════════════════════════════════════════════════
{
let s = darkSlide();
addHeader(s, "SURGICAL RELEVANCE & KEY LANDMARKS", MID_BG, ACCENT);
const pts = [
{ icon:"★", title:"Superior Gland — Landmark",
text:"Located in 2 cm zone centred 1 cm around ITA-RLN junction at cricothyroid level. Present here in >80% of patients. Lies posterior and lateral to RLN." },
{ icon:"★", title:"Inferior Gland — Variability",
text:"Most commonly at inferior thyroid pole (56%), freely mobile in a fat globule. Highly variable due to thymic descent. May be in thyrothymic tract or mediastinum." },
{ icon:"★", title:"Blood Supply — Vulnerability",
text:"Both glands supplied by ITA via end-arteries. Devascularisation during thyroidectomy → hypoparathyroidism. Preserve ITA branches meticulously." },
{ icon:"★", title:"RLN Relationship",
text:"Superior gland: posterior/lateral to RLN. Inferior gland: usually anterior to RLN. The RLN-ITA crossing is the key intraoperative landmark." },
{ icon:"★", title:"Bilateral Symmetry Rule",
text:"When one gland is found, search for the contralateral gland in a mirror-image position. A highly useful surgical principle during bilateral neck exploration." },
{ icon:"★", title:"Ectopic Glands — Failed Surgery",
text:"Ectopic glands (mediastinal, intrathyroidal, retro-oesophageal) cause persistent hypercalcaemia. Pre-op sestamibi scan or CT/4D-CT essential for localisation." },
];
pts.forEach((pt, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.22 + col * 5.05;
const y = 0.85 + row * 1.56;
s.addShape(pres.ShapeType.roundRect, { x, y, w:4.7, h:1.45, fill:{ color:"1E3560" }, line:{ color:ACCENT2, width:1 }, rectRadius:0.1 });
s.addText(pt.icon + " " + pt.title, { x:x+0.1, y:y+0.08, w:4.5, h:0.4, fontSize:12, bold:true, color:ACCENT2, fontFace:"Calibri" });
s.addText(pt.text, { x:x+0.1, y:y+0.5, w:4.5, h:0.88, fontSize:10.5, color:"C8DCF0", fontFace:"Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 — Summary
// ═══════════════════════════════════════════════════════════════════════════
{
let s = darkSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.7, fill:{ color:ACCENT } });
s.addText("SUMMARY", { x:0.3, y:0, w:9.5, h:0.7, fontSize:22, bold:true, color:DARK_BG, fontFace:"Calibri", valign:"middle" });
const summaryPoints = [
"4 glands, each ~30 mg, 'Portland brick' yellow-brown colour; arise from 3rd (inferior) and 4th (superior) pharyngeal pouches",
"Inferior glands descend with thymus (3rd pouch) → more variable; >50% at inferior thyroid pole",
"Superior glands arise from 4th pouch → more constant; >77% near ITA-RLN intersection at cricothyroid level",
"Blood supply: mainly inferior thyroid artery (end-arteries) — both superior and inferior glands",
"No secretomotor innervation — PTH secretion controlled entirely by serum calcium via CaSR",
"Histology: chief cells (PTH-secreting), oxyphil cells, fat cells (~50% gland volume in adults)",
"PTH: 84 AA peptide; raises serum Ca²⁺ via kidney (CaSR), bone, and GIT; antagonised by calcitonin",
"~13% have abnormal PT tissue; ~5% have true supernumerary gland → cause of failed parathyroid surgery",
];
summaryPoints.forEach((pt, i) => {
const clr = i%2===0 ? "D0E8F8" : "A8CCE8";
s.addShape(pres.ShapeType.rect, { x:0.3, y:0.82+i*0.57, w:0.35, h:0.5, fill:{ color:ACCENT } });
s.addText(pt, { x:0.75, y:0.82+i*0.57, w:8.95, h:0.52, fontSize:10.5, color:clr, fontFace:"Calibri", valign:"middle" });
});
s.addShape(pres.ShapeType.rect, { x:0, y:5.32, w:10, h:0.305, fill:{ color:MID_BG } });
s.addText("Bailey & Love's Short Practice of Surgery 28th Ed, Chapter 56 | SRB's Manual of Surgery", {
x:0.3, y:5.32, w:9.5, h:0.305, fontSize:9, color:"8899AA", fontFace:"Calibri", valign:"middle", align:"center"
});
}
// ─── Write ────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/parathyroid-ppt/Parathyroid_Gland_Anatomy.pptx" })
.then(() => console.log("SUCCESS: PPT saved!"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/parathyroid-ppt && node build_ppt.js 2>&1
ls -lh /home/daytona/workspace/parathyroid-ppt/Parathyroid_Gland_Anatomy.pptx
Parathyroid Gland Anatomy
Presentation · PPTX
| # | Slide | Images |
|---|---|---|
| 1 | Title slide | - |
| 2 | Overview / Contents | - |
| 3 | Historical Background (Owen 1850 → Mandl 1925) | - |
| 4 | Embryological Development (3rd vs 4th pharyngeal pouch) | - |
| 5 | Gross Anatomy (number, size, weight, colour) | - |
| 6 | Inferior Parathyroid — Positions & Frequency | Fig 56.1a (Bailey & Love diagram) |
| 7 | Superior Parathyroid — Positions & Frequency | Fig 56.1b (Bailey & Love diagram) |
| 8 | Ectopic & Supernumerary Glands | - |
| 9 | Blood Supply, Venous Drainage, Nerve Supply, Lymphatics | - |
| 10 | Histology (chief cells, oxyphil cells, fat cells) | H&E histology image |
| 11 | PTH & Calcium Regulation | Fig 56.2 (Bailey & Love PTH flowchart) |
| 12 | Surgical Relevance & Key Landmarks | - |
| 13 | Summary | - |