I want medicine advance notes for neet pg with integrated physiology pathology pharmacology

Asking for Preferences
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Running Command

mkdir -p /home/daytona/workspace/neet-pg-medicine && ls /home/daytona/workspace/neet-pg-medicine/

Writing File

~/neet-pg-medicine/generate_notes.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = 'LAYOUT_WIDE';
pres.title = 'NEET PG Medicine - Integrated Notes';
pres.author = 'Orris Medical';

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  darkBg:    "0D1B2A",   // deep navy  (title/section slides)
  medBg:     "1B2A4A",   // mid navy
  lightBg:   "EEF2F7",   // off-white body
  accent1:   "00B4D8",   // cyan
  accent2:   "F4A261",   // amber
  accent3:   "52B788",   // green
  accent4:   "E63946",   // red
  accent5:   "A8DADC",   // light teal
  white:     "FFFFFF",
  textDark:  "1A1A2E",
  textGray:  "4A4A6A",
  border:    "CBD5E1",
  boxPhysio: "D6EAF8",   // blue box
  boxPatho:  "FADBD8",   // red box
  boxPharma: "D5F5E3",   // green box
  boxClin:   "FEF9E7",   // yellow box
};

// ─── HELPERS ─────────────────────────────────────────────────────────────────
function addSectionTitle(title, subtitle, colorHex) {
  let s = pres.addSlide();
  s.background = { color: C.darkBg };
  // Left accent bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 7.5, fill: { color: colorHex } });
  s.addText(title, {
    x: 0.4, y: 2.2, w: 12.5, h: 1.2,
    fontSize: 40, bold: true, color: C.white, fontFace: "Calibri",
    charSpacing: 2,
  });
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 3.5, w: 2, h: 0.07, fill: { color: colorHex } });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.4, y: 3.7, w: 12, h: 0.8,
      fontSize: 18, color: accent1orColor(colorHex), fontFace: "Calibri",
    });
  }
  return s;
}

function accent1orColor(c) { return c === C.accent1 ? C.white : C.accent5; }

function addTitleSlide() {
  let s = pres.addSlide();
  s.background = { color: C.darkBg };
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 1.1, fill: { color: C.accent1 } });
  s.addText("NEET PG MEDICINE", {
    x: 0, y: 0.1, w: 13.3, h: 0.9,
    fontSize: 28, bold: true, color: C.darkBg, align: "center", fontFace: "Calibri",
  });
  s.addText("Integrated Advance Notes", {
    x: 0.5, y: 1.5, w: 12.3, h: 1.0,
    fontSize: 36, bold: true, color: C.white, align: "center", fontFace: "Calibri",
  });
  s.addText("Physiology  Β·  Pathology  Β·  Pharmacology", {
    x: 0.5, y: 2.6, w: 12.3, h: 0.7,
    fontSize: 20, color: C.accent5, align: "center", fontFace: "Calibri",
  });
  s.addShape(pres.ShapeType.rect, { x: 2, y: 3.5, w: 9.3, h: 0.06, fill: { color: C.accent2 } });
  s.addText([
    { text: "CVS  ", options: { color: C.accent1 } },
    { text: "Β·  Respiratory  Β·  ", options: { color: C.white } },
    { text: "Renal  ", options: { color: C.accent3 } },
    { text: "Β·  Endocrine  Β·  ", options: { color: C.white } },
    { text: "GIT  ", options: { color: C.accent2 } },
    { text: "Β·  Neurology  Β·  ", options: { color: C.white } },
    { text: "Hematology", options: { color: C.accent4 } },
  ], {
    x: 0.5, y: 3.8, w: 12.3, h: 0.6, align: "center", fontSize: 14, fontFace: "Calibri",
  });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 6.8, w: 13.3, h: 0.7, fill: { color: C.medBg } });
  s.addText("Flowchart-Style | High-Yield | NEET PG 2026", {
    x: 0, y: 6.85, w: 13.3, h: 0.55,
    fontSize: 13, color: C.accent5, align: "center", fontFace: "Calibri",
  });
}

// Draws a 3-column integrated box slide
function addIntegratedSlide(topic, accentColor, physio, patho, pharma) {
  let s = pres.addSlide();
  s.background = { color: C.lightBg };
  // Header bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.85, fill: { color: accentColor } });
  s.addText(topic, {
    x: 0.3, y: 0.08, w: 12.7, h: 0.7,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });
  // Column labels
  const labels = ["πŸ”¬ PHYSIOLOGY", "🧬 PATHOLOGY", "πŸ’Š PHARMACOLOGY"];
  const bgColors = [C.boxPhysio, C.boxPatho, C.boxPharma];
  const borderColors = [C.accent1, C.accent4, C.accent3];
  const colX = [0.15, 4.6, 9.05];
  const colW = 4.2;
  labels.forEach((lbl, i) => {
    s.addShape(pres.ShapeType.rect, { x: colX[i], y: 0.95, w: colW, h: 0.42, fill: { color: borderColors[i] }, line: { color: borderColors[i] } });
    s.addText(lbl, {
      x: colX[i], y: 0.97, w: colW, h: 0.38,
      fontSize: 13, bold: true, color: C.white, align: "center", fontFace: "Calibri",
    });
  });

  const content = [physio, patho, pharma];
  content.forEach((items, i) => {
    s.addShape(pres.ShapeType.rect, {
      x: colX[i], y: 1.42, w: colW, h: 5.9,
      fill: { color: bgColors[i] },
      line: { color: borderColors[i], width: 1.5 },
    });
    const richText = items.map((item, idx) => {
      const parts = [];
      if (item.startsWith("β†’") || item.startsWith("↓") || item.startsWith("↑") || item.startsWith("β–Έ")) {
        parts.push({ text: item + "\n", options: { fontSize: 11, color: C.textDark, fontFace: "Calibri", paraSpaceAfter: 4, indentLevel: 1 } });
      } else if (item.startsWith("##")) {
        parts.push({ text: item.replace("##", "").trim() + "\n", options: { fontSize: 12, bold: true, color: borderColors[i], fontFace: "Calibri", paraSpaceAfter: 3 } });
      } else {
        parts.push({ text: "β€’ " + item + "\n", options: { fontSize: 11, color: C.textDark, fontFace: "Calibri", paraSpaceAfter: 4 } });
      }
      return parts[0];
    });
    s.addText(richText, {
      x: colX[i] + 0.1, y: 1.5, w: colW - 0.2, h: 5.7,
      fontFace: "Calibri", valign: "top",
    });
  });
  return s;
}

// Draws a flowchart-style pathway slide
function addFlowchartSlide(topic, accentColor, steps) {
  // steps: [{label, text, color}]
  let s = pres.addSlide();
  s.background = { color: C.darkBg };
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.8, fill: { color: accentColor } });
  s.addText("PATHOPHYSIOLOGY FLOWCHART: " + topic, {
    x: 0.3, y: 0.08, w: 12.7, h: 0.65,
    fontSize: 18, bold: true, color: C.darkBg, fontFace: "Calibri",
  });

  const stepW = 13.3 / steps.length - 0.15;
  steps.forEach((step, i) => {
    const sx = 0.1 + i * (stepW + 0.15);
    const sy = 1.0;
    s.addShape(pres.ShapeType.roundRect, {
      x: sx, y: sy, w: stepW, h: 1.1,
      fill: { color: step.color || accentColor },
      line: { color: C.white, width: 0 },
    });
    s.addText(step.label, {
      x: sx + 0.05, y: sy + 0.05, w: stepW - 0.1, h: 0.45,
      fontSize: 11, bold: true, color: C.white, align: "center", fontFace: "Calibri",
    });
    s.addText(step.text, {
      x: sx + 0.05, y: sy + 0.5, w: stepW - 0.1, h: 0.55,
      fontSize: 9, color: C.white, align: "center", fontFace: "Calibri",
    });
    // Arrow
    if (i < steps.length - 1) {
      s.addText("β–Ά", {
        x: sx + stepW, y: sy + 0.3, w: 0.18, h: 0.4,
        fontSize: 14, color: C.accent2, align: "center", fontFace: "Arial",
      });
    }
  });

  // Pathology bullets below
  if (steps.details) {
    steps.details.forEach((d, i) => {
      s.addText("β€’ " + d, {
        x: 0.3, y: 2.3 + i * 0.4, w: 12.7, h: 0.38,
        fontSize: 12, color: C.accent5, fontFace: "Calibri",
      });
    });
  }
  return s;
}

function addKeyPointsSlide(topic, accentColor, points) {
  let s = pres.addSlide();
  s.background = { color: C.lightBg };
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.8, fill: { color: accentColor } });
  s.addText("HIGH-YIELD KEY POINTS: " + topic, {
    x: 0.3, y: 0.1, w: 12.7, h: 0.62,
    fontSize: 20, bold: true, color: C.white, fontFace: "Calibri",
  });
  points.forEach((pt, i) => {
    const isEven = i % 2 === 0;
    const bx = isEven ? 0.2 : 6.75;
    const by = 1.0 + Math.floor(i / 2) * 1.3;
    s.addShape(pres.ShapeType.roundRect, {
      x: bx, y: by, w: 6.2, h: 1.2,
      fill: { color: C.white },
      line: { color: accentColor, width: 2 },
    });
    s.addText("β˜… " + pt.title, {
      x: bx + 0.1, y: by + 0.05, w: 6.0, h: 0.38,
      fontSize: 12, bold: true, color: accentColor, fontFace: "Calibri",
    });
    s.addText(pt.body, {
      x: bx + 0.1, y: by + 0.45, w: 6.0, h: 0.65,
      fontSize: 10, color: C.textDark, fontFace: "Calibri",
    });
  });
  return s;
}

// ─── SLIDE CONTENT ───────────────────────────────────────────────────────────

// TITLE
addTitleSlide();

// ══════════════════════════════════════════════════════
// 1. CARDIOVASCULAR SYSTEM
// ══════════════════════════════════════════════════════
addSectionTitle("1. CARDIOVASCULAR SYSTEM", "Heart Failure Β· IHD Β· Hypertension Β· Arrhythmias", C.accent1);

// Heart Failure - Integrated
addIntegratedSlide(
  "HEART FAILURE β€” Integrated Physiology Β· Pathology Β· Pharmacology",
  C.accent1,
  [
    "## Normal Cardiac Physiology",
    "CO = HR Γ— SV  |  SV = Preload βˆ’ Afterload + Contractility",
    "Frank-Starling: ↑ stretch β†’ ↑ force",
    "↑ SNS β†’ ↑ HR + contractility (Ξ²1)",
    "RAAS: Ang II β†’ ↑ aldosterone β†’ Na+/H2O retention",
    "## HF Pathophysiology",
    "↓ CO β†’ Baroreceptor activation",
    "β†’ ↑ SNS: tachycardia, vasoconstriction",
    "β†’ ↑ RAAS: fluid retention, ↑ preload/afterload",
    "β†’ ↑ ADH: water retention",
    "β†’ Maladaptive LV remodeling",
    "Systolic HF (HFrEF): EF <40%",
    "Diastolic HF (HFpEF): EF β‰₯50%, ↓ compliance",
  ],
  [
    "## Gross Pathology",
    "HFrEF: Dilated cardiomyopathy",
    "β†’ Eccentric hypertrophy (sarcomeres in series)",
    "HFpEF: Concentric hypertrophy (sarcomeres in parallel)",
    "## Histology",
    "Myocyte hypertrophy, interstitial fibrosis",
    "Myocyte loss via apoptosis/necrosis",
    "## Lung Changes (LHF)",
    "Pulm. edema β†’ 'bat-wing' CXR",
    "Hemosiderin-laden macrophages ('heart failure cells')",
    "## Liver Changes (RHF)",
    "Nutmeg liver: central venous congestion",
    "Centrilobular necrosis β†’ cardiac cirrhosis",
  ],
  [
    "## MORTALITY REDUCERS",
    "ACE-I / ARB: Block RAAS (↓ preload+afterload)",
    "Beta-blocker: Metoprolol, carvedilol (↓ SNS)",
    "MRA: Spironolactone (↓ aldosterone, anti-fibrotic)",
    "ARNI: Sacubitril/valsartan (BNP ↑ β†’ vasodilation)",
    "SGLT2i: Dapagliflozin (osmotic diuresis, cardioprotective)",
    "Ivabradine: ↓ HR via If channel (HFrEF + HR>70)",
    "## SYMPTOM RELIEVERS",
    "Loop diuretics: Furosemide (↓ preload)",
    "Digoxin: ↑ contractility (↑ [Ca2+]i via Na/K ATPase)",
    "Hydralazine + Nitrate: African-Americans",
    "NYHA I-II: ACEi + BB + MRA + SGLT2i",
  ]
);

// Heart Failure Flowchart
addFlowchartSlide(
  "HEART FAILURE",
  C.accent1,
  [
    { label: "TRIGGER", text: "HTN / IHD / Valve disease / Cardiomyopathy", color: "1A3A5C" },
    { label: "↓ CO", text: "Reduced cardiac output", color: "1E5F74" },
    { label: "NEUROHORMONAL", text: "↑ SNS, ↑ RAAS, ↑ ADH, ↑ BNP/ANP", color: "1B7A9A" },
    { label: "COMPENSATION", text: "HR↑, Volume retention, Vasoconstriction", color: "117A65" },
    { label: "REMODELING", text: "Eccentric/Concentric hypertrophy, Fibrosis", color: "922B21" },
    { label: "DECOMPENSATION", text: "Dyspnea, Edema, Reduced EF", color: "7D3C98" },
    { label: "TREATMENT", text: "ACEi, BB, MRA, ARNI, SGLT2i, Diuretics", color: "1D6A96" },
  ]
);

addKeyPointsSlide("HEART FAILURE", C.accent1, [
  { title: "HFrEF vs HFpEF", body: "HFrEF: EF<40%, dilated, eccentric hypertrophy. HFpEF: EFβ‰₯50%, concentric, stiff ventricle. HFmrEF: EF 40-49%." },
  { title: "BNP/NT-proBNP", body: "Released by ventricular myocytes in response to wall stress. BNP>500 pg/mL = HF; <100 excludes HF. Useful for monitoring." },
  { title: "ARNI Mechanism", body: "Sacubitril inhibits neprilysin (↑ BNP/ANP) β†’ ↑ vasodilation + natriuresis. Valsartan blocks AT1. Do NOT combine with ACEi (angioedema risk)." },
  { title: "SGLT2 inhibitors", body: "Dapagliflozin/Empagliflozin approved for HFrEF regardless of diabetes. ↓ hospitalisation by 25%. Mechanism: osmotic diuresis + direct cardiac effects." },
  { title: "Digoxin Use", body: "Only reduces hospitalisations, NOT mortality. Use in HFrEF with AF. Toxicity: bradycardia, yellow-green vision, GI upset. Level: 0.5-0.9 ng/mL optimal." },
  { title: "Cardiac Output Formula", body: "CO = HR Γ— SV; Fick: CO = VO2 / (CaO2 - CvO2). Normal CO 4-8 L/min. Cardiac index = CO/BSA (normal 2.2-4.0 L/min/mΒ²)." },
]);

// IHD
addIntegratedSlide(
  "ISCHEMIC HEART DISEASE (IHD) β€” Integrated",
  C.accent1,
  [
    "## Coronary Physiology",
    "Coronary flow: diastole-dominant (esp. LCA)",
    "O2 extraction at rest: ~70% (↑ demand met by ↑ flow)",
    "Autoregulation: 50-130 mmHg",
    "## Triggers of Ischemia",
    "↑ demand: tachycardia, HTN, hypertrophy",
    "↓ supply: atherosclerosis, spasm, thrombosis",
    "Subendocardium: most vulnerable (highest O2 demand)",
    "## Ischemic Cascade",
    "Diastolic dysfunction β†’ Systolic dysfunction",
    "β†’ ECG changes β†’ Chest pain (last step)",
  ],
  [
    "## Atherosclerosis Stages",
    "Fatty streak β†’ Fibrous plaque β†’ Complicated plaque",
    "LDL oxidation β†’ Foam cells β†’ Inflammation",
    "## Stable Angina",
    "Fixed stenosis >70%, demand-supply mismatch",
    "## ACS Pathology",
    "Plaque rupture/erosion β†’ Thrombus formation",
    "NSTEMI: Partial occlusion (subendocardial infarct)",
    "STEMI: Complete occlusion (transmural infarct)",
    "## MI Zones",
    "Centre: necrosis, Periphery: injury, outer: ischemia",
    "Complications: Arrhythmia (24-48h) β†’ Failure β†’ Rupture (3-7d) β†’ Aneurysm",
  ],
  [
    "## Antiplatelet",
    "Aspirin: COX-1 β†’ ↓ TXA2 (irreversible)",
    "Clopidogrel: P2Y12 blocker (ADP pathway)",
    "Ticagrelor: Reversible P2Y12 (preferred in ACS)",
    "## Anticoagulant",
    "UFH: APTT-guided; LMWH: Enoxaparin",
    "Fondaparinux: Factor Xa inhibitor (NSTEMI)",
    "## Thrombolytics (STEMI)",
    "Streptokinase, Alteplase (tPA), Tenecteplase",
    "## Stable Angina",
    "Beta-blockers: ↓ HR, ↓ O2 demand (1st line)",
    "Nitrates: ↓ preload (venodilation) + vasodilation",
    "CCBs: Amlodipine (stable), Diltiazem/Verapamil (vasospastic)",
    "Ranolazine: ↓ late Na+ current β†’ ↓ Ca2+ overload",
  ]
);

// HTN
addIntegratedSlide(
  "HYPERTENSION β€” Integrated",
  C.accent1,
  [
    "## BP Regulation Physiology",
    "BP = CO Γ— TPR",
    "RAAS: Renin (JGA) β†’ Ang I β†’ ACE β†’ Ang II",
    "Ang II: AT1 β†’ vasoconstriction, aldosterone, ADH",
    "Baroreceptors: aortic arch + carotid sinus",
    "Macula densa: sensing Na+ β†’ renin release",
    "## Essential HTN Mechanisms",
    "↑ SNS activity, ↑ RAAS, Endothelial dysfunction",
    "Na+ retention (genetic), ↑ intracellular Ca2+",
    "## Secondary HTN Causes",
    "Renovascular, Conn's (↑ aldosterone), Pheochromocytoma",
    "Cushing's, Coarctation of aorta",
  ],
  [
    "## Target Organ Damage",
    "Heart: LVH β†’ HF, Angina, MI",
    "Brain: Lacunar infarcts, ICH, Hypertensive encephalopathy",
    "Kidney: Benign/Malignant nephrosclerosis",
    "Eye: Keith-Wagener-Barker classification (Grade 1-4)",
    "## Benign Nephrosclerosis",
    "Hyaline arteriolosclerosis β†’ ↓ GFR gradually",
    "## Malignant Nephrosclerosis",
    "Onion-skin (hyperplastic arteriolosclerosis)",
    "Fibrinoid necrosis, Microangiopathic hemolysis",
    "## Hypertensive Emergency",
    "BP >180/120 + end-organ damage",
    "Papilledema, AKI, Hypertensive encephalopathy",
  ],
  [
    "## Step Therapy",
    "Stage 1 (<130/80 no organ damage): Lifestyle",
    "Stage 1 (>10% CVD risk) / Stage 2: Drug therapy",
    "## Drug Classes",
    "ACE-I (Enalapril): RAAS block; avoid in pregnancy, bilateral RAS",
    "ARB (Losartan): AT1 block; no cough",
    "CCB (Amlodipine): ↓ Ca2+ β†’ smooth muscle relax",
    "Thiazide (HCTZ): ↑ NCC inhibition, ↓ Na+/H2O",
    "Beta-blocker: JNC no longer 1st line (except HF, MI)",
    "## Special Situations",
    "Pregnancy: Methyldopa, Labetalol, Nifedipine",
    "HTN emergency: IV Labetalol/Nicardipine/Nitroprusside",
    "Pheochromocytoma: Ξ±-blocker first (Phenoxybenzamine), then Ξ²",
  ]
);

// ══════════════════════════════════════════════════════
// 2. RESPIRATORY SYSTEM
// ══════════════════════════════════════════════════════
addSectionTitle("2. RESPIRATORY SYSTEM", "Asthma Β· COPD Β· Pneumonia Β· TB Β· Lung Cancer", C.accent2);

addFlowchartSlide(
  "ASTHMA vs COPD",
  C.accent2,
  [
    { label: "TRIGGER", text: "Allergen/Exercise β†’ IgE β†’ Mast cell degranulation (Asthma) | Smoking β†’ Oxidative stress (COPD)", color: "5D4037" },
    { label: "INFLAMMATION", text: "Asthma: Eosinophilic (Th2: IL-4,5,13)\nCOPD: Neutrophilic/CD8+ (IL-8, TNF-Ξ±)", color: "795548" },
    { label: "OBSTRUCTION", text: "Asthma: Reversible bronchospasm + mucus\nCOPD: Fixed airflow limitation", color: "6D4C41" },
    { label: "SPIROMETRY", text: "Asthma: FEV1/FVC <0.7 (reversible >12%)\nCOPD: FEV1/FVC <0.7 post-BD (irreversible)", color: "4E342E" },
    { label: "PATHOLOGY", text: "Asthma: BM thickening, goblet hyperplasia\nCOPD: Emphysema (centriacinar/panacinar)", color: "3E2723" },
    { label: "TREATMENT", text: "Asthma: ICS + LABA\nCOPD: LAMA (Tiotropium) Β± LABA Β± ICS", color: "1B5E20" },
  ]
);

addIntegratedSlide(
  "ASTHMA & COPD β€” Integrated",
  C.accent2,
  [
    "## Airway Physiology",
    "Airways: Conducting (dead space 150mL) + Respiratory",
    "FRC = TLC βˆ’ IC; FEV1/FVC normal >0.7",
    "Airway resistance: inversely proportional to r⁴",
    "## Asthma Physiology",
    "Early phase (min): Bronchospasm via LTC4/D4, histamine",
    "Late phase (hours): Eosinophilic inflammation via IL-5",
    "Ξ²2 receptors on bronchial smooth muscle β†’ bronchodilation",
    "## COPD Physiology",
    "Emphysema: Loss of alveolar walls β†’ ↑ lung compliance",
    "Chronic bronchitis: Hypersecretion β†’ ↑ airway resistance",
    "V/Q mismatch β†’ Type 1 resp. failure (↓PaO2, normal PaCO2)",
    "Severe COPD: CO2 retention β†’ Type 2 respiratory failure",
  ],
  [
    "## Asthma Pathology",
    "Bronchial wall thickening (smooth muscle hypertrophy)",
    "Sub-epithelial fibrosis (basement membrane thickening)",
    "Goblet cell hyperplasia + mucus hypersecretion",
    "Charcot-Leyden crystals (eosinophilic granules)",
    "Curschmann's spirals (mucus plugs)",
    "## COPD Pathology",
    "Centriacinar emphysema: Smoking (upper lobes)",
    "Panacinar emphysema: Ξ±1-antitrypsin deficiency (lower lobes)",
    "Chronic bronchitis: Reid index >0.5 (mucous gland/wall ratio)",
    "## Ξ±1-AT Deficiency",
    "Neutrophil elastase destroys alveolar walls unchecked",
    "Also causes liver disease (PAS+ globules in hepatocytes)",
  ],
  [
    "## Asthma Treatment (GINA Steps)",
    "Step 1: SABA (Salbutamol) PRN",
    "Step 2: Low-dose ICS (Beclomethasone)",
    "Step 3: Low ICS + LABA (Formoterol)",
    "Step 4: Medium ICS + LABA",
    "Step 5: Add-on: Tiotropium, Anti-IL5 (Mepolizumab), Anti-IgE (Omalizumab)",
    "Acute severe: IV Mg2+, IV aminophylline, nebulized salbutamol",
    "## COPD Treatment (GOLD)",
    "LAMA (Tiotropium): 1st line for COPD",
    "LAMA + LABA: Group B-D patients",
    "Add ICS: Frequent exacerbations (eosinophilic)",
    "Roflumilast: PDE-4 inhibitor (↓ exacerbations)",
    "Mucolytics: N-acetylcysteine",
    "Long-term O2 (LTOT): PaO2 <55mmHg",
  ]
);

// TB
addIntegratedSlide(
  "TUBERCULOSIS β€” Integrated",
  C.accent2,
  [
    "## Granuloma Physiology",
    "M. tuberculosis β†’ engulfed by macrophage",
    "Macrophage cannot kill (lipid-rich cell wall: mycolic acid)",
    "β†’ Signals T-cells (IL-12 β†’ Th1 β†’ IFN-Ξ³)",
    "β†’ Macrophage activation β†’ Granuloma formation",
    "## Hypersensitivity Type",
    "Primary TB: Type IV (cell-mediated) hypersensitivity",
    "Ghon focus: Parenchyma (right lower/mid zone)",
    "Ghon complex = Ghon focus + hilar lymphadenopathy",
    "## Latent vs Active TB",
    "Latent: Granuloma contains organisms (IGRA/TST +ve)",
    "Reactivation: Apex (high O2) β†’ liquefaction β†’ cavity",
  ],
  [
    "## Primary TB Pathology",
    "Ghon focus: Caseous necrosis in lower/mid lung",
    "Hilar lymphadenopathy (Ranke complex if calcified)",
    "## Secondary (Reactivation) TB",
    "Apical/posterior upper lobe (Simon focus)",
    "Caseation, cavitation, fibrosis",
    "## Histology",
    "Epithelioid granuloma with Langhans' giant cells",
    "Central caseous necrosis",
    "Ziehl-Neelsen stain: Acid-fast bacilli (red rods)",
    "## Miliary TB",
    "Hematogenous spread β†’ 1-2mm nodules (millet seeds)",
    "## Paradoxical reaction",
    "Immune reconstitution phenomenon (IRIS)",
  ],
  [
    "## Intensive Phase (2 months)",
    "HRZE: Isoniazid + Rifampicin + Pyrazinamide + Ethambutol",
    "## Continuation Phase (4 months)",
    "HR: Isoniazid + Rifampicin",
    "## Drug Mechanisms",
    "Isoniazid (H): Inhibits mycolic acid synthesis (InhA/KatG)",
    "Rifampicin (R): Inhibits RNA polymerase (rpoB gene)",
    "Pyrazinamide (Z): Active in acidic environment; joint pain",
    "Ethambutol (E): Inhibits arabinogalactan synthesis",
    "## Side Effects",
    "INH: Peripheral neuropathy (give B6), Hepatitis",
    "Rifampicin: Hepatitis, Orange discoloration, CYP inducer",
    "Pyrazinamide: Hyperuricemia, Hepatotoxicity",
    "Ethambutol: Optic neuritis (color vision first affected)",
    "MDR-TB: Resistance to H+R β†’ use Bedaquiline+linezolid",
  ]
);

// ══════════════════════════════════════════════════════
// 3. RENAL SYSTEM
// ══════════════════════════════════════════════════════
addSectionTitle("3. RENAL SYSTEM", "AKI Β· CKD Β· Glomerulonephritis Β· Nephrotic Syndrome", C.accent3);

addFlowchartSlide(
  "ACUTE KIDNEY INJURY (AKI)",
  C.accent3,
  [
    { label: "PRE-RENAL", text: "↓ Volume / ↓ CO / Vasodilation\nFENA <1%, BUN/Cr >20:1", color: "1A5276" },
    { label: "INTRINSIC", text: "ATN (ischemia/nephrotoxin)\nFENA >2%, Muddy brown casts", color: "1D8348" },
    { label: "POST-RENAL", text: "BPH / Stones / Stricture\nBilateral obstruction needed", color: "6E2F1A" },
    { label: "PATHOLOGY", text: "ATN: S3 proximal tubule (ischemia)\nCortex/Medulla junction most vulnerable", color: "7D6608" },
    { label: "RECOVERY", text: "Oliguric β†’ Diuretic β†’ Recovery\nPolyuric phase: Risk of K+ loss", color: "117A65" },
    { label: "TREATMENT", text: "Remove cause, IV fluids (pre-renal)\nDialysis: AEIOU criteria", color: "1D6A96" },
  ]
);

addIntegratedSlide(
  "NEPHROTIC vs NEPHRITIC SYNDROME β€” Integrated",
  C.accent3,
  [
    "## Glomerular Physiology",
    "GFR = 120-125 mL/min (normal)",
    "Filtration barrier: Endothelium + GBM + Podocytes",
    "GBM: Type IV collagen + Heparan sulfate (βˆ’ve charge)",
    "Podocytes: Foot processes + Nephrin (slit diaphragm)",
    "## Nephrotic Pathophysiology",
    "Loss of βˆ’ve charge (heparan sulfate) β†’ proteinuria",
    "Albumin lost β†’ ↓ oncotic pressure β†’ Edema",
    "↓ Oncotic P β†’ Compensatory ↑ RAAS β†’ Na+/H2O retention",
    "Lipiduria: Lipoproteins lost in urine (oval fat bodies)",
    "↑ LDL: Liver compensatory synthesis",
  ],
  [
    "## Nephrotic Syndrome Causes",
    "Child: Minimal Change Disease (MCD) β€” #1 cause",
    "Adult: Membranous GN (primary: PLA2R antibody)",
    "Diabetes: Nodular glomerulosclerosis (Kimmelstiel-Wilson)",
    "Amyloidosis: Congo red β†’ apple-green birefringence",
    "FSGS: HIV, heroin, obesity; podocyte injury",
    "## Nephritic Syndrome Causes",
    "Post-streptococcal GN: Subepithelial humps (immune complex)",
    "IgA nephropathy (Berger's): Mesangial IgA deposits",
    "Lupus nephritis: Wire-loop lesion (Class IV worst)",
    "Goodpasture's: Anti-GBM (linear IgG on IF)",
    "RPGN: Crescentic GN (epithelial crescents) β†’ Poor prognosis",
  ],
  [
    "## Nephrotic Treatment",
    "MCD: Prednisolone (steroid-sensitive, good prognosis)",
    "Membranous: Cyclosporine / Tacrolimus / Rituximab",
    "Diabetic Nephropathy: ACEi/ARB + SGLT2i (Empagliflozin)",
    "General: Loop diuretics, Low-Na+ diet, Statins",
    "## Nephritic Treatment",
    "Post-strep GN: Supportive (usually self-limiting)",
    "IgA Nephropathy: ACEi + fish oil (mild); steroids (heavy proteinuria)",
    "Goodpasture's: Plasmapheresis + Cyclophosphamide + Steroids",
    "Lupus Nephritis Class IV: Cyclophosphamide/Mycophenolate + Steroids",
    "## Dialysis Indications (AEIOU)",
    "Acidosis, Electrolytes (↑K+), Intoxication, Overload (fluid), Uremia",
  ]
);

addIntegratedSlide(
  "CHRONIC KIDNEY DISEASE (CKD) β€” Integrated",
  C.accent3,
  [
    "## CKD Staging (KDIGO)",
    "G1: GFR >90 (kidney damage with normal GFR)",
    "G2: GFR 60-89",
    "G3a: GFR 45-59 | G3b: GFR 30-44",
    "G4: GFR 15-29 (preparation for RRT)",
    "G5: GFR <15 (kidney failure/ESRD)",
    "## Pathophysiology",
    "Hyperfiltration of remaining nephrons β†’ Glomerular HTN",
    "β†’ Proteinuria β†’ TGF-Ξ² β†’ Fibrosis",
    "β†’ Tubular atrophy β†’ Interstitial fibrosis",
    "Hallmark: Broad waxy casts in urine",
  ],
  [
    "## Metabolic Consequences",
    "↓ GFR β†’ ↑ BUN, Creatinine, Uric acid",
    "Anemia: ↓ EPO production by peritubular cells",
    "Renal Osteodystrophy: ↓ 1Ξ±-hydroxylase β†’ ↓ active Vit D β†’ ↑ PTH",
    "β†’ Osteitis fibrosa cystica (high-turnover bone disease)",
    "Metabolic acidosis: ↓ NH4+ excretion",
    "Hyperkalemia, Hyperphosphatemia",
    "Hypertension: Na+/H2O retention + ↑ RAAS",
    "## Uremia",
    "Uremic pericarditis (friction rub)",
    "Uremic encephalopathy, Platelet dysfunction",
    "Uremic fetor (ammonia breath)",
  ],
  [
    "## Slowing CKD Progression",
    "ACEi/ARB: ↓ proteinuria + ↓ glomerular HTN",
    "SGLT2i: Empagliflozin/Dapagliflozin (↓ CKD progression)",
    "BP control: Target <130/80 mmHg",
    "Protein restriction: 0.6-0.8 g/kg/day",
    "## Treating Complications",
    "Anemia: Erythropoietin stimulating agents (ESA) + IV iron",
    "Renal Osteodystrophy: Phosphate binders (Ca carbonate, Sevelamer), Vit D supplementation",
    "Cinacalcet: Calcimimetic β†’ ↓ PTH",
    "Hyperkalemia: Low-K diet, Patiromer/Na-Zirconium Cyclosilicate",
    "Acidosis: Sodium Bicarbonate",
    "## RRT",
    "HD, CAPD, Kidney transplant (preferred)",
  ]
);

// ══════════════════════════════════════════════════════
// 4. ENDOCRINE SYSTEM
// ══════════════════════════════════════════════════════
addSectionTitle("4. ENDOCRINE SYSTEM", "Diabetes Β· Thyroid Β· Adrenal Β· Pituitary", C.accent4);

addIntegratedSlide(
  "DIABETES MELLITUS β€” Integrated",
  C.accent4,
  [
    "## Glucose Homeostasis",
    "Insulin: Ξ² cells (glucose β†’ depolarize β†’ Ca2+ β†’ exocytosis)",
    "↑ glucose uptake (GLUT4), ↑ glycogen synthesis, ↑ lipogenesis",
    "Glucagon (Ξ± cells): ↑ glycogenolysis, ↑ gluconeogenesis",
    "Incretins: GLP-1, GIP (↑ insulin, ↓ glucagon, ↓ gastric emptying)",
    "## Type 1 DM",
    "Autoimmune destruction of Ξ² cells (anti-GAD, anti-IA2, anti-islet)",
    "HLA-DR3/DR4; absolute insulin deficiency β†’ DKA prone",
    "## Type 2 DM",
    "Insulin resistance (↓ GLUT4 translocation) + Ξ² cell exhaustion",
    "Amyloid deposits in islets (IAPP/Amylin)",
    "Central obesity, Metabolic syndrome",
  ],
  [
    "## Macrovascular Complications",
    "Accelerated atherosclerosis β†’ MI, Stroke, PAD",
    "## Microvascular Complications",
    "Retinopathy: Non-proliferative (microaneurysms, dot hemorrhages) β†’ Proliferative (neovascularization) β†’ Tractional detachment",
    "Nephropathy: GBM thickening β†’ Microalbuminuria β†’ Macroalbuminuria β†’ ESRD",
    "Kimmelstiel-Wilson lesion: Nodular glomerulosclerosis (pathognomonic)",
    "Neuropathy: Distal symmetric polyneuropathy (stocking-glove), Autonomic neuropathy",
    "## DKA vs HHS",
    "DKA: T1DM, ↑ ketones, anion gap acidosis, pH <7.3",
    "HHS: T2DM, ↑ ↑ glucose (>600), Hyperosmolar, No ketones",
  ],
  [
    "## T1DM: Insulin",
    "Basal-bolus regimen (Glargine/Detemir + Lispro/Aspart)",
    "## T2DM: Drug Classes",
    "Metformin: ↓ hepatic gluconeogenesis (AMPK), ↑ insulin sensitivity β€” 1st line, cardioprotective",
    "SGLT2i: Gliflozins β€” ↓ renal glucose reabsorption, ↓ CV events, ↓ CKD progression",
    "GLP-1 RA: Semaglutide/Liraglutide β€” ↓ CV events, weight loss, ↓ SBP",
    "DPP4i: Gliptins β€” incretins, weight neutral, safe in CKD",
    "Sulfonylureas: Glibenclamide β€” ↑ insulin secretion (KATP channel), hypoglycemia risk",
    "Pioglitazone (TZD): ↑ insulin sensitivity (PPAR-Ξ³), β†’ weight gain, fluid retention",
    "## DKA Treatment",
    "IV fluids (NS first), Insulin infusion, K+ replacement (give K+ if >3.5)",
    "Monitor: Blood glucose, K+, bicarbonate, pH",
  ]
);

addFlowchartSlide(
  "THYROID PHYSIOLOGY & PATHOLOGY",
  C.accent4,
  [
    { label: "HYPOTHALAMUS", text: "TRH (cold, stress, ↓T4)", color: "6A1B9A" },
    { label: "PITUITARY", text: "TSH (↑ if ↓T4; ↓ if ↑T4)\nNeg feedback", color: "7B1FA2" },
    { label: "THYROID", text: "T4 (prohormone, 90%)\nT3 (active, 10%)", color: "8E24AA" },
    { label: "PERIPHERAL", text: "Deiodinase: T4β†’T3 (liver, kidney)\nReverse T3 in illness", color: "AB47BC" },
    { label: "HYPERTHYROID", text: "Graves' (TSI), Toxic MNG, Toxic adenoma\n↑ BMR, AF, weight loss", color: "D81B60" },
    { label: "HYPOTHYROID", text: "Hashimoto's (anti-TPO, anti-Tg)\nMyxedema, constipation, cold intolerance", color: "880E4F" },
    { label: "TREATMENT", text: "Hyper: PTU/Carbimazole, RAI, Surgery\nHypo: Levothyroxine (T4)", color: "1B5E20" },
  ]
);

addIntegratedSlide(
  "THYROID DISORDERS β€” Integrated",
  C.accent4,
  [
    "## Thyroid Hormone Physiology",
    "Synthesis: Iodide trapping β†’ Organification (TPO) β†’ Coupling",
    "T4:T3 ratio released = 20:1",
    "T3 (active form): ~4Γ— more potent than T4",
    "Actions: ↑ BMR, ↑ HR, ↑ thermogenesis, bone/brain development",
    "In pregnancy: Essential for fetal brain development",
    "## Graves' Disease",
    "TSI (Thyroid-stimulating immunoglobulin) activates TSH-R",
    "Features: Goiter + Exophthalmos + Pretibial myxedema (triad)",
    "Exophthalmos: GAG deposition behind eye + fibroblast activation",
  ],
  [
    "## Hashimoto's Thyroiditis",
    "Auto-antibodies: Anti-TPO (most sensitive), Anti-Thyroglobulin",
    "Histology: Lymphocytic infiltrate with Askanazy (Hurthle) cells, Germinal centers",
    "Initially may cause transient hyperthyroidism (hashitoxicosis)",
    "β†’ Eventually hypothyroidism",
    "## Graves' Pathology",
    "Diffuse hyperplasia with scalloping of colloid",
    "Lymphoid follicles in stroma",
    "## Thyroid Carcinoma",
    "Papillary: Most common; Orphan Annie nuclei, Psammoma bodies, RET/PTC",
    "Follicular: Hematogenous spread; RAS mutation",
    "Medullary: Parafollicular C cells; Calcitonin; MEN2",
    "Anaplastic: Worst prognosis",
  ],
  [
    "## Hypothyroidism Treatment",
    "Levothyroxine (T4): Start low, increase gradually; goal TSH normal",
    "Myxedema coma: IV T3/T4 + IV Hydrocortisone + ICU",
    "## Hyperthyroidism Treatment",
    "Thionamides: PTU (blocks TPO + peripheral T4β†’T3 conversion), Carbimazole/Methimazole",
    "Propranolol: Beta-blocker for symptom control (palpitations, tremor)",
    "Radioactive Iodine (I-131): Definitive for Graves' (avoid in pregnancy)",
    "Surgery: Thyroidectomy (large goiter, Ca suspicion)",
    "## Thyroid Storm Treatment",
    "Propylthiouracil + Lugol's iodine (after PTU) + Propranolol + Steroids",
    "## Sick Euthyroid",
    "↓ T3, ↑ rT3, normal/↓ TSH in acute illness",
    "Do NOT treat β€” just manage underlying illness",
  ]
);

// ══════════════════════════════════════════════════════
// 5. GIT
// ══════════════════════════════════════════════════════
addSectionTitle("5. GASTROINTESTINAL SYSTEM", "Peptic Ulcer Β· Liver Disease Β· IBD Β· Malabsorption", C.accent5);

addIntegratedSlide(
  "PEPTIC ULCER DISEASE & H. PYLORI β€” Integrated",
  "2196F3",
  [
    "## Gastric Acid Physiology",
    "Parietal cells: H+/K+ ATPase (proton pump) secretes HCl",
    "Stimulated by: Acetylcholine (M3), Gastrin (CCK-B), Histamine (H2)",
    "Chief cells: Pepsinogen (activated by HCl β†’ Pepsin)",
    "G cells (antrum): Gastrin secretion",
    "Protective: Mucus-bicarbonate layer, Prostaglandins (PGE2)",
    "## H. pylori Pathogenesis",
    "Urease: NH3 β†’ neutralizes acid (microenvironment)",
    "CagA protein: Disrupts tight junctions, activates NF-ΞΊB",
    "VacA toxin: Pore formation in epithelial cells",
    "β†’ ↑ Gastrin, ↓ Somatostatin β†’ ↑↑ acid secretion",
  ],
  [
    "## H. pylori Association",
    "Type B gastritis (antral initially, then diffuse)",
    "Duodenal ulcer (95% H. pylori) β€” most common",
    "Gastric ulcer (70% H. pylori)",
    "Gastric adenocarcinoma (↑ risk 3-6Γ—)",
    "MALT lymphoma (mucosa-associated lymphoid tissue)",
    "## Ulcer Locations",
    "Duodenal ulcer: First part of duodenum, relieved by food",
    "Gastric ulcer: Pain worse with food (Type I: lesser curve)",
    "Zollinger-Ellison: Multiple ulcers, elevated serum gastrin, MEN1",
    "## Complications",
    "Perforation β†’ Pneumoperitoneum β†’ Surgical emergency",
    "Bleeding β†’ Hematemesis / Melena / Hematochezia",
    "Pyloric obstruction β†’ Succussion splash, hypochloremic alkalosis",
  ],
  [
    "## H. pylori Eradication",
    "Triple therapy: PPI + Amoxicillin + Clarithromycin (7-14 days)",
    "Bismuth quadruple: PPI + Bismuth + Metronidazole + Tetracycline",
    "Confirm eradication: Urea breath test (4 weeks after treatment)",
    "## PPIs (Omeprazole, Lansoprazole)",
    "Prodrug activated by acid; Covalent bond with H+/K+ ATPase",
    "Most potent acid suppression; Give 30 min before meals",
    "## H2 Blockers (Ranitidine, Famotidine)",
    "H2 receptor antagonism β†’ ↓ cAMP β†’ ↓ H+ secretion",
    "Less potent than PPI; Ranitidine withdrawn (NDMA)",
    "## Sucralfate",
    "Coats ulcer base (physical barrier); does not affect acid",
    "## Misoprostol",
    "PGE1 analogue: ↑ mucus, ↓ acid; Used with NSAIDs",
  ]
);

addIntegratedSlide(
  "LIVER DISEASE β€” Integrated",
  "2196F3",
  [
    "## Liver Physiology",
    "Zone I (periportal): O2-rich; First-pass metabolism, Gluconeogenesis",
    "Zone III (centrilobular): Low O2; Drug metabolism (CYP450), most vulnerable to ischemia/toxins",
    "Kupffer cells: Resident macrophages",
    "Hepatic stellate cells (Ito cells): Store Vitamin A; Activated β†’ Fibrosis (TGF-Ξ²)",
    "## Portal Hypertension (PHT)",
    "Normal: <10 mmHg; Clinically significant: >12 mmHg",
    "Pre-hepatic: Portal vein thrombosis",
    "Intrahepatic: Cirrhosis (most common) β†’ Sinusoidal resistance",
    "Post-hepatic: Budd-Chiari, Right HF, Constrictive pericarditis",
  ],
  [
    "## Alcoholic Liver Disease",
    "Fatty liver β†’ Alcoholic hepatitis β†’ Cirrhosis",
    "Histology: Hepatic steatosis β†’ Mallory-Denk bodies (cytokeratin aggregates) β†’ Fibrosis",
    "## Cirrhosis Complications",
    "Ascites: ↓ Albumin + ↑ PHT + ↑ RAAS β†’ Na+/H2O retention",
    "Varices: Portosystemic shunts (esophageal, rectal, caput medusae)",
    "Hepatic Encephalopathy: NH3 (from gut bacteria) crosses BBB",
    "Hepatorenal Syndrome (HRS): Severe renal vasoconstriction in cirrhosis",
    "SBP: Spontaneous bacterial peritonitis (E.coli, Klebsiella)",
    "HCC: HBV (direct oncogene), HCV, Cirrhosis; ↑ AFP",
    "Coagulopathy: ↓ Clotting factors (except VIII); ↑ PT",
  ],
  [
    "## Ascites Management",
    "Salt restriction + Spironolactone (1st line) + Furosemide",
    "Refractory ascites: Large-volume paracentesis + IV albumin",
    "TIPS (Transjugular Intrahepatic Portosystemic Shunt)",
    "## SBP Treatment",
    "Cefotaxime IV 5 days + IV albumin (↓ HRS risk)",
    "Prophylaxis: Norfloxacin/Ciprofloxacin (after 1st SBP or UGIB)",
    "## Hepatic Encephalopathy",
    "Lactulose: ↓ NH3 (trap NH4+, ↓ gut transit)",
    "Rifaximin: Non-absorbable antibiotic (↓ ammonia-producing bacteria)",
    "## Variceal Bleeding",
    "Endoscopic: Band ligation (1st line) or Sclerotherapy",
    "Pharmacology: Terlipressin (↓ portal flow), Octreotide",
    "Sengstaken-Blakemore tube: Balloon tamponade (temporary)",
    "## NAFLD/NASH",
    "Insulin resistance β†’ Lipid accumulation β†’ Oxidative stress β†’ Inflammation",
    "Treatment: Weight loss, Exercise, Vitamin E (NASH); Semaglutide emerging",
  ]
);

// ══════════════════════════════════════════════════════
// 6. NEUROLOGY
// ══════════════════════════════════════════════════════
addSectionTitle("6. NEUROLOGY", "Stroke Β· Meningitis Β· Epilepsy Β· Parkinson's Β· Dementia", "9C27B0");

addFlowchartSlide(
  "STROKE PATHWAY",
  "9C27B0",
  [
    { label: "ISCHEMIC (85%)", text: "Thrombotic / Embolic / Lacunar\nMCA most common", color: "4A148C" },
    { label: "PATHOLOGY", text: "Core: Necrosis (irreversible)\nPenumbra: Ischemic but salvageable", color: "6A1B9A" },
    { label: "REPERFUSION", text: "rtPA <4.5h (no contraindications)\nMechanical thrombectomy <24h (LVO)", color: "7B1FA2" },
    { label: "HEMORRHAGIC (15%)", text: "ICH: HTN (putamen, thalamus)\nSAH: Berry aneurysm (sudden worst headache)", color: "AD1457" },
    { label: "VASCULAR SUPPLY", text: "ACA: Leg (contralateral)\nMCA: Face+Arm (contralateral)\nPCA: Vision", color: "880E4F" },
    { label: "SECONDARY PREVENTION", text: "Antiplatelet (aspirinΒ±clopidogrel)\nStatins, Antihypertensives\nAnticoagulants if AF", color: "1B5E20" },
  ]
);

addIntegratedSlide(
  "MENINGITIS & EPILEPSY β€” Integrated",
  "9C27B0",
  [
    "## Meningeal Physiology",
    "CSF: Produced by choroid plexus (500mL/day, ~150mL present)",
    "Flow: Lateral ventricles β†’ 3rd β†’ Aqueduct β†’ 4th β†’ Subarachnoid",
    "Absorption: Arachnoid granulations (pacchionian bodies)",
    "Blood-brain barrier: Tight junctions of endothelium",
    "## Seizure Physiology",
    "↑ excitation (↑ glutamate/NMDA) + ↓ inhibition (↓ GABA)",
    "Synchronous neuronal discharge",
    "Ictal: seizure phase; Post-ictal: transient deficit",
    "GABA-A: Cl- channel (BZD bind β†’ ↑ frequency of opening)",
    "GABA-B: K+ channel (Baclofen)",
  ],
  [
    "## Bacterial Meningitis",
    "Neonates: GBS, E. coli, Listeria",
    "Children: N. meningitidis (Meningococcal β€” can cause purpuric rash + Waterhouse-Friderichsen)",
    "Adults: S. pneumoniae (most common overall)",
    "Elderly: S. pneumoniae + Listeria",
    "CSF: ↑↑ protein, ↓ glucose (<40 or <60% serum), ↑↑ cells (PMNs)",
    "## Viral Meningitis",
    "CSF: Lymphocytes, normal glucose, mildly ↑ protein",
    "Enterovirus most common cause",
    "## TB Meningitis",
    "CSF: Lymphocytes, ↓↓ glucose, fibrin web, ↑ ADA",
    "India ink: Cryptococcus (HIV patients)",
    "## Epilepsy Classification",
    "Focal vs Generalized; Motor vs Non-motor",
  ],
  [
    "## Bacterial Meningitis Treatment",
    "Empirical: Ceftriaxone + Vancomycin + Dexamethasone",
    "Add Ampicillin: >50 yrs or immunocompromised (Listeria)",
    "Dexamethasone: Before or with 1st antibiotic dose (↓ inflammation)",
    "Chemoprophylaxis: Rifampicin for N. meningitidis contacts",
    "## Epilepsy Treatment",
    "Focal seizures: Carbamazepine/Oxcarbazepine, Lamotrigine",
    "Generalized tonic-clonic: Valproate (avoid in women of child-bearing age)",
    "Absence seizures: Ethosuximide (T-type Ca2+ channel block)",
    "Myoclonic: Valproate (broad-spectrum)",
    "Status Epilepticus: Lorazepam IV β†’ Phenytoin/Fosphenytoin β†’ Phenobarbital β†’ Anesthesia",
    "## Mechanism Summary",
    "BZD (Diazepam): ↑ GABA-A Cl- influx (frequency)",
    "Barbiturates: ↑ GABA-A duration of Cl- opening",
    "Phenytoin/CBZ: Na+ channel blockade",
    "Valproate: ↑ GABA + ↓ Na+ channels",
  ]
);

// Parkinson's & Dementia
addIntegratedSlide(
  "PARKINSON'S & DEMENTIA β€” Integrated",
  "9C27B0",
  [
    "## Basal Ganglia Physiology",
    "Direct pathway: ↑ movement (Striatum β†’ GPi inhibit β†’ Thalamus β†’ Cortex)",
    "Indirect pathway: ↓ movement (Striatum β†’ GPe β†’ STN β†’ GPi inhibit β†’ Thalamus)",
    "Dopamine (D1): Facilitates direct pathway (↑ movement)",
    "Dopamine (D2): Inhibits indirect pathway (↑ movement)",
    "↓ Dopamine in PD β†’ Indirect pathway dominant β†’ Bradykinesia",
    "## PD Pathology",
    "Degeneration of Substantia nigra pars compacta (dopaminergic neurons)",
    "Lewy bodies: Intracytoplasmic eosinophilic inclusions (Ξ±-synuclein)",
    "Loss of dopamine β†’ ↑ ACh activity (cholinergic-dopaminergic imbalance)",
  ],
  [
    "## Parkinson's Disease",
    "Triad: Tremor (resting, pill-rolling, 4-6Hz) + Rigidity (cogwheel/lead pipe) + Bradykinesia",
    "Postural instability (late feature)",
    "Micrographia, Masked facies, Shuffling gait",
    "## Dementia Types",
    "Alzheimer's: Amyloid plaques (AΞ²42) + Neurofibrillary tangles (hyperphosphorylated Tau)",
    "Vascular dementia: Step-wise progression; lacunar infarcts",
    "Lewy Body Dementia: Parkinsonism + Visual hallucinations + Fluctuating cognition",
    "Frontotemporal (Pick's): Pick bodies (tau inclusions); personality changes first",
    "Creutzfeldt-Jakob: Prion; Spongiform degeneration, PrPSc",
    "Binswanger's: Subcortical arteriosclerotic encephalopathy",
  ],
  [
    "## Parkinson's Treatment",
    "Levodopa + Carbidopa (DOPA decarboxylase inhibitor): Gold standard",
    "β†’ On-off fluctuations, dyskinesias (long-term use)",
    "Dopamine agonists: Pramipexole, Ropinirole (young patients, avoid dyskinesia early)",
    "MAO-B inhibitors: Selegiline, Rasagiline (↓ dopamine breakdown)",
    "COMT inhibitors: Entacapone (↑ duration of Levodopa)",
    "Amantadine: Antidyskinesia (NMDA antagonist)",
    "Anticholinergics: Trihexyphenidyl (tremor-dominant, young patients)",
    "## Alzheimer's Treatment",
    "Mild-Moderate: AChE inhibitors β€” Donepezil, Rivastigmine, Galantamine",
    "Moderate-Severe: Memantine (NMDA antagonist) Β± AChEi",
    "## Lewy Body: Avoid Haloperidol (marked sensitivity)",
  ]
);

// ══════════════════════════════════════════════════════
// 7. HEMATOLOGY
// ══════════════════════════════════════════════════════
addSectionTitle("7. HEMATOLOGY", "Anemia Β· Leukemia Β· Lymphoma Β· Coagulation", "FF5722");

addIntegratedSlide(
  "ANEMIA β€” Integrated",
  "FF5722",
  [
    "## Hematopoiesis",
    "All blood cells from HSC (pluripotent stem cell)",
    "Myeloid vs Lymphoid lineages",
    "EPO (kidney peritubular cells): Drives erythropoiesis",
    "Iron metabolism: Absorbed in duodenum as Fe2+",
    "Hepcidin: Liver-derived; ↑ by ↑ iron/inflammation β†’ ↓ ferroportin β†’ ↓ iron absorption",
    "## Hemoglobin Structure",
    "Hb = 2Ξ± + 2Ξ² (HbA); 2Ξ±+2Ξ³ (HbF); 2Ξ±+2Ξ΄ (HbA2)",
    "O2-Hb dissociation curve: Sigmoid (cooperative binding)",
    "↑ Temp, ↑ CO2, ↑ 2,3-DPG, ↑ H+: Right shift (↓ O2 affinity = ↑ release)",
    "HbF: Left shift (↑ O2 affinity β€” favors placental O2 transfer)",
  ],
  [
    "## Microcytic Anemias (MCV <80)",
    "IDA: ↓ Ferritin, ↓ Fe, ↑ TIBC, ↑ RDW; koilonychia, pica",
    "Thalassemia: ↓ or absent globin chain; Target cells, basophilic stippling",
    "Ξ±-Thal: HbH (Ξ²4), Hb Barts (Ξ³4); Southeast Asian",
    "Ξ²-Thal major: HbF dominant; bone marrow expansion β†’ crew-cut skull X-ray",
    "Sideroblastic: Ring sideroblasts (iron in mitochondria); ↑ Fe, ↑ ferritin",
    "## Macrocytic Anemias (MCV >100)",
    "B12 deficiency: Subacute combined degeneration (posterior + lateral columns), Hypersegmented neutrophils",
    "Folate deficiency: No neurological symptoms; in pregnancy β†’ Neural tube defects",
    "## Normocytic Anemias",
    "ACD (Anemia of Chronic Disease), Hemolytic anemia, Aplastic anemia",
  ],
  [
    "## Iron Deficiency Anemia",
    "Oral Fe: Ferrous sulfate (constipation, black stools)",
    "IV Iron: Low-molecular-weight iron dextran/Ferric carboxymaltose",
    "## B12/Folate",
    "IM Hydroxocobalamin (B12 deficiency)",
    "Folic acid 5mg (deficiency); 400mcg (pregnancy prophylaxis)",
    "## Hemolytic Anemias",
    "Intravascular: DIC, G6PD deficiency (Heinz bodies, bite cells), PNH",
    "Extravascular: Hereditary spherocytosis (Osmotic fragility test; Splenectomy)",
    "AIHA: Warm (IgG) β†’ Steroids; Cold (IgM) β†’ Rituximab/warm environment",
    "## Sickle Cell Disease",
    "HbS: Glu→Val at β6; HbSS most severe",
    "Vaso-occlusive crisis: IV fluids + Analgesia (opioids)",
    "Hydroxyurea: ↑ HbF β†’ ↓ sickling (ribonucleotide reductase inhibitor)",
    "Exchange transfusion: Stroke prevention/acute chest syndrome",
  ]
);

addIntegratedSlide(
  "LEUKEMIA & LYMPHOMA β€” Integrated",
  "FF5722",
  [
    "## Normal WBC Physiology",
    "Granulopoiesis: BM β†’ Myeloblast β†’ Promyelocyte β†’ … β†’ PMN",
    "G-CSF: Neutrophil production/release",
    "## ALL (Acute Lymphoblastic Leukemia)",
    "Children (peak 2-5yr); t(12;21) TEL-AML1 = best prognosis",
    "Philadelphia chromosome t(9;22) BCR-ABL1 = worst prognosis in ALL",
    "TdT+, CD10+, CD19+ (B-ALL) or CD3+ (T-ALL)",
    "CNS prophylaxis: Intrathecal methotrexate/cytarabine",
    "## AML (Acute Myeloid Leukemia)",
    "Adults; Auer rods (M3 = APL: t(15;17) PML-RARA)",
    "APL treatment: ATRA + Arsenic trioxide (differentiating agents)",
    "Risk: Prior chemo (therapy-related), MDS, Benzene",
  ],
  [
    "## CML (Chronic Myeloid Leukemia)",
    "t(9;22): BCR-ABL1 (Philadelphia chromosome), constitutive tyrosine kinase",
    "3 phases: Chronic β†’ Accelerated β†’ Blast crisis",
    "## CLL (Chronic Lymphocytic Leukemia)",
    "Smudge/Basket cells; Mature B-cells (CD5+CD19+CD23+)",
    "Most common adult leukemia (West); Autoimmune hemolysis (warm AIHA)",
    "## Lymphoma",
    "Hodgkin's Lymphoma: Reed-Sternberg cells (owl-eye nuclei) CD15+CD30+",
    "Classical HL: Nodular sclerosis (most common) > Mixed cellularity",
    "B symptoms: Fever, Night sweats, >10% weight loss",
    "Non-Hodgkin's: Diffuse Large B-cell (DLBCL) most common adult NHL",
    "Burkitt's: t(8;14) MYC; Starry sky pattern; EBV-associated (African type)",
    "Follicular: t(14;18) BCL-2 (anti-apoptotic); Indolent but incurable",
  ],
  [
    "## CML Treatment",
    "Imatinib (Gleevec): BCR-ABL1 TKI β€” 1st line; Revolution in CML treatment",
    "2nd gen TKIs: Dasatinib, Nilotinib (T315I mutation: Ponatinib)",
    "## Hodgkin's Lymphoma",
    "ABVD: Adriamycin + Bleomycin + Vinblastine + Dacarbazine",
    "Bleomycin toxicity: Pulmonary fibrosis",
    "Highly curable (even advanced disease ~80%)",
    "## DLBCL Treatment",
    "R-CHOP: Rituximab + Cyclophosphamide + Doxorubicin + Vincristine + Prednisolone",
    "Rituximab: Anti-CD20 monoclonal antibody",
    "## ALL Treatment",
    "Induction: Vincristine + Prednisolone + L-Asparaginase Β± Anthracycline",
    "Maintenance: 6-Mercaptopurine + Methotrexate (2 yrs)",
    "## APL Treatment",
    "ATRA (All-trans retinoic acid): Differentiation of blasts",
    "ATO (Arsenic trioxide): Degradation of PML-RARA",
  ]
);

// Coagulation
addIntegratedSlide(
  "COAGULATION DISORDERS β€” Integrated",
  "FF5722",
  [
    "## Coagulation Physiology",
    "Primary hemostasis: Platelet plug (VWF-GPIb binding at injury site)",
    "Secondary hemostasis: Coagulation cascade β†’ Fibrin",
    "Extrinsic (TF/VII): PT/INR monitors",
    "Intrinsic (XII,XI,IX,VIII): aPTT monitors",
    "Common pathway: X β†’ Xa β†’ Prothrombin β†’ Thrombin β†’ Fibrin",
    "VWF: Carrier for Factor VIII; synthesized by endothelium (Weibel-Palade bodies)",
    "## Vitamin K dependent factors",
    "II, VII, IX, X (clotting) + Protein C, S (anticoagulant)",
    "Warfarin blocks VKOR (Vitamin K oxide reductase)",
  ],
  [
    "## Hemophilia",
    "Hemophilia A: Factor VIII deficiency (X-linked); ↑ aPTT, normal PT",
    "Hemophilia B: Factor IX deficiency (X-linked); similar picture",
    "Treatment: Recombinant Factor VIII/IX; Desmopressin (mild HA)",
    "## VWD (Von Willebrand Disease)",
    "Most common hereditary bleeding disorder",
    "Type 1 (most common): Quantitative ↓; Desmopressin (↑ VWF release)",
    "Type 3: Absent VWF; needs VWF concentrate",
    "## DIC",
    "Pathology: Simultaneous coagulation AND bleeding",
    "Triggers: Sepsis (#1), Obstetric complications, Malignancy (APL), Trauma",
    "Labs: ↑ PT, ↑ aPTT, ↑ D-dimer, ↓ Platelets, ↓ Fibrinogen",
    "Treatment: Treat cause + FFP (for factors) + Cryoprecipitate (fibrinogen)",
  ],
  [
    "## Anticoagulants (Pharmacology)",
    "UFH: Activates antithrombin III (β†’ inhibits IIa, Xa); Monitor: aPTT",
    "LMWH (Enoxaparin): Primarily anti-Xa; fixed dose, no monitoring",
    "Fondaparinux: Pure anti-Xa; safe in HIT",
    "Warfarin: Inhibits VKOR (↓ Vit K factors); Monitor: INR; Reversal: Vit K / FFP",
    "Dabigatran: Direct thrombin (IIa) inhibitor; Reversal: Idarucizumab",
    "Rivaroxaban/Apixaban: Direct Xa inhibitors; Reversal: Andexanet alfa",
    "## Heparin-Induced Thrombocytopenia (HIT)",
    "Type I: Non-immune, mild, transient",
    "Type II: PF4-heparin IgG antibody β†’ platelet activation β†’ THROMBOSIS",
    "Stop heparin β†’ Use Direct Thrombin Inhibitor (Argatroban, Bivalirudin)",
    "## Thrombocytopenia",
    "ITP: Anti-GpIIb/IIIa antibody; Treat: Prednisolone β†’ IVIG β†’ Romiplostim β†’ Splenectomy",
    "TTP: ADAMTS13 deficiency; Plasma exchange (NOT platelets)",
  ]
);

// ══════════════════════════════════════════════════════
// CLOSING SLIDE
// ══════════════════════════════════════════════════════
let closing = pres.addSlide();
closing.background = { color: C.darkBg };
closing.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.8, fill: { color: C.accent1 } });
closing.addText("QUICK REVISION MNEMONICS", {
  x: 0.3, y: 0.1, w: 12.7, h: 0.65,
  fontSize: 20, bold: true, color: C.darkBg, fontFace: "Calibri",
});
const mnemonics = [
  { t: "HF Mortality Drugs", b: "ABCDS: ACEi, Beta-blocker, CRT, Diuretics, SGLT2i" },
  { t: "ACS Antiplatelet", b: "MONA-B: Morphine, O2, Nitrates, Aspirin, Beta-blocker" },
  { t: "DKA vs HHS", b: "DKA = Dangerous Keto Acidosis (Type 1, ketones, pH<7.3); HHS = Huge Hyperosmolarity (Type 2, >600mg/dL, no ketones)" },
  { t: "TB Drugs", b: "RHZE: Rifampicin-Hepatitis, Hyperuricemia(PZA), Z-oonosis, Ethambutol=Eye toxicity" },
  { t: "Nephrotic 5 Ds", b: "Decreased albumin, Dependent edema, Dyslipidemia, Deficiency of Ig, Deep vein thrombosis" },
  { t: "Reed-Sternberg", b: "RS cells: owl-eye, CD15+, CD30+, CD45- (NOT CD45)" },
  { t: "Hemophilia Types", b: "Hemophilia A=8 (eight/ate = A), B=9 (B=nine)" },
  { t: "TTP vs HUS", b: "TTP: FAT RN (Fever, Anemia, Thrombocytopenia, Renal failure, Neuro). HUS: No neuro, Shiga toxin/E.coli O157:H7" },
];
mnemonics.forEach((m, i) => {
  const bx = (i % 2 === 0) ? 0.2 : 6.8;
  const by = 0.95 + Math.floor(i / 2) * 1.55;
  closing.addShape(pres.ShapeType.roundRect, {
    x: bx, y: by, w: 6.1, h: 1.45,
    fill: { color: C.medBg },
    line: { color: C.accent1, width: 1.5 },
  });
  closing.addText("⚑ " + m.t, {
    x: bx + 0.1, y: by + 0.05, w: 5.9, h: 0.4,
    fontSize: 12, bold: true, color: C.accent2, fontFace: "Calibri",
  });
  closing.addText(m.b, {
    x: bx + 0.1, y: by + 0.48, w: 5.9, h: 0.88,
    fontSize: 10, color: C.white, fontFace: "Calibri",
  });
});

pres.writeFile({ fileName: "/home/daytona/workspace/neet-pg-medicine/NEET_PG_Medicine_Integrated_Notes.pptx" })
  .then(() => console.log("SUCCESS: PPTX created!"))
  .catch(e => console.error("ERROR:", e));
Running Command

cd /home/daytona/workspace/neet-pg-medicine && node generate_notes.js

Running Command

ls -lh /home/daytona/workspace/neet-pg-medicine/

Your NEET PG Medicine Integrated Notes are ready!

NEET PG Medicine Integrated Notes

Presentation Β· PPTX


What's Inside (25 slides, 7 Systems)

The deck is built in a dark navy + color-coded system with flowcharts and 3-column integrated panels (πŸ”¬ Physiology | 🧬 Pathology | πŸ’Š Pharmacology) for every major topic:

System Coverage

#SystemTopics Covered
1CVSHeart Failure (HFrEF/HFpEF), IHD/ACS, Hypertension
2RespiratoryAsthma vs COPD, TB (drugs + mechanisms), Spirometry
3RenalAKI (pre/intra/post), Nephrotic vs Nephritic, CKD staging
4EndocrineDM Type 1 & 2 (DKA vs HHS), Thyroid, Graves', Hashimoto's
5GITPeptic Ulcer + H. pylori, Liver disease, Cirrhosis, Portal HTN
6NeurologyStroke, Meningitis, Epilepsy, Parkinson's, Dementia
7HematologyAnemia (IDA/Thal/B12), Leukemia, Lymphoma, Coagulation/HIT/TTP

Flowchart Slides

Each system has a pathophysiology flowchart showing the cascade from trigger β†’ pathology β†’ treatment (e.g., HF: Trigger β†’ ↓CO β†’ Neurohormonal activation β†’ Remodeling β†’ Decompensation β†’ Treatment).

Closing Mnemonics Slide

8 high-yield mnemonics: ABCDS for HF, DKA vs HHS comparison, Hemophilia A=8/B=9, TTP vs HUS (FAT RN), and more.

Sources: Fuster's Heart 15e, Braunwald's Heart Disease, Katzung Pharmacology 16e, Goodman & Gilman's, Brenner & Rector's Kidney, Washington Manual of Medical Therapeutics, and Comprehensive Clinical Nephrology.
This is a shared conversation. Sign in to Orris to start your own chat.