Approach to edema, different waveform of jvp with one example

| Mechanism | Examples |
|---|---|
| ↑ Hydrostatic pressure (impaired venous return) | Congestive heart failure, constrictive pericarditis, liver cirrhosis, venous thrombosis, external compression, prolonged dependency |
| ↑ Hydrostatic pressure (arteriolar dilation) | Heat, calcium channel blockers, direct vasodilators |
| ↓ Plasma oncotic pressure (hypoproteinemia) | Nephrotic syndrome, advanced liver disease, malnutrition, protein-losing gastroenteropathy |
| Lymphatic obstruction | Inflammatory, neoplastic, post-surgical, post-irradiation |
| Na+ retention | Renal insufficiency, hyperaldosteronism, renal hypoperfusion |
| Increased vascular permeability | Acute/chronic inflammation, angiogenesis |
| Feature | Pitting Edema | Non-Pitting Edema |
|---|---|---|
| Mechanism | Water/sodium accumulation | Lymphedema, myxedema (protein deposits) |
| Common causes | CHF, nephrotic, cirrhosis, venous insufficiency | Lymphatic obstruction, hypothyroidism |
"The most common systemic causes of edema are heart, liver, and kidney diseases." - Symptom to Diagnosis, 4th Ed.

| Component | Timing | Mechanism |
|---|---|---|
| a wave | Just after P wave, before S1 | Right atrial presystolic contraction |
| c wave | After S1, interrupts x descent | Tricuspid valve closure / bulging into RA during early ventricular systole |
| x descent | After a wave | Fall in RA pressure after tricuspid opening; interrupted by c wave |
| v wave | During ventricular systole | Atrial filling / atrial diastole while tricuspid is closed |
| y descent | After peak of v wave | Tricuspid valve opens; RA empties into RV |
| Abnormality | Example Condition |
|---|---|
| Giant a wave | Pulmonary hypertension, tricuspid stenosis |
| Cannon a wave (irregular) | Ventricular tachycardia, complete heart block |
| Absent a wave | Atrial fibrillation |
| Giant cv wave + steep y descent | Tricuspid regurgitation |
| Absent y descent | Cardiac tamponade |
| Kussmaul's sign | Constrictive pericarditis |
| Raised JVP, no waveform change | SVC obstruction |
Create a detailed ppt
node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care…
mkdir -p /home/daytona/workspace/edema-jvp-ppt
~/edema-jvp-ppt/create_ppt.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/f90893e40351cc17d9715cf69cf52e7a26408b92fac1ea3e7e19a0e90314874c.png" "https://cdn.orris.care/cdss_images/d6748196a8de8d8aede6f814d72afb9c0c3f255f9ed781a462661366fc551c0b.png"`
).toString());
const jvpImg = images[0].base64;
const edemaDiagImg = images[1].base64;
// ─── Color palette ─────────────────────────────────────────────────────────
const C = {
darkNavy: "0D1B2A", // dominant dark bg
navy: "1B3A5C", // secondary dark
teal: "1A7A8A", // accent / headers
tealLight: "25A4B8", // lighter teal
amber: "E8A020", // highlight accent
white: "FFFFFF",
offWhite: "F0F4F8",
lightGray: "D8E4EE",
textDark: "0D1B2A",
textMid: "2C4A6E",
};
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Approach to Edema & JVP Waveforms";
pres.author = "Medical Education";
// ══════════════════════════════════════════════════════════════════
// HELPER FUNCTIONS
// ══════════════════════════════════════════════════════════════════
function addDarkHeader(slide, title, subtitle) {
// Full dark top bar
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.05, fill: { color: C.darkNavy }, line: { color: C.darkNavy } });
// Teal accent stripe
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.05, w: 10, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });
slide.addText(title, { x: 0.35, y: 0.08, w: 9.3, h: 0.65, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
if (subtitle) {
slide.addText(subtitle, { x: 0.35, y: 0.72, w: 9.3, h: 0.3, fontSize: 11, color: C.tealLight, fontFace: "Calibri", italic: true, margin: 0 });
}
}
function addFooter(slide, src) {
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.darkNavy }, line: { color: C.darkNavy } });
slide.addText(src || "Sources: Harrison's 22E | Robbins Pathology | Symptom to Diagnosis 4E", {
x: 0.2, y: 5.45, w: 9.6, h: 0.175, fontSize: 7.5, color: C.lightGray, fontFace: "Calibri", margin: 0, valign: "middle"
});
}
function pillLabel(slide, text, x, y, w, h, bg, fg) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w, h, fill: { color: bg }, line: { color: bg }, rectRadius: 0.08 });
slide.addText(text, { x, y, w, h, fontSize: 10, bold: true, color: fg || C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
}
function card(slide, x, y, w, h, bg, shadow) {
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w, h,
fill: { color: bg || C.offWhite },
line: { color: "C8D8E8", width: 0.5 },
shadow: shadow || { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.10 }
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
// Full dark background
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkNavy }, line: { color: C.darkNavy } });
// Left teal accent bar
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
// Amber bottom stripe
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.amber }, line: { color: C.amber } });
// Main title
sl.addText("APPROACH TO EDEMA", {
x: 0.5, y: 1.0, w: 9, h: 0.9, fontSize: 40, bold: true, color: C.white,
fontFace: "Calibri", align: "center", charSpacing: 3, margin: 0
});
// Divider
sl.addShape(pres.shapes.RECTANGLE, { x: 2.5, y: 2.0, w: 5, h: 0.055, fill: { color: C.teal }, line: { color: C.teal } });
// Subtitle
sl.addText("& JVP WAVEFORMS", {
x: 0.5, y: 2.1, w: 9, h: 0.75, fontSize: 30, bold: false, color: C.tealLight,
fontFace: "Calibri", align: "center", charSpacing: 4, margin: 0
});
// Sub-subtitle
sl.addText("Pathophysiology | Clinical Approach | Differential Diagnosis | Waveform Analysis", {
x: 0.5, y: 3.05, w: 9, h: 0.4, fontSize: 13, color: C.lightGray,
fontFace: "Calibri", align: "center", margin: 0
});
// Source tag
sl.addText("Harrison's 22E · Robbins Pathology · Symptom to Diagnosis 4E", {
x: 0.3, y: 5.36, w: 9.4, h: 0.24, fontSize: 9, color: C.darkNavy,
fontFace: "Calibri", align: "center", bold: true, margin: 0
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW / CONTENTS
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Overview", "What will be covered in this presentation");
const topics = [
{ num: "01", title: "Pathophysiology of Edema", desc: "Starling forces, transudate vs exudate, fluid dynamics" },
{ num: "02", title: "Causes of Edema", desc: "Hydrostatic, oncotic, lymphatic, Na+ retention, inflammation" },
{ num: "03", title: "Clinical Approach", desc: "Distribution, pitting vs non-pitting, history & investigations" },
{ num: "04", title: "JVP Waveform Components", desc: "a, c, v waves; x, y descents – timing & mechanism" },
{ num: "05", title: "Abnormal JVP Waveforms", desc: "Cannon a, giant v, absent a, Kussmaul's sign with examples" },
{ num: "06", title: "Quick Reference Tables", desc: "Diagnostic clues and waveform abnormality summary" },
];
topics.forEach((t, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.3 + col * 4.9;
const y = 1.25 + row * 1.35;
card(sl, x, y, 4.6, 1.15, C.white);
// Number circle
sl.addShape(pres.shapes.ELLIPSE, { x: x + 0.12, y: y + 0.22, w: 0.55, h: 0.55, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText(t.num, { x: x + 0.12, y: y + 0.22, w: 0.55, h: 0.55, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0, fontFace: "Calibri" });
sl.addText(t.title, { x: x + 0.78, y: y + 0.1, w: 3.7, h: 0.4, fontSize: 12, bold: true, color: C.textDark, fontFace: "Calibri", margin: 0 });
sl.addText(t.desc, { x: x + 0.78, y: y + 0.52, w: 3.7, h: 0.5, fontSize: 9.5, color: C.textMid, fontFace: "Calibri", margin: 0 });
});
addFooter(sl);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 3 – PATHOPHYSIOLOGY OF EDEMA
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Pathophysiology of Edema", "Starling forces and mechanisms of interstitial fluid accumulation");
// Left: image
card(sl, 0.25, 1.25, 4.3, 3.85, C.white);
sl.addImage({ data: edemaDiagImg, x: 0.35, y: 1.35, w: 4.1, h: 3.6, altText: "Capillary bed edema diagram" });
// Right: content
const rightX = 4.85;
// Definitions box
card(sl, rightX, 1.25, 4.9, 1.1, "EBF4FA");
sl.addText("Key Definitions", { x: rightX + 0.12, y: 1.28, w: 4.6, h: 0.32, fontSize: 11, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
sl.addText([
{ text: "Edema: ", options: { bold: true, color: C.textDark } },
{ text: "Accumulation of interstitial fluid in tissues\n", options: { color: C.textMid } },
{ text: "Anasarca: ", options: { bold: true, color: C.textDark } },
{ text: "Severe generalized edema with cavity effusions", options: { color: C.textMid } },
], { x: rightX + 0.12, y: 1.6, w: 4.65, h: 0.65, fontSize: 9.5, fontFace: "Calibri", margin: 0 });
// Mechanisms
const mechs = [
{ label: "↑ Hydrostatic Pressure", desc: "Pushes fluid out at arteriolar end; venous obstruction or cardiac failure", col: C.navy },
{ label: "↓ Oncotic Pressure", desc: "Reduced plasma proteins reduce reabsorption at venular end", col: C.teal },
{ label: "Lymphatic Obstruction", desc: "Impairs drainage of residual interstitial fluid back to circulation", col: "C05820" },
{ label: "↑ Vascular Permeability", desc: "Inflammation causes protein-rich exudate to leak across vessel wall", col: "7B3F9E" },
];
mechs.forEach((m, i) => {
const y = 2.45 + i * 0.63;
sl.addShape(pres.shapes.RECTANGLE, { x: rightX, y, w: 0.08, h: 0.5, fill: { color: m.col }, line: { color: m.col } });
sl.addText(m.label, { x: rightX + 0.18, y: y + 0.0, w: 4.6, h: 0.22, fontSize: 10, bold: true, color: m.col, fontFace: "Calibri", margin: 0 });
sl.addText(m.desc, { x: rightX + 0.18, y: y + 0.22, w: 4.6, h: 0.28, fontSize: 9, color: C.textMid, fontFace: "Calibri", margin: 0 });
});
addFooter(sl, "Robbins & Kumar Basic Pathology | Symptom to Diagnosis 4E – Figure 17-1");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 4 – CAUSES OF EDEMA TABLE
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Causes of Edema", "Classified by underlying mechanism – Robbins Table 3.1");
const cols = [
{
title: "↑ Hydrostatic Pressure",
color: C.navy,
items: [
"Congestive heart failure",
"Constrictive pericarditis",
"Liver cirrhosis (portal HTN)",
"Venous thrombosis (DVT)",
"External compression",
"CCBs, vasodilators",
"Prolonged dependency / heat",
]
},
{
title: "↓ Oncotic Pressure",
color: C.teal,
items: [
"Nephrotic syndrome",
"Advanced liver disease",
"Malnutrition / kwashiorkor",
"Protein-losing gastroenteropathy",
"Severe burns",
"Malabsorption syndromes",
]
},
{
title: "Lymphatic / Na+ / Other",
color: "C05820",
items: [
"Filariasis (lymphedema)",
"Post-surgical / irradiation",
"Neoplastic obstruction",
"Renal Na+ retention",
"↑ Renin-angiotensin-aldosterone",
"Myxedema (hypothyroidism)",
"Acute/chronic inflammation",
]
},
];
cols.forEach((col, ci) => {
const x = 0.22 + ci * 3.25;
// Header
sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.22, w: 3.1, h: 0.42, fill: { color: col.color }, line: { color: col.color } });
sl.addText(col.title, { x, y: 1.22, w: 3.1, h: 0.42, fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
// Body card
card(sl, x, 1.64, 3.1, 3.72, C.white);
col.items.forEach((item, ii) => {
const iy = 1.72 + ii * 0.5;
// Dot
sl.addShape(pres.shapes.ELLIPSE, { x: x + 0.12, y: iy + 0.1, w: 0.13, h: 0.13, fill: { color: col.color }, line: { color: col.color } });
sl.addText(item, { x: x + 0.32, y: iy, w: 2.7, h: 0.38, fontSize: 10, color: C.textDark, fontFace: "Calibri", margin: 0, valign: "middle" });
});
});
addFooter(sl, "Sources: Robbins Pathology Table 3.1 | Symptom to Diagnosis 4E");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 5 – CLINICAL APPROACH: DISTRIBUTION
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Clinical Approach to Edema", "Step 1: Use distribution as the pivotal clinical point – Symptom to Diagnosis 4E");
// Two main columns
// LEFT: Bilateral
card(sl, 0.25, 1.25, 4.55, 4.05, C.white);
sl.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 1.25, w: 4.55, h: 0.42, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("BILATERAL LEG EDEMA", { x: 0.25, y: 1.25, w: 4.55, h: 0.42, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText("→ Systemic cause", { x: 0.4, y: 1.73, w: 4.2, h: 0.28, fontSize: 10, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
const bilat = [
{ cat: "Cardiovascular", items: "HFrEF / HFpEF, Constrictive pericarditis, Pulmonary HTN" },
{ cat: "Hepatic", items: "Cirrhosis (portal hypertension + ↓albumin)" },
{ cat: "Renal", items: "Nephrotic syndrome, Advanced CKD" },
{ cat: "Endocrine", items: "Hypothyroidism (myxedema)" },
{ cat: "Medications", items: "CCBs, NSAIDs, steroids, thiazolidinediones" },
{ cat: "Nutritional", items: "Hypoalbuminemia, refeeding edema" },
];
bilat.forEach((b, i) => {
const y = 2.05 + i * 0.53;
pillLabel(sl, b.cat, 0.38, y, 1.45, 0.28, C.teal);
sl.addText(b.items, { x: 1.9, y: y - 0.02, w: 2.75, h: 0.35, fontSize: 8.5, color: C.textMid, fontFace: "Calibri", margin: 0, valign: "middle" });
});
// Note
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.38, y: 5.05, w: 4.25, h: 0.22, fill: { color: "FFF3CD" }, line: { color: C.amber }, rectRadius: 0.05 });
sl.addText("Most common systemic causes: Heart · Liver · Kidney", { x: 0.38, y: 5.05, w: 4.25, h: 0.22, fontSize: 8.5, bold: true, color: "7A5000", fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
// RIGHT: Unilateral
card(sl, 5.1, 1.25, 4.65, 4.05, C.white);
sl.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 1.25, w: 4.65, h: 0.42, fill: { color: "C05820" }, line: { color: "C05820" } });
sl.addText("UNILATERAL EDEMA", { x: 5.1, y: 1.25, w: 4.65, h: 0.42, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText("→ Local cause", { x: 5.25, y: 1.73, w: 4.3, h: 0.28, fontSize: 10, bold: true, color: "C05820", fontFace: "Calibri", margin: 0 });
const unilat = [
{ cat: "DVT", items: "Sudden onset, pain, Homan's sign, D-dimer ↑" },
{ cat: "Cellulitis", items: "Warm, erythema, fever, tender, skin break" },
{ cat: "Lymphedema", items: "Non-pitting, progressive, skin changes (peau d'orange)" },
{ cat: "Baker's Cyst", items: "Posterior popliteal, rupture mimics DVT" },
{ cat: "Venous insuff.", items: "Chronic, varicosities, skin pigmentation, ulcers" },
{ cat: "Trauma/Injury", items: "Fracture, muscle tear, hematoma" },
];
unilat.forEach((b, i) => {
const y = 2.05 + i * 0.53;
pillLabel(sl, b.cat, 5.22, y, 1.3, 0.28, "C05820");
sl.addText(b.items, { x: 6.6, y: y - 0.02, w: 3.0, h: 0.35, fontSize: 8.5, color: C.textMid, fontFace: "Calibri", margin: 0, valign: "middle" });
});
addFooter(sl, "Symptom to Diagnosis 4E – Chapter 17 | Goldman-Cecil Medicine");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 6 – PITTING VS NON-PITTING & INVESTIGATIONS
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Step 2–4: Pitting, History & Investigations", "Characterizing edema and targeted workup");
// --- Pitting vs Non-pitting (top row) ---
// Pitting card
card(sl, 0.25, 1.22, 4.55, 1.6, "EBF4FA");
sl.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 1.22, w: 4.55, h: 0.32, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("PITTING EDEMA", { x: 0.25, y: 1.22, w: 4.55, h: 0.32, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
const pittingItems = [
"Mechanism: Water/sodium accumulation in interstitium",
"Finger pressure leaves a transient pit (30 sec)",
"Causes: CHF, nephrotic, cirrhosis, venous insufficiency",
"Grading: 1+ (2mm) to 4+ (>8mm, >30 sec rebound)",
];
sl.addText(pittingItems.map(t => ({ text: t, options: { bullet: { indent: 10 }, breakLine: true, fontSize: 9, color: C.textDark } })),
{ x: 0.35, y: 1.57, w: 4.3, h: 1.2, fontFace: "Calibri", margin: 0 });
// Non-pitting card
card(sl, 5.1, 1.22, 4.65, 1.6, "FFF8F0");
sl.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 1.22, w: 4.65, h: 0.32, fill: { color: "C05820" }, line: { color: "C05820" } });
sl.addText("NON-PITTING EDEMA", { x: 5.1, y: 1.22, w: 4.65, h: 0.32, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
const nonPittingItems = [
"Mechanism: Protein/mucin deposits in interstitium",
"No pit on finger pressure",
"Lymphedema: protein-rich fluid, fibrosis over time",
"Myxedema: glycosaminoglycan deposits (hypothyroid)",
];
sl.addText(nonPittingItems.map(t => ({ text: t, options: { bullet: { indent: 10 }, breakLine: true, fontSize: 9, color: C.textDark } })),
{ x: 5.22, y: 1.57, w: 4.4, h: 1.2, fontFace: "Calibri", margin: 0 });
// --- History clues ---
card(sl, 0.25, 2.95, 4.55, 2.35, C.white);
sl.addText("Key History Clues", { x: 0.35, y: 2.97, w: 4.3, h: 0.32, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
const hxClues = [
{ sym: "Orthopnea / PND + ↑ JVP", dx: "→ Heart failure" },
{ sym: "Ascites + jaundice + spider naevi", dx: "→ Cirrhosis" },
{ sym: "Frothy urine + periorbital puffiness (AM)", dx: "→ Nephrotic syndrome" },
{ sym: "Unilateral + pain + warmth", dx: "→ DVT / cellulitis" },
{ sym: "CCB / NSAID / steroid use", dx: "→ Drug-induced" },
{ sym: "Fatigue + cold intolerance + non-pitting", dx: "→ Myxedema" },
];
hxClues.forEach((h, i) => {
const y = 3.33 + i * 0.315;
sl.addText(h.sym, { x: 0.38, y, w: 2.65, h: 0.28, fontSize: 8.8, color: C.textDark, fontFace: "Calibri", margin: 0, valign: "middle" });
sl.addText(h.dx, { x: 3.08, y, w: 1.5, h: 0.28, fontSize: 8.8, bold: true, color: C.teal, fontFace: "Calibri", margin: 0, valign: "middle" });
});
// --- Investigations ---
card(sl, 5.1, 2.95, 4.65, 2.35, C.white);
sl.addText("Investigations", { x: 5.22, y: 2.97, w: 4.4, h: 0.32, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
const invRows = [
["Urine dipstick / 24hr protein", "Nephrotic syndrome"],
["Serum albumin", "Hypoproteinemia"],
["LFTs + Coagulation", "Liver disease"],
["Renal function (eGFR, Cr)", "CKD / AKI"],
["BNP / NT-proBNP", "Heart failure"],
["TFTs (TSH, fT4)", "Hypothyroidism"],
["Doppler USS legs", "DVT"],
["Echocardiogram", "Cardiac cause"],
];
invRows.forEach((row, i) => {
const y = 3.33 + i * 0.285;
sl.addShape(pres.shapes.ELLIPSE, { x: 5.22, y: y + 0.08, w: 0.12, h: 0.12, fill: { color: C.amber }, line: { color: C.amber } });
sl.addText(row[0], { x: 5.4, y, w: 2.4, h: 0.28, fontSize: 8.8, color: C.textDark, fontFace: "Calibri", margin: 0, valign: "middle" });
sl.addText(row[1], { x: 7.85, y, w: 1.75, h: 0.28, fontSize: 8.5, color: C.teal, fontFace: "Calibri", margin: 0, valign: "middle", italic: true });
});
addFooter(sl, "Symptom to Diagnosis 4E | Goldman-Cecil Medicine | Robbins Pathology");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 7 – JVP: INTRODUCTION & NORMAL WAVEFORM
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Jugular Venous Pulse (JVP) – Normal Waveform", "Harrison's Principles of Internal Medicine 22E – Cardiovascular Examination");
// Left: diagram
card(sl, 0.25, 1.22, 4.0, 4.1, C.white);
sl.addImage({ data: jvpImg, x: 0.3, y: 1.27, w: 3.9, h: 3.95, altText: "JVP waveform diagrams" });
// Right: components table
const comps = [
{ wave: "a wave", timing: "After P wave, before S1", mech: "Right atrial presystolic contraction", color: C.navy },
{ wave: "c wave", timing: "After S1 (early systole)", mech: "Tricuspid valve closure / bulging into RA", color: C.teal },
{ wave: "x descent", timing: "Mid-systole", mech: "Fall in RA pressure; interrupted by c wave", color: "5B8DB8" },
{ wave: "v wave", timing: "During ventricular systole", mech: "Atrial filling while tricuspid is closed", color: "C05820" },
{ wave: "y descent", timing: "After v wave peak", mech: "Tricuspid opens → RA empties into RV", color: "7B3F9E" },
];
sl.addText("Waveform Components", { x: 4.55, y: 1.27, w: 5.2, h: 0.32, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
comps.forEach((c, i) => {
const y = 1.68 + i * 0.72;
card(sl, 4.55, y, 5.2, 0.62, C.white);
sl.addShape(pres.shapes.RECTANGLE, { x: 4.55, y, w: 0.12, h: 0.62, fill: { color: c.color }, line: { color: c.color } });
sl.addText(c.wave, { x: 4.75, y: y + 0.04, w: 1.2, h: 0.26, fontSize: 11, bold: true, color: c.color, fontFace: "Calibri", margin: 0 });
sl.addText(c.timing, { x: 4.75, y: y + 0.3, w: 2.0, h: 0.25, fontSize: 8.5, color: C.textMid, fontFace: "Calibri", italic: true, margin: 0 });
sl.addText(c.mech, { x: 6.82, y: y + 0.1, w: 2.85, h: 0.42, fontSize: 9, color: C.textDark, fontFace: "Calibri", margin: 0, valign: "middle" });
});
// Tip box
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 4.55, y: 5.05, w: 5.2, h: 0.32, fill: { color: "E8F8FA" }, line: { color: C.teal }, rectRadius: 0.06 });
sl.addText("JVP is biphasic in sinus rhythm (2 peaks: a & v); monophasic carotid pulse helps distinguish them", {
x: 4.62, y: 5.05, w: 5.06, h: 0.32, fontSize: 8.5, color: C.teal, fontFace: "Calibri", valign: "middle", margin: 0
});
addFooter(sl, "Harrison's Principles of Internal Medicine 22E – Fig. 246-1");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 8 – ABNORMAL JVP WAVEFORMS PART 1
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Abnormal JVP Waveforms – Part 1", "Prominent/cannon a waves and absent a wave with clinical examples");
const abnorms1 = [
{
title: "Giant / Prominent a Wave",
color: C.navy,
mechanism: "Increased resistance to RV filling forces RA to contract harder against a non-compliant or hypertrophied RV.",
causes: ["Pulmonary hypertension", "Pulmonary stenosis", "Tricuspid stenosis", "RV hypertrophy / HOCM"],
example: { label: "Example: Pulmonary Hypertension", detail: "Patient with severe pulmonary HTN – giant a wave on JVP due to markedly reduced RV compliance. Also shows loud P2, right parasternal heave, and fixed split S2." }
},
{
title: "Cannon a Wave (Intermittent, Giant)",
color: "B8220A",
mechanism: "RA contracts against a CLOSED tricuspid valve due to AV dissociation – produces massive 'cannon' shot of venous pressure.",
causes: ["Ventricular tachycardia (VT)", "Complete heart block", "Ventricular pacing", "Junctional rhythm"],
example: { label: "Classic Example: Wide Complex Tachycardia", detail: "Presence of irregular cannon a waves on JVP during a wide complex tachycardia = diagnostic of VENTRICULAR TACHYCARDIA (not SVT with aberrancy). Cannon a waves = AV dissociation." }
},
{
title: "Absent a Wave",
color: "888888",
mechanism: "No coordinated right atrial contraction = no a wave. The atria fibrillate and no P wave is generated.",
causes: ["Atrial fibrillation (AF)", "Atrial flutter (variable)"],
example: { label: "Example: Atrial Fibrillation", detail: "No a wave on JVP. The baseline is irregular. Combined with irregularly irregular pulse, this is a bedside diagnosis of AF. Confirm with ECG (no P waves, chaotic baseline)." }
},
];
abnorms1.forEach((a, i) => {
const x = 0.22 + i * 3.25;
// Header
sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.22, w: 3.1, h: 0.38, fill: { color: a.color }, line: { color: a.color } });
sl.addText(a.title, { x, y: 1.22, w: 3.1, h: 0.38, fontSize: 9.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
card(sl, x, 1.6, 3.1, 3.78, C.white);
// Mechanism
sl.addText("Mechanism:", { x: x + 0.12, y: 1.65, w: 2.85, h: 0.22, fontSize: 9, bold: true, color: a.color, fontFace: "Calibri", margin: 0 });
sl.addText(a.mechanism, { x: x + 0.12, y: 1.87, w: 2.85, h: 0.65, fontSize: 8.5, color: C.textDark, fontFace: "Calibri", margin: 0 });
// Causes
sl.addText("Causes:", { x: x + 0.12, y: 2.57, w: 2.85, h: 0.22, fontSize: 9, bold: true, color: a.color, fontFace: "Calibri", margin: 0 });
a.causes.forEach((c, ci) => {
sl.addShape(pres.shapes.ELLIPSE, { x: x + 0.14, y: 2.83 + ci * 0.3 + 0.08, w: 0.1, h: 0.1, fill: { color: a.color }, line: { color: a.color } });
sl.addText(c, { x: x + 0.3, y: 2.83 + ci * 0.3, w: 2.65, h: 0.28, fontSize: 9, color: C.textMid, fontFace: "Calibri", margin: 0, valign: "middle" });
});
// Example
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: x + 0.08, y: 4.88 - (a.causes.length > 3 ? 0.2 : 0), w: 2.95, h: 0.42, fill: { color: "FFF8E8" }, line: { color: C.amber }, rectRadius: 0.06 });
sl.addText([
{ text: a.example.label + "\n", options: { bold: true, color: "7A5000", fontSize: 8.5 } },
{ text: a.example.detail, options: { color: C.textMid, fontSize: 7.5 } },
], { x: x + 0.12, y: 4.86 - (a.causes.length > 3 ? 0.2 : 0), w: 2.88, h: 0.48, fontFace: "Calibri", margin: 2 });
});
addFooter(sl, "Harrison's Principles of Internal Medicine 22E – JVP section");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 9 – ABNORMAL JVP WAVEFORMS PART 2
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Abnormal JVP Waveforms – Part 2", "v wave abnormalities, y descent, Kussmaul's sign");
const abnorms2 = [
{
title: "Large cv Wave (TR Pattern)",
color: "C05820",
mechanism: "Regurgitant flow from RV into RA during systole augments v wave. Severe TR 'ventricularzies' the RA waveform.",
details: [
"v merges with c wave → cv complex",
"Steep, rapid y descent follows",
"Pulsatile liver with TR",
"Waveform resembles arterial pulse",
],
example: { label: "Example: Severe Tricuspid Regurgitation", detail: "Giant cv wave + rapid y descent. Seen in IE, rheumatic heart disease, carcinoid, Ebstein's anomaly." }
},
{
title: "Absent / Blunted y Descent",
color: "7B3F9E",
mechanism: "Obstruction to RV inflow after tricuspid valve opens prevents rapid emptying of RA → slow/absent y descent.",
details: [
"Cardiac tamponade: absent y, preserved x",
"Tricuspid stenosis: slow y descent",
"Beck's triad in tamponade: ↓BP + ↑JVP + muffled heart sounds",
"Paradoxical pulse (pulsus paradoxus) in tamponade",
],
example: { label: "Example: Cardiac Tamponade", detail: "Absent y descent + preserved x descent (Friedrich's sign). Kussmaul's sign is ABSENT in tamponade (present in constrictive pericarditis)." }
},
{
title: "Kussmaul's Sign",
color: C.teal,
mechanism: "JVP rises (or fails to fall) with inspiration. Normally, JVP falls with inspiration due to ↓ intrathoracic pressure pulling blood into RA.",
details: [
"Constrictive pericarditis (classic)",
"Restrictive cardiomyopathy",
"Massive pulmonary embolism",
"Right ventricular infarction",
"Advanced LV systolic heart failure",
],
example: { label: "Example: Constrictive Pericarditis", detail: "Rigid pericardium prevents inspiratory increase in RV filling → blood backs up → JVP rises with inspiration. Also: pericardial knock, pulsus paradoxus, Ewart's sign." }
},
];
abnorms2.forEach((a, i) => {
const x = 0.22 + i * 3.25;
sl.addShape(pres.shapes.RECTANGLE, { x, y: 1.22, w: 3.1, h: 0.38, fill: { color: a.color }, line: { color: a.color } });
sl.addText(a.title, { x, y: 1.22, w: 3.1, h: 0.38, fontSize: 9.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
card(sl, x, 1.6, 3.1, 3.78, C.white);
sl.addText("Mechanism:", { x: x + 0.12, y: 1.65, w: 2.85, h: 0.22, fontSize: 9, bold: true, color: a.color, fontFace: "Calibri", margin: 0 });
sl.addText(a.mechanism, { x: x + 0.12, y: 1.87, w: 2.85, h: 0.65, fontSize: 8.5, color: C.textDark, fontFace: "Calibri", margin: 0 });
sl.addText("Features:", { x: x + 0.12, y: 2.57, w: 2.85, h: 0.22, fontSize: 9, bold: true, color: a.color, fontFace: "Calibri", margin: 0 });
a.details.forEach((d, di) => {
sl.addShape(pres.shapes.ELLIPSE, { x: x + 0.14, y: 2.83 + di * 0.29 + 0.08, w: 0.1, h: 0.1, fill: { color: a.color }, line: { color: a.color } });
sl.addText(d, { x: x + 0.3, y: 2.83 + di * 0.29, w: 2.65, h: 0.26, fontSize: 8.5, color: C.textMid, fontFace: "Calibri", margin: 0, valign: "middle" });
});
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: x + 0.08, y: 4.8, w: 2.95, h: 0.5, fill: { color: "EEF8FF" }, line: { color: C.teal }, rectRadius: 0.06 });
sl.addText([
{ text: a.example.label + "\n", options: { bold: true, color: C.navy, fontSize: 8.5 } },
{ text: a.example.detail, options: { color: C.textMid, fontSize: 7.5 } },
], { x: x + 0.12, y: 4.8, w: 2.88, h: 0.5, fontFace: "Calibri", margin: 2 });
});
addFooter(sl, "Harrison's Principles of Internal Medicine 22E – JVP section");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 10 – QUICK REFERENCE TABLE
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
addDarkHeader(sl, "Quick Reference: JVP Waveform Abnormalities", "Summary table for rapid clinical identification");
const headers = ["Waveform Abnormality", "Mechanism", "Classic Example", "Key Bedside Clue"];
const rows = [
["Giant a wave", "↑ resistance to RV filling", "Pulmonary hypertension", "Loud P2 + RV heave"],
["Cannon a wave (irregular)", "AV dissociation (RA vs. closed TV)", "Ventricular tachycardia", "Wide QRS + AV dissociation"],
["Absent a wave", "No RA contraction", "Atrial fibrillation", "Irregularly irregular pulse"],
["Giant cv wave + rapid y", "TR: RV → RA regurgitation", "Severe tricuspid regurgitation", "Pulsatile liver, pansystolic murmur"],
["Absent y descent", "RV inflow obstruction", "Cardiac tamponade", "Absent y, pulsus paradoxus"],
["Kussmaul's sign", "Rigid pericardium / RV failure", "Constrictive pericarditis", "JVP rises with inspiration"],
["Elevated JVP, no waveform", "SVC obstruction", "Mediastinal mass / SVC syndrome", "Non-pulsatile neck veins"],
];
const colW = [2.3, 2.1, 2.2, 3.2];
const colX = [0.2, 2.55, 4.7, 6.95];
const headerColors = [C.darkNavy, C.navy, C.teal, "C05820"];
// Header row
headers.forEach((h, ci) => {
sl.addShape(pres.shapes.RECTANGLE, { x: colX[ci], y: 1.18, w: colW[ci] - 0.05, h: 0.38, fill: { color: headerColors[ci] }, line: { color: headerColors[ci] } });
sl.addText(h, { x: colX[ci], y: 1.18, w: colW[ci] - 0.05, h: 0.38, fontSize: 9, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 2 });
});
// Data rows
rows.forEach((row, ri) => {
const y = 1.6 + ri * 0.52;
const rowBg = ri % 2 === 0 ? C.white : "F0F6FF";
row.forEach((cell, ci) => {
sl.addShape(pres.shapes.RECTANGLE, { x: colX[ci], y, w: colW[ci] - 0.05, h: 0.48, fill: { color: rowBg }, line: { color: "D0DFEE", width: 0.5 } });
sl.addText(cell, { x: colX[ci] + 0.08, y, w: colW[ci] - 0.18, h: 0.48, fontSize: 9, color: ci === 0 ? headerColors[0] : C.textDark, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 0 });
});
});
addFooter(sl, "Harrison's Principles of Internal Medicine 22E | Fuster & Hurst's The Heart 15E");
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 11 – CONCLUSION
// ══════════════════════════════════════════════════════════════════
{
let sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkNavy }, line: { color: C.darkNavy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.amber }, line: { color: C.amber } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Key Takeaways", { x: 0.5, y: 0.5, w: 9, h: 0.55, fontSize: 28, bold: true, color: C.white, fontFace: "Calibri", align: "center", charSpacing: 2, margin: 0 });
sl.addShape(pres.shapes.RECTANGLE, { x: 2.5, y: 1.1, w: 5, h: 0.055, fill: { color: C.amber }, line: { color: C.amber } });
const takeaways = [
{ icon: "EDEMA", color: C.teal, text: "Edema = imbalance in Starling forces. Always classify by DISTRIBUTION first (bilateral = systemic; unilateral = local)." },
{ icon: "CAUSES", color: "C05820", text: "The big three systemic causes are Heart, Liver, Kidney. Medications are a common and reversible cause." },
{ icon: "PITTING", color: C.navy, text: "Pitting = water/Na accumulation. Non-pitting = protein/mucin (lymphedema, myxedema). Grading helps track severity." },
{ icon: "JVP", color: C.tealLight, text: "Normal JVP: a wave (RA contraction), c wave (TV closure), x descent, v wave (atrial filling), y descent (TV opens)." },
{ icon: "CANNON a", color: "B8220A", text: "Cannon a waves = AV dissociation → diagnose VT during wide complex tachycardia at the bedside." },
{ icon: "KUSSMAUL", color: "7B3F9E", text: "Kussmaul's sign = JVP rises with inspiration → constrictive pericarditis. Absent in tamponade (which has absent y descent)." },
];
takeaways.forEach((t, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.45 + col * 4.85;
const y = 1.3 + row * 1.28;
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w: 4.55, h: 1.1, fill: { color: "FFFFFF", transparency: 90 }, line: { color: t.color, width: 1.2 }, rectRadius: 0.1 });
pillLabel(sl, t.icon, x + 0.08, y + 0.1, 0.85, 0.28, t.color, C.white);
sl.addText(t.text, { x: x + 1.0, y: y + 0.05, w: 3.45, h: 0.95, fontSize: 9, color: C.white, fontFace: "Calibri", margin: 0, valign: "middle" });
});
sl.addText("Harrison's 22E · Robbins Pathology · Symptom to Diagnosis 4E · Fuster & Hurst's The Heart 15E", {
x: 0.3, y: 5.35, w: 9.4, h: 0.24, fontSize: 8.5, color: C.white, fontFace: "Calibri", align: "center", bold: false, margin: 0, valign: "middle"
});
}
// ── Write file ──────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/edema-jvp-ppt/Edema_and_JVP_Waveforms.pptx" })
.then(() => console.log("SUCCESS: File written"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/edema-jvp-ppt && node create_ppt.js
node -e "const p = require('pptxgenjs'); const pp = new p(); console.log(Object.…
node -e "const p = require('pptxgenjs'); const pp = new p(); console.log(JSON.st…
node -e "const p = require('pptxgenjs'); const pp = new p(); const st = pp.Shape…
cd /home/daytona/workspace/edema-jvp-ppt && sed -i 's/pres\.shapes\.RECTANGLE/"r…
cd /home/daytona/workspace/edema-jvp-ppt && python3 -c " content = open('create_…
cd /home/daytona/workspace/edema-jvp-ppt && node create_ppt.js
ls -lh /home/daytona/workspace/edema-jvp-ppt/Edema_and_JVP_Waveforms.pptx
Edema and JVP Waveforms
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Overview / table of contents (6 topic cards) |
| 3 | Pathophysiology of Edema - with the Robbins capillary bed diagram embedded |
| 4 | Causes of Edema - 3-column table (hydrostatic / oncotic / lymphatic + Na+) |
| 5 | Clinical Approach - Bilateral vs. Unilateral distribution (with pill labels for each cause) |
| 6 | Steps 2-4: Pitting vs. Non-pitting, History clues, Investigations |
| 7 | JVP Normal Waveform - Harrison's diagram embedded + component table (a, c, x, v, y) |
| 8 | Abnormal JVP Part 1 - Giant a wave, Cannon a wave, Absent a wave with clinical examples |
| 9 | Abnormal JVP Part 2 - Giant cv wave (TR), Absent y descent (tamponade), Kussmaul's sign |
| 10 | Quick Reference Table - all 7 waveform abnormalities in one table |
| 11 | Conclusion / Key Takeaways (dark background, 6 summary cards) |