Genrate a flow chart expaining the complications of diabeties
A detailed medical flowchart showing the complications of diabetes mellitus. The chart starts with "Diabetes Mellitus" at the top center as the root node, then branches into two main categories: "Type 1 Diabetes" and "Type 2 Diabetes" feeding into a central "Chronic Hyperglycemia" box. From "Chronic Hyperglycemia", the chart splits into two major pathways: "Microvascular Complications" and "Macrovascular Complications", plus a third branch for "Acute Complications". Microvascular branch includes: Diabetic Retinopathy (leading to Blindness), Diabetic Nephropathy (leading to Chronic Kidney Disease and End-Stage Renal Disease), Diabetic Neuropathy (splitting into Peripheral Neuropathy causing foot ulcers and amputations, and Autonomic Neuropathy causing gastroparesis, orthostatic hypotension, and sexual dysfunction). Macrovascular branch includes: Coronary Artery Disease (leading to Heart Attack/MI), Cerebrovascular Disease (leading to Stroke), Peripheral Arterial Disease (leading to Limb Ischemia and Amputation). Acute Complications branch includes: Diabetic Ketoacidosis (DKA) in Type 1, Hyperosmolar Hyperglycemic State (HHS) in Type 2, and Hypoglycemia from treatment. Each node is a rounded rectangle with color coding: blue for main categories, red for acute complications, orange for macrovascular, purple for microvascular. Arrows connect all nodes clearly. Clean white background, professional medical diagram style with legible labels.

Make a presentation abt diabeties
ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/diabetes-pptx
~/diabetes-pptx/create_pptx.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Diabetes Mellitus - Clinical Overview";
pres.author = "Medical Education";
// ── Color Palette ──────────────────────────────────────────────
const BG_DARK = "0D2B45"; // deep navy (title / section slides)
const BG_LIGHT = "F4F7FB"; // pale blue-white (content slides)
const ACCENT1 = "1A8FE3"; // bright blue
const ACCENT2 = "E84545"; // red (for acute / danger items)
const ACCENT3 = "27AE60"; // green (management / good)
const TEXT_MAIN = "1B2B3B"; // near-black
const TEXT_LITE = "FFFFFF"; // white
const BORDER = "C5D5E8"; // subtle border
// ══════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: BG_DARK } });
// Decorative stripe
s.addShape(pres.ShapeType.rect, { x: 0, y: 3.9, w: 10, h: 0.07, fill: { color: ACCENT1 }, line: { type: "none" } });
// Diabetes icon strip (colored blocks)
for (let i = 0; i < 6; i++) {
s.addShape(pres.ShapeType.rect, {
x: 0 + i * 1.67, y: 0, w: 1.67, h: 0.18,
fill: { color: i % 2 === 0 ? ACCENT1 : "1D6FA4" },
line: { type: "none" }
});
}
s.addText("DIABETES MELLITUS", {
x: 0.5, y: 1.0, w: 9, h: 1.0,
fontSize: 42, bold: true, color: TEXT_LITE, fontFace: "Calibri",
align: "center", charSpacing: 3
});
s.addText("A Clinical Overview for Medical Students & Clinicians", {
x: 0.5, y: 2.2, w: 9, h: 0.6,
fontSize: 18, color: "A8C8E8", fontFace: "Calibri", align: "center", italic: true
});
s.addText("Topics: Definition · Classification · Pathophysiology · Diagnosis\nComplications · Management · Monitoring", {
x: 1, y: 3.0, w: 8, h: 0.7,
fontSize: 13, color: "7FB3D3", fontFace: "Calibri", align: "center"
});
s.addText("June 2026", {
x: 0.5, y: 5.1, w: 9, h: 0.35,
fontSize: 11, color: "5588AA", align: "center"
});
}
// ── Helper: content slide shell ────────────────────────────────
function contentSlide(title, accentColor) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: BG_LIGHT }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.9, fill: { color: accentColor || BG_DARK }, line: { type: "none" } });
s.addText(title, {
x: 0.4, y: 0.1, w: 9.2, h: 0.7,
fontSize: 22, bold: true, color: TEXT_LITE, fontFace: "Calibri", valign: "middle"
});
return s;
}
// ── Helper: card box ───────────────────────────────────────────
function addCard(s, x, y, w, h, header, headerColor, lines) {
s.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: "FFFFFF" }, line: { color: BORDER, pt: 1 }, shadow: { type: "outer", color: "CCDDEE", blur: 6, offset: 2, angle: 45, opacity: 0.4 } });
s.addShape(pres.ShapeType.rect, { x, y, w, h: 0.28, fill: { color: headerColor }, line: { type: "none" } });
s.addText(header, { x: x + 0.1, y: y + 0.01, w: w - 0.2, h: 0.28, fontSize: 12, bold: true, color: TEXT_LITE, valign: "middle" });
const items = lines.map((l, i) => ({
text: l,
options: { bullet: { type: "bullet" }, breakLine: i < lines.length - 1, fontSize: 11, color: TEXT_MAIN }
}));
s.addText(items, { x: x + 0.15, y: y + 0.32, w: w - 0.25, h: h - 0.38, fontFace: "Calibri", valign: "top" });
}
// ══════════════════════════════════════════════════════════════
// SLIDE 2 – DEFINITION & EPIDEMIOLOGY
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Definition & Epidemiology", BG_DARK);
// Definition box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.05, w: 9.4, h: 0.85, fill: { color: "E8F2FA" }, line: { color: ACCENT1, pt: 1.5 } });
s.addText([
{ text: "Definition: ", options: { bold: true, color: ACCENT1 } },
{ text: "A group of metabolic disorders characterised by chronic hyperglycaemia resulting from defects in insulin secretion, insulin action, or both (WHO).", options: { color: TEXT_MAIN } }
], { x: 0.45, y: 1.1, w: 9.1, h: 0.75, fontSize: 13, fontFace: "Calibri" });
// Stat cards
const stats = [
["537 M", "Adults living with diabetes worldwide (IDF 2021)"],
["~50%", "Cases undiagnosed globally"],
["3rd leading", "Cause of death in many high-income countries"],
["$966 B", "Global health expenditure on diabetes (2021)"]
];
stats.forEach(([big, small], i) => {
const x = 0.3 + i * 2.4;
s.addShape(pres.ShapeType.rect, { x, y: 2.1, w: 2.25, h: 1.35, fill: { color: i % 2 === 0 ? BG_DARK : ACCENT1 }, line: { type: "none" } });
s.addText(big, { x, y: 2.18, w: 2.25, h: 0.65, fontSize: 22, bold: true, color: TEXT_LITE, align: "center", fontFace: "Calibri" });
s.addText(small, { x, y: 2.82, w: 2.25, h: 0.55, fontSize: 10, color: "BBDDEE", align: "center", fontFace: "Calibri" });
});
s.addText("Risk factors: obesity, physical inactivity, family history, age >45, gestational diabetes, hypertension, dyslipidaemia", {
x: 0.3, y: 3.65, w: 9.4, h: 0.55, fontSize: 12, color: TEXT_MAIN, fontFace: "Calibri",
fill: { color: "FEF3CD" }, align: "left", valign: "middle"
});
s.addText("⚠ Risk factors", { x: 0.35, y: 3.67, w: 1.5, h: 0.25, fontSize: 11, bold: true, color: "B7860B" });
}
// ══════════════════════════════════════════════════════════════
// SLIDE 3 – CLASSIFICATION
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Classification of Diabetes Mellitus", ACCENT1);
const cards = [
{ header: "Type 1 DM", color: ACCENT2, lines: ["Autoimmune destruction of β-cells", "Absolute insulin deficiency", "Onset: childhood/adolescence", "Prone to DKA", "HLA-DR3/DR4 associated"] },
{ header: "Type 2 DM", color: BG_DARK, lines: ["Insulin resistance + relative deficiency", "~90% of all DM cases", "Onset: usually >40 yrs (now younger)", "Strongly linked to obesity", "Progressive β-cell failure"] },
{ header: "Gestational DM", color: "7D3C98", lines: ["Any degree of glucose intolerance during pregnancy", "Risk: macrosomia, pre-eclampsia", "Screen at 24–28 weeks", "75g OGTT diagnostic", "↑ risk T2DM later in life"] },
{ header: "Other Specific Types", color: "2E86AB", lines: ["MODY (monogenic)", "Pancreatogenic (T3c)", "Drug-induced (steroids, tacrolimus)", "Endocrinopathies (Cushing's, acromegaly)", "Neonatal DM"] }
];
cards.forEach((c, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
addCard(s, 0.25 + col * 4.85, 1.1 + row * 2.2, 4.6, 2.1, c.header, c.color, c.lines);
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 4 – PATHOPHYSIOLOGY
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Pathophysiology", "1D6FA4");
// T1 column
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 4.35, h: 3.85, fill: { color: "FFF5F5" }, line: { color: ACCENT2, pt: 1 } });
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.05, w: 4.35, h: 0.32, fill: { color: ACCENT2 }, line: { type: "none" } });
s.addText("Type 1 – Autoimmune", { x: 0.3, y: 1.06, w: 4.2, h: 0.3, fontSize: 13, bold: true, color: TEXT_LITE });
s.addText([
{ text: "1. Genetic susceptibility (HLA-DR3/DR4)\n", options: { bold: true } },
{ text: "2. Environmental trigger (viral, dietary)\n" },
{ text: "3. Autoantibodies: anti-GAD, anti-IA2, anti-ZnT8\n" },
{ text: "4. CD4+/CD8+ T-cell mediated β-cell destruction\n" },
{ text: "5. >80% β-cell loss → absolute insulin deficiency\n" },
{ text: "6. Glucagon unopposed → DKA risk\n" }
], { x: 0.38, y: 1.42, w: 4.15, h: 3.4, fontSize: 12, fontFace: "Calibri", color: TEXT_MAIN });
// T2 column
s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.05, w: 4.75, h: 3.85, fill: { color: "F0F8FF" }, line: { color: BG_DARK, pt: 1 } });
s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.05, w: 4.75, h: 0.32, fill: { color: BG_DARK }, line: { type: "none" } });
s.addText("Type 2 – Metabolic", { x: 5.05, y: 1.06, w: 4.6, h: 0.3, fontSize: 13, bold: true, color: TEXT_LITE });
s.addText([
{ text: "Ominous Octet (DeFronzo):\n", options: { bold: true } },
{ text: "↓ Insulin secretion (β-cell failure)\n" },
{ text: "↑ Hepatic glucose production\n" },
{ text: "↓ Muscle glucose uptake (IR)\n" },
{ text: "↑ Lipolysis → free fatty acids\n" },
{ text: "↑ Glucagon (α-cell dysfunction)\n" },
{ text: "↓ Incretin effect (GIP, GLP-1)\n" },
{ text: "↑ Renal glucose reabsorption (SGLT2 upregulation)\n" },
{ text: "↑ Central appetite dysregulation\n" }
], { x: 5.1, y: 1.42, w: 4.55, h: 3.4, fontSize: 12, fontFace: "Calibri", color: TEXT_MAIN });
}
// ══════════════════════════════════════════════════════════════
// SLIDE 5 – DIAGNOSIS
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Diagnosis (ADA / WHO Criteria)", ACCENT1);
// Table header
const cols = [2.2, 2.2, 2.2, 2.4];
const headers = ["Test", "Diabetes", "Pre-diabetes", "Normal"];
const hColors = [BG_DARK, ACCENT2, "E67E22", ACCENT3];
let xPos = 0.2;
headers.forEach((h, i) => {
s.addShape(pres.ShapeType.rect, { x: xPos, y: 1.05, w: cols[i], h: 0.38, fill: { color: hColors[i] }, line: { type: "none" } });
s.addText(h, { x: xPos, y: 1.05, w: cols[i], h: 0.38, fontSize: 13, bold: true, color: TEXT_LITE, align: "center", valign: "middle" });
xPos += cols[i];
});
const rows = [
["Fasting Plasma Glucose", "≥ 7.0 mmol/L\n(126 mg/dL)", "5.6–6.9 mmol/L\n(IFG)", "< 5.6 mmol/L"],
["2-hr 75g OGTT", "≥ 11.1 mmol/L\n(200 mg/dL)", "7.8–11.0 mmol/L\n(IGT)", "< 7.8 mmol/L"],
["HbA1c", "≥ 48 mmol/mol\n(≥ 6.5%)", "39–47 mmol/mol\n(5.7–6.4%)", "< 39 mmol/mol"],
["Random PG + Sx", "≥ 11.1 mmol/L\nwith symptoms", "—", "—"]
];
rows.forEach((row, ri) => {
xPos = 0.2;
const bgColor = ri % 2 === 0 ? "FFFFFF" : "EEF5FB";
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x: xPos, y: 1.43 + ri * 0.72, w: cols[ci], h: 0.72, fill: { color: bgColor }, line: { color: BORDER, pt: 0.5 } });
s.addText(cell, { x: xPos + 0.05, y: 1.43 + ri * 0.72, w: cols[ci] - 0.1, h: 0.72, fontSize: 11.5, color: TEXT_MAIN, align: "center", valign: "middle", fontFace: "Calibri" });
xPos += cols[ci];
});
});
s.addText("Note: In asymptomatic individuals, two abnormal results on separate days are required for diagnosis.", {
x: 0.2, y: 4.45, w: 9.6, h: 0.4, fontSize: 11, italic: true, color: "667788", fontFace: "Calibri"
});
s.addText("Sx = classic symptoms (polyuria, polydipsia, unexplained weight loss) · IFG = Impaired Fasting Glucose · IGT = Impaired Glucose Tolerance", {
x: 0.2, y: 4.85, w: 9.6, h: 0.35, fontSize: 10, color: "889AAA", fontFace: "Calibri"
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 6 – CLINICAL FEATURES
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Clinical Features", "2E86AB");
const items = [
{ label: "Polyuria", detail: "Osmotic diuresis from glucosuria", icon: "💧" },
{ label: "Polydipsia", detail: "Secondary to dehydration & hyperosmolality", icon: "🥤" },
{ label: "Polyphagia", detail: "Cellular starvation despite hyperglycaemia", icon: "🍽️" },
{ label: "Weight loss", detail: "Catabolism (especially T1DM)", icon: "⚖️" },
{ label: "Blurred vision", detail: "Osmotic lens swelling", icon: "👁️" },
{ label: "Fatigue & weakness", detail: "Impaired glucose utilisation", icon: "😴" },
{ label: "Recurrent infections", detail: "Candidiasis, UTIs, skin infections", icon: "🦠" },
{ label: "Slow wound healing", detail: "Impaired neutrophil function & angiogenesis", icon: "🩹" }
];
items.forEach((item, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.9;
const y = 1.1 + row * 1.05;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.65, h: 0.9, fill: { color: "FFFFFF" }, line: { color: BORDER, pt: 1 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h: 0.9, fill: { color: ACCENT1 }, line: { type: "none" } });
s.addText(item.icon, { x, y, w: 0.55, h: 0.9, fontSize: 20, align: "center", valign: "middle" });
s.addText(item.label, { x: x + 0.62, y: y + 0.06, w: 3.9, h: 0.3, fontSize: 13, bold: true, color: TEXT_MAIN });
s.addText(item.detail, { x: x + 0.62, y: y + 0.38, w: 3.9, h: 0.4, fontSize: 11, color: "556677", fontFace: "Calibri" });
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 7 – COMPLICATIONS
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Complications of Diabetes", ACCENT2);
// Acute
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.0, w: 9.6, h: 0.3, fill: { color: ACCENT2 }, line: { type: "none" } });
s.addText("ACUTE COMPLICATIONS", { x: 0.2, y: 1.01, w: 9.6, h: 0.28, fontSize: 12, bold: true, color: TEXT_LITE, align: "center" });
const acute = [
["DKA", "T1DM; pH <7.3, ketones, anion gap ↑"],
["HHS", "T2DM; glucose >33, no ketosis, hyperosmolar"],
["Hypoglycaemia", "BG <4 mmol/L; sweating, tremor, confusion"]
];
acute.forEach(([t, d], i) => {
s.addShape(pres.ShapeType.rect, { x: 0.2 + i * 3.22, y: 1.32, w: 3.12, h: 0.75, fill: { color: "FFF0F0" }, line: { color: ACCENT2, pt: 1 } });
s.addText(t, { x: 0.25 + i * 3.22, y: 1.35, w: 3.0, h: 0.28, fontSize: 13, bold: true, color: ACCENT2 });
s.addText(d, { x: 0.25 + i * 3.22, y: 1.63, w: 3.0, h: 0.4, fontSize: 10.5, color: TEXT_MAIN, fontFace: "Calibri" });
});
// Chronic micro
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.2, w: 4.7, h: 0.3, fill: { color: "7D3C98" }, line: { type: "none" } });
s.addText("MICROVASCULAR", { x: 0.2, y: 2.21, w: 4.7, h: 0.28, fontSize: 12, bold: true, color: TEXT_LITE, align: "center" });
addCard(s, 0.2, 2.52, 4.7, 2.65, "Small Vessel Disease", "7D3C98", [
"Retinopathy – leading cause of blindness (working age)",
"Nephropathy – CKD → ESRD (dialysis)",
"Peripheral Neuropathy – foot ulcers, Charcot joint",
"Autonomic Neuropathy – gastroparesis, OH, ED",
"Mechanism: polyol pathway, AGEs, PKC, oxidative stress"
]);
// Chronic macro
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.2, w: 4.7, h: 0.3, fill: { color: "1A5276" }, line: { type: "none" } });
s.addText("MACROVASCULAR", { x: 5.1, y: 2.21, w: 4.7, h: 0.28, fontSize: 12, bold: true, color: TEXT_LITE, align: "center" });
addCard(s, 5.1, 2.52, 4.7, 2.65, "Large Vessel Disease", "1A5276", [
"Coronary Artery Disease – MI (2–4× higher risk)",
"Cerebrovascular Disease – stroke / TIA",
"Peripheral Arterial Disease – limb ischaemia, amputation",
"Mechanism: accelerated atherosclerosis, endothelial dysfunction",
"CV disease is the #1 cause of death in T2DM"
]);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 8 – MANAGEMENT
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Management Overview", ACCENT3);
// Glycaemic targets bar
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.0, w: 9.6, h: 0.5, fill: { color: "E8F8EF" }, line: { color: ACCENT3, pt: 1 } });
s.addText([
{ text: "Glycaemic Targets (ADA 2024): ", options: { bold: true, color: ACCENT3 } },
{ text: "HbA1c <53 mmol/mol (<7.0%) | FPG 4.4–7.2 mmol/L | PPG <10 mmol/L ", options: { color: TEXT_MAIN } }
], { x: 0.35, y: 1.02, w: 9.3, h: 0.46, fontSize: 12, fontFace: "Calibri", valign: "middle" });
// Non-pharmacological
addCard(s, 0.2, 1.62, 3.0, 3.45, "Non-Pharmacological", ACCENT3, [
"MNT: low GI diet, calorie deficit",
"Physical activity: 150 min/wk moderate",
"Weight loss ≥5–10% in T2DM",
"Smoking cessation",
"Alcohol moderation",
"Diabetes self-management education (DSME)",
"BP & lipid control"
]);
// T1 Pharmacology
addCard(s, 3.45, 1.62, 3.0, 3.45, "T1DM Pharmacotherapy", ACCENT2, [
"Basal-bolus insulin regimen",
"Basal: glargine, detemir, degludec",
"Bolus: lispro, aspart, glulisine",
"CSII (insulin pump) option",
"CGM for all T1DM",
"Adjunct: pramlintide (amylin analog)",
"Target TIR >70%"
]);
// T2 Pharmacology
addCard(s, 6.7, 1.62, 3.1, 3.45, "T2DM Pharmacotherapy", BG_DARK, [
"1st line: Metformin + lifestyle",
"Add-on (CV/CKD): SGLT2i or GLP-1 RA",
"SGLT2i: empagliflozin, dapagliflozin",
"GLP-1 RA: semaglutide, dulaglutide",
"DPP-4i, sulfonylureas, TZDs",
"Insulin when HbA1c uncontrolled",
"Consider weight-loss surgery (BMI≥35)"
]);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 9 – MONITORING & TARGETS
// ══════════════════════════════════════════════════════════════
{
const s = contentSlide("Monitoring & Screening", "2E86AB");
const monitors = [
{ title: "HbA1c", freq: "Every 3–6 months", target: "< 53 mmol/mol\n(< 7.0%)", color: ACCENT1 },
{ title: "Blood Pressure", freq: "Every visit", target: "< 130/80 mmHg", color: ACCENT2 },
{ title: "Lipids (LDL-C)", freq: "Annually", target: "< 1.8 mmol/L\n(high CV risk)", color: "E67E22" },
{ title: "Renal function\n(eGFR + ACR)", freq: "Annually", target: "ACR < 3 mg/mmol\neGFR trend", color: "7D3C98" },
{ title: "Eye Exam\n(Fundoscopy)", freq: "Annually", target: "Detect early NPDR", color: BG_DARK },
{ title: "Foot Exam", freq: "Every visit", target: "10-g monofilament\nPeripheral pulses", color: ACCENT3 }
];
monitors.forEach((m, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.22 + col * 3.25;
const y = 1.08 + row * 2.15;
s.addShape(pres.ShapeType.rect, { x, y, w: 3.1, h: 2.05, fill: { color: "FFFFFF" }, line: { color: BORDER, pt: 1 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 3.1, h: 0.35, fill: { color: m.color }, line: { type: "none" } });
s.addText(m.title, { x, y, w: 3.1, h: 0.35, fontSize: 13, bold: true, color: TEXT_LITE, align: "center", valign: "middle" });
s.addText("Frequency:", { x: x + 0.1, y: y + 0.42, w: 2.9, h: 0.25, fontSize: 11, bold: true, color: "556677" });
s.addText(m.freq, { x: x + 0.1, y: y + 0.66, w: 2.9, h: 0.3, fontSize: 12, color: TEXT_MAIN, fontFace: "Calibri" });
s.addText("Target:", { x: x + 0.1, y: y + 1.02, w: 2.9, h: 0.25, fontSize: 11, bold: true, color: "556677" });
s.addText(m.target, { x: x + 0.1, y: y + 1.26, w: 2.9, h: 0.55, fontSize: 12, color: m.color, bold: true, fontFace: "Calibri" });
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 10 – KEY TAKEAWAYS
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: BG_DARK }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: ACCENT1 }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.555, w: 10, h: 0.07, fill: { color: ACCENT1 }, line: { type: "none" } });
s.addText("Key Takeaways", { x: 0.4, y: 0.18, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: TEXT_LITE, fontFace: "Calibri" });
const points = [
["01", "Early & accurate diagnosis using ADA criteria is the foundation of management.", ACCENT1],
["02", "T2DM treatment now prioritises CV & renal outcomes — SGLT2i and GLP-1 RAs first-line alongside metformin.", "27AE60"],
["03", "Microvascular complications are largely preventable with tight glycaemic control (DCCT/UKPDS evidence).", "E67E22"],
["04", "Macrovascular disease (CAD, stroke, PAD) remains the #1 killer — manage BP, lipids, and antiplatelet therapy.", ACCENT2],
["05", "Regular structured monitoring (HbA1c, eyes, kidneys, feet) enables early intervention and prevents end-organ damage.", "A569C4"]
];
points.forEach(([num, text, color], i) => {
const y = 0.88 + i * 0.88;
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.5, h: 0.5, fill: { color }, line: { type: "none" } });
s.addText(num, { x: 0.3, y, w: 0.5, h: 0.5, fontSize: 16, bold: true, color: TEXT_LITE, align: "center", valign: "middle" });
s.addText(text, { x: 0.95, y: y + 0.03, w: 8.7, h: 0.5, fontSize: 13.5, color: "D0E8F8", fontFace: "Calibri", valign: "middle" });
});
s.addText("References: ADA Standards of Care 2024 · WHO DM Definition · IDF Diabetes Atlas 10th Ed · DCCT/UKPDS trials", {
x: 0.3, y: 5.25, w: 9.4, h: 0.3, fontSize: 9.5, color: "5588AA", fontFace: "Calibri", align: "center", italic: true
});
}
// ══════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/diabetes-pptx/Diabetes_Mellitus_Clinical_Overview.pptx" })
.then(() => console.log("SUCCESS: Presentation created."))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/diabetes-pptx && node create_pptx.js 2>&1
Diabetes Mellitus Clinical Overview
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Definition & Epidemiology (IDF stats, risk factors) |
| 3 | Classification - T1, T2, Gestational, Other |
| 4 | Pathophysiology - autoimmune cascade vs. DeFronzo's Ominous Octet |
| 5 | Diagnosis - ADA/WHO criteria table (FPG, OGTT, HbA1c, random PG) |
| 6 | Clinical Features - 8 symptoms with icons and mechanisms |
| 7 | Complications - Acute (DKA, HHS, hypoglycaemia) + Micro vs. Macrovascular |
| 8 | Management - lifestyle, T1DM insulin regimens, T2DM drug hierarchy (SGLT2i, GLP-1 RA) |
| 9 | Monitoring & Targets - HbA1c, BP, lipids, renal, eye, foot |
| 10 | Key Takeaways with references (ADA 2024, DCCT/UKPDS) |