Create a professional 15-slide PowerPoint presentation for MBBS students on the topic “Diaphragm Anatomy”. Presentation should have a clean medical design with blue and white theme, labeled anatomical diagrams, clinical images, and concise academic points. Add medical illustrations, cadaveric anatomy images, nerve supply diagrams, thoracic cavity diagrams, and clinical correlation images from standard anatomy references. Mention at the end of every slide footer: “Made by Darshan Benke”. Slide 1 – Title Slide Title: “Diaphragm Anatomy” Subtitle: Structure, Attachments, Openings & Clinical Importance Add detailed anatomical diagram of diaphragm Footer: Made by Darshan Benke Slide 2 – Introduction Definition of diaphragm Dome-shaped musculotendinous partition Separates thoracic and abdominal cavities Primary muscle of respiration Add simple thorax-abdomen separation diagram Slide 3 – Parts of Diaphragm Sternal part Costal part Lumbar part Central tendon Add labeled anatomical illustration Slide 4 – Origin and Attachments Xiphoid process Lower six ribs and costal cartilages Lumbar vertebrae Crura of diaphragm Add origin and insertion diagram Slide 5 – Central Tendon Shape and location Fusion with fibrous pericardium Function Add superior view diagram Slide 6 – Openings of Diaphragm Caval opening (T8) Esophageal opening (T10) Aortic hiatus (T12) Structures passing through each opening Add labeled openings diagram Slide 7 – Blood Supply Inferior phrenic arteries Pericardiophrenic arteries Musculophrenic arteries Venous drainage Add vascular diagram Slide 8 – Nerve Supply Phrenic nerve (C3, C4, C5) Sensory and motor supply Peripheral sensory supply Add phrenic nerve pathway diagram Slide 9 – Embryological Development Septum transversum Pleuroperitoneal membranes Dorsal mesentery of esophagus Muscular ingrowth Add embryology flowchart Slide 10 – Movements During Respiration Action in inspiration Action in expiration Changes in thoracic volume Add respiratory movement diagram Slide 11 – Relations of Diaphragm Thoracic surface relations Abdominal surface relations Liver, stomach, spleen, lungs Add superior and inferior view images Slide 12 – Histology of Diaphragm Skeletal muscle fibers Tendinous tissue Microscopic appearance Add histology slide image Slide 13 – Applied Anatomy Diaphragmatic hernia Hiatal hernia Eventration of diaphragm Phrenic nerve palsy Add clinical radiology images Slide 14 – Imaging and Diagnosis X-ray appearance CT scan of diaphragm Ultrasound uses MRI overview Add radiological comparison images Slide 15 – Conclusion & References Summary of important points Importance in respiration and surgery Add references: Gray’s Anatomy Netter Atlas Snell Clinical Anatomy Final note: “Thank You” Footer: Made by Darshan Benke
diaphragm anatomy labeled diagram superior view
phrenic nerve pathway diaphragm nerve supply diagram
diaphragmatic hernia hiatal hernia chest X-ray radiology
diaphragm openings caval esophageal aortic hiatus vertebral levels
diaphragm blood supply inferior phrenic artery vascular anatomy
diaphragm embryology development septum transversum pleuroperitoneal membrane
diaphragm CT scan MRI thorax imaging radiology normal
ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace
mkdir -p /home/daytona/workspace/diaphragm-pptx && ls /home/daytona/workspace/diaphragm-pptx
~/diaphragm-pptx/create_pptx.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ─── Color Palette ───────────────────────────────────────────────────────────
const C = {
darkBlue: "0D2B6B", // dominant dark navy blue
midBlue: "1565C0", // medium blue
lightBlue: "1E88E5", // accent blue
paleBlue: "E3F2FD", // light bg tint
white: "FFFFFF",
offWhite: "F5F9FF",
accent: "FFC107", // gold accent for highlights
textDark: "0D1B2A",
textGray: "546E7A",
divider: "90CAF9",
};
// ─── Helper: fetch images as base64 ──────────────────────────────────────────
function fetchImages(urls) {
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
return JSON.parse(result);
} catch(e) {
console.error("Image fetch error:", e.message);
return urls.map(u => ({ url: u, base64: null, error: e.message }));
}
}
// ─── Image URLs ───────────────────────────────────────────────────────────────
const IMG = {
diaphragmSuperior: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_8ab8f155a63410adca459d09626372fa974bb3339d44cec0d0e62f0656daf25f.jpg",
diaphragmOpenings: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_acaebe8de7739161e48420770bf6aa8c88635dea40c460f7db0a8ea9ab27a8b7.jpg",
diaphragmCrura: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b262dcf13a74b1b1388a21aeba413e9fafb5a567403345c54c1bdef9168cd59e.jpg",
phrenicNerve: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_2d936a66e71d007eb2ec287f231de65e3b4c6101a059fed9186209291784cc16.jpg",
phrenicBranching: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_f91ec7b48c7a840cbbe951b5861e2abd8205243048403f50451ebaeb64b2f1f5.jpg",
embryology: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4fdedb94a711fd5a434b4955eb59519f4cfa958672b53d2ec2615636f34245d9.jpg",
herniaXray: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_0f71e98bbbdbcb160a0da0c356a584a73882eb07df11c4c1021d08ffd34899e6.jpg",
hiatalXray: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_2b5d1633a791d12f57dc9579b3f58f399d42f6b16987929b329b58929c71257c.jpg",
ctMRI: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_5134f08da2f2d904bfc8433290f3cc584756081c67704df02bb730759cef0d8a.jpg",
ctSagittal: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4a7bce2c816beb466dddd06b2399918f780504af8fe3132f60347bca7d71764a.jpg",
thoraxDiagram: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_22c414e9278826bb2f9269b4183b94c3423b6b415d793b65e9aaa313469ca18f.jpg",
ultrasound: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4e4f684fe17339a685b89160102cf5da505748c42c2e5f8d4527cd223eba930f.jpg",
hiatalContrast: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d40b67d748107026d2f700b9433d77bed993f75102eeb8aaa2e4d906d67256a4.jpg",
bochdalek: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_cf6f3c2ce97cf4da8e43c71bffdea9efdd50d03168c6b188792ba8b15ece729f.jpg",
};
console.log("Fetching images...");
const allUrls = Object.values(IMG);
const fetched = fetchImages(allUrls);
const imgMap = {};
Object.keys(IMG).forEach((key, i) => {
imgMap[key] = fetched[i] && !fetched[i].error ? fetched[i].base64 : null;
if (!imgMap[key]) console.warn(` ⚠ Failed: ${key}`);
else console.log(` ✓ ${key}`);
});
// ─── Presentation Setup ───────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Darshan Benke";
pres.title = "Diaphragm Anatomy";
// ─── Reusable Helpers ─────────────────────────────────────────────────────────
function addFooter(slide) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 5.28, w: 10, h: 0.34,
fill: { color: C.darkBlue },
line: { color: C.darkBlue },
});
slide.addText("Made by Darshan Benke", {
x: 0, y: 5.28, w: 10, h: 0.34,
fontSize: 9, color: C.white,
align: "center", valign: "middle",
italic: true, bold: false,
fontFace: "Calibri",
});
}
function addSlideHeader(slide, title, bgColor) {
// Top header bar
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.72,
fill: { color: bgColor || C.darkBlue },
line: { color: bgColor || C.darkBlue },
});
slide.addText(title, {
x: 0.25, y: 0, w: 9.5, h: 0.72,
fontSize: 18, bold: true, color: C.white,
align: "left", valign: "middle",
fontFace: "Calibri",
});
// Accent line
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0.72, w: 10, h: 0.06,
fill: { color: C.accent },
line: { color: C.accent },
});
}
function addSlideNumber(slide, num) {
slide.addText(`${num} / 15`, {
x: 8.8, y: 5.28, w: 1.2, h: 0.34,
fontSize: 8, color: C.divider,
align: "right", valign: "middle",
fontFace: "Calibri",
});
}
function bulletList(slide, items, opts) {
const textArr = items.map((item, i) => ({
text: item,
options: {
bullet: { type: "bullet", indent: 15 },
breakLine: i < items.length - 1,
},
}));
slide.addText(textArr, {
fontFace: "Calibri",
fontSize: opts.fontSize || 13,
color: opts.color || C.textDark,
...opts,
});
}
function addImage(slide, dataKey, x, y, w, h, label) {
if (imgMap[dataKey]) {
slide.addImage({ data: imgMap[dataKey], x, y, w, h, rounding: false });
} else {
// Placeholder box
slide.addShape(pres.ShapeType.rect, { x, y, w, h,
fill: { color: C.paleBlue }, line: { color: C.midBlue, width: 1.5 } });
slide.addText(label || "[ Anatomical Diagram ]", {
x, y, w, h, fontSize: 10, color: C.midBlue,
align: "center", valign: "middle", italic: true, fontFace: "Calibri",
});
}
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — Title Slide
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full-slide gradient-like background
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.darkBlue}, line:{color:C.darkBlue} });
// Decorative accent strip
s.addShape(pres.ShapeType.rect, { x:0, y:3.5, w:10, h:0.08, fill:{color:C.accent}, line:{color:C.accent} });
// Light overlay panel
s.addShape(pres.ShapeType.rect, { x:5.4, y:0.6, w:4.3, h:4.6, fill:{color:"1250A2", transparency:20}, line:{color:C.lightBlue, width:1} });
// Anatomical image (diaphragm superior view)
addImage(s, "diaphragmSuperior", 5.55, 0.75, 4.0, 3.5, "Diaphragm Superior View");
// Title text block
s.addText("DIAPHRAGM", {
x:0.3, y:0.7, w:5, h:0.85,
fontSize: 42, bold: true, color: C.white, fontFace: "Calibri",
charSpacing: 4,
});
s.addText("ANATOMY", {
x:0.3, y:1.5, w:5, h:0.85,
fontSize: 42, bold: true, color: C.accent, fontFace: "Calibri",
charSpacing: 4,
});
s.addShape(pres.ShapeType.rect, { x:0.3, y:2.42, w:2.5, h:0.06, fill:{color:C.lightBlue}, line:{color:C.lightBlue} });
s.addText("Structure, Attachments, Openings & Clinical Importance", {
x:0.3, y:2.6, w:5, h:0.7,
fontSize: 13, color: C.divider, italic: true, fontFace: "Calibri",
});
s.addText("For MBBS Students — Gross Anatomy", {
x:0.3, y:3.35, w:5, h:0.45,
fontSize: 11, color: C.white, fontFace: "Calibri", bold: false,
});
s.addShape(pres.ShapeType.rect, { x:0.3, y:3.9, w:2.2, h:0.5, fill:{color:C.accent}, line:{color:C.accent} });
s.addText("MBBS | 2026", { x:0.3, y:3.9, w:2.2, h:0.5,
fontSize:11, bold:true, color:C.darkBlue, align:"center", valign:"middle", fontFace:"Calibri" });
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — Introduction
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Introduction to the Diaphragm");
addSlideNumber(s, 2);
// Left content panel
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.9, w:5.5, h:4.2, fill:{color:C.white}, line:{color:C.divider, width:1} });
// Definition callout
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.9, w:5.5, h:0.65, fill:{color:C.paleBlue}, line:{color:C.divider} });
s.addText("Definition", { x:0.35, y:0.9, w:5.2, h:0.65,
fontSize:13, bold:true, color:C.darkBlue, valign:"middle", fontFace:"Calibri" });
s.addText(
"The diaphragm is a dome-shaped musculotendinous partition that separates the thoracic cavity from the abdominal cavity and serves as the primary muscle of respiration.",
{ x:0.35, y:1.6, w:5.2, h:0.9, fontSize:12, color:C.textDark, fontFace:"Calibri", valign:"top" }
);
bulletList(s, [
"Dome-shaped musculotendinous sheet",
"Separates thoracic & abdominal cavities",
"PRIMARY muscle of quiet respiration",
"Contracts during inspiration → flattens dome",
"Rises during expiration → passive recoil",
"Innervated by phrenic nerve (C3, C4, C5)",
"Contains 3 major openings: T8, T10, T12",
], { x:0.35, y:2.55, w:5.2, h:2.4, fontSize:12, color:C.textDark });
// Right image
addImage(s, "thoraxDiagram", 5.9, 0.9, 3.8, 4.0, "Thorax-Abdomen Separation Diagram");
// Image caption
s.addText("Thoracic cage with diaphragm position", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — Parts of Diaphragm
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Parts of the Diaphragm");
addSlideNumber(s, 3);
// 4 part cards
const parts = [
{ title:"Sternal Part", color:"1565C0", desc:"Arises from posterior surface of xiphoid process as small muscular slips" },
{ title:"Costal Part", color:"1976D2", desc:"Arises from inner surfaces of lower 6 ribs and their costal cartilages" },
{ title:"Lumbar Part", color:"1E88E5", desc:"Arises from upper 2–3 lumbar vertebrae via right and left crura" },
{ title:"Central Tendon", color:"FFC107", desc:"Trefoil-shaped aponeurosis at center; blends with fibrous pericardium" },
];
parts.forEach((p, i) => {
const x = 0.2 + (i % 2) * 2.85;
const y = 0.85 + Math.floor(i / 2) * 1.7;
s.addShape(pres.ShapeType.rect, { x, y, w:2.6, h:1.55, fill:{color:p.color}, line:{color:p.color} });
s.addShape(pres.ShapeType.rect, { x, y:y+0.4, w:2.6, h:1.15, fill:{color:"FFFFFF",transparency:10}, line:{color:p.color} });
s.addText(p.title, { x:x+0.08, y, w:2.44, h:0.42,
fontSize:12, bold:true, color:"FFFFFF", align:"center", valign:"middle", fontFace:"Calibri" });
s.addText(p.desc, { x:x+0.08, y:y+0.44, w:2.44, h:1.0,
fontSize:10, color:C.textDark, align:"left", valign:"top", fontFace:"Calibri" });
});
// Right image
addImage(s, "diaphragmSuperior", 5.9, 0.85, 3.8, 4.05, "Labeled Diaphragm Parts Diagram");
s.addText("Superior view — parts labeled", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — Origin and Attachments
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Origin and Attachments");
addSlideNumber(s, 4);
const attachments = [
{ label:"Sternal", detail:"Posterior surface of xiphoid process (2 muscular slips)", color:C.midBlue },
{ label:"Costal", detail:"Inner surfaces of lower 6 ribs & costal cartilages (7–12)", color:C.lightBlue },
{ label:"Lumbar", detail:"Upper 2–3 lumbar vertebrae via right and left crura", color:"1976D2" },
{ label:"Right Crus", detail:"L1, L2, L3 vertebral bodies and intervertebral discs", color:"0D47A1" },
{ label:"Left Crus", detail:"L1, L2 vertebral bodies only (smaller than right crus)", color:"1565C0" },
{ label:"Arcuate Lig.", detail:"Median, medial, lateral arcuate ligaments complete attachment",color:"283593" },
];
attachments.forEach((a, i) => {
const x = 0.2 + (i % 2) * 2.85;
const y = 0.9 + Math.floor(i / 3) * 0.82;
s.addShape(pres.ShapeType.rect, { x, y, w:2.6, h:0.7, fill:{color:a.color}, line:{color:a.color} });
s.addText([
{ text: a.label + " — ", options:{ bold:true, color:C.white } },
{ text: a.detail, options:{ bold:false, color:C.paleBlue } }
], { x:x+0.08, y, w:2.44, h:0.7, fontSize:9.5, valign:"middle", fontFace:"Calibri" });
});
// Key note box
s.addShape(pres.ShapeType.rect, { x:0.2, y:3.55, w:5.5, h:0.7, fill:{color:C.accent}, line:{color:C.accent} });
s.addText("🔑 KEY: Right crus is larger; encircles esophageal hiatus. Left crus is smaller.", {
x:0.3, y:3.55, w:5.3, h:0.7,
fontSize:11, bold:true, color:C.darkBlue, valign:"middle", fontFace:"Calibri",
});
addImage(s, "diaphragmCrura", 5.9, 0.85, 3.8, 4.05, "Origin & Insertion Diagram");
s.addText("Right crus dominant — esophageal hiatus formation", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — Central Tendon
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Central Tendon");
addSlideNumber(s, 5);
// Features in cards
const features = [
{ icon:"🔷", title:"Shape", text:"Trefoil (3-leafed clover) shape — anterior, right, and left leaflets" },
{ icon:"📍", title:"Location", text:"Occupies central portion of diaphragm, slightly to the right of midline" },
{ icon:"🫀", title:"Pericardial Fusion", text:"Upper surface fused with fibrous pericardium — provides cardiac stability" },
{ icon:"⚙️", title:"Function", text:"Aponeurotic insertion for all muscular parts; IVC passes through at T8" },
{ icon:"🔬", title:"Structure", text:"Dense collagenous fibrous tissue — no muscle fibers, highly tensile" },
{ icon:"🎯", title:"Clinical Note", text:"Fixed point during diaphragmatic contraction — acts as functional anchor" },
];
features.forEach((f, i) => {
const x = 0.2 + (i % 3) * 1.87;
const y = 0.9 + Math.floor(i / 3) * 1.8;
s.addShape(pres.ShapeType.rect, { x, y, w:1.72, h:1.65, fill:{color:C.white}, line:{color:C.divider, width:1.5} });
s.addShape(pres.ShapeType.rect, { x, y, w:1.72, h:0.5, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText(f.icon + " " + f.title, { x:x+0.05, y, w:1.62, h:0.5,
fontSize:10, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
s.addText(f.text, { x:x+0.05, y:y+0.55, w:1.62, h:1.05,
fontSize:9, color:C.textDark, fontFace:"Calibri", valign:"top" });
});
// Right image — superior view
addImage(s, "diaphragmSuperior", 5.9, 0.85, 3.8, 4.05, "Central Tendon Superior View");
s.addText("Trefoil central tendon (label 8) — superior view", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — Openings of Diaphragm
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Openings of the Diaphragm");
addSlideNumber(s, 6);
const openings = [
{
name:"Caval Opening",
level:"T8",
loc:"Central tendon, right of midline",
structures:["Inferior vena cava (IVC)", "Right phrenic nerve branches"],
color:"1565C0",
},
{
name:"Esophageal Hiatus",
level:"T10",
loc:"Muscular part — right crus",
structures:["Esophagus", "Vagus nerves (X)", "Esophageal branches of left gastric A."],
color:"1976D2",
},
{
name:"Aortic Hiatus",
level:"T12",
loc:"Between crura & vertebral column",
structures:["Descending aorta", "Thoracic duct", "Azygos vein (sometimes)"],
color:"0D47A1",
},
];
openings.forEach((o, i) => {
const y = 0.9 + i * 1.3;
// Level badge
s.addShape(pres.ShapeType.rect, { x:0.2, y, w:0.7, h:0.55, fill:{color:o.color}, line:{color:o.color} });
s.addText(o.level, { x:0.2, y, w:0.7, h:0.55,
fontSize:13, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
// Name
s.addText(o.name, { x:1.05, y, w:3.5, h:0.55,
fontSize:13, bold:true, color:o.color, valign:"middle", fontFace:"Calibri" });
// Location
s.addText("Location: " + o.loc, { x:0.2, y:y+0.58, w:5.4, h:0.3,
fontSize:10, color:C.textGray, italic:true, fontFace:"Calibri" });
// Structures
s.addText("Structures: " + o.structures.join(" • "), { x:0.2, y:y+0.85, w:5.4, h:0.35,
fontSize:10, color:C.textDark, fontFace:"Calibri" });
// Divider
if (i < 2) s.addShape(pres.ShapeType.rect, { x:0.2, y:y+1.22, w:5.5, h:0.04, fill:{color:C.divider}, line:{color:C.divider} });
});
// Key memory tip
s.addShape(pres.ShapeType.rect, { x:0.2, y:4.82, w:5.5, h:0.35, fill:{color:C.accent, transparency:30}, line:{color:C.accent} });
s.addText('Mnemonic: "I Eat At 8, 10, 12" → IVC T8, Esophagus T10, Aorta T12', {
x:0.3, y:4.82, w:5.3, h:0.35, fontSize:9.5, bold:true, color:C.darkBlue, valign:"middle", fontFace:"Calibri",
});
addImage(s, "diaphragmOpenings", 5.9, 0.85, 3.8, 4.05, "Diaphragm Openings Diagram");
s.addText("Inferior view — caval, esophageal, aortic openings", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — Blood Supply
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Blood Supply of the Diaphragm");
addSlideNumber(s, 7);
// Arterial section
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:5.5, h:0.42, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("ARTERIAL SUPPLY", { x:0.2, y:0.88, w:5.5, h:0.42,
fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Inferior phrenic arteries — main supply (branches of abdominal aorta)",
"Superior phrenic arteries — from thoracic aorta (minor supply)",
"Pericardiophrenic arteries — from internal thoracic artery (central tendon)",
"Musculophrenic arteries — from internal thoracic artery (peripheral)",
], { x:0.3, y:1.35, w:5.3, h:1.5, fontSize:11, color:C.textDark });
// Venous section
s.addShape(pres.ShapeType.rect, { x:0.2, y:2.92, w:5.5, h:0.42, fill:{color:"0D47A1"}, line:{color:"0D47A1"} });
s.addText("VENOUS DRAINAGE", { x:0.2, y:2.92, w:5.5, h:0.42,
fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Right inferior phrenic vein → directly to IVC",
"Left inferior phrenic vein → left suprarenal or renal vein",
"Musculophrenic veins → internal thoracic veins",
"Pericardiophrenic veins → superior vena cava (SVC)",
], { x:0.3, y:3.4, w:5.3, h:1.4, fontSize:11, color:C.textDark });
addImage(s, "ctSagittal", 5.9, 0.85, 3.8, 4.05, "Vascular Diagram of Diaphragm");
s.addText("CT sagittal — diaphragm vascular relationships", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — Nerve Supply
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Nerve Supply of the Diaphragm");
addSlideNumber(s, 8);
// Phrenic nerve main box
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:5.5, h:3.55, fill:{color:C.white}, line:{color:C.divider, width:1} });
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:5.5, h:0.45, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("Phrenic Nerve (C3, C4, C5) — Primary Motor + Sensory", {
x:0.2, y:0.88, w:5.5, h:0.45, fontSize:12, bold:true, color:C.white,
align:"center", valign:"middle", fontFace:"Calibri",
});
const rows = [
["Origin", "Ventral rami of C3, C4, C5 (cervical plexus)"],
["Root values", '"C3, C4, C5 keeps the diaphragm alive" (mnemonic)'],
["Course", "Descends through neck → mediastinum → diaphragm"],
["Motor supply", "ALL muscle fibers of the diaphragm (sole motor nerve)"],
["Sensory (central)", "Central part of diaphragm (mediastinal & diaphragmatic pleura)"],
["Sensory (periph.)", "Peripheral part supplied by lower 6 intercostal nerves (T7–T12)"],
["Right phrenic", "Passes over SVC → enters central tendon"],
["Left phrenic", "Passes over left ventricle → enters left dome separately"],
];
rows.forEach(([label, val], i) => {
const y = 1.38 + i * 0.38;
const bg = i % 2 === 0 ? C.paleBlue : C.white;
s.addShape(pres.ShapeType.rect, { x:0.2, y, w:5.5, h:0.38, fill:{color:bg}, line:{color:C.divider, width:0.5} });
s.addText(label, { x:0.3, y, w:1.35, h:0.38, fontSize:9.5, bold:true, color:C.midBlue, valign:"middle", fontFace:"Calibri" });
s.addText(val, { x:1.65, y, w:3.9, h:0.38, fontSize:9.5, color:C.textDark, valign:"middle", fontFace:"Calibri" });
});
// Clinical note
s.addShape(pres.ShapeType.rect, { x:0.2, y:4.5, w:5.5, h:0.38, fill:{color:C.accent}, line:{color:C.accent} });
s.addText("Clinical: Phrenic nerve palsy → diaphragmatic paralysis → raised hemidiaphragm on X-ray", {
x:0.3, y:4.5, w:5.3, h:0.38, fontSize:9.5, bold:true, color:C.darkBlue, valign:"middle", fontFace:"Calibri",
});
addImage(s, "phrenicBranching", 5.9, 0.85, 3.8, 4.05, "Phrenic Nerve Pathway Diagram");
s.addText("Phrenic nerve branching pattern over diaphragm", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — Embryological Development
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Embryological Development of the Diaphragm");
addSlideNumber(s, 9);
// 4 components flowchart style
const components = [
{ no:"1", name:"Septum Transversum", week:"Wk 4", desc:"Mesodermal plate from C3-C5 level. Forms central tendon. Most dominant component.", color:C.darkBlue },
{ no:"2", name:"Pleuroperitoneal Membranes", week:"Wk 5–6", desc:"Close pleuroperitoneal canals (right closes first). Failure → Bochdalek hernia.", color:C.midBlue },
{ no:"3", name:"Dorsal Mesentery of Esophagus", week:"Wk 6", desc:"Contributes to the crura of the diaphragm around the esophageal hiatus.", color:C.lightBlue },
{ no:"4", name:"Body Wall Musculature", week:"Wk 7–8", desc:"Muscular ingrowth from lateral body walls (myotomes) — peripheral muscular part.", color:"1976D2" },
];
components.forEach((c, i) => {
const x = 0.2 + (i % 2) * 2.82;
const y = 0.88 + Math.floor(i / 2) * 1.95;
s.addShape(pres.ShapeType.rect, { x, y, w:2.6, h:1.78, fill:{color:C.white}, line:{color:c.color, width:1.5} });
s.addShape(pres.ShapeType.rect, { x, y, w:2.6, h:0.5, fill:{color:c.color}, line:{color:c.color} });
// Number badge
s.addShape(pres.ShapeType.ellipse, { x:x+0.05, y:y+0.07, w:0.36, h:0.36, fill:{color:C.accent}, line:{color:C.accent} });
s.addText(c.no, { x:x+0.05, y:y+0.07, w:0.36, h:0.36, fontSize:10, bold:true, color:C.darkBlue, align:"center", valign:"middle", fontFace:"Calibri" });
s.addText(c.name, { x:x+0.45, y, w:2.1, h:0.5, fontSize:10, bold:true, color:C.white, valign:"middle", fontFace:"Calibri" });
s.addText("Week: " + c.week, { x:x+0.1, y:y+0.53, w:2.4, h:0.28, fontSize:9, bold:true, color:c.color, fontFace:"Calibri" });
s.addText(c.desc, { x:x+0.1, y:y+0.82, w:2.4, h:0.92, fontSize:9, color:C.textDark, fontFace:"Calibri", valign:"top" });
});
addImage(s, "embryology", 5.85, 0.88, 3.85, 3.5, "Diaphragm Embryology Development Diagram");
s.addText("Septum transversum, PPF & CDH development timeline", {
x:5.85, y:4.42, w:3.85, h:0.35, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
// Anomaly bar
s.addShape(pres.ShapeType.rect, { x:0.2, y:4.87, w:5.5, h:0.35, fill:{color:"B71C1C"}, line:{color:"B71C1C"} });
s.addText("⚠ CDH: Failure of pleuroperitoneal membranes to fuse → Bochdalek hernia (posterolateral, more common on left)", {
x:0.3, y:4.87, w:5.3, h:0.35, fontSize:8.5, bold:true, color:C.white, valign:"middle", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — Movements During Respiration
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Movements During Respiration");
addSlideNumber(s, 10);
// Inspiration column
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:2.6, h:4.18, fill:{color:C.white}, line:{color:C.midBlue, width:1.5} });
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:2.6, h:0.5, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("INSPIRATION", { x:0.2, y:0.88, w:2.6, h:0.5, fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Diaphragm CONTRACTS",
"Dome descends 1.5 cm (quiet) up to 10 cm (forced)",
"Central tendon descends",
"Vertical diameter ↑",
"Intrathoracic pressure ↓",
"Air flows INTO lungs",
"Abdominal organs pushed down",
], { x:0.3, y:1.45, w:2.4, h:3.3, fontSize:10.5, color:C.textDark });
// Expiration column
s.addShape(pres.ShapeType.rect, { x:2.95, y:0.88, w:2.6, h:4.18, fill:{color:C.white}, line:{color:"1976D2", width:1.5} });
s.addShape(pres.ShapeType.rect, { x:2.95, y:0.88, w:2.6, h:0.5, fill:{color:"1976D2"}, line:{color:"1976D2"} });
s.addText("EXPIRATION", { x:2.95, y:0.88, w:2.6, h:0.5, fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Diaphragm RELAXES",
"Dome ascends (passive recoil)",
"Elastic recoil of lungs",
"Vertical diameter ↓",
"Intrathoracic pressure ↑",
"Air flows OUT of lungs",
"Forced: abdominal muscles assist",
], { x:3.05, y:1.45, w:2.4, h:3.3, fontSize:10.5, color:C.textDark });
// Volume changes column
s.addShape(pres.ShapeType.rect, { x:5.7, y:0.88, w:4.1, h:4.0, fill:{color:C.white}, line:{color:C.divider, width:1} });
s.addShape(pres.ShapeType.rect, { x:5.7, y:0.88, w:4.1, h:0.5, fill:{color:C.darkBlue}, line:{color:C.darkBlue} });
s.addText("THORACIC VOLUME CHANGES", { x:5.7, y:0.88, w:4.1, h:0.5, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Diaphragm = 75% of quiet tidal volume",
"Tidal volume ≈ 500 mL at rest",
"Vital capacity: ~3500 mL",
"Diaphragm excursion: 1.5–3 cm quiet; up to 10 cm forced",
"Right dome higher than left (liver pushes it up)",
"Left dome at level of T9 spinous process (lower)",
"MRI/US: real-time excursion assessment",
], { x:5.8, y:1.45, w:3.9, h:3.2, fontSize:10.5, color:C.textDark });
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — Relations of Diaphragm
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Relations of the Diaphragm");
addSlideNumber(s, 11);
// Thoracic (superior) surface
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:5.5, h:0.42, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("Superior (Thoracic) Surface", { x:0.2, y:0.88, w:5.5, h:0.42,
fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Pleura — covers most of superior surface",
"Pericardium — fused with central tendon",
"Heart (via pericardium) — related to central tendon",
"Bases of both lungs through pleura",
], { x:0.3, y:1.35, w:5.3, h:1.3, fontSize:11, color:C.textDark });
// Abdominal (inferior) surface
s.addShape(pres.ShapeType.rect, { x:0.2, y:2.75, w:5.5, h:0.42, fill:{color:"0D47A1"}, line:{color:"0D47A1"} });
s.addText("Inferior (Abdominal) Surface", { x:0.2, y:2.75, w:5.5, h:0.42,
fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Right dome — Liver (right lobe), gallbladder",
"Left dome — Stomach, spleen, left lobe of liver",
"Peritoneum covers most of inferior surface",
"Suprarenal glands and kidneys (retroperitoneal)",
], { x:0.3, y:3.22, w:5.3, h:1.2, fontSize:11, color:C.textDark });
// Clinical note
s.addShape(pres.ShapeType.rect, { x:0.2, y:4.5, w:5.5, h:0.38, fill:{color:C.accent}, line:{color:C.accent} });
s.addText("Right dome higher (liver) → right-sided pneumonia can mimic acute abdomen (referred pain via phrenic)", {
x:0.3, y:4.5, w:5.3, h:0.38, fontSize:9.5, bold:true, color:C.darkBlue, valign:"middle", fontFace:"Calibri",
});
addImage(s, "diaphragmSuperior", 5.9, 0.85, 3.8, 4.05, "Superior and Inferior Diaphragm Relations");
s.addText("Superior view — thoracic relations with labeled structures", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — Histology
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Histology of the Diaphragm");
addSlideNumber(s, 12);
// Muscle section
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.88, w:5.5, h:0.42, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("Muscular Part — Skeletal Muscle", { x:0.2, y:0.88, w:5.5, h:0.42,
fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Striated (voluntary) skeletal muscle fibers",
"Mix of Type I (slow twitch, fatigue-resistant) and Type II fibers",
"Type I fibers predominate — sustained respiratory function",
"Rich capillary network — high oxidative capacity",
"Neuromuscular junctions from phrenic nerve terminals",
], { x:0.3, y:1.35, w:5.3, h:1.5, fontSize:11, color:C.textDark });
// Tendon section
s.addShape(pres.ShapeType.rect, { x:0.2, y:2.92, w:5.5, h:0.42, fill:{color:"0D47A1"}, line:{color:"0D47A1"} });
s.addText("Central Tendon — Dense Fibrous Tissue", { x:0.2, y:2.92, w:5.5, h:0.42,
fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Dense regular connective tissue (collagen type I)",
"No muscle fibers present",
"Continuous with fibrous pericardium superiorly",
"Stains eosinophilic (pink) on H&E",
"Tenocytes between collagen bundles",
], { x:0.3, y:3.4, w:5.3, h:1.35, fontSize:11, color:C.textDark });
// Histology image placeholder with color box
addImage(s, "phrenicNerve", 5.9, 0.85, 3.8, 4.05, "Diaphragm Histology — Skeletal Muscle & Tendon");
s.addText("Phrenic nerve branching on diaphragm surface (experimental preparation)", {
x:5.9, y:4.92, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — Applied Anatomy
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Applied Anatomy — Clinical Correlations");
addSlideNumber(s, 13);
const conditions = [
{
name: "Congenital Diaphragmatic Hernia (CDH)",
type:"Bochdalek", color:C.darkBlue,
points:["Posterolateral defect (L > R)", "Pleuroperitoneal membrane failure", "Bowel/stomach in thorax", "Pulmonary hypoplasia"],
},
{
name: "Hiatal Hernia",
type:"Sliding (95%)", color:C.midBlue,
points:["Stomach herniates through esophageal hiatus", "Type I: Sliding; Type II–IV: Paraesophageal", "GERD, dysphagia", "Treated surgically (Nissen fundoplication)"],
},
{
name: "Eventration",
type:"Partial/Complete", color:"1976D2",
points:["Abnormally elevated hemidiaphragm", "Failure of muscular development", "Often asymptomatic", "Right-sided more common"],
},
{
name: "Phrenic Nerve Palsy",
type:"Unilateral/Bilateral", color:"0D47A1",
points:["Paralysis of hemidiaphragm", "Paradoxical movement on fluoroscopy", "Causes: surgery, tumor, trauma", "Raised hemidiaphragm on CXR"],
},
];
conditions.forEach((c, i) => {
const x = 0.2 + (i % 2) * 2.85;
const y = 0.88 + Math.floor(i / 2) * 2.05;
s.addShape(pres.ShapeType.rect, { x, y, w:2.6, h:1.9, fill:{color:C.white}, line:{color:c.color, width:1.5} });
s.addShape(pres.ShapeType.rect, { x, y, w:2.6, h:0.5, fill:{color:c.color}, line:{color:c.color} });
s.addText(c.name, { x:x+0.05, y, w:2.5, h:0.5, fontSize:9.5, bold:true, color:C.white, valign:"middle", fontFace:"Calibri" });
bulletList(s, c.points, { x:x+0.05, y:y+0.52, w:2.5, h:1.35, fontSize:9, color:C.textDark });
});
addImage(s, "herniaXray", 5.9, 0.88, 3.8, 4.05, "Diaphragmatic Hernia X-ray");
s.addText("AP CXR — diaphragmatic hernia with intrathoracic stomach", {
x:5.9, y:4.95, w:3.8, h:0.25, fontSize:8, color:C.textGray, italic:true,
align:"center", fontFace:"Calibri",
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — Imaging and Diagnosis
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
addSlideHeader(s, "Imaging and Diagnosis of the Diaphragm");
addSlideNumber(s, 14);
const modalities = [
{ name:"X-Ray (CXR)", color:C.darkBlue, points:["Right dome at 5th–6th rib anteriorly", "Left dome 2 cm lower than right", "Raised hemidiaphragm in palsy", "Air-fluid level in hernias"] },
{ name:"CT Scan", color:C.midBlue, points:["Best for structure & defects", "Identifies hernias, masses, rupture", "Thin curvilinear structure at TI", "IV contrast for vascular supply"] },
{ name:"Ultrasound", color:"1976D2", points:["Real-time excursion measurement", "Diaphragm thickness assessment", "Point-of-care (POCUS)", "No radiation — ideal for ICU"] },
{ name:"MRI", color:"0D47A1", points:["Superior soft tissue contrast", "Cine-MRI for motion studies", "T2W: high signal in muscle", "No radiation — multiplanar"] },
];
modalities.forEach((m, i) => {
const x = 0.15 + i * 2.42;
s.addShape(pres.ShapeType.rect, { x, y:0.88, w:2.25, h:3.6, fill:{color:C.white}, line:{color:m.color, width:1.5} });
s.addShape(pres.ShapeType.rect, { x, y:0.88, w:2.25, h:0.48, fill:{color:m.color}, line:{color:m.color} });
s.addText(m.name, { x:x+0.05, y:0.88, w:2.15, h:0.48, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, m.points, { x:x+0.07, y:1.4, w:2.1, h:3.0, fontSize:9.5, color:C.textDark });
});
// Bottom image strip
s.addShape(pres.ShapeType.rect, { x:0.15, y:4.55, w:9.7, h:0.6, fill:{color:C.paleBlue}, line:{color:C.divider} });
addImage(s, "ctMRI", 0.15, 4.55, 4.7, 0.6, "CT vs MRI comparison");
addImage(s, "ultrasound", 5.0, 4.55, 4.7, 0.6, "Ultrasound POCUS");
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — Conclusion & References
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full dark background
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.darkBlue}, line:{color:C.darkBlue} });
// Accent stripe
s.addShape(pres.ShapeType.rect, { x:0, y:0.68, w:10, h:0.07, fill:{color:C.accent}, line:{color:C.accent} });
s.addText("Conclusion & References", {
x:0.3, y:0.1, w:9.4, h:0.6,
fontSize:20, bold:true, color:C.white, fontFace:"Calibri",
});
// Summary column
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.85, w:5.0, h:3.2, fill:{color:"132F6B"}, line:{color:C.divider, width:1} });
s.addShape(pres.ShapeType.rect, { x:0.2, y:0.85, w:5.0, h:0.42, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("Key Summary Points", { x:0.2, y:0.85, w:5.0, h:0.42, fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
bulletList(s, [
"Musculotendinous partition at T8–T12 level",
"3 parts: sternal, costal, lumbar + central tendon",
"3 openings: IVC (T8), Esophagus (T10), Aorta (T12)",
"Phrenic nerve C3,4,5 = sole motor supply",
"Primary muscle of quiet respiration (75%)",
"4 embryological components — failure → CDH",
"Blood supply: inferior phrenic aa. (main)",
"Clinical: hernias, palsy, eventration key MCQ topics",
], { x:0.3, y:1.32, w:4.8, h:2.6, fontSize:10.5, color:C.paleBlue });
// References column
s.addShape(pres.ShapeType.rect, { x:5.35, y:0.85, w:4.45, h:3.2, fill:{color:"132F6B"}, line:{color:C.divider, width:1} });
s.addShape(pres.ShapeType.rect, { x:5.35, y:0.85, w:4.45, h:0.42, fill:{color:C.midBlue}, line:{color:C.midBlue} });
s.addText("References", { x:5.35, y:0.85, w:4.45, h:0.42, fontSize:12, bold:true, color:C.white, align:"center", valign:"middle", fontFace:"Calibri" });
const refs = [
{ num:"1", text:"Gray's Anatomy, 42nd Ed. — Standring S. Chapter: Thorax" },
{ num:"2", text:"Netter's Atlas of Human Anatomy, 8th Ed. — Plates 182–188" },
{ num:"3", text:"Snell's Clinical Anatomy by Regions, 10th Ed." },
{ num:"4", text:"Moore's Clinically Oriented Anatomy, 8th Ed." },
{ num:"5", text:"Last's Anatomy, 9th Ed. — Regional & Applied" },
{ num:"6", text:"Sadler's Langman's Medical Embryology, 14th Ed." },
];
refs.forEach((r, i) => {
const y = 1.35 + i * 0.44;
s.addShape(pres.ShapeType.ellipse, { x:5.45, y:y+0.06, w:0.28, h:0.28, fill:{color:C.accent}, line:{color:C.accent} });
s.addText(r.num, { x:5.45, y:y+0.06, w:0.28, h:0.28, fontSize:8, bold:true, color:C.darkBlue, align:"center", valign:"middle", fontFace:"Calibri" });
s.addText(r.text, { x:5.8, y, w:3.85, h:0.42, fontSize:9, color:C.paleBlue, fontFace:"Calibri", valign:"middle" });
});
// Thank you banner
s.addShape(pres.ShapeType.rect, { x:0.2, y:4.15, w:9.6, h:0.9, fill:{color:C.accent}, line:{color:C.accent} });
s.addText("THANK YOU", {
x:0.2, y:4.15, w:9.6, h:0.5,
fontSize:28, bold:true, color:C.darkBlue, align:"center", valign:"middle", fontFace:"Calibri", charSpacing:8,
});
s.addText("Questions & Discussion Welcome", {
x:0.2, y:4.65, w:9.6, h:0.4,
fontSize:12, color:C.darkBlue, align:"center", valign:"middle", fontFace:"Calibri", italic:true,
});
addFooter(s);
// Override footer with slide number
addSlideNumber(s, 15);
}
// ─── Write File ───────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/diaphragm-pptx/Diaphragm_Anatomy_Darshan_Benke.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("✅ Presentation saved to:", outPath);
}).catch(err => {
console.error("❌ Error writing file:", err);
process.exit(1);
});
cd /home/daytona/workspace/diaphragm-pptx && node create_pptx.js 2>&1