these are the pages from Harrison.make a power point presentation on it..I am md general medicine 1st year residents ...my audiences are professors ...cover all point in details
cd /home/daytona/workspace/attachments/05fb90f9-8509-4766-8bae-b0af1c602471 && python3 -c " import pdfplumber with pdfplumber.open('dyspnea.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() print(f'--- PAGE {i+1} ---') print(text[:3000] if text else '[No text]') print() "
mkdir -p /home/daytona/workspace/dyspnea-pptx && ls /home/daytona/workspace/dyspnea-pptx/
~/dyspnea-pptx/create_presentation.js
const pptxgen = require("pptxgenjs");
let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.author = 'MD General Medicine';
pres.title = 'Dyspnea - Harrison\'s Principles of Internal Medicine';
// ─── GLOBAL PALETTE ──────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy
const MID_BG = "1B2A3B"; // mid navy
const ACCENT = "E63946"; // vivid red
const ACCENT2 = "457B9D"; // steel blue
const ACCENT3 = "A8DADC"; // pale teal
const WHITE = "FFFFFF";
const LIGHT_GRAY = "E8EEF4";
const YELLOW = "FFD166";
const TEXT_DARK = "1A1A2E";
const SUBTEXT = "A8C0D6";
// Helper: header bar
function addHeader(slide, title, subtitle) {
// Background is set per slide
slide.addText(title, {
x: 0.4, y: 0.12, w: 9.2, h: 0.55,
fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri",
margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.4, y: 0.68, w: 9.2, h: 0.32,
fontSize: 13, color: ACCENT3, fontFace: "Calibri",
italic: true, margin: 0
});
}
// Accent underline
slide.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.0, w: 9.2, h: 0.04,
fill: { color: ACCENT }, line: { color: ACCENT }
});
}
function setBg(slide, color) {
slide.background = { color: color };
}
// ══════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
// Big decorative rectangle on right
s.addShape(pres.ShapeType.rect, {
x: 6.8, y: 0, w: 3.2, h: 5.625,
fill: { color: ACCENT2, transparency: 40 },
line: { color: ACCENT2, transparency: 40 }
});
s.addShape(pres.ShapeType.rect, {
x: 6.85, y: 0, w: 0.06, h: 5.625,
fill: { color: ACCENT },
line: { color: ACCENT }
});
s.addText("DYSPNEA", {
x: 0.5, y: 0.9, w: 6.1, h: 1.2,
fontSize: 64, bold: true, color: WHITE, fontFace: "Calibri",
charSpacing: 8, margin: 0
});
s.addText("Chapter 37 | Harrison's Principles of Internal Medicine", {
x: 0.5, y: 2.15, w: 6.1, h: 0.45,
fontSize: 14, color: ACCENT3, fontFace: "Calibri", italic: true, margin: 0
});
s.addText("Breathlessness: Mechanisms, Evaluation & Management", {
x: 0.5, y: 2.65, w: 6.1, h: 0.4,
fontSize: 15, color: YELLOW, fontFace: "Calibri", bold: true, margin: 0
});
// Divider
s.addShape(pres.ShapeType.line, {
x: 0.5, y: 3.15, w: 6.0, h: 0,
line: { color: ACCENT, width: 2 }
});
s.addText([
{ text: "Presenter: ", options: { bold: true } },
{ text: "MD General Medicine, 1st Year Resident" }
], {
x: 0.5, y: 3.35, w: 6.1, h: 0.35,
fontSize: 13, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0
});
s.addText("Department of Internal Medicine", {
x: 0.5, y: 3.72, w: 6.1, h: 0.3,
fontSize: 12, color: SUBTEXT, fontFace: "Calibri", italic: true, margin: 0
});
// Right panel content
s.addText("KEY THEMES", {
x: 7.1, y: 0.4, w: 2.7, h: 0.4,
fontSize: 11, bold: true, color: YELLOW, fontFace: "Calibri",
charSpacing: 3, margin: 0
});
const themes = ["Pathophysiology", "Afferent / Efferent Signaling", "Differential Diagnosis", "Systematic Evaluation", "Management Principles"];
themes.forEach((t, i) => {
s.addShape(pres.ShapeType.rect, {
x: 7.0, y: 0.9 + i * 0.72, w: 2.9, h: 0.55,
fill: { color: DARK_BG, transparency: 30 },
line: { color: ACCENT, width: 1 }
});
s.addText(t, {
x: 7.05, y: 0.94 + i * 0.72, w: 2.8, h: 0.45,
fontSize: 11, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4
});
});
s.addText("May 2026", {
x: 0.5, y: 5.2, w: 2, h: 0.25,
fontSize: 10, color: SUBTEXT, fontFace: "Calibri", margin: 0
});
}
// ══════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / OUTLINE
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Lecture Outline", "A structured approach to dyspnea");
const sections = [
{ num: "01", label: "Definition & Epidemiological Significance" },
{ num: "02", label: "Mechanisms: Afferent & Efferent Pathways" },
{ num: "03", label: "Efferent–Reafferent Mismatch" },
{ num: "04", label: "Differential Diagnosis — Pulmonary Causes" },
{ num: "05", label: "Differential Diagnosis — Cardiac & Other Causes" },
{ num: "06", label: "Clinical Evaluation: History & Physical Examination" },
{ num: "07", label: "Diagnostic Algorithm & Investigations" },
{ num: "08", label: "Distinguishing Cardiac vs. Respiratory Dyspnea" },
{ num: "09", label: "Management Principles" },
{ num: "10", label: "Take-Home Messages & Q&A" },
];
sections.forEach((sec, i) => {
const col = i < 5 ? 0 : 1;
const row = i < 5 ? i : i - 5;
const x = col === 0 ? 0.35 : 5.15;
const y = 1.25 + row * 0.76;
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 4.55, h: 0.6,
fill: { color: DARK_BG, transparency: 20 },
line: { color: ACCENT2, width: 1 }
});
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 0.55, h: 0.6,
fill: { color: ACCENT },
line: { color: ACCENT }
});
s.addText(sec.num, {
x: x, y: y, w: 0.55, h: 0.6,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText(sec.label, {
x: x + 0.62, y: y + 0.05, w: 3.85, h: 0.5,
fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 0
});
});
}
// ══════════════════════════════════════════════════════
// SLIDE 3 — DEFINITION
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Definition of Dyspnea", "Chapter 37, Harrison's Principles of Internal Medicine");
// Large definition box
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.15, w: 9.2, h: 1.4,
fill: { color: ACCENT2, transparency: 60 },
line: { color: ACCENT2, width: 1.5 }
});
s.addText([
{ text: '"', options: { fontSize: 40, color: YELLOW, bold: true } },
{ text: "Dyspnea", options: { fontSize: 22, bold: true, color: WHITE } },
{ text: " is the subjective sensation of breathing discomfort that derives from interactions among multiple physiological, psychological, social, and environmental factors, and may induce secondary physiological and behavioral responses.", options: { fontSize: 16, color: LIGHT_GRAY } }
], {
x: 0.6, y: 1.22, w: 8.8, h: 1.25,
fontFace: "Calibri", valign: "middle", margin: 6
});
// Key characteristics as cards
const cards = [
{ title: "Subjective", body: "Patient's self-reported experience; cannot be objectively measured" },
{ title: "Multifactorial", body: "Physiological, psychological, social & environmental contributors" },
{ title: "Distinct Qualities", body: "Air hunger, chest tightness, increased WOB — different mechanisms" },
{ title: "Clinically Significant", body: "Most common complaint in emergency medicine; major morbidity indicator" },
];
cards.forEach((c, i) => {
const x = 0.35 + i * 2.35;
s.addShape(pres.ShapeType.rect, {
x: x, y: 2.82, w: 2.2, h: 2.5,
fill: { color: MID_BG },
line: { color: ACCENT, width: 1.5 }
});
s.addShape(pres.ShapeType.rect, {
x: x, y: 2.82, w: 2.2, h: 0.45,
fill: { color: ACCENT },
line: { color: ACCENT }
});
s.addText(c.title, {
x: x, y: 2.82, w: 2.2, h: 0.45,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText(c.body, {
x: x + 0.08, y: 3.33, w: 2.05, h: 1.85,
fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri",
valign: "top", margin: 4
});
});
}
// ══════════════════════════════════════════════════════
// SLIDE 4 — MECHANISMS OVERVIEW
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Mechanisms Underlying Dyspnea", "Three major contributory pathways");
// Three pathway boxes
const paths = [
{
title: "AFFERENT SIGNALS",
color: ACCENT2,
icon: "↑",
items: [
"Peripheral chemoreceptors (carotid body, aortic arch)",
"Central chemoreceptors (medulla)",
"Triggered by: hypoxemia, hypercapnia, acidemia",
"Mechanoreceptors in upper airways, lungs & chest wall",
"Activated by: ↑ airway resistance, ↓ compliance",
"Pulmonary vascular receptors",
"Skeletal muscle metaboreceptors"
]
},
{
title: "EFFERENT SIGNALS",
color: ACCENT,
icon: "↓",
items: [
"CNS sends commands to respiratory muscles",
"Motor cortex → sensory cortex corollary discharge",
"Brainstem motor output → sensory cortex",
"Creates conscious awareness of respiratory effort",
"Sensation of 'work of breathing'",
"Independent of afferent feedback"
]
},
{
title: "EFFERENT–REAFFERENT MISMATCH",
color: YELLOW,
icon: "≠",
items: [
"Key concept: perceived mismatch",
"Motor command sent ≠ sensory feedback received",
"CNS expected response doesn't match actual",
"Central mechanism of dyspnea perception",
"Explains dyspnea disproportionate to workload",
"Seen in neuromuscular disease, severe obstruction"
]
}
];
paths.forEach((p, i) => {
const x = 0.25 + i * 3.2;
s.addShape(pres.ShapeType.rect, {
x: x, y: 1.15, w: 3.05, h: 4.2,
fill: { color: DARK_BG },
line: { color: p.color, width: 2 }
});
// header
s.addShape(pres.ShapeType.rect, {
x: x, y: 1.15, w: 3.05, h: 0.65,
fill: { color: p.color, transparency: 20 },
line: { color: p.color }
});
s.addText(p.icon + " " + p.title, {
x: x + 0.05, y: 1.15, w: 2.95, h: 0.65,
fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
// bullets
const bulletItems = p.items.map((item, bi) => ({
text: item,
options: { bullet: { code: "25B6", color: p.color }, breakLine: bi < p.items.length - 1, fontSize: 10.5, color: LIGHT_GRAY }
}));
s.addText(bulletItems, {
x: x + 0.1, y: 1.9, w: 2.85, h: 3.3,
fontFace: "Calibri", valign: "top", margin: 4
});
});
}
// ══════════════════════════════════════════════════════
// SLIDE 5 — SIGNALING PATHWAYS (DETAILED DIAGRAM)
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Signaling Pathways — Fig. 37-1", "How sensory inputs translate to dyspnea descriptors");
// Left column — Afferent inputs
s.addText("AFFERENT INPUTS", {
x: 0.2, y: 1.15, w: 2.5, h: 0.35,
fontSize: 11, bold: true, color: ACCENT3, fontFace: "Calibri",
charSpacing: 2, margin: 0
});
const afferents = [
{ label: "Central Chemoreceptors\n(medulla)", sub: "Hypoxemia / Hypercapnia / Acidemia" },
{ label: "Peripheral Chemoreceptors\n(carotid body, aortic arch)", sub: "O₂ / CO₂ / pH sensors" },
{ label: "Mechanoreceptors\n(airways, lungs, chest wall)", sub: "↑ Resistance / ↓ Compliance" },
{ label: "Metaboreceptors\n(skeletal muscle)", sub: "Metabolic byproducts" },
];
afferents.forEach((a, i) => {
s.addShape(pres.ShapeType.rect, {
x: 0.15, y: 1.6 + i * 0.9, w: 2.6, h: 0.75,
fill: { color: ACCENT2, transparency: 50 },
line: { color: ACCENT2, width: 1 }
});
s.addText(a.label, {
x: 0.2, y: 1.62 + i * 0.9, w: 2.5, h: 0.4,
fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri", margin: 2
});
s.addText(a.sub, {
x: 0.2, y: 2.0 + i * 0.9, w: 2.5, h: 0.28,
fontSize: 9, color: ACCENT3, fontFace: "Calibri", italic: true, margin: 2
});
});
// Center — CNS Processing box
s.addShape(pres.ShapeType.rect, {
x: 3.35, y: 1.55, w: 3.3, h: 3.4,
fill: { color: MID_BG },
line: { color: YELLOW, width: 2 }
});
s.addText("CNS PROCESSING", {
x: 3.35, y: 1.55, w: 3.3, h: 0.45,
fontSize: 12, bold: true, color: YELLOW, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addShape(pres.ShapeType.rect, {
x: 3.6, y: 2.1, w: 2.8, h: 0.65,
fill: { color: ACCENT, transparency: 40 },
line: { color: ACCENT, width: 1 }
});
s.addText("Brainstem", {
x: 3.6, y: 2.1, w: 2.8, h: 0.65,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText("↕ Integration", {
x: 3.6, y: 2.78, w: 2.8, h: 0.35,
fontSize: 10, color: SUBTEXT, fontFace: "Calibri", align: "center", margin: 0
});
s.addShape(pres.ShapeType.rect, {
x: 3.6, y: 3.2, w: 2.8, h: 0.65,
fill: { color: ACCENT2, transparency: 40 },
line: { color: ACCENT2, width: 1 }
});
s.addText("Sensory & Motor Cortex", {
x: 3.6, y: 3.2, w: 2.8, h: 0.65,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText("Corollary discharge pathway", {
x: 3.6, y: 3.9, w: 2.8, h: 0.3,
fontSize: 9, color: SUBTEXT, fontFace: "Calibri", align: "center", italic: true, margin: 0
});
s.addText("MISMATCH\n= DYSPNEA", {
x: 3.75, y: 4.25, w: 2.5, h: 0.6,
fontSize: 14, bold: true, color: YELLOW, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
// Right — Sensations / descriptors
s.addText("PATIENT DESCRIPTORS", {
x: 7.15, y: 1.15, w: 2.6, h: 0.35,
fontSize: 11, bold: true, color: ACCENT3, fontFace: "Calibri",
charSpacing: 2, margin: 0
});
const descs = [
{ label: "\"Air Hunger\"", color: ACCENT, sub: "Chemoreceptor-driven; ↑ drive to breathe" },
{ label: "\"Chest Tightness\"", color: ACCENT2, sub: "Vagal irritant receptors; bronchospasm" },
{ label: "\"Work of Breathing\"", color: YELLOW, sub: "Motor cortex → sensory cortex signal" },
{ label: "\"Cannot get a\ndeep breath\"", color: ACCENT3, sub: "Mechanoreceptor / compliance signal" },
];
descs.forEach((d, i) => {
s.addShape(pres.ShapeType.rect, {
x: 7.15, y: 1.6 + i * 0.9, w: 2.6, h: 0.75,
fill: { color: DARK_BG },
line: { color: d.color, width: 1.5 }
});
s.addText(d.label, {
x: 7.2, y: 1.62 + i * 0.9, w: 2.5, h: 0.4,
fontSize: 10.5, bold: true, color: d.color, fontFace: "Calibri", margin: 2
});
s.addText(d.sub, {
x: 7.2, y: 2.0 + i * 0.9, w: 2.5, h: 0.28,
fontSize: 9, color: SUBTEXT, fontFace: "Calibri", italic: true, margin: 2
});
});
// Arrows (lines)
// Afferent → Brainstem
s.addShape(pres.ShapeType.line, { x: 2.75, y: 3.05, w: 0.6, h: 0, line: { color: ACCENT3, width: 1.5 } });
// Brainstem → descriptors
s.addShape(pres.ShapeType.line, { x: 6.65, y: 3.05, w: 0.5, h: 0, line: { color: ACCENT3, width: 1.5 } });
}
// ══════════════════════════════════════════════════════
// SLIDE 6 — DIFFERENTIAL DIAGNOSIS: PULMONARY
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Differential Diagnosis — Pulmonary Causes", "Table 37-2: Systematic approach by organ system");
const rows = [
{
system: "Airways Disease",
disease: "Asthma, COPD, Upper Airway Obstruction",
symptoms: "Chest tightness, wheeze, tachypnea, ↑WOB, air hunger, inability to take deep breath",
findings: "Wheezing, accessory muscle use, exertional hypoxemia (COPD)",
mechanism: "↑WOB, hypoxemia, hypercapnia, pulmonary receptor stimulation",
tests: "Peak flow (↓), Spirometry (OVD), CXR (hyperinflation), Chest CT"
},
{
system: "Parenchymal Disease",
disease: "Interstitial Lung Disease (IPF, CTD, drug-induced)",
symptoms: "Air hunger, inability to take deep breath, exertional hypoxemia",
findings: "Dry end-inspiratory crackles, digital clubbing",
mechanism: "↑WOB, ↑respiratory drive, hypoxemia, hypercapnia, receptor stimulation",
tests: "Spirometry & lung volumes (RVD), CXR and CT (ILD pattern)"
},
{
system: "Chest Wall Disease",
disease: "Kyphoscoliosis, Neuromuscular weakness (ALS, etc.)",
symptoms: "↑WOB, inability to take deep breath, fatigue",
findings: "↓Diaphragm excursion, atelectasis",
mechanism: "↑WOB, pulmonary receptor stimulation (if atelectasis)",
tests: "Spirometry (RVD), MIP & MEP (↓ in NM weakness)"
},
];
const colW = [1.3, 1.7, 2.1, 1.7, 1.5, 1.5];
const colX = [0.25, 1.55, 3.25, 5.35, 7.05, 8.55];
const headers = ["System", "Disease", "Symptoms", "Findings", "Mechanism", "Tests"];
const hColors = [ACCENT, ACCENT2, ACCENT3, ACCENT, ACCENT2, ACCENT3];
// Header row
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, {
x: colX[i], y: 1.15, w: colW[i], h: 0.45,
fill: { color: hColors[i], transparency: 20 },
line: { color: hColors[i] }
});
s.addText(h, {
x: colX[i], y: 1.15, w: colW[i], h: 0.45,
fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 2
});
});
// Data rows
rows.forEach((r, ri) => {
const y = 1.65 + ri * 1.25;
const bg = ri % 2 === 0 ? DARK_BG : MID_BG;
const cells = [r.system, r.disease, r.symptoms, r.findings, r.mechanism, r.tests];
cells.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, {
x: colX[ci], y: y, w: colW[ci], h: 1.2,
fill: { color: bg },
line: { color: ACCENT2, width: 0.5 }
});
s.addText(cell, {
x: colX[ci] + 0.04, y: y + 0.04, w: colW[ci] - 0.08, h: 1.12,
fontSize: ci === 0 ? 10.5 : 9.5,
bold: ci === 0,
color: ci === 0 ? YELLOW : LIGHT_GRAY,
fontFace: "Calibri", valign: "middle", margin: 3
});
});
});
s.addText("Source: Harrison's Table 37-2", {
x: 0.25, y: 5.3, w: 4, h: 0.22,
fontSize: 8.5, color: SUBTEXT, fontFace: "Calibri", italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════
// SLIDE 7 — DIFFERENTIAL DIAGNOSIS: CARDIAC & OTHER
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Differential Diagnosis — Cardiac & Other Causes", "Table 37-2 continued");
// Pulmonary Vascular
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 9.5, h: 0.42, fill: { color: ACCENT2, transparency: 30 }, line: { color: ACCENT2 } });
s.addText("PULMONARY VASCULATURE", { x: 0.3, y: 1.15, w: 3, h: 0.42, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
s.addText("Pulmonary Hypertension — all causes (primary, thromboembolic, secondary)", { x: 3.0, y: 1.15, w: 6.6, h: 0.42, fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 4 });
const pvData = [
["Symptoms", "Tachypnea, exertional dyspnea"],
["Physical Findings", "Elevated right heart pressures"],
["Mechanism", "↑Respiratory drive, hypoxemia, stimulation of vascular receptors"],
["Diagnostics", "DLCO (↓), ECG, ECHO (pulmonary artery pressures)"]
];
pvData.forEach((d, i) => {
s.addText(d[0] + ": ", { x: 0.3, y: 1.65 + i * 0.25, w: 1.4, h: 0.22, fontSize: 10, bold: true, color: ACCENT3, fontFace: "Calibri", margin: 0 });
s.addText(d[1], { x: 1.7, y: 1.65 + i * 0.25, w: 8.0, h: 0.22, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
});
// Cardiac — Left Heart
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 2.72, w: 4.65, h: 2.65, fill: { color: MID_BG }, line: { color: ACCENT, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 2.72, w: 4.65, h: 0.42, fill: { color: ACCENT, transparency: 10 }, line: { color: ACCENT } });
s.addText("LEFT HEART FAILURE", { x: 0.3, y: 2.72, w: 4.55, h: 0.42, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const lhfItems = [
"Diseases: CAD, Cardiomyopathy",
"Symptoms: Chest tightness, air hunger, orthopnea, PND",
"Findings: Elevated left heart pressures, wet crackles, S3/S4 gallop",
"Mechanism: ↑WOB, hypoxemia, stimulation of vascular & pulmonary receptors",
"Tests: BNP (↑ in acute setting), ECG, ECHO, Stress test, LHC"
];
lhfItems.forEach((item, i) => {
s.addText("▸ " + item, { x: 0.4, y: 3.22 + i * 0.39, w: 4.4, h: 0.36, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", margin: 2 });
});
// Cardiac — Pericardial
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.72, w: 4.65, h: 1.25, fill: { color: MID_BG }, line: { color: ACCENT2, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.72, w: 4.65, h: 0.42, fill: { color: ACCENT2, transparency: 10 }, line: { color: ACCENT2 } });
s.addText("PERICARDIAL DISEASE", { x: 5.15, y: 2.72, w: 4.55, h: 0.42, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
["Constrictive Pericarditis, Cardiac Tamponade", "Finding: Pulsus paradoxus (tamponade)", "Same evaluation workup as LHF"].forEach((item, i) => {
s.addText("▸ " + item, { x: 5.25, y: 3.22 + i * 0.35, w: 4.4, h: 0.32, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", margin: 2 });
});
// Other Causes
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 4.05, w: 4.65, h: 1.32, fill: { color: MID_BG }, line: { color: YELLOW, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 4.05, w: 4.65, h: 0.42, fill: { color: YELLOW, transparency: 20 }, line: { color: YELLOW } });
s.addText("OTHER CAUSES", { x: 5.15, y: 4.05, w: 4.55, h: 0.42, fontSize: 12, bold: true, color: TEXT_DARK, fontFace: "Calibri", valign: "middle", margin: 4 });
const others = [
"Anemia — metaboreceptors & chemoreceptors (anaerobic metabolism)",
"Deconditioning (poor fitness) — early anaerobic threshold",
"Psychological / Anxiety disorders",
"Metabolic disturbances (thyroid, metabolic acidosis)",
"GI causes: GERD, Aspiration pneumonitis"
];
others.forEach((item, i) => {
s.addText("▸ " + item, { x: 5.25, y: 4.55 + i * 0.22, w: 4.4, h: 0.2, fontSize: 9.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 1 });
});
}
// ══════════════════════════════════════════════════════
// SLIDE 8 — HISTORY & CLINICAL EVALUATION
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Clinical Evaluation — History Taking", "Focused symptom characterization to narrow differential");
const sections = [
{
title: "Quality of Breathing Discomfort",
color: ACCENT,
items: [
"\"Air hunger / urge to breathe\" → chemoreceptor activation (hypoxemia, hypercapnia)",
"\"Chest tightness\" → bronchospasm, vagal irritant receptors (asthma, COPD)",
"\"Work / effort of breathing\" → motor cortex signals (NM disease, severe obstruction)",
"\"Cannot get a deep breath / unsatisfied inspiration\" → hyperinflation, effusion"
]
},
{
title: "Timing & Pattern",
color: ACCENT2,
items: [
"Acute onset: PE, pneumothorax, acute LVF, asthma attack",
"Subacute / weeks: pleural effusion, decompensating heart failure, pneumonia",
"Chronic: COPD, ILD, pulmonary hypertension, chronic heart failure",
"Orthopnea → LVF, diaphragm weakness; PND → LVF",
"Platypnea (worse upright) → intracardiac shunts, hepatopulmonary syndrome"
]
},
{
title: "Provocative & Relieving Factors",
color: ACCENT3,
items: [
"Exertional dyspnea: assess exercise tolerance to grade severity",
"Allergen / seasonal / nocturnal → asthma",
"Relief with bronchodilators → reversible airway disease",
"Posture-dependent changes → pericardial disease, effusions"
]
},
{
title: "Associated Symptoms",
color: YELLOW,
items: [
"Cough, sputum, hemoptysis → airway / parenchymal disease",
"Chest pain → ACS, PE, pericarditis",
"Leg swelling / DVT signs → PE, right heart failure",
"Fever, chills → infectious etiology",
"Weight loss → malignancy, chronic infection"
]
}
];
sections.forEach((sec, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.25 : 5.1;
const y = 1.15 + row * 2.2;
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 4.65, h: 2.05,
fill: { color: DARK_BG },
line: { color: sec.color, width: 1.5 }
});
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 4.65, h: 0.4,
fill: { color: sec.color, transparency: 25 },
line: { color: sec.color }
});
s.addText(sec.title, {
x: x + 0.1, y: y, w: 4.5, h: 0.4,
fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri",
valign: "middle", margin: 2
});
const bullets = sec.items.map((item, bi) => ({
text: item,
options: { bullet: { code: "25CF", color: sec.color }, breakLine: bi < sec.items.length - 1, fontSize: 9.5, color: LIGHT_GRAY }
}));
s.addText(bullets, {
x: x + 0.12, y: y + 0.45, w: 4.45, h: 1.55,
fontFace: "Calibri", valign: "top", margin: 3
});
});
}
// ══════════════════════════════════════════════════════
// SLIDE 9 — PHYSICAL EXAMINATION
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Physical Examination — Systematic Approach", "Key findings and their clinical correlates");
const examSections = [
{
region: "General",
findings: [
"Pallor of conjunctivae → anemia",
"Cyanosis (central / peripheral)",
"Spider angiomata, gynecomastia → cirrhosis (hepatopulmonary syndrome)",
"Clubbing → ILD, bronchiectasis, malignancy"
]
},
{
region: "Chest Inspection",
findings: [
"Asymmetry of movement → effusion, pneumothorax, NM weakness",
"Accessory muscle use → significant airway obstruction",
"Paradoxical abdominal movement in supine → diaphragm weakness",
"Rounding of abdomen during exhalation → pulmonary edema",
"Kyphoscoliosis → chest wall restriction"
]
},
{
region: "Chest Percussion",
findings: [
"Dullness → pleural effusion, consolidation",
"Hyperresonance → pneumothorax, emphysema"
]
},
{
region: "Auscultation",
findings: [
"Wheeze, rhonchi, prolonged expiratory phase → airway obstruction",
"Diminished breath sounds → COPD, effusion, pneumothorax",
"Dry end-inspiratory crackles → ILD",
"Wet crackles → pulmonary edema (LVF)"
]
},
{
region: "Cardiovascular",
findings: [
"JVD, peripheral edema → right heart pressure elevation",
"Accentuated P2 → pulmonary hypertension",
"S3 gallop → LV dysfunction (sensitive for heart failure)",
"S4 gallop → reduced LV compliance",
"Murmurs → valvular disease",
"Pulsus paradoxus → cardiac tamponade, severe asthma/COPD"
]
},
{
region: "Abdomen & Extremities",
findings: [
"Inward abdominal motion during inspiration → diaphragm weakness",
"Hepatomegaly / ascites → right heart failure, cirrhosis",
"Joint swelling / Raynaud's changes → collagen vascular disease (lung involvement)"
]
}
];
const positions = [
[0.25, 1.15], [3.4, 1.15], [6.55, 1.15],
[0.25, 3.15], [3.4, 3.15], [6.55, 3.15]
];
const colors = [ACCENT, ACCENT2, ACCENT3, YELLOW, ACCENT, ACCENT2];
examSections.forEach((sec, i) => {
const [x, y] = positions[i];
const col = colors[i];
const h = i === 1 || i === 4 ? 1.78 : 1.78;
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 2.95, h: 1.85,
fill: { color: MID_BG },
line: { color: col, width: 1.5 }
});
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 2.95, h: 0.38,
fill: { color: col, transparency: 20 },
line: { color: col }
});
s.addText(sec.region, {
x: x + 0.08, y: y, w: 2.82, h: 0.38,
fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri",
valign: "middle", margin: 2
});
const bullets = sec.findings.map((f, bi) => ({
text: f,
options: { bullet: { code: "2022", color: col }, breakLine: bi < sec.findings.length - 1, fontSize: 9, color: LIGHT_GRAY }
}));
s.addText(bullets, {
x: x + 0.1, y: y + 0.42, w: 2.82, h: 1.38,
fontFace: "Calibri", valign: "top", margin: 3
});
});
}
// ══════════════════════════════════════════════════════
// SLIDE 10 — DIAGNOSTIC ALGORITHM
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Diagnostic Algorithm — Fig. 37-2", "Step-wise evaluation: Phase 1 → 2 → 3");
// Start box
s.addShape(pres.ShapeType.rect, { x: 3.2, y: 1.15, w: 3.6, h: 0.55, fill: { color: ACCENT, transparency: 10 }, line: { color: ACCENT, width: 2 } });
s.addText("History + Physical Exam\n+ Walking Oximetry + Peak Flow", { x: 3.2, y: 1.15, w: 3.6, h: 0.55, fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle", margin: 2 });
// Arrow down
s.addShape(pres.ShapeType.line, { x: 5.0, y: 1.7, w: 0, h: 0.2, line: { color: WHITE, width: 1.5 } });
s.addText("Diagnosis?", { x: 3.8, y: 1.92, w: 2.4, h: 0.3, fontSize: 10, color: YELLOW, fontFace: "Calibri", align: "center", bold: true, margin: 0 });
// Yes branch
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.3, w: 1.6, h: 0.42, fill: { color: ACCENT3, transparency: 30 }, line: { color: ACCENT3 } });
s.addText("YES → TREAT", { x: 0.2, y: 2.3, w: 1.6, h: 0.42, fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.line, { x: 3.2, y: 2.32, w: -1.4, h: 0, line: { color: ACCENT3, width: 1.5 } });
// Phase 1
s.addShape(pres.ShapeType.rect, { x: 2.8, y: 2.3, w: 4.4, h: 1.0, fill: { color: DARK_BG }, line: { color: ACCENT2, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 2.8, y: 2.3, w: 4.4, h: 0.32, fill: { color: ACCENT2, transparency: 20 }, line: { color: ACCENT2 } });
s.addText("PHASE 1 — Initial Tests", { x: 2.85, y: 2.3, w: 4.3, h: 0.32, fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 2 });
s.addText("• Chest X-ray • Spirometry • ECG • CBC + Basic Metabolic Panel", { x: 2.9, y: 2.65, w: 4.25, h: 0.6, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 4 });
// Phase 2
s.addShape(pres.ShapeType.line, { x: 5.0, y: 3.3, w: 0, h: 0.2, line: { color: WHITE, width: 1.5 } });
s.addText("Diagnosis?", { x: 3.8, y: 3.52, w: 2.4, h: 0.3, fontSize: 10, color: YELLOW, fontFace: "Calibri", align: "center", bold: true, margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 2.8, y: 3.88, w: 4.4, h: 1.1, fill: { color: DARK_BG }, line: { color: YELLOW, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 2.8, y: 3.88, w: 4.4, h: 0.32, fill: { color: YELLOW, transparency: 20 }, line: { color: YELLOW } });
s.addText("PHASE 2 — Advanced Tests", { x: 2.85, y: 3.88, w: 4.3, h: 0.32, fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 2 });
s.addText("• Chest CT ± Angiography (PE) • Lung volumes + DLCO • Tests of neuromuscular function • ECHO + Cardiac stress testing", { x: 2.9, y: 4.22, w: 4.25, h: 0.7, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 4 });
// Phase 3
s.addShape(pres.ShapeType.line, { x: 5.0, y: 4.98, w: 0, h: 0.2, line: { color: WHITE, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x: 2.8, y: 5.18, w: 4.4, h: 0.28, fill: { color: ACCENT, transparency: 10 }, line: { color: ACCENT, width: 1.5 } });
s.addText("PHASE 3 — CPET + Subspecialty Referral", { x: 2.85, y: 5.18, w: 4.3, h: 0.28, fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle", margin: 2 });
// Key side note
s.addShape(pres.ShapeType.rect, { x: 7.45, y: 1.15, w: 2.3, h: 4.3, fill: { color: DARK_BG }, line: { color: ACCENT3, width: 1.5 } });
s.addText("QUICK CLUES", { x: 7.5, y: 1.2, w: 2.2, h: 0.35, fontSize: 10, bold: true, color: ACCENT3, fontFace: "Calibri", align: "center", charSpacing: 2, margin: 0 });
const clues = [
"Peak flow ↓ → asthma / COPD",
"Walking SaO₂ ↓ → ILD, PH",
"OVD on spirometry → obstructive",
"RVD on spirometry → restrictive",
"BNP ↑ → CHF (acute setting)",
"DLCO ↓ → PH, ILD, emphysema",
"MIP / MEP ↓ → NM weakness",
"ECHO → valvular, cardiomyopathy",
"CPET → distinguish cardiac vs respiratory"
];
clues.forEach((c, i) => {
s.addText("• " + c, { x: 7.55, y: 1.62 + i * 0.37, w: 2.15, h: 0.34, fontSize: 9, color: LIGHT_GRAY, fontFace: "Calibri", margin: 2 });
});
}
// ══════════════════════════════════════════════════════
// SLIDE 11 — CHEST IMAGING & SPIROMETRY
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Investigations — Chest Imaging & Pulmonary Function", "Interpreting key diagnostic findings");
// CXR section
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 4.65, h: 4.2, fill: { color: MID_BG }, line: { color: ACCENT2, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 4.65, h: 0.45, fill: { color: ACCENT2, transparency: 20 }, line: { color: ACCENT2 } });
s.addText("CHEST X-RAY / CT", { x: 0.3, y: 1.15, w: 4.55, h: 0.45, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const cxrItems = [
{ finding: "Hyperinflation (flat diaphragms, ↑AP diameter)", dx: "Obstructive lung disease (COPD, severe asthma)" },
{ finding: "Low lung volumes", dx: "ILD, diaphragmatic dysfunction, chest wall restriction" },
{ finding: "Interstitial opacities (ground glass, reticulation)", dx: "ILD, pulmonary edema" },
{ finding: "Cardiomegaly, Kerley B lines, cephalization", dx: "LV failure / pulmonary venous hypertension" },
{ finding: "Pleural effusion (blunted costophrenic angle)", dx: "Heart failure, malignancy, empyema, parapneumonic" },
{ finding: "Unilateral opacification", dx: "Pneumonia, lobar atelectasis, hemothorax" },
{ finding: "Pulmonary nodules / mass", dx: "Malignancy — primary or metastatic" },
{ finding: "CT angiography: filling defects", dx: "Pulmonary embolism (thromboembolic disease)" },
];
cxrItems.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.68 + i * 0.46, w: 2.2, h: 0.4, fill: { color: ACCENT2, transparency: 70 }, line: { color: ACCENT2, width: 0.5 } });
s.addText(item.finding, { x: 0.34, y: 1.7 + i * 0.46, w: 2.15, h: 0.38, fontSize: 9.5, bold: true, color: ACCENT3, fontFace: "Calibri", valign: "middle", margin: 2 });
s.addText("→ " + item.dx, { x: 2.55, y: 1.7 + i * 0.46, w: 2.25, h: 0.38, fontSize: 9.5, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 2 });
});
// Spirometry / PFT section
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.15, w: 4.65, h: 4.2, fill: { color: MID_BG }, line: { color: ACCENT, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.15, w: 4.65, h: 0.45, fill: { color: ACCENT, transparency: 20 }, line: { color: ACCENT } });
s.addText("PULMONARY FUNCTION TESTS", { x: 5.15, y: 1.15, w: 4.55, h: 0.45, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const pftData = [
{ test: "Spirometry — OVD pattern", detail: "FEV₁/FVC < 0.7 → COPD, asthma, bronchiectasis\nBronchodilator reversibility (>12%, >200mL) → asthma" },
{ test: "Spirometry — RVD pattern", detail: "FVC ↓, FEV₁/FVC normal/↑ → ILD, NM weakness, chest wall disease\nConfirm with lung volumes: TLC < 80% predicted" },
{ test: "DLCO (Diffusing Capacity)", detail: "↓ DLCO → ILD, pulmonary hypertension, emphysema\nNormal DLCO with RVD → NM weakness or chest wall" },
{ test: "MIP (Max Inspiratory Pressure)", detail: "↓ MIP → NM weakness affecting inspiratory muscles\nAssess if unexplained dyspnea + restrictive pattern" },
{ test: "MEP (Max Expiratory Pressure)", detail: "↓ MEP → NM weakness (expiratory muscles)\nAssess along with MIP in suspected NM disease" },
{ test: "Bronchoprovocation Testing", detail: "For intermittent symptoms suggesting asthma\nNormal spirometry at rest; up to 1/3 of clinical asthma Dx lack bronchoreactivity" },
{ test: "Peak Flow Monitoring", detail: "Home monitoring for diurnal variation\n>20% variability diagnostic of asthma" },
];
pftData.forEach((p, i) => {
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.68 + i * 0.52, w: 4.55, h: 0.47, fill: { color: DARK_BG }, line: { color: ACCENT, width: 0.5 } });
s.addText(p.test, { x: 5.2, y: 1.7 + i * 0.52, w: 1.9, h: 0.44, fontSize: 9.5, bold: true, color: YELLOW, fontFace: "Calibri", valign: "middle", margin: 2 });
s.addText(p.detail, { x: 7.15, y: 1.7 + i * 0.52, w: 2.48, h: 0.44, fontSize: 8.5, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 2 });
});
}
// ══════════════════════════════════════════════════════
// SLIDE 12 — CARDIAC BIOMARKERS & ECHO
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Cardiac & Vascular Investigations in Dyspnea", "BNP, ECG, Echocardiography, CPET");
// BNP box
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 4.6, h: 2.0, fill: { color: DARK_BG }, line: { color: ACCENT, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 4.6, h: 0.42, fill: { color: ACCENT, transparency: 15 }, line: { color: ACCENT } });
s.addText("BNP / NT-proBNP", { x: 0.3, y: 1.15, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const bnpItems = [
"Increasingly used to assess CHF in ACUTE dyspnea",
"Elevated in LV dysfunction, volume overload, myocarditis",
"CAUTION: Also elevated in RV strain (PE, cor pulmonale)",
"Normal BNP has high negative predictive value for CHF",
"Interpret in clinical context — not a standalone test"
];
bnpItems.forEach((item, i) => {
s.addText("▸ " + item, { x: 0.35, y: 1.63 + i * 0.28, w: 4.4, h: 0.26, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", margin: 2 });
});
// ECG box
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.15, w: 4.6, h: 2.0, fill: { color: DARK_BG }, line: { color: ACCENT2, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.15, w: 4.6, h: 0.42, fill: { color: ACCENT2, transparency: 15 }, line: { color: ACCENT2 } });
s.addText("ECG", { x: 5.2, y: 1.15, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const ecgItems = [
"LVH → hypertensive cardiomyopathy, aortic stenosis",
"ST changes → ischemic cardiomyopathy, ACS",
"Right heart strain pattern (S1Q3T3, RBBB) → PE, PH",
"Arrhythmias → tachyarrhythmia-induced cardiomyopathy",
"Low voltage → pericardial effusion, cardiac tamponade"
];
ecgItems.forEach((item, i) => {
s.addText("▸ " + item, { x: 5.25, y: 1.63 + i * 0.28, w: 4.4, h: 0.26, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", margin: 2 });
});
// ECHO
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.25, w: 4.6, h: 2.15, fill: { color: DARK_BG }, line: { color: ACCENT3, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.25, w: 4.6, h: 0.42, fill: { color: ACCENT3, transparency: 20 }, line: { color: ACCENT3 } });
s.addText("Echocardiography", { x: 0.3, y: 3.25, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: TEXT_DARK, fontFace: "Calibri", valign: "middle", margin: 4 });
const echoItems = [
"LV systolic function — EF%, wall motion abnormalities",
"LV diastolic function — E/A ratio, TDI patterns",
"Pulmonary artery pressures → pulmonary hypertension",
"Valvular disease — stenosis, regurgitation",
"Pericardial disease — effusion, diastolic collapse (tamponade)",
"RV size and function → PE, cor pulmonale"
];
echoItems.forEach((item, i) => {
s.addText("▸ " + item, { x: 0.35, y: 3.73 + i * 0.26, w: 4.4, h: 0.24, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", margin: 2 });
});
// CPET
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 3.25, w: 4.6, h: 2.15, fill: { color: DARK_BG }, line: { color: YELLOW, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 3.25, w: 4.6, h: 0.42, fill: { color: YELLOW, transparency: 20 }, line: { color: YELLOW } });
s.addText("Cardiopulmonary Exercise Test (CPET)", { x: 5.2, y: 3.25, w: 4.5, h: 0.42, fontSize: 12, bold: true, color: TEXT_DARK, fontFace: "Calibri", valign: "middle", margin: 4 });
const cpetItems = [
"Incremental symptom-limited exercise (cycle / treadmill)",
"Measures: VO₂max, VCO₂, VE, AT, O₂-pulse, HR",
"RESPIRATORY cause if: peak VE ≥ predicted maximal, ↑dead space, exertional hypoxemia, bronchospasm",
"CARDIAC cause if: HR > 85% predicted max, early AT, BP fall, ↓O₂-pulse, ischemic ECG changes"
];
cpetItems.forEach((item, i) => {
s.addText("▸ " + item, { x: 5.25, y: 3.73 + i * 0.39, w: 4.4, h: 0.36, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 2 });
});
}
// ══════════════════════════════════════════════════════
// SLIDE 13 — DISTINGUISHING CARDIAC vs RESPIRATORY
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Cardiac vs. Respiratory Dyspnea — Differentiation", "Systematic approach when both systems are involved");
// Context box
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 9.5, h: 0.5, fill: { color: MID_BG }, line: { color: SUBTEXT, width: 1 } });
s.addText("Clinical scenario: Patient with evidence of both pulmonary AND cardiac disease, not responding to treatment, or unclear primary driver of dyspnea", {
x: 0.3, y: 1.17, w: 9.4, h: 0.46, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", italic: true, valign: "middle", margin: 4
});
// Two columns
const cols = [
{
title: "RESPIRATORY SYSTEM — Features at CPET",
color: ACCENT2,
features: [
"Peak VE ≥ predicted maximal ventilation",
"↑ Dead space fraction (VD/VT) at peak exercise",
"Exertional arterial hypoxemia develops",
"Bronchospasm on exercise (wheeze, ↓FEV₁)",
"Respiratory limitation: VE/VCO₂ slope steepness",
"O₂-pulse remains normal or ↑",
"HR does not reach 85% of predicted maximum"
]
},
{
title: "CARDIOVASCULAR SYSTEM — Features at CPET",
color: ACCENT,
features: [
"HR > 85% of predicted maximum at peak exercise",
"Anaerobic threshold (AT) reached early",
"Blood pressure becomes excessively high OR decreases",
"O₂-pulse (VO₂/HR) decreases — indicator of ↓stroke volume",
"Ischemic changes on ECG during exercise",
"Low VO₂max with cardiovascular limitation pattern",
"Hemodynamic monitoring: ↑PCWP or ↓cardiac output"
]
}
];
cols.forEach((col, ci) => {
const x = ci === 0 ? 0.25 : 5.1;
s.addShape(pres.ShapeType.rect, { x, y: 1.78, w: 4.65, h: 3.57, fill: { color: MID_BG }, line: { color: col.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 1.78, w: 4.65, h: 0.45, fill: { color: col.color, transparency: 15 }, line: { color: col.color } });
s.addText(col.title, { x: x + 0.08, y: 1.78, w: 4.52, h: 0.45, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const bullets = col.features.map((f, bi) => ({
text: f, options: { bullet: { code: "25B6", color: col.color }, breakLine: bi < col.features.length - 1, fontSize: 10.5, color: LIGHT_GRAY }
}));
s.addText(bullets, { x: x + 0.12, y: 2.3, w: 4.45, h: 3.0, fontFace: "Calibri", valign: "top", margin: 5 });
});
// CPET note
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 5.22, w: 9.5, h: 0.28, fill: { color: YELLOW, transparency: 60 }, line: { color: YELLOW, width: 1 } });
s.addText("Note: CPET may include noninvasive and invasive measures of pulmonary vascular pressures and cardiac output for definitive differentiation", {
x: 0.35, y: 5.24, w: 9.3, h: 0.24, fontSize: 9.5, color: WHITE, fontFace: "Calibri", italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════
// SLIDE 14 — MANAGEMENT
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Management of Dyspnea", "Principles: treat the underlying cause + symptom palliation");
// Principles box
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.15, w: 9.5, h: 0.45, fill: { color: ACCENT, transparency: 30 }, line: { color: ACCENT, width: 1 } });
s.addText("PRIMARY PRINCIPLE: Identify and treat the underlying disease process driving dyspnea", {
x: 0.35, y: 1.15, w: 9.3, h: 0.45, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4
});
const mgmtCols = [
{
title: "Pulmonary — Obstructive",
color: ACCENT2,
items: [
"SABA (salbutamol) — acute bronchodilation",
"LABA + ICS — long-term asthma/COPD control",
"LAMA (tiotropium) — COPD maintenance",
"Systemic corticosteroids — acute exacerbations",
"Non-invasive ventilation (BiPAP) — COPD exacerbation",
"Supplemental O₂ for chronic hypoxemia (PaO₂ < 55 mmHg)"
]
},
{
title: "Pulmonary — ILD / Restrictive",
color: ACCENT3,
items: [
"Antifibrotics: Pirfenidone / Nintedanib for IPF",
"Immunosuppression for CTD-ILD, HP",
"Supplemental O₂ for exertional hypoxemia",
"Pulmonary rehabilitation",
"Lung transplant evaluation for advanced disease"
]
},
{
title: "Cardiac Causes",
color: ACCENT,
items: [
"Diuretics (furosemide) → pulmonary edema relief",
"ACEi/ARB/ARNI — LV remodeling benefit",
"Beta-blockers — survival benefit in HFrEF",
"SGLT2 inhibitors — reduce HF hospitalizations",
"Revascularization for ischemic cardiomyopathy",
"Pericardiocentesis for tamponade"
]
},
{
title: "Pulmonary Hypertension",
color: YELLOW,
items: [
"Anticoagulation for chronic thromboembolic PH",
"Pulmonary vasodilators: PDE-5i, ERA, prostacyclins",
"O₂ therapy for hypoxemia",
"Surgical / endovascular for CTEPH (PEA, BPA)"
]
}
];
mgmtCols.forEach((col, i) => {
const x = 0.25 + (i % 2) * 4.87;
const y = 1.72 + Math.floor(i / 2) * 1.95;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.65, h: 1.8, fill: { color: DARK_BG }, line: { color: col.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 4.65, h: 0.38, fill: { color: col.color, transparency: 25 }, line: { color: col.color } });
s.addText(col.title, { x: x + 0.08, y, w: 4.52, h: 0.38, fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
const bullets = col.items.map((item, bi) => ({
text: item, options: { bullet: { code: "2022", color: col.color }, breakLine: bi < col.items.length - 1, fontSize: 9.5, color: LIGHT_GRAY }
}));
s.addText(bullets, { x: x + 0.1, y: y + 0.42, w: 4.48, h: 1.32, fontFace: "Calibri", valign: "top", margin: 3 });
});
// Palliative note
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 5.25, w: 9.5, h: 0.28, fill: { color: DARK_BG }, line: { color: SUBTEXT, width: 1 } });
s.addText("Symptom palliation: Opioids (low-dose morphine) reduce dyspnea in refractory/end-stage disease. Inhaled furosemide under study. Yoga/Tai Chi may help in COPD.", {
x: 0.35, y: 5.27, w: 9.3, h: 0.24, fontSize: 9, color: SUBTEXT, fontFace: "Calibri", italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════
// SLIDE 15 — SYMPTOM PALLIATION & NOVEL APPROACHES
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
addHeader(s, "Symptom Palliation & Novel Approaches", "When underlying disease is refractory or end-stage");
const pallBox = [
{
title: "Opioids",
color: ACCENT,
body: "Low-dose oral or parenteral opioids (morphine, hydromorphone) reduce the sensation of air hunger by modifying afferent signaling at the CNS level. Evidence from randomized trials supports modest but meaningful relief in advanced COPD and cancer-related dyspnea. Risk of respiratory depression requires careful titration."
},
{
title: "Supplemental Oxygen",
color: ACCENT2,
body: "Indicated for resting hypoxemia (PaO₂ < 55 mmHg or SaO₂ < 88%). Reduces pulmonary hypertension, improves exercise capacity, and reduces dyspnea in COPD. Less clear benefit in non-hypoxemic patients — cool-air facial stimulation (fan) may provide symptomatic relief via trigeminal nerve."
},
{
title: "Inhaled Furosemide",
color: YELLOW,
body: "Under active investigation. Proposed mechanism: alters afferent sensory signaling from pulmonary stretch receptors, thereby reducing the perception of dyspnea. Randomized controlled trials have not yet demonstrated consistent benefit. May have a role in chemoreceptor-driven air hunger."
},
{
title: "Mind-Body Approaches",
color: ACCENT3,
body: "Yoga and Tai Chi: RCTs show benefit in managing respiratory symptoms in obstructive lung disease. Mechanisms include improved respiratory muscle function, reduced anxiety (psychological component of dyspnea), and enhanced parasympathetic tone. Adjunct to pharmacotherapy in COPD and asthma."
},
{
title: "Pulmonary Rehabilitation",
color: ACCENT,
body: "Strong evidence base. Exercise training improves exercise tolerance, reduces dyspnea, improves health-related QoL in COPD. Reconditioning reduces early anaerobic threshold (a key driver of exertional dyspnea in deconditioning). Should be offered to all eligible COPD patients."
},
{
title: "Anxiolytics / Antidepressants",
color: ACCENT2,
body: "Psychological factors modulate dyspnea perception significantly. Benzodiazepines provide short-term relief in anxiety-driven dyspnea. SSRIs may benefit chronic breathlessness syndrome. Cognitive-behavioral therapy increasingly recommended in multidisciplinary dyspnea management."
}
];
const positions2 = [
[0.25, 1.15], [3.4, 1.15], [6.55, 1.15],
[0.25, 3.25], [3.4, 3.25], [6.55, 3.25]
];
pallBox.forEach((box, i) => {
const [x, y] = positions2[i];
s.addShape(pres.ShapeType.rect, { x, y, w: 2.95, h: 1.95, fill: { color: MID_BG }, line: { color: box.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 2.95, h: 0.4, fill: { color: box.color, transparency: 20 }, line: { color: box.color } });
s.addText(box.title, { x: x + 0.08, y, w: 2.82, h: 0.4, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 4 });
s.addText(box.body, { x: x + 0.1, y: y + 0.45, w: 2.78, h: 1.46, fontSize: 9, color: LIGHT_GRAY, fontFace: "Calibri", valign: "top", margin: 4 });
});
}
// ══════════════════════════════════════════════════════
// SLIDE 16 — TAKE-HOME MESSAGES
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, MID_BG);
addHeader(s, "Take-Home Messages", "Core concepts every clinician must know");
const messages = [
{
num: "1",
msg: "Dyspnea is a SUBJECTIVE symptom — the quality descriptor (air hunger vs. chest tightness vs. increased WOB) guides the underlying mechanism and helps narrow the differential.",
color: ACCENT
},
{
num: "2",
msg: "Three pathways drive dyspnea: (a) afferent signals from chemoreceptors and mechanoreceptors, (b) efferent commands from the motor cortex, and (c) efferent-reafferent MISMATCH — the key unifying concept.",
color: ACCENT2
},
{
num: "3",
msg: "Work through the differential systematically: Pulmonary (airways → parenchyma → chest wall → vasculature) → Cardiac (LVF → pericardium) → Other (anemia, deconditioning, anxiety, metabolic, GI).",
color: ACCENT3
},
{
num: "4",
msg: "The diagnostic algorithm is tiered. Start with H&P + walking oximetry + peak flow. Then Phase 1 (CXR, spirometry, ECG, labs). Phase 2 (CT, lung volumes, DLCO, ECHO). Phase 3: CPET for undifferentiated cases.",
color: YELLOW
},
{
num: "5",
msg: "BNP is useful in acute dyspnea to evaluate for CHF, but can be elevated in RV strain — interpret in context. DLCO reduction points to ILD, PH, or emphysema. MIP/MEP isolates neuromuscular causes.",
color: ACCENT
},
{
num: "6",
msg: "CPET is the gold standard to separate cardiac from respiratory limitation when both systems are diseased. Respiratory: peak VE ≥ MVV, ↑dead space, hypoxemia. Cardiac: HR >85% max, early AT, ↓O₂-pulse.",
color: ACCENT2
},
{
num: "7",
msg: "Management is primarily etiology-directed. For refractory/palliative cases: low-dose opioids (evidence-based), supplemental O₂ for hypoxemia, pulmonary rehab, mind-body approaches, and anxiolytics as adjuncts.",
color: ACCENT3
},
];
messages.forEach((m, i) => {
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: 1.15 + i * 0.62, w: 9.5, h: 0.57,
fill: { color: DARK_BG },
line: { color: m.color, width: 1 }
});
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: 1.15 + i * 0.62, w: 0.5, h: 0.57,
fill: { color: m.color, transparency: 10 },
line: { color: m.color }
});
s.addText(m.num, {
x: 0.25, y: 1.15 + i * 0.62, w: 0.5, h: 0.57,
fontSize: 15, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText(m.msg, {
x: 0.82, y: 1.17 + i * 0.62, w: 8.85, h: 0.53,
fontSize: 9.8, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle", margin: 3
});
});
}
// ══════════════════════════════════════════════════════
// SLIDE 17 — THANK YOU / Q&A
// ══════════════════════════════════════════════════════
{
let s = pres.addSlide();
setBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: MID_BG, transparency: 60 },
line: { color: MID_BG }
});
// Left accent bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.1, h: 5.625,
fill: { color: ACCENT },
line: { color: ACCENT }
});
s.addShape(pres.ShapeType.rect, {
x: 9.9, y: 0, w: 0.1, h: 5.625,
fill: { color: ACCENT2 },
line: { color: ACCENT2 }
});
s.addText("Thank You", {
x: 1, y: 0.7, w: 8, h: 1.2,
fontSize: 60, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", margin: 0
});
s.addShape(pres.ShapeType.line, { x: 2, y: 2.0, w: 6, h: 0, line: { color: ACCENT, width: 2.5 } });
s.addText("Questions & Discussion", {
x: 1, y: 2.15, w: 8, h: 0.65,
fontSize: 26, color: YELLOW, fontFace: "Calibri", align: "center",
bold: true, margin: 0
});
s.addText("Chapter 37 — Dyspnea\nHarrison's Principles of Internal Medicine", {
x: 1, y: 2.9, w: 8, h: 0.65,
fontSize: 14, color: ACCENT3, fontFace: "Calibri", align: "center",
italic: true, margin: 0
});
// Key reference
s.addShape(pres.ShapeType.rect, { x: 1.5, y: 3.75, w: 7, h: 0.55, fill: { color: DARK_BG }, line: { color: ACCENT2, width: 1 } });
s.addText("Key Reference: Parshall MB et al. An Official American Thoracic Society Statement: Update on the mechanisms, assessment, and management of dyspnea. Am J Respir Crit Care Med 185:435, 2012.", {
x: 1.6, y: 3.78, w: 6.8, h: 0.5, fontSize: 9, color: SUBTEXT, fontFace: "Calibri",
italic: true, valign: "middle", margin: 3
});
s.addText("Presented by: MD General Medicine, 1st Year Resident | May 2026", {
x: 1, y: 4.45, w: 8, h: 0.3, fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri",
align: "center", margin: 0
});
}
// ══════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/dyspnea-pptx/Dyspnea_Harrisons_Presentation.pptx" })
.then(() => console.log("SUCCESS: Presentation saved!"))
.catch(err => console.error("ERROR:", err));
cd /home/daytona/workspace/dyspnea-pptx && node create_presentation.js
ls -lh /home/daytona/workspace/dyspnea-pptx/
Dyspnea Harrisons Presentation
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide — bold design with key theme preview panel |
| 2 | Lecture outline — 10 numbered sections at a glance |
| 3 | Definition — ATS definition + 4 key characteristic cards |
| 4 | Mechanisms overview — 3 columns: Afferent / Efferent / Mismatch with all receptor types |
| 5 | Signaling pathways (Fig. 37-1) — full pathway diagram with patient descriptors mapped to mechanisms |
| 6 | DD: Pulmonary causes — Table 37-2 (airways, parenchymal, chest wall) with symptoms, findings, mechanisms, tests |
| 7 | DD: Cardiac & other causes — pulmonary vasculature, LHF, pericardial disease, anemia, deconditioning, anxiety, GI |
| 8 | History taking — 4 panels: quality of dyspnea, timing, precipitants, associated symptoms |
| 9 | Physical examination — 6 regional panels: general → cardiovascular → abdomen, with clinical correlates |
| 10 | Diagnostic algorithm (Fig. 37-2) — Phase 1 / 2 / 3 flowchart + quick clues sidebar |
| 11 | CXR & PFT interpretation — CXR findings with diagnoses + spirometry, DLCO, MIP/MEP, bronchoprovocation |
| 12 | Cardiac investigations — BNP pitfalls, ECG patterns, ECHO parameters, CPET methodology |
| 13 | Cardiac vs. Respiratory dyspnea — CPET criteria for each, indications for invasive measurement |
| 14 | Management — 4 panels by etiology + palliative note |
| 15 | Symptom palliation & novel approaches — opioids, O₂, inhaled furosemide, yoga/Tai Chi, pulmonary rehab, anxiolytics |
| 16 | 7 take-home messages — concise, numbered, color-coded |
| 17 | Thank you / Q&A — with ATS reference citation |