Skin flap physiology from Cummings
Q = πr⁴(ΔP) / 8ηl
| Factor | Clinical Action |
|---|---|
| Systemic BP | Avoid hypotension and vasoconstriction |
| Tissue pressure | Avoid excess tension, edema, fluid overload |
| Vessel radius | Base flaps on large named vessels; use flap delay; free tissue transfer |
| Blood viscosity | Maintain hydration; target low-normal hematocrit |
| Flap length | Longer flaps = more resistance = greater risk of distal necrosis |

Key myth dispelled: A wider base in a random flap adds vessels with the same perfusion pressure — it does NOT change the relationship between perfusion pressure and critical closing pressure, and does NOT increase survival length.
| Zone | Compartment | Key Determinants |
|---|---|---|
| Zone I — Macrocirculatory | Large vessels, pedicle, anastomosis | Systemic BP, vessel patency |
| Zone II — Microcirculatory | Arterioles, capillaries, venules | Tissue pressure, sphincter tone, A-V shunts |
| Zone III — Interstitial | Extracellular matrix, lymphatics | Starling forces, edema, diffusion distances |
Jv/A = Lp[(Pi − Pi) − σ(πi − πi)]

| Flap Type | Blood Supply | Plane of Dissection | Notes |
|---|---|---|---|
| Random cutaneous | Subdermal plexus from unnamed musculocutaneous perforators | Subcutaneous fat | Survival = function of PP, NOT length:width ratio |
| Arterial (axial) cutaneous | Named septocutaneous artery along longitudinal axis | Must include septocutaneous vessel | Better survival than random; distal extension = random territory |
| Fasciocutaneous | Septocutaneous vessels → deep fascial plexus → subdermal plexus | Deep fascia included | Relies on skin vascular territories; 4 subtypes based on fascial supply pattern |
| Musculocutaneous / Myocutaneous | Segmental vessels to muscle → musculocutaneous perforators | Muscle incorporated | Best survival; leaves local perforators intact; named for donor muscle |
| Zone | Monitoring | Salvage |
|---|---|---|
| Zone I (macrocirculatory) | Doppler, near-infrared spectroscopy, temperature | Explore pedicle/anastomosis; thrombosis treatment |
| Zone II (microcirculatory) | Doppler, tissue oxygenation, tissue pressure | Vascular washout; reduce edema |
| Zone III (interstitial) | Clinical assessment | Address Starling forces, reduce edema |
Make a ppt
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace is empty"
mkdir -p /home/daytona/workspace/skin-flap-ppt && node /home/daytona/skills/shar…
~/skin-flap-ppt/generate.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images
const images = JSON.parse(execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ` +
`"https://cdn.orris.care/cdss_images/d0a512d589cd28d792911d65f39b832f4c28f68db7b1f5c791afa3e2267bd9bc.png" ` +
`"https://cdn.orris.care/cdss_images/4849dcb2ef6c4152e12631aca3798c9760b67d2a3336332ed02be715a1ece884.png"`
).toString());
const imgFlap = images[0].base64;
const imgClass = images[1].base64;
// Color palette — deep surgical blue & warm anatomical tones
const C = {
bg: "0D1B2A", // deep navy
panel: "162436", // slightly lighter navy for cards
accent: "E63946", // surgical red accent
gold: "F4A261", // warm gold for highlights
teal: "2EC4B6", // teal for sub-accents
white: "FFFFFF",
offwhite: "E8EEF4",
grey: "8FA3B1",
lightblue: "A8DADC",
};
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Skin Flap Physiology";
pres.author = "Cummings Otolaryngology";
// ─── Helper: slide background ─────────────────────────────────────────────
function addBg(slide) {
slide.background = { color: C.bg };
}
// ─── Helper: accent bar top ───────────────────────────────────────────────
function addTopBar(slide, accent = C.accent) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 0.08,
fill: { color: accent }, line: { color: accent }
});
}
// ─── Helper: section label pill ──────────────────────────────────────────
function pill(slide, label, x, y, w = 2.5, color = C.accent) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h: 0.32,
fill: { color }, line: { color }, rectRadius: 0.08
});
slide.addText(label, {
x, y, w, h: 0.32,
fontSize: 9, bold: true, color: C.white,
align: "center", valign: "middle", margin: 0
});
}
// ─── Helper: card box ─────────────────────────────────────────────────────
function card(slide, x, y, w, h, fillColor = C.panel) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill: { color: fillColor },
line: { color: "1E3A50", width: 0.5 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.3 }
});
}
// ─── SLIDE 1: TITLE ──────────────────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
// Bold red accent bar left
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.18, h: 5.625,
fill: { color: C.accent }, line: { color: C.accent }
});
// Subtle anatomy illustration background shape
s.addShape(pres.shapes.RECTANGLE, {
x: 5.5, y: 0, w: 4.5, h: 5.625,
fill: { color: "0A1520" }, line: { color: "0A1520" }
});
// Title
s.addText("Skin Flap", {
x: 0.6, y: 1.2, w: 5, h: 0.9,
fontSize: 52, bold: true, color: C.white,
fontFace: "Calibri", charSpacing: 2
});
s.addText("Physiology", {
x: 0.6, y: 2.05, w: 5, h: 0.9,
fontSize: 52, bold: true, color: C.accent,
fontFace: "Calibri", charSpacing: 2
});
s.addText("Vascular Supply · Perfusion Physics · Flap Classification · Failure & Salvage", {
x: 0.6, y: 3.1, w: 5, h: 0.5,
fontSize: 13, color: C.grey, italic: true, fontFace: "Calibri"
});
// Source badge
card(s, 0.6, 4.3, 4.5, 0.7);
s.addText("Source: Cummings Otolaryngology Head & Neck Surgery · Chapter 77", {
x: 0.6, y: 4.3, w: 4.5, h: 0.7,
fontSize: 10, color: C.lightblue, align: "center", valign: "middle"
});
// Right panel decorative lines
for (let i = 0; i < 6; i++) {
s.addShape(pres.shapes.RECTANGLE, {
x: 5.8, y: 0.6 + i * 0.72, w: 3.8, h: 0.04,
fill: { color: i === 0 ? C.accent : "1E3A50" },
line: { color: i === 0 ? C.accent : "1E3A50" }
});
}
s.addText("OTOLARYNGOLOGY\nHEAD & NECK SURGERY", {
x: 5.5, y: 1.5, w: 4.2, h: 1.2,
fontSize: 22, bold: true, color: "1E3A50",
align: "center", valign: "middle"
});
s.addText("SKIN FLAP\nPHYSIOLOGY", {
x: 5.5, y: 2.7, w: 4.2, h: 1.4,
fontSize: 36, bold: true, color: C.teal,
align: "center", valign: "middle", charSpacing: 3
});
}
// ─── SLIDE 2: OVERVIEW / AGENDA ──────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.teal);
pill(s, "OVERVIEW", 0.4, 0.18, 1.8, C.teal);
s.addText("What We Will Cover", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 30, bold: true, color: C.white, fontFace: "Calibri"
});
const topics = [
{ n: "01", title: "Physics of Flow", sub: "Hagen-Poiseuille · Perfusion Pressure · Resistance", col: C.accent },
{ n: "02", title: "Critical Closing Pressure", sub: "LaPlace's Law · Flap Length vs. Viability", col: C.gold },
{ n: "03", title: "Zones of Perfusion", sub: "Macrocirculation · Microcirculation · Interstitium", col: C.teal },
{ n: "04", title: "Flap Classification", sub: "Random · Axial · Fasciocutaneous · Myocutaneous", col: C.lightblue },
{ n: "05", title: "Flap Failure & Salvage", sub: "Risk Factors · Monitoring · HBO · Delay", col: C.accent },
];
topics.forEach((t, i) => {
const x = 0.3 + (i % 3) * 3.2;
const y = i < 3 ? 1.5 : 3.2;
const w = 2.9;
card(s, x, y, w, 1.4);
// number
s.addText(t.n, {
x: x + 0.15, y: y + 0.1, w: 0.5, h: 0.5,
fontSize: 22, bold: true, color: t.col, margin: 0
});
s.addText(t.title, {
x: x + 0.15, y: y + 0.55, w: w - 0.3, h: 0.4,
fontSize: 13, bold: true, color: C.white, margin: 0
});
s.addText(t.sub, {
x: x + 0.15, y: y + 0.95, w: w - 0.3, h: 0.38,
fontSize: 9, color: C.grey, margin: 0
});
});
}
// ─── SLIDE 3: PHYSICS OF FLOW ─────────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.accent);
pill(s, "PHYSICS OF FLOW", 0.4, 0.18, 2.2, C.accent);
s.addText("Hagen-Poiseuille Equation", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
// Formula box
card(s, 0.4, 1.35, 9.2, 1.05, "0A1520");
s.addShape(pres.shapes.RECTANGLE, {
x: 0.4, y: 1.35, w: 0.06, h: 1.05,
fill: { color: C.accent }, line: { color: C.accent }
});
s.addText("Q = π r⁴ · ΔP / 8ηl", {
x: 0.8, y: 1.35, w: 4, h: 1.05,
fontSize: 30, bold: true, color: C.gold, align: "left", valign: "middle"
});
s.addText([
{ text: "Q", options: { bold: true, color: C.gold } },
{ text: " = Flow ", options: { color: C.offwhite } },
{ text: "r⁴", options: { bold: true, color: C.gold } },
{ text: " = Vessel radius (4th power)\n", options: { color: C.offwhite } },
{ text: "ΔP", options: { bold: true, color: C.gold } },
{ text: " = Perfusion pressure ", options: { color: C.offwhite } },
{ text: "η", options: { bold: true, color: C.gold } },
{ text: " = Viscosity ", options: { color: C.offwhite } },
{ text: "l", options: { bold: true, color: C.gold } },
{ text: " = Length", options: { color: C.offwhite } },
], { x: 4.5, y: 1.35, w: 5, h: 1.05, fontSize: 11, valign: "middle" });
// Perfusion pressure box
card(s, 0.4, 2.55, 4.3, 0.75, "0A1520");
s.addText("Perfusion Pressure = P_diastolic − P_tissue", {
x: 0.4, y: 2.55, w: 4.3, h: 0.75,
fontSize: 13, bold: true, color: C.teal, align: "center", valign: "middle"
});
// Clinical goals
const goals = [
{ icon: "↑", label: "Maintain systemic BP", detail: "Avoid hypotension & vasoconstriction" },
{ icon: "↓", label: "Minimize tissue pressure", detail: "No excess tension, edema or fluid overload" },
{ icon: "⊕", label: "Maximize vessel radius", detail: "Base on named vessels; use delay or free transfer" },
{ icon: "↓", label: "Lower blood viscosity", detail: "Hydration · Low-normal hematocrit" },
{ icon: "↓", label: "Minimize flap length", detail: "Longer flap = more resistance = distal risk" },
];
goals.forEach((g, i) => {
const x = 0.35 + (i % 3) * 3.1;
const y = i < 3 ? 3.42 : 4.52;
const yw = i >= 3 ? 3.4 : 3.1;
card(s, x, y, i >= 3 ? yw - 0.1 : 2.9, 0.85);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: x + 0.1, y: y + 0.17, w: 0.38, h: 0.38,
fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.05
});
s.addText(g.icon, {
x: x + 0.1, y: y + 0.17, w: 0.38, h: 0.38,
fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle", margin: 0
});
s.addText(g.label, {
x: x + 0.55, y: y + 0.08, w: (i >= 3 ? yw - 0.1 : 2.9) - 0.65, h: 0.35,
fontSize: 11, bold: true, color: C.white, margin: 0
});
s.addText(g.detail, {
x: x + 0.55, y: y + 0.44, w: (i >= 3 ? yw - 0.1 : 2.9) - 0.65, h: 0.3,
fontSize: 9, color: C.grey, margin: 0
});
});
}
// ─── SLIDE 4: CRITICAL CLOSING PRESSURE ──────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.gold);
pill(s, "CRITICAL CLOSING PRESSURE", 0.4, 0.18, 3.2, C.gold);
s.addText("Flap Length vs. Perfusion Pressure", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
// Chart image (left)
if (imgFlap) {
s.addImage({ data: imgFlap, x: 0.3, y: 1.35, w: 5.2, h: 3.6 });
}
// Concepts (right column)
const concepts = [
{
title: "LaPlace's Law",
body: "Surface tension on vessel walls ↑ with radius → explains vessel dilation and development of collateral flow (basis for flap delay)"
},
{
title: "Critical Closing Pressure",
body: "When tissue pressure exceeds intracapillary pressure → capillary collapse → flow ceases. This threshold defines the necrotic zone."
},
{
title: "Width ≠ Safety",
body: "Wider random flap base adds vessels with the SAME perfusion pressure — does NOT change survival length. PP:CCP ratio is unchanged."
},
];
concepts.forEach((c, i) => {
card(s, 5.7, 1.35 + i * 1.3, 4.05, 1.15);
s.addShape(pres.shapes.RECTANGLE, {
x: 5.7, y: 1.35 + i * 1.3, w: 0.06, h: 1.15,
fill: { color: C.gold }, line: { color: C.gold }
});
s.addText(c.title, {
x: 5.85, y: 1.4 + i * 1.3, w: 3.8, h: 0.35,
fontSize: 13, bold: true, color: C.gold, margin: 0
});
s.addText(c.body, {
x: 5.85, y: 1.75 + i * 1.3, w: 3.8, h: 0.65,
fontSize: 10, color: C.offwhite, margin: 0
});
});
s.addText("Fig. 77.1 — Viable, At-Risk, and Necrotic zones along flap length", {
x: 0.3, y: 4.95, w: 5.2, h: 0.3,
fontSize: 8, italic: true, color: C.grey, align: "center"
});
}
// ─── SLIDE 5: ZONES OF PERFUSION ─────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.teal);
pill(s, "ZONES OF PERFUSION", 0.4, 0.18, 2.4, C.teal);
s.addText("Three-Zone Model of Flap Vascularity", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
const zones = [
{
num: "I",
label: "Macrocirculatory",
color: C.accent,
items: [
"Large vessels, pedicle, anastomosis",
"Governed by systemic BP & vessel patency",
"Monitor: Doppler, near-infrared spectroscopy, temperature",
"Salvage: Explore pedicle / re-anastomose / thrombectomy",
]
},
{
num: "II",
label: "Microcirculatory",
color: C.gold,
items: [
"Arterioles → metarterioles → precapillary sphincters",
"A-V shunts bypass nutritive capillary flow",
"Precapillary sphincters regulate nutritive blood flow",
"Monitor: tissue oxygenation, tissue pressure",
"Salvage: vascular washout, reduce edema",
]
},
{
num: "III",
label: "Interstitial",
color: C.teal,
items: [
"Proteoglycans, collagen, hyaluronic acid matrix",
"Starling forces govern transcapillary flow",
"Diffusion (small molecules) & convection (bulk flow)",
"Edema ↑ diffusion distances → ↓ nutrient delivery",
"Salvage: optimize Starling forces, reduce edema",
]
},
];
zones.forEach((z, i) => {
const x = 0.22 + i * 3.25;
card(s, x, 1.38, 3.1, 3.95);
// header
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y: 1.38, w: 3.1, h: 0.62,
fill: { color: z.color }, line: { color: z.color }, rectRadius: 0.1
});
s.addText(`Zone ${z.num}`, {
x: x + 0.12, y: 1.38, w: 0.65, h: 0.62,
fontSize: 22, bold: true, color: C.bg, valign: "middle", margin: 0
});
s.addText(z.label, {
x: x + 0.75, y: 1.38, w: 2.25, h: 0.62,
fontSize: 12, bold: true, color: C.bg, valign: "middle", margin: 0
});
// bullets
z.items.forEach((item, j) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: x + 0.18, y: 2.12 + j * 0.56, w: 0.22, h: 0.22,
fill: { color: z.color }, line: { color: z.color }, rectRadius: 0.04
});
s.addText(item, {
x: x + 0.48, y: 2.08 + j * 0.56, w: 2.5, h: 0.48,
fontSize: 9.5, color: C.offwhite, valign: "top", margin: 0
});
});
});
}
// ─── SLIDE 6: STARLING EQUATION ──────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.teal);
pill(s, "ZONE III — INTERSTITIUM", 0.4, 0.18, 2.6, C.teal);
s.addText("Starling Forces & Capillary Exchange", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
// Starling equation box
card(s, 0.4, 1.38, 9.2, 1.0, "0A1520");
s.addShape(pres.shapes.RECTANGLE, {
x: 0.4, y: 1.38, w: 0.06, h: 1.0,
fill: { color: C.teal }, line: { color: C.teal }
});
s.addText("Jv/A = Lp [ (Pc − Pi) − σ(πc − πi) ]", {
x: 0.7, y: 1.38, w: 9, h: 1.0,
fontSize: 22, bold: true, color: C.teal, valign: "middle"
});
// Legend table
const terms = [
{ sym: "Jv/A", def: "Plasma flow out of capillary per unit area" },
{ sym: "Lp", def: "Membrane water permeability" },
{ sym: "Pc − Pi", def: "Hydrostatic pressure gradient (capillary − interstitium)" },
{ sym: "πc − πi", def: "Osmotic pressure gradient (capillary − interstitium)" },
{ sym: "σ", def: "Osmotic reflection coefficient (membrane 'leakiness')" },
];
terms.forEach((t, i) => {
const x = i < 3 ? 0.4 : 5.1;
const y = i < 3 ? 2.55 + i * 0.62 : 2.55 + (i - 3) * 0.62;
const w = 4.4;
card(s, x, y, w, 0.52);
s.addText(t.sym, {
x: x + 0.15, y, w: 0.9, h: 0.52,
fontSize: 14, bold: true, color: C.gold, valign: "middle", margin: 0
});
s.addText(t.def, {
x: x + 1.05, y, w: w - 1.2, h: 0.52,
fontSize: 10, color: C.offwhite, valign: "middle", margin: 0
});
});
// Two mechanisms
const mechs = [
{ t: "Diffusion", d: "Dominant for SMALL molecules under normal conditions. Edema ↑ diffusion distances → ↓ nutrient delivery to cells." },
{ t: "Convective Flow", d: "Bulk flow sweeps molecules along microchannels regardless of concentration gradient. Important for LARGE molecules." },
];
mechs.forEach((m, i) => {
card(s, 0.4 + i * 4.8, 4.55, 4.6, 0.82);
s.addShape(pres.shapes.RECTANGLE, {
x: 0.4 + i * 4.8, y: 4.55, w: 0.06, h: 0.82,
fill: { color: i === 0 ? C.accent : C.gold },
line: { color: i === 0 ? C.accent : C.gold }
});
s.addText(m.t, {
x: 0.6 + i * 4.8, y: 4.58, w: 4.2, h: 0.3,
fontSize: 13, bold: true, color: i === 0 ? C.accent : C.gold, margin: 0
});
s.addText(m.d, {
x: 0.6 + i * 4.8, y: 4.88, w: 4.2, h: 0.44,
fontSize: 9.5, color: C.offwhite, margin: 0
});
});
}
// ─── SLIDE 7: FLAP CLASSIFICATION ────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.lightblue);
pill(s, "FLAP CLASSIFICATION", 0.4, 0.18, 2.4, "2A7D8A");
s.addText("Classification by Vascular Supply", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
// Image right
if (imgClass) {
s.addImage({ data: imgClass, x: 5.2, y: 1.3, w: 4.5, h: 3.8 });
}
const flaps = [
{
type: "Random Cutaneous",
supply: "Subdermal plexus from unnamed musculocutaneous perforators",
plane: "Subcutaneous fat",
note: "Survival = perfusion pressure, NOT length:width ratio",
col: C.accent
},
{
type: "Arterial (Axial)",
supply: "Named septocutaneous artery along flap axis",
plane: "Must include septocutaneous vessel",
note: "Distal extension beyond named artery = random territory",
col: C.gold
},
{
type: "Fasciocutaneous",
supply: "Septocutaneous vessels → deep fascial plexus → subdermal plexus",
plane: "Deep fascia included",
note: "4 subtypes; relies on skin vascular territories",
col: C.teal
},
{
type: "Musculocutaneous",
supply: "Segmental vessels to muscle → musculocutaneous perforators",
plane: "Muscle incorporated",
note: "Best survival; leaves local perforators intact",
col: C.lightblue
},
];
flaps.forEach((f, i) => {
card(s, 0.25, 1.3 + i * 1.0, 4.75, 0.88);
s.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 1.3 + i * 1.0, w: 0.06, h: 0.88,
fill: { color: f.col }, line: { color: f.col }
});
s.addText(f.type, {
x: 0.4, y: 1.33 + i * 1.0, w: 4.4, h: 0.28,
fontSize: 12, bold: true, color: f.col, margin: 0
});
s.addText(`Supply: ${f.supply}`, {
x: 0.4, y: 1.6 + i * 1.0, w: 4.4, h: 0.24,
fontSize: 8.5, color: C.offwhite, margin: 0
});
s.addText(`▶ ${f.note}`, {
x: 0.4, y: 1.84 + i * 1.0, w: 4.4, h: 0.24,
fontSize: 8.5, color: C.grey, italic: true, margin: 0
});
});
s.addText("Fig. 77.5 — Vascular supply patterns for each flap type", {
x: 5.2, y: 5.12, w: 4.5, h: 0.25,
fontSize: 8, italic: true, color: C.grey, align: "center"
});
}
// ─── SLIDE 8: HEAD & NECK EXAMPLES ───────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.gold);
pill(s, "H&N EXAMPLES", 0.4, 0.18, 1.8, C.gold);
s.addText("Common Head & Neck Flaps", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
const examples = [
{ flap: "Deltopectoral Flap", type: "Arterial (Axial)", vessel: "Anterior perforators of internal mammary artery", col: C.gold },
{ flap: "Paramedian Forehead Flap", type: "Arterial (Axial)", vessel: "Supratrochlear vessels", col: C.gold },
{ flap: "Pectoralis Major Myocutaneous", type: "Musculocutaneous", vessel: "Pectoral branch of thoracoacromial artery", col: C.lightblue },
{ flap: "Latissimus Dorsi Flap", type: "Musculocutaneous", vessel: "Thoracodorsal artery (segmental supply)", col: C.lightblue },
{ flap: "Radial Forearm Free Flap", type: "Free Tissue Transfer", vessel: "Radial artery", col: C.teal },
{ flap: "Fibula Free Flap", type: "Osteocutaneous Free Flap", vessel: "Peroneal artery", col: C.teal },
];
examples.forEach((e, i) => {
const col = i % 2 === 0 ? 0.3 : 5.1;
const row = Math.floor(i / 2);
card(s, col, 1.5 + row * 1.25, 4.55, 1.1);
s.addShape(pres.shapes.RECTANGLE, {
x: col, y: 1.5 + row * 1.25, w: 0.06, h: 1.1,
fill: { color: e.col }, line: { color: e.col }
});
s.addText(e.flap, {
x: col + 0.18, y: 1.54 + row * 1.25, w: 4.2, h: 0.32,
fontSize: 13, bold: true, color: C.white, margin: 0
});
s.addText(e.type, {
x: col + 0.18, y: 1.85 + row * 1.25, w: 4.2, h: 0.25,
fontSize: 10, color: e.col, italic: true, margin: 0
});
s.addText(`Vessel: ${e.vessel}`, {
x: col + 0.18, y: 2.1 + row * 1.25, w: 4.2, h: 0.38,
fontSize: 9.5, color: C.grey, margin: 0
});
});
}
// ─── SLIDE 9: FLAP FAILURE & MONITORING ──────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.accent);
pill(s, "FLAP FAILURE & MONITORING", 0.4, 0.18, 2.8, C.accent);
s.addText("Recognition, Monitoring & Salvage", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
// Risk factors
card(s, 0.3, 1.35, 9.4, 0.72);
s.addText("⚠ Key Risk Factors:", {
x: 0.5, y: 1.38, w: 2, h: 0.35,
fontSize: 11, bold: true, color: C.accent, margin: 0
});
s.addText("Diabetes · Prior irradiation · Hypotension · Excess tension on closure · Tissue edema · High hematocrit · Vasoconstriction", {
x: 2.4, y: 1.38, w: 7.1, h: 0.6,
fontSize: 10, color: C.offwhite, valign: "middle", margin: 0
});
// Monitoring / salvage table
const rows = [
{ zone: "Zone I\n(Macro)", monitor: "Doppler · Near-infrared spectroscopy · Temperature", salvage: "Explore pedicle / anastomosis · Thrombectomy", col: C.accent },
{ zone: "Zone II\n(Micro)", monitor: "Doppler · Tissue oxygenation · Tissue pressure", salvage: "Vascular washout · Reduce edema", col: C.gold },
{ zone: "Zone III\n(Interstitium)", monitor: "Clinical assessment · Fluid balance", salvage: "Optimize Starling forces · Manage edema", col: C.teal },
];
// Table header
["Zone", "Monitoring Method", "Salvage Method"].forEach((h, i) => {
const xs = [0.3, 2.0, 6.0];
const ws = [1.55, 3.8, 3.75];
s.addShape(pres.shapes.RECTANGLE, {
x: xs[i], y: 2.18, w: ws[i], h: 0.4,
fill: { color: "1E3A50" }, line: { color: "1E3A50" }
});
s.addText(h, {
x: xs[i] + 0.1, y: 2.18, w: ws[i] - 0.1, h: 0.4,
fontSize: 11, bold: true, color: C.offwhite, valign: "middle", margin: 0
});
});
rows.forEach((r, i) => {
const y = 2.65 + i * 0.88;
card(s, 0.3, y, 1.55, 0.82, "0A1520");
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y, w: 0.06, h: 0.82,
fill: { color: r.col }, line: { color: r.col }
});
s.addText(r.zone, {
x: 0.42, y: y + 0.04, w: 1.35, h: 0.74,
fontSize: 10, bold: true, color: r.col, valign: "middle", margin: 0
});
card(s, 2.0, y, 3.8, 0.82);
s.addText(r.monitor, {
x: 2.15, y: y + 0.08, w: 3.5, h: 0.66,
fontSize: 10, color: C.offwhite, valign: "middle", margin: 0
});
card(s, 6.0, y, 3.75, 0.82);
s.addText(r.salvage, {
x: 6.15, y: y + 0.08, w: 3.45, h: 0.66,
fontSize: 10, color: C.offwhite, valign: "middle", margin: 0
});
});
}
// ─── SLIDE 10: AUGMENTING FLAP SURVIVAL ──────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.teal);
pill(s, "AUGMENTING SURVIVAL", 0.4, 0.18, 2.4, C.teal);
s.addText("Flap Delay & Hyperbaric Oxygen", {
x: 0.4, y: 0.6, w: 9, h: 0.65,
fontSize: 28, bold: true, color: C.white
});
// Flap Delay card
card(s, 0.3, 1.38, 4.6, 3.9);
s.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.38, w: 4.6, h: 0.5,
fill: { color: C.teal }, line: { color: C.teal }
});
s.addText("FLAP DELAY", {
x: 0.3, y: 1.38, w: 4.6, h: 0.5,
fontSize: 15, bold: true, color: C.bg, align: "center", valign: "middle", margin: 0
});
const delayPts = [
"Preliminary interruption of part of flap's blood supply",
"Triggers collateral vessel dilation via LaPlace's Law",
"Allows time for neovascularization",
"Effectively extends safe flap length",
"Used when large or borderline flap is planned",
"Interval of 1–3 weeks typically required",
];
delayPts.forEach((p, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.52, y: 2.02 + i * 0.52, w: 0.22, h: 0.22,
fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.04
});
s.addText(p, {
x: 0.82, y: 1.98 + i * 0.52, w: 3.9, h: 0.44,
fontSize: 10, color: C.offwhite, margin: 0, valign: "middle"
});
});
// HBO card
card(s, 5.1, 1.38, 4.6, 3.9);
s.addShape(pres.shapes.RECTANGLE, {
x: 5.1, y: 1.38, w: 4.6, h: 0.5,
fill: { color: C.gold }, line: { color: C.gold }
});
s.addText("HYPERBARIC OXYGEN (HBO)", {
x: 5.1, y: 1.38, w: 4.6, h: 0.5,
fontSize: 15, bold: true, color: C.bg, align: "center", valign: "middle", margin: 0
});
const hboPts = [
"↑ O₂ carrying capacity by ~20% (plasma-dissolved O₂)",
"Greater effect with low hematocrit",
"↑ O₂ diffusion from perfused → ischemic zone",
"↓ Leukocyte adherence · ↓ Edema · ↑ Neovascularization",
"Must be given EARLY — little benefit after 24h",
"Challenge test: TcO₂ rise ≥50 mmHg = favorable",
"Reserve for high-risk flaps (not cost-effective for all)",
];
hboPts.forEach((p, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 5.32, y: 2.02 + i * 0.44, w: 0.22, h: 0.22,
fill: { color: C.gold }, line: { color: C.gold }, rectRadius: 0.04
});
s.addText(p, {
x: 5.62, y: 1.98 + i * 0.44, w: 3.9, h: 0.38,
fontSize: 9.5, color: C.offwhite, margin: 0, valign: "middle"
});
});
}
// ─── SLIDE 11: SUMMARY ───────────────────────────────────────────────────
{
let s = pres.addSlide();
addBg(s);
addTopBar(s, C.accent);
// Background accent block
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.18, h: 5.625,
fill: { color: C.accent }, line: { color: C.accent }
});
s.addText("Key Takeaways", {
x: 0.5, y: 0.25, w: 9, h: 0.65,
fontSize: 30, bold: true, color: C.white
});
const takeaways = [
{ n: "1", text: "Vascular supply is THE most critical factor in flap planning — perfusion pressure (DBP − tissue pressure) drives all zones.", col: C.accent },
{ n: "2", text: "Hagen-Poiseuille: vessel radius (r⁴) dominates flow. Choose large named vessels, minimize length, and maintain BP.", col: C.gold },
{ n: "3", text: "Critical closing pressure determines viable vs. at-risk vs. necrotic zones. Wider base does NOT increase survival length.", col: C.teal },
{ n: "4", text: "Three zones of perfusion (macro → micro → interstitial) each have distinct monitoring and salvage strategies.", col: C.lightblue },
{ n: "5", text: "Flap type dictates vascular anatomy: Random < Axial < Fasciocutaneous < Musculocutaneous in terms of reliability.", col: C.gold },
{ n: "6", text: "Flap delay (collateral development) and HBO (early, high-risk cases only) are the main methods to augment survival.", col: C.accent },
];
takeaways.forEach((t, i) => {
const y = 1.05 + i * 0.72;
card(s, 0.5, y, 9.2, 0.62);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.62, y: y + 0.1, w: 0.38, h: 0.38,
fill: { color: t.col }, line: { color: t.col }, rectRadius: 0.06
});
s.addText(t.n, {
x: 0.62, y: y + 0.1, w: 0.38, h: 0.38,
fontSize: 14, bold: true, color: C.bg, align: "center", valign: "middle", margin: 0
});
s.addText(t.text, {
x: 1.12, y: y + 0.06, w: 8.4, h: 0.5,
fontSize: 10.5, color: C.offwhite, valign: "middle", margin: 0
});
});
s.addText("Cummings Otolaryngology Head & Neck Surgery · Chapter 77: Skin Flap Physiology", {
x: 0.5, y: 5.3, w: 9.2, h: 0.25,
fontSize: 8.5, italic: true, color: C.grey, align: "center"
});
}
// ─── WRITE FILE ───────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/skin-flap-ppt/Skin_Flap_Physiology.pptx" })
.then(() => console.log("✅ Done: /home/daytona/workspace/skin-flap-ppt/Skin_Flap_Physiology.pptx"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });
cd /home/daytona/workspace/skin-flap-ppt && node generate.js 2>&1
Skin Flap Physiology
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title |
| 2 | Overview / Agenda |
| 3 | Physics of Flow — Hagen-Poiseuille, clinical goals |
| 4 | Critical Closing Pressure — flap length graph (Fig. 77.1) |
| 5 | Three Zones of Perfusion (macro/micro/interstitial) |
| 6 | Starling Forces & Capillary Exchange (Zone III) |
| 7 | Flap Classification — with the 4-type vascular diagram (Fig. 77.5) |
| 8 | H&N Flap Examples (deltopectoral, forehead, pec major, LD, radial forearm, fibula) |
| 9 | Flap Failure — risk factors, monitoring & salvage table by zone |
| 10 | Augmenting Survival — Flap Delay vs. HBO side-by-side |
| 11 | Key Takeaways + source citation |