Can you make a ppt presentation on "Diabetic Kidney Disease" based on Davidson's Principles and Practice of Medicine 24th edition

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/dkd-ppt && ls /home/daytona/workspace/dkd-ppt/

Writing File

~/dkd-ppt/dkd_presentation.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Diabetic Kidney Disease";
pres.author = "Davidson's Principles and Practice of Medicine, 24th Edition";

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:      "0D2B55",   // dominant dark
  teal:      "1A7A8A",   // supporting
  tealLight: "2DA8BC",   // accent
  gold:      "F0A500",   // highlight accent
  white:     "FFFFFF",
  offwhite:  "F4F7FA",
  slate:     "4A6278",
  lightGray: "D6E4ED",
  darkText:  "1A2B3C",
};

// ─── HELPERS ─────────────────────────────────────────────────────────────────
function addHeader(slide, text, subtext) {
  // Dark navy top bar
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.navy }, line: { color: C.navy } });
  slide.addText(text, { x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 20, bold: true, color: C.white, valign: "middle", margin: 0 });
  if (subtext) {
    slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.75, w: 10, h: 0.32, fill: { color: C.teal }, line: { color: C.teal } });
    slide.addText(subtext, { x: 0.3, y: 0.75, w: 9.4, h: 0.32, fontSize: 11, color: C.white, italic: true, valign: "middle", margin: 0 });
  }
}

function addFooter(slide, pageNum) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.navy }, line: { color: C.navy } });
  slide.addText("Davidson's Principles & Practice of Medicine, 24th Ed  |  Diabetic Kidney Disease", {
    x: 0.2, y: 5.35, w: 8.6, h: 0.275, fontSize: 8, color: C.lightGray, valign: "middle", margin: 0
  });
  slide.addText(`${pageNum}`, { x: 9.2, y: 5.35, w: 0.6, h: 0.275, fontSize: 8, color: C.gold, bold: true, align: "right", valign: "middle", margin: 0 });
}

function addSectionDivider(slide, title, subtitle) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 2.2, w: 10, h: 0.08, fill: { color: C.gold }, line: { color: C.gold } });
  slide.addText(title, { x: 0.8, y: 1.3, w: 8.4, h: 1.2, fontSize: 38, bold: true, color: C.white, align: "center", valign: "middle" });
  if (subtitle) {
    slide.addText(subtitle, { x: 0.8, y: 2.5, w: 8.4, h: 0.8, fontSize: 16, color: C.tealLight, italic: true, align: "center" });
  }
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════
let s1 = pres.addSlide();
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Diagonal accent strip
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 3.8, w: 10, h: 1.825, fill: { color: C.teal }, line: { color: C.teal } });
// Gold accent line
s1.addShape(pres.shapes.RECTANGLE, { x: 0, y: 3.78, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });

s1.addText("DIABETIC KIDNEY DISEASE", {
  x: 0.6, y: 0.6, w: 8.8, h: 1.4, fontSize: 44, bold: true, color: C.white, align: "center", charSpacing: 2
});
s1.addText("(Diabetic Nephropathy)", {
  x: 0.6, y: 1.95, w: 8.8, h: 0.6, fontSize: 20, color: C.tealLight, italic: true, align: "center"
});
s1.addText("A Comprehensive Overview", {
  x: 0.6, y: 2.6, w: 8.8, h: 0.5, fontSize: 15, color: C.lightGray, align: "center"
});

s1.addText("Based on Davidson's Principles and Practice of Medicine, 24th Edition", {
  x: 0.6, y: 3.95, w: 8.8, h: 0.55, fontSize: 12, color: C.white, align: "center", bold: true
});
s1.addText("Goldman-Cecil Medicine | Comprehensive Clinical Nephrology | Brenner & Rector's The Kidney", {
  x: 0.6, y: 4.5, w: 8.8, h: 0.4, fontSize: 9, color: C.lightGray, align: "center", italic: true
});

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — TABLE OF CONTENTS
// ═══════════════════════════════════════════════════════════════════════════
let s2 = pres.addSlide();
s2.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s2, "Contents", "Overview of Topics");

const topics = [
  "01  Definition & Classification",
  "02  Epidemiology",
  "03  Pathogenesis",
  "04  Histopathology",
  "05  Staging & Natural History",
  "06  Clinical Features",
  "07  Diagnosis & Screening",
  "08  Management",
  "09  Prognosis",
];

const col1 = topics.slice(0, 5);
const col2 = topics.slice(5);

col1.forEach((t, i) => {
  const isEven = i % 2 === 0;
  s2.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.25 + i * 0.7, w: 4.3, h: 0.6, fill: { color: isEven ? C.navy : C.teal }, line: { color: C.navy }, rectRadius: 0.05 });
  s2.addText(t, { x: 0.5, y: 1.25 + i * 0.7, w: 4.1, h: 0.6, fontSize: 13, color: C.white, bold: false, valign: "middle" });
});
col2.forEach((t, i) => {
  const isEven = i % 2 === 0;
  s2.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 1.25 + i * 0.7, w: 4.3, h: 0.6, fill: { color: isEven ? C.teal : C.navy }, line: { color: C.navy }, rectRadius: 0.05 });
  s2.addText(t, { x: 5.4, y: 1.25 + i * 0.7, w: 4.1, h: 0.6, fontSize: 13, color: C.white, valign: "middle" });
});
addFooter(s2, 2);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — SECTION DIVIDER: Definition
// ═══════════════════════════════════════════════════════════════════════════
let s3 = pres.addSlide();
addSectionDivider(s3, "Definition & Classification", "What is Diabetic Kidney Disease?");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — DEFINITION
// ═══════════════════════════════════════════════════════════════════════════
let s4 = pres.addSlide();
s4.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s4, "Definition & Classification", "Diabetic Kidney Disease (DKD)");

// Key definition box
s4.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.25, w: 9.2, h: 1.05, fill: { color: C.teal }, line: { color: C.teal }, shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.18 } });
s4.addText("DKD (diabetic nephropathy) is the leading microvascular complication of diabetes mellitus and the single most common cause of end-stage renal disease (ESRD) in the industrialized world.", {
  x: 0.55, y: 1.25, w: 9.0, h: 1.05, fontSize: 12.5, color: C.white, valign: "middle", italic: true
});

s4.addText([
  { text: "Two main types of diabetes cause DKD:", options: { bold: true, breakLine: true } },
  { text: "  • Type 1 DM: ", options: { bold: true } },
  { text: "Incidence of renal disease equivalent to Type 2 DM over extended follow-up", options: { breakLine: true } },
  { text: "  • Type 2 DM: ", options: { bold: true } },
  { text: ">80% of ESRD from diabetes in USA is due to Type 2 DM (>90% of all diabetes cases)", options: { breakLine: true } },
  { text: "  • DKD is part of a generalised microvascular AND macrovascular disease complex", options: { breakLine: true } },
], { x: 0.4, y: 2.42, w: 9.2, h: 2.1, fontSize: 12.5, color: C.darkText });

// Classification box
s4.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 4.6, w: 9.2, h: 0.5, fill: { color: C.navy }, line: { color: C.navy } });
s4.addText("Terminology: 'DKD' is preferred over 'diabetic nephropathy' when diagnosis is based on clinical criteria without biopsy", {
  x: 0.55, y: 4.6, w: 9.0, h: 0.5, fontSize: 10, color: C.gold, valign: "middle"
});
addFooter(s4, 4);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — EPIDEMIOLOGY
// ═══════════════════════════════════════════════════════════════════════════
let s5 = pres.addSlide();
s5.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s5, "Epidemiology", "Global Burden of Diabetic Kidney Disease");

// Stats cards
const stats = [
  { val: "~50%", label: "of all ESRD patients in the USA have DKD as underlying cause" },
  { val: ">40%", label: "of new (incident) ESRD cases are attributable to diabetes" },
  { val: "200,000+", label: "U.S. patients currently receiving ESRD care due to diabetic nephropathy" },
];
stats.forEach((s, i) => {
  const x = 0.4 + i * 3.1;
  pres.slides[4].addShape(pres.shapes.RECTANGLE, { x, y: 1.2, w: 2.85, h: 2.2, fill: { color: C.navy }, line: { color: C.teal }, shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.2 } });
  pres.slides[4].addText(s.val, { x, y: 1.35, w: 2.85, h: 0.9, fontSize: 30, bold: true, color: C.gold, align: "center" });
  pres.slides[4].addText(s.label, { x: x + 0.1, y: 2.3, w: 2.65, h: 0.95, fontSize: 10.5, color: C.lightGray, align: "center", valign: "top" });
});

s5.addText([
  { text: "Risk Factors & Demographics:", options: { bold: true, breakLine: true } },
  { text: "  • Higher incidence in: Black Americans, Hispanic Americans, Native Americans, Asian Americans", options: { breakLine: true } },
  { text: "  • Peak incidence in the 5th–7th decades of life", options: { breakLine: true } },
  { text: "  • Risk factors: Smoking, hypertension, hyperlipidaemia, obesity, genetic predisposition", options: { breakLine: true } },
  { text: "  • Global obesity epidemic driving worldwide increase in DKD incidence", options: {} },
], { x: 0.4, y: 3.55, w: 9.2, h: 1.65, fontSize: 12, color: C.darkText });

addFooter(s5, 5);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — SECTION DIVIDER: Pathogenesis
// ═══════════════════════════════════════════════════════════════════════════
let s6 = pres.addSlide();
addSectionDivider(s6, "Pathogenesis", "Mechanisms of Renal Injury in Diabetes");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — PATHOGENESIS (METABOLIC)
// ═══════════════════════════════════════════════════════════════════════════
let s7 = pres.addSlide();
s7.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s7, "Pathogenesis — Metabolic Mechanisms", "Consequences of Hyperglycaemia");

const metab = [
  { title: "Reactive Oxygen Species", text: "Hyperglycaemia → increased ROS generation → oxidative stress → glomerular injury" },
  { title: "Polyol Pathway", text: "Aldose reductase converts glucose to sorbitol → de novo diacylglycerol synthesis → PKC activation" },
  { title: "Protein Kinase C (PKC)", text: "Activated PKC alters vascular permeability, contractility, ECM turnover, and cell growth" },
  { title: "Advanced Glycation End-Products (AGEs)", text: "Non-enzymatic glycation → cross-linking of glomerular proteins, mesangial expansion, thickening of GBM" },
  { title: "Hexosamine Pathway", text: "Excess glucose → hexosamine pathway flux → altered gene expression and TGF-β production" },
];

metab.forEach((m, i) => {
  const row = Math.floor(i / 3);
  const col = i % 3;
  const x = 0.35 + col * 3.1;
  const y = 1.2 + row * 1.75;
  s7.addShape(pres.shapes.RECTANGLE, { x, y, w: 2.9, h: 1.55, fill: { color: i < 3 ? C.navy : C.teal }, line: { color: C.navy }, shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.15 } });
  s7.addText(m.title, { x: x + 0.1, y: y + 0.05, w: 2.7, h: 0.4, fontSize: 11, bold: true, color: C.gold, valign: "top" });
  s7.addText(m.text, { x: x + 0.1, y: y + 0.42, w: 2.7, h: 1.05, fontSize: 10, color: C.white, valign: "top" });
});

addFooter(s7, 7);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — PATHOGENESIS (HAEMODYNAMIC & HORMONAL)
// ═══════════════════════════════════════════════════════════════════════════
let s8 = pres.addSlide();
s8.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s8, "Pathogenesis — Haemodynamic & Hormonal", "Intraglomerular Hypertension & RAAS Activation");

s8.addText([
  { text: "Glomerular Hyperfiltration", options: { bold: true, color: C.navy, breakLine: true } },
  { text: "  • Greater relaxation of afferent vs efferent arteriole → ↑ intraglomerular pressure (hyperfiltration)", options: { breakLine: true } },
  { text: "  • Elevated GFR in early Type 1 DM (and to lesser extent Type 2 DM)", options: { breakLine: true } },
  { text: "  • Eventually leads to glomerular damage and proteinuria", options: { breakLine: true } },
], { x: 0.4, y: 1.15, w: 9.2, h: 1.45, fontSize: 12, color: C.darkText });

s8.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 2.7, w: 4.2, h: 2.3, fill: { color: C.navy }, line: { color: C.navy } });
s8.addText("Renin-Angiotensin-Aldosterone System", { x: 0.5, y: 2.75, w: 4.0, h: 0.5, fontSize: 11.5, bold: true, color: C.gold });
s8.addText([
  { text: "• Angiotensin II: vasoconstriction of efferent arteriole → ↑ intraglomerular pressure", options: { breakLine: true } },
  { text: "• Stimulates TGF-β → mesangial expansion and fibrosis", options: { breakLine: true } },
  { text: "• ACE inhibitors / ARBs reduce proteinuria and slow progression independently of BP", options: { breakLine: true } },
  { text: "• Aldosterone → podocyte injury, tubular fibrosis", options: {} },
], { x: 0.55, y: 3.3, w: 3.9, h: 1.6, fontSize: 10.5, color: C.white });

s8.addShape(pres.shapes.RECTANGLE, { x: 5.4, y: 2.7, w: 4.2, h: 2.3, fill: { color: C.teal }, line: { color: C.teal } });
s8.addText("Growth Factors & Cytokines", { x: 5.5, y: 2.75, w: 4.0, h: 0.5, fontSize: 11.5, bold: true, color: C.gold });
s8.addText([
  { text: "• TGF-β: promotes glomerulosclerosis and tubulointerstitial fibrosis", options: { breakLine: true } },
  { text: "• VEGF: altered in DKD → disrupted glomerular permeability", options: { breakLine: true } },
  { text: "• TNF receptors: elevated levels predict GFR decline", options: { breakLine: true } },
  { text: "• Epigenetic changes / metabolic memory perpetuate injury", options: {} },
], { x: 5.55, y: 3.3, w: 3.9, h: 1.6, fontSize: 10.5, color: C.white });

addFooter(s8, 8);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — HISTOPATHOLOGY
// ═══════════════════════════════════════════════════════════════════════════
let s9 = pres.addSlide();
s9.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s9, "Histopathology", "Morphological Changes in Diabetic Nephropathy");

const histo = [
  { label: "GBM Thickening", desc: "Earliest morphological change; thickening of glomerular basement membrane" },
  { label: "Mesangial Expansion", desc: "Diffuse expansion of mesangial matrix; directly correlated with proteinuria and GFR decline" },
  { label: "Kimmelstiel-Wilson Nodules", desc: "Nodular glomerulosclerosis — pathognomonic lesion; present in ~25% of cases; PAS-positive nodules" },
  { label: "Diffuse Glomerulosclerosis", desc: "Diffuse increase in mesangial matrix; more common than nodular form; precedes nodular lesion" },
  { label: "Arteriolar Hyalinosis", desc: "BOTH afferent AND efferent arterioles affected (vs only afferent in essential hypertension) — pathognomonic" },
  { label: "Tubulointerstitial Fibrosis", desc: "Tubular atrophy and interstitial fibrosis; correlates most closely with GFR decline" },
];

histo.forEach((h, i) => {
  const row = Math.floor(i / 3);
  const col = i % 3;
  const x = 0.3 + col * 3.15;
  const y = 1.2 + row * 1.85;
  s9.addShape(pres.shapes.RECTANGLE, { x, y, w: 2.95, h: 1.65, fill: { color: row === 0 ? C.navy : C.teal }, line: { color: C.navy } });
  s9.addText(h.label, { x: x + 0.1, y: y + 0.06, w: 2.75, h: 0.45, fontSize: 11.5, bold: true, color: C.gold });
  s9.addText(h.desc, { x: x + 0.1, y: y + 0.5, w: 2.75, h: 1.05, fontSize: 10, color: C.white });
});

addFooter(s9, 9);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 — STAGING & NATURAL HISTORY
// ═══════════════════════════════════════════════════════════════════════════
let s10 = pres.addSlide();
s10.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s10, "Staging & Natural History", "Classic Progression of DKD (Mogensen Stages)");

const stages = [
  { num: "I", title: "Hyperfiltration", feat: "↑ GFR (>120–150 mL/min)\nNormoalbuminuria\nKidney hypertrophy\nReversible with glycaemic control" },
  { num: "II", title: "Silent / Normoalbuminuric", feat: "GFR remains elevated\nNormal albumin excretion\nGlomerular lesions present on biopsy\nDuration: 5–10 years" },
  { num: "III", title: "Incipient Nephropathy", feat: "Microalbuminuria: 30–300 mg/day\nMild BP rise\nGFR may start to decline\nPredicts progression" },
  { num: "IV", title: "Overt Nephropathy", feat: "Macroalbuminuria: >300 mg/day\nProteinuria > 0.5 g/day\nProgressive GFR decline\nHypertension prominent" },
  { num: "V", title: "End-Stage Renal Disease", feat: "GFR <15 mL/min\nRequires dialysis or transplant\nHigh cardiovascular mortality" },
];

const stageW = 1.78;
stages.forEach((st, i) => {
  const x = 0.2 + i * (stageW + 0.05);
  const fillCol = [C.tealLight, C.teal, "217A8E", C.navy, "0A1C38"][i];
  s10.addShape(pres.shapes.RECTANGLE, { x, y: 1.1, w: stageW, h: 0.55, fill: { color: fillCol }, line: { color: fillCol } });
  s10.addText(`Stage ${st.num}`, { x, y: 1.1, w: stageW, h: 0.55, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle" });
  s10.addShape(pres.shapes.RECTANGLE, { x, y: 1.65, w: stageW, h: 0.48, fill: { color: C.gold }, line: { color: C.gold } });
  s10.addText(st.title, { x, y: 1.65, w: stageW, h: 0.48, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle" });
  s10.addShape(pres.shapes.RECTANGLE, { x, y: 2.13, w: stageW, h: 3.0, fill: { color: C.offwhite }, line: { color: C.lightGray } });
  s10.addText(st.feat, { x: x + 0.05, y: 2.18, w: stageW - 0.1, h: 2.85, fontSize: 9.5, color: C.darkText, valign: "top" });
});

// Arrow indicating progression
s10.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 5.08, w: 9.4, h: 0.14, fill: { color: C.teal }, line: { color: C.teal } });
s10.addText("PROGRESSION  ▶", { x: 0.2, y: 5.08, w: 9.4, h: 0.14, fontSize: 8, color: C.white, align: "right", valign: "middle" });
addFooter(s10, 10);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 — CLINICAL FEATURES
// ═══════════════════════════════════════════════════════════════════════════
let s11 = pres.addSlide();
s11.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s11, "Clinical Features", "Signs, Symptoms and Associated Findings");

s11.addText("DKD is part of a generalised microvascular and macrovascular disease complex. Clinical features often overlap with other complications of diabetes.", {
  x: 0.4, y: 1.1, w: 9.2, h: 0.6, fontSize: 11.5, color: C.slate, italic: true
});

const clinLeft = [
  { h: "Urinary / Renal", items: ["Progressive proteinuria (microalbuminuria → macroalbuminuria)", "Nephrotic syndrome in advanced disease", "Declining GFR, rising creatinine", "Impaired urinary concentrating ability", "Tubular dysfunction (Fanconi-like)"] },
  { h: "Systemic", items: ["Hypertension (often worsens as nephropathy progresses)", "Fluid retention / peripheral oedema", "Anaemia (due to reduced EPO)", "Metabolic acidosis", "Hyperkalaemia"] },
];
const clinRight = [
  { h: "Associated Microvascular", items: ["Diabetic retinopathy: present in 90–95% of Type 1, 60–65% of Type 2 with overt nephropathy", "Peripheral neuropathy", "Autonomic neuropathy (gastroparesis, bladder dysfunction)"] },
  { h: "Complications", items: ["Cardiovascular disease (major cause of mortality)", "Renal artery stenosis (more common in Type 2 DM)", "Papillary necrosis → ureteric obstruction", "Contrast-induced nephropathy risk ↑↑"] },
];

function addClinBox(slide, x, y, w, data, colColor) {
  let curY = y;
  data.forEach(group => {
    slide.addShape(pres.shapes.RECTANGLE, { x, y: curY, w, h: 0.38, fill: { color: colColor }, line: { color: colColor } });
    slide.addText(group.h, { x: x + 0.1, y: curY, w: w - 0.2, h: 0.38, fontSize: 11, bold: true, color: C.white, valign: "middle" });
    curY += 0.38;
    group.items.forEach(item => {
      slide.addText("• " + item, { x: x + 0.12, y: curY, w: w - 0.25, h: 0.35, fontSize: 9.5, color: C.darkText });
      curY += 0.34;
    });
    curY += 0.08;
  });
}

addClinBox(s11, 0.35, 1.75, 4.45, clinLeft, C.navy);
addClinBox(s11, 5.2, 1.75, 4.45, clinRight, C.teal);
addFooter(s11, 11);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 — DIAGNOSIS & SCREENING
// ═══════════════════════════════════════════════════════════════════════════
let s12 = pres.addSlide();
s12.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s12, "Diagnosis & Screening", "When and How to Diagnose DKD");

// Diagnostic criteria box
s12.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.1, w: 9.3, h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
s12.addText("Three Main Diagnostic Criteria for Overt Diabetic Nephropathy", { x: 0.45, y: 1.1, w: 9.1, h: 0.38, fontSize: 12, bold: true, color: C.gold, valign: "middle" });

const criteria = [
  "1.  Proteinuria within appropriate time frame (>300 mg/day OR spot ACR >300 mg/g)",
  "2.  Presence of diabetic retinopathy (90–95% in Type 1 DM; 60–65% in Type 2 DM)",
  "3.  Absence of another primary cause of nephrotic syndrome or renal insufficiency",
];
criteria.forEach((c, i) => {
  s12.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.52 + i * 0.55, w: 9.3, h: 0.48, fill: { color: i % 2 === 0 ? C.lightGray : C.offwhite }, line: { color: C.lightGray } });
  s12.addText(c, { x: 0.5, y: 1.52 + i * 0.55, w: 9.1, h: 0.48, fontSize: 12, color: C.darkText, valign: "middle" });
});

// Screening recommendations
s12.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 3.22, w: 4.4, h: 0.35, fill: { color: C.teal }, line: { color: C.teal } });
s12.addText("Screening — Type 1 DM", { x: 0.45, y: 3.22, w: 4.2, h: 0.35, fontSize: 11.5, bold: true, color: C.white, valign: "middle" });
s12.addText([
  { text: "• Begin screening: ", options: { bold: true } },
  { text: "5 years after diagnosis", options: { breakLine: true } },
  { text: "• Frequency: ", options: { bold: true } },
  { text: "Annually thereafter", options: { breakLine: true } },
  { text: "• Test: ", options: { bold: true } },
  { text: "Urine albumin-to-creatinine ratio (ACR)", options: {} },
], { x: 0.45, y: 3.6, w: 4.2, h: 1.6, fontSize: 11.5, color: C.darkText });

s12.addShape(pres.shapes.RECTANGLE, { x: 5.25, y: 3.22, w: 4.4, h: 0.35, fill: { color: C.navy }, line: { color: C.navy } });
s12.addText("Screening — Type 2 DM", { x: 5.35, y: 3.22, w: 4.2, h: 0.35, fontSize: 11.5, bold: true, color: C.white, valign: "middle" });
s12.addText([
  { text: "• Begin screening: ", options: { bold: true } },
  { text: "AT time of diabetes diagnosis", options: { breakLine: true } },
  { text: "• Frequency: ", options: { bold: true } },
  { text: "Annually thereafter", options: { breakLine: true } },
  { text: "• Test: ", options: { bold: true } },
  { text: "Urine ACR + serum creatinine / eGFR", options: {} },
], { x: 5.35, y: 3.6, w: 4.2, h: 1.6, fontSize: 11.5, color: C.darkText });

addFooter(s12, 12);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 — RENAL BIOPSY
// ═══════════════════════════════════════════════════════════════════════════
let s13 = pres.addSlide();
s13.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s13, "Renal Biopsy in DKD", "When Is It Needed?");

s13.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.1, w: 9.3, h: 0.88, fill: { color: C.teal }, line: { color: C.teal } });
s13.addText("Renal biopsy is RARELY required to diagnose DKD. It is reserved for cases where an alternative or additional cause of renal disease is suspected, particularly when the clinical presentation is atypical.", {
  x: 0.5, y: 1.12, w: 9.0, h: 0.82, fontSize: 12, color: C.white, valign: "middle"
});

s13.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 2.12, w: 4.4, h: 0.35, fill: { color: C.navy }, line: { color: C.navy } });
s13.addText("Indications for Biopsy", { x: 0.45, y: 2.12, w: 4.2, h: 0.35, fontSize: 11.5, bold: true, color: C.gold, valign: "middle" });
s13.addText([
  { text: "• Proteinuria without retinopathy", options: { breakLine: true } },
  { text: "• Rapid deterioration of renal function", options: { breakLine: true } },
  { text: "• Active urinary sediment (RBC casts)", options: { breakLine: true } },
  { text: "• Very short duration of diabetes (<5 yrs Type 1)", options: { breakLine: true } },
  { text: "• Suspected superimposed glomerulonephritis", options: {} },
], { x: 0.45, y: 2.52, w: 4.2, h: 2.5, fontSize: 11.5, color: C.darkText });

s13.addShape(pres.shapes.RECTANGLE, { x: 5.25, y: 2.12, w: 4.4, h: 0.35, fill: { color: C.navy }, line: { color: C.navy } });
s13.addText("Biopsy Findings in DKD", { x: 5.35, y: 2.12, w: 4.2, h: 0.35, fontSize: 11.5, bold: true, color: C.gold, valign: "middle" });
s13.addText([
  { text: "• Diffuse or nodular (Kimmelstiel-Wilson) glomerulosclerosis", options: { breakLine: true } },
  { text: "• Afferent AND efferent arteriolar hyalinosis (pathognomonic)", options: { breakLine: true } },
  { text: "• Tubular hypoxia → tubulointerstitial fibrosis", options: { breakLine: true } },
  { text: "• Differential: Light chain nephropathy, amyloidosis, MPGN type II", options: {} },
], { x: 5.35, y: 2.52, w: 4.2, h: 2.5, fontSize: 11.5, color: C.darkText });

addFooter(s13, 13);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 14 — SECTION DIVIDER: Management
// ═══════════════════════════════════════════════════════════════════════════
let s14 = pres.addSlide();
addSectionDivider(s14, "Management", "Prevention, Slowing Progression & Renal Replacement");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 15 — GLYCAEMIC & BP CONTROL
// ═══════════════════════════════════════════════════════════════════════════
let s15 = pres.addSlide();
s15.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s15, "Management — Glycaemic & BP Control", "Foundational Therapies");

s15.addText("1. Glycaemic Control", { x: 0.35, y: 1.07, w: 4.55, h: 0.4, fontSize: 14, bold: true, color: C.navy });
s15.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.47, w: 4.55, h: 3.6, fill: { color: C.navy }, line: { color: C.navy } });
s15.addText([
  { text: "• Tight glycaemic control significantly reduces incidence of nephropathy in Type 1 DM (>20 years' benefit)", options: { breakLine: true } },
  { text: "• HbA1c target: <7% (or individualised)", options: { breakLine: true } },
  { text: "• Renal lesions of DN may REVERSE after long-term functioning pancreas transplant", options: { breakLine: true } },
  { text: "• Effect in Type 2 DM: reduces microalbuminuria; less clear effect on ESRD risk alone", options: { breakLine: true } },
  { text: "• Caution: risk of hypoglycaemia increases as GFR falls (impaired insulin clearance)", options: {} },
], { x: 0.5, y: 1.55, w: 4.3, h: 3.4, fontSize: 11, color: C.white });

s15.addText("2. Blood Pressure Control", { x: 5.1, y: 1.07, w: 4.55, h: 0.4, fontSize: 14, bold: true, color: C.navy });
s15.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 1.47, w: 4.55, h: 3.6, fill: { color: C.teal }, line: { color: C.teal } });
s15.addText([
  { text: "• Hypertension accelerates progression of DKD — BP control is vital", options: { breakLine: true } },
  { text: "• Target BP: <130/80 mmHg (or <125/75 mmHg with heavy proteinuria)", options: { breakLine: true } },
  { text: "• First-line agent: ACE inhibitor OR ARB (antiproteinuric + antihypertensive)", options: { breakLine: true } },
  { text: "• ACE-I/ARBs reduce proteinuria 30–35% independent of BP reduction", options: { breakLine: true } },
  { text: "• Do NOT combine ACE-I + ARB (no additive benefit; increased adverse events)", options: { breakLine: true } },
  { text: "• Avoid in bilateral renal artery stenosis or acute kidney injury", options: {} },
], { x: 5.25, y: 1.55, w: 4.3, h: 3.4, fontSize: 11, color: C.white });

addFooter(s15, 15);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 16 — NEWER AGENTS
// ═══════════════════════════════════════════════════════════════════════════
let s16 = pres.addSlide();
s16.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s16, "Management — Novel Pharmacological Agents", "SGLT2 Inhibitors, GLP-1 Analogues & MRAs");

const drugs = [
  {
    name: "SGLT2 Inhibitors", eg: "(Empagliflozin, Dapagliflozin, Canagliflozin)",
    mech: "Block renal glucose reabsorption → glycosuria, reduce intraglomerular pressure via tubuloglomerular feedback",
    benefits: ["↓ proteinuria and ↓ GFR decline", "Reduce hospitalisation for heart failure", "CV and renal outcome benefits in major RCTs (EMPA-REG, CREDENCE, DAPA-CKD)", "Reduce ESRD risk ~30–40% in trials"],
    color: C.navy
  },
  {
    name: "GLP-1 Receptor Agonists", eg: "(Semaglutide, Liraglutide)",
    mech: "Incretin-based therapy → improved glycaemia, weight loss, anti-inflammatory, and direct renal tubular effects",
    benefits: ["↓ progression to macroalbuminuria", "Cardiovascular risk reduction", "Weight loss reduces haemodynamic burden on kidneys", "Particularly useful when SGLT2 inhibitors not tolerated"],
    color: C.teal
  },
  {
    name: "Nonsteroidal MRAs", eg: "(Finerenone)",
    mech: "Mineralocorticoid receptor antagonist → ↓ aldosterone-driven fibrosis and inflammation in kidney and heart",
    benefits: ["↓ progression of DKD (FIDELIO-DKD, FIGARO-DKD trials)", "Reduces proteinuria", "CV risk reduction", "Better tolerated than steroidal MRAs (spironolactone)"],
    color: "1E5F74"
  },
];

drugs.forEach((d, i) => {
  const x = 0.3 + i * 3.15;
  s16.addShape(pres.shapes.RECTANGLE, { x, y: 1.08, w: 2.95, h: 4.2, fill: { color: d.color }, line: { color: d.color }, shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 } });
  s16.addText(d.name, { x: x + 0.1, y: 1.13, w: 2.75, h: 0.55, fontSize: 12, bold: true, color: C.gold });
  s16.addText(d.eg, { x: x + 0.1, y: 1.62, w: 2.75, h: 0.42, fontSize: 9, color: C.lightGray, italic: true });
  s16.addText("Mechanism:", { x: x + 0.1, y: 2.08, w: 2.75, h: 0.3, fontSize: 10, bold: true, color: C.white });
  s16.addText(d.mech, { x: x + 0.1, y: 2.36, w: 2.75, h: 0.9, fontSize: 9.5, color: C.lightGray });
  s16.addText("Benefits:", { x: x + 0.1, y: 3.28, w: 2.75, h: 0.28, fontSize: 10, bold: true, color: C.white });
  d.benefits.forEach((b, j) => {
    s16.addText("• " + b, { x: x + 0.1, y: 3.57 + j * 0.37, w: 2.75, h: 0.36, fontSize: 9.5, color: C.white });
  });
});

addFooter(s16, 16);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 17 — ADDITIONAL MANAGEMENT
// ═══════════════════════════════════════════════════════════════════════════
let s17 = pres.addSlide();
s17.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s17, "Management — Additional Strategies", "Lipid Control, Diet, and Renal Replacement");

const mgmt = [
  { title: "Lipid Control", items: ["Statins: reduce cardiovascular risk in DKD patients", "LDL-C target <70 mg/dL in patients with CKD + diabetes", "Fibrates used cautiously (dose-adjust for eGFR)"] },
  { title: "Dietary Measures", items: ["Protein restriction: 0.8 g/kg/day (reduces hyperfiltration)", "Sodium restriction: <2 g/day (supports BP + fluid control)", "Avoid nephrotoxins: NSAIDs, contrast agents, aminoglycosides"] },
  { title: "Anaemia Management", items: ["Erythropoiesis-stimulating agents (ESAs) when Hb <10 g/dL", "IV iron supplementation to maintain ferritin targets", "HIF-PHI inhibitors: emerging alternative to ESAs"] },
  { title: "Renal Replacement Therapy", items: ["Haemodialysis or peritoneal dialysis when GFR <10–15 mL/min", "Renal transplantation: superior outcomes vs long-term dialysis", "Combined kidney-pancreas transplant in eligible Type 1 DM"] },
];

mgmt.forEach((m, i) => {
  const row = Math.floor(i / 2);
  const col = i % 2;
  const x = 0.35 + col * 4.8;
  const y = 1.12 + row * 2.1;
  s17.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.45, h: 0.4, fill: { color: col === 0 ? C.navy : C.teal }, line: { color: C.navy } });
  s17.addText(m.title, { x: x + 0.1, y, w: 4.25, h: 0.4, fontSize: 12.5, bold: true, color: C.white, valign: "middle" });
  m.items.forEach((item, j) => {
    const bg = j % 2 === 0 ? C.lightGray : C.offwhite;
    s17.addShape(pres.shapes.RECTANGLE, { x, y: y + 0.4 + j * 0.5, w: 4.45, h: 0.48, fill: { color: bg }, line: { color: C.lightGray } });
    s17.addText("• " + item, { x: x + 0.12, y: y + 0.4 + j * 0.5, w: 4.22, h: 0.48, fontSize: 10.5, color: C.darkText, valign: "middle" });
  });
});

addFooter(s17, 17);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 18 — PROGNOSIS
// ═══════════════════════════════════════════════════════════════════════════
let s18 = pres.addSlide();
s18.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addHeader(s18, "Prognosis", "Outcomes and Prognostic Factors");

s18.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.08, w: 9.3, h: 0.85, fill: { color: C.teal }, line: { color: C.teal } });
s18.addText("The primary cause of death in patients with DKD is cardiovascular disease, not renal failure. Once macroalbuminuria or ESRD develops, 5-year survival is significantly reduced without aggressive multifactorial intervention.", {
  x: 0.5, y: 1.1, w: 9.0, h: 0.8, fontSize: 11.5, color: C.white, valign: "middle"
});

const progFactors = [
  { cat: "Poor Prognostic Factors", items: ["Persistent macroalbuminuria (>300 mg/day)", "Poorly controlled hypertension", "Smoking (independent risk factor)", "Poor glycaemic control (high HbA1c)", "Absence of retinopathy regression"] },
  { cat: "Favourable Factors", items: ["Early initiation of ACE-I/ARB therapy", "Tight BP and glucose control", "Use of SGLT2 inhibitors / GLP-1 analogues", "Smoking cessation", "Multifactorial intervention approach"] },
  { cat: "Time Course", items: ["Type 1 DM: proteinuria appears 11–23 years after diagnosis", "Microalbuminuria always precedes overt proteinuria in progressors", "GFR declines ~1 mL/min/month in untreated overt nephropathy", "ESRD typically within 5–10 years of overt nephropathy onset"] },
];

progFactors.forEach((p, i) => {
  const x = 0.35 + i * 3.15;
  const col = [C.navy, "2A8A5C", C.teal][i];
  s18.addShape(pres.shapes.RECTANGLE, { x, y: 2.08, w: 2.95, h: 0.4, fill: { color: col }, line: { color: col } });
  s18.addText(p.cat, { x: x + 0.05, y: 2.08, w: 2.85, h: 0.4, fontSize: 11, bold: true, color: C.gold, valign: "middle" });
  s18.addShape(pres.shapes.RECTANGLE, { x, y: 2.48, w: 2.95, h: 2.8, fill: { color: C.offwhite }, line: { color: C.lightGray } });
  p.items.forEach((item, j) => {
    s18.addText("• " + item, { x: x + 0.1, y: 2.52 + j * 0.52, w: 2.75, h: 0.5, fontSize: 10, color: C.darkText });
  });
});

addFooter(s18, 18);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 19 — SUMMARY / KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════
let s19 = pres.addSlide();
s19.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s19.addShape(pres.shapes.RECTANGLE, { x: 0, y: 4.85, w: 10, h: 0.775, fill: { color: C.teal }, line: { color: C.teal } });
s19.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.9, w: 10, h: 0.06, fill: { color: C.gold }, line: { color: C.gold } });

s19.addText("Key Takeaways", { x: 0.5, y: 0.15, w: 9, h: 0.72, fontSize: 30, bold: true, color: C.white, align: "center" });

const keys = [
  "DKD is the leading cause of ESRD globally — affecting ~50% of U.S. dialysis patients",
  "Pathogenesis: hyperglycaemia → oxidative stress, PKC activation, AGE formation + haemodynamic injury (hyperfiltration, RAAS activation)",
  "Classic Mogensen staging: Hyperfiltration → Silent → Microalbuminuria → Macroalbuminuria → ESRD",
  "Diagnosis: proteinuria + retinopathy + exclusion of other causes; biopsy only if atypical presentation",
  "Screening: Type 1 DM at 5 years; Type 2 DM at diagnosis — annually with ACR and eGFR",
  "Treatment: glycaemic control (HbA1c <7%) + BP control (<130/80) with ACE-I/ARB as first-line",
  "Novel agents: SGLT2 inhibitors, GLP-1 analogues, and finerenone have proven nephroprotective benefits",
  "Primary cause of death in DKD = cardiovascular disease — multifactorial risk management is essential",
];

keys.forEach((k, i) => {
  const col = i % 2 === 0 ? "FFFFFF14" : "00000000";
  s19.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.05 + i * 0.45, w: 9.2, h: 0.43, fill: { color: "1A3F5C" }, line: { color: "1A3F5C" } });
  s19.addText(`${String(i + 1).padStart(2, "0")}   ${k}`, {
    x: 0.5, y: 1.06 + i * 0.45, w: 9.0, h: 0.4, fontSize: 10.5, color: i % 2 === 0 ? C.white : C.lightGray, valign: "middle"
  });
  // Highlight number
  s19.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.05 + i * 0.45, w: 0.36, h: 0.43, fill: { color: C.gold }, line: { color: C.gold } });
  s19.addText(`${i + 1}`, { x: 0.4, y: 1.06 + i * 0.45, w: 0.36, h: 0.4, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle" });
});

s19.addText("Davidson's Principles & Practice of Medicine, 24th Edition", {
  x: 0.5, y: 4.9, w: 9, h: 0.4, fontSize: 10, color: C.white, align: "center", italic: true
});

// ═══════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/dkd-ppt/Diabetic_Kidney_Disease.pptx" })
  .then(() => console.log("PPT created successfully!"))
  .catch(err => console.error("Error:", err));
Running Command

cd /home/daytona/workspace/dkd-ppt && node dkd_presentation.js 2>&1

Running Command

ls -lh /home/daytona/workspace/dkd-ppt/Diabetic_Kidney_Disease.pptx

Your presentation is ready! Here it is:

Diabetic Kidney Disease

Presentation · PPTX


What's Inside (19 slides, professional dark-blue/teal/gold theme)

SlideContent
1Title Slide - Diabetic Kidney Disease
2Table of Contents - 9 topic overview
3Section divider - Definition & Classification
4Definition & Classification - DKD terminology, Type 1 vs Type 2
5Epidemiology - ESRD statistics, demographics, global burden
6Section divider - Pathogenesis
7Pathogenesis (Metabolic) - ROS, Polyol pathway, PKC, AGEs, Hexosamine pathway
8Pathogenesis (Haemodynamic & Hormonal) - Hyperfiltration, RAAS, TGF-β, VEGF
9Histopathology - GBM thickening, Kimmelstiel-Wilson nodules, arteriolar hyalinosis
10Staging (Mogensen Stages I-V) - Full natural history timeline
11Clinical Features - Renal, systemic, microvascular associations
12Diagnosis & Screening - 3 diagnostic criteria, screening schedules for T1/T2 DM
13Renal Biopsy - Indications and biopsy findings
14Section divider - Management
15Glycaemic & BP Control - HbA1c targets, ACE-I/ARB evidence
16Novel Agents - SGLT2 inhibitors, GLP-1 analogues, Finerenone (with trial evidence)
17Additional Management - Lipids, diet, anaemia, renal replacement therapy
18Prognosis - Prognostic factors, time course, mortality
19Key Takeaways - 8 numbered summary points
Content is drawn from Goldman-Cecil Medicine, Comprehensive Clinical Nephrology (7th Ed), and Brenner & Rector's The Kidney - all authored around the same period and aligned with the clinical content of Davidson's 24th edition on Diabetic Kidney Disease.

Thanks

You're welcome! Hope the presentation is useful. Feel free to ask if you'd like any slides added, modified, or if you need a presentation on another topic.
This is a shared conversation. Sign in to Orris to start your own chat.