Pharmacology: create a word document with all mcqs, saqs and laqs antihypertensive + heartfailure + angina +hematinics exam oriented

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

ls -la /home/daytona/workspace/ && ls /home/daytona/skills/docx/

Running Command

ls /home/daytona/workspace/cardio-pharmacology-questions/

Hi

Hi! How can I help you?

Pharmacology: create a word document with all mcqs, saqs and laqs antihypertensive + heartfailure + angina +hematinics exam oriented

Reading File
Running Command

ls /home/daytona/workspace/ && ls /home/daytona/skills/docx/scripts/office/

Writing File

~/cardio-pharmacology-questions/generate.js

const {
  Document, Packer, Paragraph, TextRun, HeadingLevel,
  AlignmentType, PageNumber, Header, Footer,
  BorderStyle, UnderlineType, PageBreak
} = require('docx');
const fs = require('fs');

// ─── HELPERS ────────────────────────────────────────────────────────────────

function heading1(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 400, after: 200 },
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: '1F4E79' } },
  });
}

function heading2(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 300, after: 150 },
  });
}

function heading3(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 200, after: 100 },
  });
}

function para(text, opts = {}) {
  return new Paragraph({
    children: [new TextRun({ text, size: 22, font: 'Calibri', ...opts })],
    spacing: { before: 60, after: 60 },
  });
}

function boldPara(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 22, font: 'Calibri' })],
    spacing: { before: 80, after: 40 },
  });
}

function answerPara(text) {
  return new Paragraph({
    children: [new TextRun({ text, color: '1F4E79', size: 22, font: 'Calibri', italics: true })],
    spacing: { before: 40, after: 80 },
    indent: { left: 400 },
  });
}

function spacer() {
  return new Paragraph({ text: '', spacing: { before: 60, after: 60 } });
}

function pageBreak() {
  return new Paragraph({ children: [new PageBreak()] });
}

function mcqBlock(num, question, options, answer) {
  const items = [];
  items.push(boldPara(`Q${num}. ${question}`));
  options.forEach(o => items.push(para(`    ${o}`)));
  items.push(answerPara(`Answer: ${answer}`));
  items.push(spacer());
  return items;
}

function saqBlock(num, question, answer) {
  const items = [];
  items.push(boldPara(`Q${num}. ${question}`));
  answer.forEach(line => items.push(answerPara(line)));
  items.push(spacer());
  return items;
}

function laqBlock(num, question, answerPoints) {
  const items = [];
  items.push(boldPara(`Q${num}. ${question}`));
  answerPoints.forEach(line => items.push(answerPara(line)));
  items.push(spacer());
  return items;
}

// ─── CONTENT ─────────────────────────────────────────────────────────────────

const children = [];

// ── TITLE PAGE ───────────────────────────────────────────────────────────────
children.push(
  new Paragraph({
    children: [new TextRun({ text: 'PHARMACOLOGY', bold: true, size: 48, color: '1F4E79', font: 'Calibri' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 1200, after: 200 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Exam-Oriented Question Bank', size: 32, color: '2E75B6', font: 'Calibri' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 100, after: 200 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Antihypertensives  |  Heart Failure  |  Angina  |  Hematinics', size: 26, italics: true, color: '555555', font: 'Calibri' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 100, after: 600 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'MCQs  •  SAQs  •  LAQs', size: 28, bold: true, font: 'Calibri', color: '1F4E79' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 200, after: 1200 },
  }),
  pageBreak()
);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 1 – ANTIHYPERTENSIVES
// ════════════════════════════════════════════════════════════════════════════
children.push(heading1('SECTION 1: ANTIHYPERTENSIVE DRUGS'));

// --- MCQs ---
children.push(heading2('MULTIPLE CHOICE QUESTIONS (MCQs)'));

const ahMCQs = [
  { q: 'Which antihypertensive drug acts by blocking angiotensin-converting enzyme (ACE)?', opts: ['A. Losartan', 'B. Enalapril', 'C. Amlodipine', 'D. Metoprolol'], ans: 'B. Enalapril' },
  { q: 'The drug of choice for hypertension in a patient with bilateral renal artery stenosis is:', opts: ['A. Enalapril', 'B. Losartan', 'C. Amlodipine', 'D. Ramipril'], ans: 'C. Amlodipine (CCBs are safe; ACE inhibitors/ARBs are contraindicated)' },
  { q: 'Which class of antihypertensives is the first-line drug in diabetic hypertensive patients with proteinuria?', opts: ['A. Beta-blockers', 'B. Calcium channel blockers', 'C. ACE inhibitors / ARBs', 'D. Thiazide diuretics'], ans: 'C. ACE inhibitors / ARBs' },
  { q: 'Mechanism of action of thiazide diuretics in hypertension:', opts: ['A. Block Na+/K+/2Cl- transporter in loop of Henle', 'B. Block Na+/Cl- transporter in distal tubule', 'C. Block aldosterone receptors', 'D. Block Na+ channels in collecting duct'], ans: 'B. Block Na+/Cl- transporter in distal tubule' },
  { q: 'Dry cough as a side effect is associated with:', opts: ['A. Losartan', 'B. Amlodipine', 'C. Enalapril', 'D. Atenolol'], ans: 'C. Enalapril (due to accumulation of bradykinin)' },
  { q: 'Which antihypertensive causes reflex tachycardia and fluid retention?', opts: ['A. Atenolol', 'B. Hydralazine', 'C. Methyldopa', 'D. Clonidine'], ans: 'B. Hydralazine' },
  { q: 'Drug of choice for hypertension in pregnancy:', opts: ['A. Enalapril', 'B. Methyldopa', 'C. Losartan', 'D. Atenolol'], ans: 'B. Methyldopa' },
  { q: 'Calcium channel blockers used specifically for hypertension (dihydropyridines):', opts: ['A. Verapamil and Diltiazem', 'B. Amlodipine and Nifedipine', 'C. Verapamil and Nifedipine', 'D. Diltiazem and Amlodipine'], ans: 'B. Amlodipine and Nifedipine' },
  { q: 'Clonidine acts on which receptor to lower blood pressure?', opts: ['A. Alpha-1 adrenoceptor', 'B. Beta-1 adrenoceptor', 'C. Alpha-2 adrenoceptor (central)', 'D. Imidazoline receptor only'], ans: 'C. Alpha-2 adrenoceptor (central)' },
  { q: 'Spironolactone lowers blood pressure by:', opts: ['A. Blocking renin release', 'B. Blocking aldosterone receptors in collecting duct', 'C. Inhibiting ACE', 'D. Blocking calcium channels'], ans: 'B. Blocking aldosterone receptors in collecting duct' },
  { q: 'Which beta-blocker has intrinsic sympathomimetic activity (ISA)?', opts: ['A. Atenolol', 'B. Propranolol', 'C. Pindolol', 'D. Metoprolol'], ans: 'C. Pindolol' },
  { q: 'First-dose hypotension is a characteristic side effect of:', opts: ['A. Prazosin', 'B. Atenolol', 'C. Amlodipine', 'D. Hydrochlorothiazide'], ans: 'A. Prazosin' },
  { q: 'Which drug is used for hypertensive emergency causing cyanide toxicity?', opts: ['A. Labetalol', 'B. Hydralazine', 'C. Sodium nitroprusside', 'D. Fenoldopam'], ans: 'C. Sodium nitroprusside' },
  { q: 'ACE inhibitors are contraindicated in:', opts: ['A. Diabetes mellitus', 'B. Pregnancy', 'C. Heart failure', 'D. Post-MI'], ans: 'B. Pregnancy (teratogenic - fetopathy)' },
  { q: 'The antihypertensive effect of beta-blockers is due to:', opts: ['A. Decreased peripheral vascular resistance', 'B. Decreased cardiac output and renin secretion', 'C. Vasodilation of arterioles', 'D. Increased natriuresis'], ans: 'B. Decreased cardiac output and renin secretion' },
];

ahMCQs.forEach((item, i) => mcqBlock(i + 1, item.q, item.opts, item.ans).forEach(p => children.push(p)));

// --- SAQs ---
children.push(pageBreak());
children.push(heading2('SHORT ANSWER QUESTIONS (SAQs)'));

const ahSAQs = [
  {
    q: 'Write a note on the mechanism and adverse effects of ACE inhibitors.',
    ans: [
      'Mechanism: Inhibit angiotensin-converting enzyme → prevent conversion of Ang I → Ang II.',
      '→ Reduced aldosterone secretion → natriuresis, reduced preload and afterload.',
      '→ Bradykinin accumulation → vasodilation (also causes cough).',
      'Uses: Hypertension, heart failure, diabetic nephropathy, post-MI.',
      'Adverse effects:',
      '  • Dry cough (most common, due to bradykinin)',
      '  • Angioedema (rare but serious)',
      '  • Hyperkalemia',
      '  • First-dose hypotension',
      '  • Teratogenicity (contraindicated in pregnancy)',
      '  • Renal impairment in bilateral renal artery stenosis',
    ],
  },
  {
    q: 'Classify antihypertensive drugs with one example each.',
    ans: [
      '1. Diuretics: Hydrochlorothiazide, Furosemide, Spironolactone',
      '2. Beta-blockers: Atenolol, Metoprolol, Propranolol',
      '3. Calcium channel blockers: Amlodipine (DHP), Verapamil (non-DHP)',
      '4. ACE inhibitors: Enalapril, Ramipril, Lisinopril',
      '5. ARBs (AT1 blockers): Losartan, Telmisartan',
      '6. Alpha-1 blockers: Prazosin, Doxazosin',
      '7. Central sympatholytics: Clonidine, Methyldopa',
      '8. Vasodilators: Hydralazine, Minoxidil, Sodium nitroprusside',
      '9. Renin inhibitors: Aliskiren',
    ],
  },
  {
    q: 'What is the treatment of hypertensive emergency? Name drugs used.',
    ans: [
      'Definition: Severe hypertension (>180/120 mmHg) with acute end-organ damage.',
      'Drugs used (IV/parenteral):',
      '  • Sodium nitroprusside - arterial and venous dilator; risk of cyanide toxicity',
      '  • Labetalol (alpha+beta blocker) - drug of choice in most emergencies',
      '  • Nitroglycerin - preferred in hypertension with cardiac ischemia',
      '  • Hydralazine - preferred in eclampsia/pregnancy',
      '  • Fenoldopam - dopamine D1 agonist; preserves renal function',
      '  • Nicardipine - CCB; used in stroke, perioperative hypertension',
      'Goal: Reduce MAP by not more than 25% in first hour.',
    ],
  },
  {
    q: 'Enumerate antihypertensives used in pregnancy and explain why some drugs are contraindicated.',
    ans: [
      'SAFE in pregnancy: Methyldopa (first choice), Labetalol, Nifedipine, Hydralazine',
      'CONTRAINDICATED:',
      '  • ACE inhibitors: Cause fetal renal tubular dysplasia, oligohydramnios, neonatal renal failure, skull ossification defects',
      '  • ARBs: Same teratogenic profile as ACE inhibitors',
      '  • Atenolol: Associated with fetal growth restriction',
      '  • Diuretics: Reduce plasma volume, worsen uteroplacental perfusion',
    ],
  },
];

ahSAQs.forEach((item, i) => saqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// --- LAQs ---
children.push(pageBreak());
children.push(heading2('LONG ANSWER QUESTIONS (LAQs)'));

const ahLAQs = [
  {
    q: 'Classify antihypertensive drugs. Describe in detail the pharmacology of calcium channel blockers. Add a note on their clinical uses and adverse effects.',
    ans: [
      'CLASSIFICATION: (as above - 9 classes)',
      '',
      'CALCIUM CHANNEL BLOCKERS (CCBs):',
      'Classification:',
      '  1. Dihydropyridines (DHP): Amlodipine, Nifedipine, Felodipine, Nicardipine',
      '     → Selective for vascular smooth muscle',
      '  2. Non-dihydropyridines:',
      '     • Phenylalkylamines: Verapamil → cardiac selective',
      '     • Benzothiazepines: Diltiazem → intermediate',
      '',
      'Mechanism of Action:',
      '  • Block L-type voltage-gated calcium channels',
      '  • Reduce intracellular Ca²⁺ in vascular smooth muscle → vasodilation → ↓ BP',
      '  • In SA and AV nodes (verapamil, diltiazem): reduce heart rate and AV conduction',
      '',
      'Pharmacokinetics:',
      '  • All well absorbed orally; high first-pass metabolism',
      '  • Amlodipine: long half-life (~35-50 hrs), once daily dosing',
      '  • Verapamil: multiple daily doses required',
      '',
      'Clinical Uses:',
      '  • Hypertension (especially DHP types)',
      '  • Angina (stable and vasospastic/Prinzmetal)',
      '  • Supraventricular tachycardias (verapamil, diltiazem)',
      '  • Raynaud phenomenon',
      '  • Safe in COPD, asthma, diabetes, peripheral vascular disease',
      '  • Preferred in elderly, isolated systolic hypertension, Afro-Caribbean patients',
      '',
      'Adverse Effects:',
      '  • DHP: Peripheral edema (most common), flushing, headache, reflex tachycardia',
      '  • Verapamil: Constipation, bradycardia, AV block, negative inotropy',
      '  • Diltiazem: Bradycardia, edema (intermediate profile)',
      '  • Gingival hyperplasia (especially nifedipine)',
      '',
      'Contraindications:',
      '  • Verapamil/Diltiazem: Sick sinus syndrome, heart block, decompensated HF',
      '  • DHP: No major cardiac contraindications',
    ],
  },
  {
    q: 'Discuss the Renin-Angiotensin-Aldosterone System (RAAS) and the pharmacology of drugs acting on it. What are their clinical uses and adverse effects?',
    ans: [
      'THE RAAS:',
      '  Renin (juxtaglomerular cells) → cleaves Angiotensinogen → Ang I',
      '  Ang I + ACE (lung/vascular endothelium) → Ang II',
      '  Ang II: vasoconstriction, aldosterone release, Na/water retention, hypertrophy',
      '',
      'DRUGS ACTING ON RAAS:',
      '',
      '1. ACE INHIBITORS (-pril):',
      '   Examples: Enalapril, Ramipril, Lisinopril, Captopril',
      '   Mechanism: Inhibit ACE → ↓ Ang II → vasodilation + ↓ aldosterone',
      '   Also ↑ bradykinin → vasodilation + cough',
      '   Uses: Hypertension, HF, diabetic nephropathy, post-MI, CKD with proteinuria',
      '   AEs: Cough, angioedema, hyperkalemia, teratogenicity, renal impairment',
      '',
      '2. ARBs (Angiotensin Receptor Blockers) (-sartan):',
      '   Examples: Losartan, Telmisartan, Valsartan, Candesartan',
      '   Mechanism: Block AT1 receptors selectively → ↓ vasoconstriction + ↓ aldosterone',
      '   NO bradykinin effect → no cough; angioedema rare',
      '   Uses: Same as ACE inhibitors; used when ACE inhibitor cough occurs',
      '   AEs: Hyperkalemia, teratogenicity; NO cough',
      '',
      '3. RENIN INHIBITORS:',
      '   Aliskiren: Direct renin inhibitor → ↓ Ang I and Ang II',
      '   Uses: Hypertension (add-on therapy)',
      '   AEs: Diarrhea, hyperkalemia; contraindicated with ACE-I/ARBs in diabetics (renal risk)',
      '',
      '4. ALDOSTERONE ANTAGONISTS:',
      '   Spironolactone, Eplerenone',
      '   Mechanism: Competitive aldosterone receptor blockade → natriuresis, K+ retention',
      '   Uses: Resistant hypertension, HF, primary aldosteronism',
      '   AEs: Hyperkalemia, gynecomastia (spironolactone)',
      '',
      'COMBINATION THERAPY:',
      '  ACE-I + ARB + Aliskiren together are CONTRAINDICATED (excessive RAAS blockade → AKI, hyperkalemia)',
    ],
  },
];

ahLAQs.forEach((item, i) => laqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// ════════════════════════════════════════════════════════════════════════════
// SECTION 2 – HEART FAILURE
// ════════════════════════════════════════════════════════════════════════════
children.push(pageBreak());
children.push(heading1('SECTION 2: DRUGS USED IN HEART FAILURE'));

// --- MCQs ---
children.push(heading2('MULTIPLE CHOICE QUESTIONS (MCQs)'));

const hfMCQs = [
  { q: 'The first-line drug combination for chronic heart failure with reduced ejection fraction (HFrEF) is:', opts: ['A. Digoxin + Furosemide', 'B. ACE inhibitor + Beta-blocker + Spironolactone', 'C. Amlodipine + Atenolol', 'D. Hydralazine + Nifedipine'], ans: 'B. ACE inhibitor + Beta-blocker + Spironolactone' },
  { q: 'Mechanism of action of digoxin in heart failure:', opts: ['A. Inhibits Na+/K+ ATPase → increased intracellular Ca²⁺', 'B. Activates adenylyl cyclase → increased cAMP', 'C. Blocks beta-1 receptors', 'D. Activates BNP receptors'], ans: 'A. Inhibits Na+/K+ ATPase → increased intracellular Ca²⁺' },
  { q: 'Which drug is used in acute decompensated heart failure as an IV inotrope?', opts: ['A. Carvedilol', 'B. Dobutamine', 'C. Ramipril', 'D. Furosemide'], ans: 'B. Dobutamine' },
  { q: 'Sacubitril (in Sacubitril/Valsartan) acts by:', opts: ['A. Inhibiting ACE', 'B. Inhibiting neprilysin → increased natriuretic peptides', 'C. Blocking AT1 receptor', 'D. Inhibiting aldosterone'], ans: 'B. Inhibiting neprilysin → increased natriuretic peptides' },
  { q: 'Which drug reduces mortality in HFrEF by blocking neurohormonal activation?', opts: ['A. Furosemide', 'B. Digoxin', 'C. Carvedilol', 'D. Dobutamine'], ans: 'C. Carvedilol (beta-blocker with alpha-blocking activity)' },
  { q: 'Digoxin toxicity is precipitated by:', opts: ['A. Hyperkalemia', 'B. Hypokalemia', 'C. Hypernatremia', 'D. Metabolic acidosis'], ans: 'B. Hypokalemia (K+ and digoxin compete for Na+/K+ ATPase binding)' },
  { q: 'SGLT2 inhibitors (e.g. Empagliflozin) in heart failure work by:', opts: ['A. Increasing aldosterone', 'B. Osmotic diuresis, reducing preload, direct cardiac effects', 'C. Increasing cardiac contractility', 'D. Inhibiting ACE'], ans: 'B. Osmotic diuresis, reducing preload, direct cardiac effects' },
  { q: 'Which diuretic is preferred in acute pulmonary edema?', opts: ['A. Hydrochlorothiazide', 'B. Spironolactone', 'C. Furosemide (IV)', 'D. Acetazolamide'], ans: 'C. Furosemide (IV) - rapid diuresis and venodilation' },
  { q: 'Beta-blockers approved for HFrEF include:', opts: ['A. Atenolol, Propranolol', 'B. Carvedilol, Bisoprolol, Metoprolol succinate', 'C. Metoprolol tartrate, Pindolol', 'D. Labetalol, Nebivolol'], ans: 'B. Carvedilol, Bisoprolol, Metoprolol succinate' },
  { q: 'The antidote for digoxin toxicity is:', opts: ['A. Naloxone', 'B. Atropine', 'C. Digoxin-specific antibody fragments (Fab)', 'D. Calcium gluconate'], ans: 'C. Digoxin-specific antibody fragments (Fab)' },
  { q: 'Milrinone acts by:', opts: ['A. Beta-1 agonism', 'B. Inhibiting phosphodiesterase III → increased cAMP', 'C. Blocking adenosine receptors', 'D. Inhibiting Na+/K+ ATPase'], ans: 'B. Inhibiting phosphodiesterase III → increased cAMP' },
  { q: 'Hydralazine + Nitrate combination in heart failure is recommended in:', opts: ['A. All HFrEF patients', 'B. Patients intolerant to ACE inhibitors AND ARBs', 'C. Patients with HFpEF', 'D. Acute heart failure only'], ans: 'B. Patients intolerant to ACE inhibitors AND ARBs (especially self-identified African Americans)' },
  { q: 'Which NYHA class is contraindicated for starting beta-blockers in HF?', opts: ['A. Class I', 'B. Class II', 'C. Class IV (decompensated/wet)', 'D. Class III'], ans: 'C. Class IV (decompensated/wet) - initiate only when patient is stabilized' },
  { q: 'Ivabradine in heart failure acts by:', opts: ['A. Blocking beta receptors', 'B. Inhibiting funny (If) current in SA node → reduces HR', 'C. Inhibiting calcium channels', 'D. Increasing vagal tone'], ans: 'B. Inhibiting funny (If) current in SA node → reduces HR' },
  { q: 'BNP (B-type natriuretic peptide) levels in heart failure are:', opts: ['A. Decreased', 'B. Unchanged', 'C. Elevated (marker of ventricular stress)', 'D. Elevated only in right heart failure'], ans: 'C. Elevated (marker of ventricular stress)' },
];

hfMCQs.forEach((item, i) => mcqBlock(i + 1, item.q, item.opts, item.ans).forEach(p => children.push(p)));

// --- SAQs ---
children.push(pageBreak());
children.push(heading2('SHORT ANSWER QUESTIONS (SAQs)'));

const hfSAQs = [
  {
    q: 'Write a short note on the pharmacology of digoxin.',
    ans: [
      'Source: Digitalis purpurea and D. lanata (foxglove)',
      'Mechanism: Inhibits Na+/K+ ATPase pump → ↑ intracellular Na+ → ↑ intracellular Ca²⁺ via Na+/Ca²⁺ exchanger → positive inotropy',
      'Also: Increases vagal tone → ↓ HR (negative chronotropy), slows AV conduction',
      'Uses: HFrEF (symptom relief), atrial fibrillation (rate control)',
      'Pharmacokinetics: Oral bioavailability 75%; renally excreted; narrow therapeutic index',
      'Toxicity (therapeutic range: 0.5-0.9 ng/mL):',
      '  • GI: Anorexia, nausea, vomiting (earliest signs)',
      '  • CNS: Xanthopsia (yellow vision), confusion',
      '  • Cardiac: Bradycardia, heart block, ventricular arrhythmias',
      'Precipitants of toxicity: Hypokalemia, hypomagnesemia, renal failure, hypothyroidism',
      'Treatment of toxicity: Digoxin-specific Fab antibody fragments',
    ],
  },
  {
    q: 'Describe the role of RAAS inhibitors in heart failure.',
    ans: [
      'In HF: RAAS is chronically activated → Ang II → vasoconstriction, aldosterone → Na/water retention → increased preload/afterload → worsening HF',
      '',
      'ACE Inhibitors (e.g. Enalapril, Ramipril):',
      '  • Reduce Ang II → ↓ afterload + ↓ aldosterone → ↓ preload',
      '  • Reduce cardiac remodeling',
      '  • Proven mortality benefit in HFrEF (CONSENSUS, SOLVD trials)',
      '',
      'ARBs (e.g. Valsartan, Candesartan):',
      '  • Used when ACE inhibitor not tolerated (dry cough)',
      '  • Similar mortality benefit (Val-HeFT, CHARM trials)',
      '',
      'Aldosterone Antagonists (Spironolactone, Eplerenone):',
      '  • Block aldosterone → reduce fibrosis, Na retention',
      '  • Proven mortality benefit in NYHA class III-IV (RALES trial)',
      '  • Monitor K+ levels (risk of hyperkalemia)',
      '',
      'ARNI (Sacubitril/Valsartan):',
      '  • Replaces ACE-I in HFrEF; superior to enalapril (PARADIGM-HF trial)',
      '  • 36-hour washout required before switching from ACE-I',
    ],
  },
  {
    q: 'What are SGLT2 inhibitors? Describe their role in heart failure.',
    ans: [
      'Examples: Empagliflozin (EMPEROR-Reduced trial), Dapagliflozin (DAPA-HF trial)',
      'Primary action: Block SGLT2 in proximal tubule → glucosuria + natriuresis',
      '',
      'Benefits in HF:',
      '  • Reduce hospitalizations for HF and CV mortality',
      '  • Osmotic diuresis → reduces preload',
      '  • Reduce sympathetic activation',
      '  • Direct cardiac effects: reduce myocardial Na+/H+ exchange, reduce cardiac fibrosis',
      '  • Beneficial in both HFrEF and HFpEF',
      '',
      'Side effects: Genitourinary infections, DKA (rare), volume depletion',
      'Now part of "Fantastic Four" of HFrEF: ACE-I/ARB/ARNI + Beta-blocker + MRA + SGLT2i',
    ],
  },
];

hfSAQs.forEach((item, i) => saqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// --- LAQs ---
children.push(pageBreak());
children.push(heading2('LONG ANSWER QUESTIONS (LAQs)'));

const hfLAQs = [
  {
    q: 'Classify drugs used in chronic heart failure. Discuss the pharmacology, mechanism, clinical uses and adverse effects of drugs that reduce mortality in HFrEF.',
    ans: [
      'CLASSIFICATION OF DRUGS IN HEART FAILURE:',
      '',
      'A. Drugs that reduce mortality (disease-modifying):',
      '   1. ACE inhibitors / ARBs / ARNI',
      '   2. Beta-blockers (Carvedilol, Bisoprolol, Metoprolol succinate)',
      '   3. Mineralocorticoid receptor antagonists (Spironolactone, Eplerenone)',
      '   4. SGLT2 inhibitors (Empagliflozin, Dapagliflozin)',
      '',
      'B. Drugs that relieve symptoms:',
      '   1. Diuretics: Furosemide, Hydrochlorothiazide, Spironolactone',
      '   2. Digoxin',
      '   3. Ivabradine',
      '   4. Hydralazine + Nitrates',
      '',
      'C. Drugs for acute decompensated HF:',
      '   1. IV diuretics (Furosemide)',
      '   2. Inotropes: Dobutamine, Milrinone, Levosimendan',
      '   3. Vasopressors: Norepinephrine (if hypotension)',
      '   4. Nesiritide (recombinant BNP)',
      '',
      'BETA-BLOCKERS IN HFrEF (Detailed):',
      '',
      'Approved agents: Carvedilol (α1+β1+β2), Bisoprolol (β1 selective), Metoprolol succinate (β1 selective)',
      '',
      'Mechanism:',
      '  • Block excessive sympathetic activation in HF → ↓ tachycardia, ↓ arrhythmias',
      '  • ↓ myocardial O2 demand',
      '  • Reduce cardiac remodeling (↑ EF over months)',
      '  • Anti-apoptotic effects on cardiomyocytes',
      '  • Improve beta-receptor density (upregulation)',
      '',
      'Clinical evidence:',
      '  • COPERNICUS (carvedilol): 35% mortality reduction in severe HF',
      '  • CIBIS-II (bisoprolol): 34% mortality reduction',
      '  • MERIT-HF (metoprolol): 34% mortality reduction',
      '',
      'Important note: Start at LOW dose; do NOT start in decompensated/fluid-overloaded patient',
      '  Titrate up slowly over weeks to months',
      '',
      'Adverse effects: Bradycardia, fatigue, hypotension, worsening HF (initial), bronchospasm (non-selective)',
      '',
      'SACUBITRIL/VALSARTAN (ARNI):',
      '',
      'Mechanism:',
      '  • Valsartan: AT1 blocker → reduces Ang II effects',
      '  • Sacubitril: Neprilysin inhibitor → ↑ ANP, BNP, bradykinin → vasodilation + natriuresis',
      '  • Dual action: reduces neurohormonal activation + increases natriuretic peptides',
      '',
      'Clinical use: Replaces ACE-I in HFrEF patients (EF ≤40%) who remain symptomatic',
      'Evidence: PARADIGM-HF trial → 20% reduction in CV death vs enalapril',
      '',
      'Key precaution: 36-hour washout period required when switching from ACE-I (risk of angioedema)',
      'Contraindicated with ACE-I (do not use together)',
      '',
      'Adverse effects: Hypotension, hyperkalemia, angioedema, renal impairment',
    ],
  },
];

hfLAQs.forEach((item, i) => laqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// ════════════════════════════════════════════════════════════════════════════
// SECTION 3 – ANGINA
// ════════════════════════════════════════════════════════════════════════════
children.push(pageBreak());
children.push(heading1('SECTION 3: DRUGS USED IN ANGINA'));

// --- MCQs ---
children.push(heading2('MULTIPLE CHOICE QUESTIONS (MCQs)'));

const anginaMCQs = [
  { q: 'Drug of choice for acute attack of stable angina:', opts: ['A. Isosorbide mononitrate (oral)', 'B. Sublingual nitroglycerin', 'C. Atenolol', 'D. Amlodipine'], ans: 'B. Sublingual nitroglycerin (rapid onset, 1-3 minutes)' },
  { q: 'Mechanism of antianginal action of nitrates:', opts: ['A. Reduce heart rate', 'B. Release NO → activate guanylyl cyclase → ↑ cGMP → venodilation → ↓ preload', 'C. Block calcium channels', 'D. Reduce renin secretion'], ans: 'B. Release NO → activate guanylyl cyclase → ↑ cGMP → venodilation → ↓ preload' },
  { q: 'Drug of choice for Prinzmetal (vasospastic) angina:', opts: ['A. Beta-blockers', 'B. Digoxin', 'C. Calcium channel blockers (Nifedipine/Amlodipine)', 'D. Aspirin alone'], ans: 'C. Calcium channel blockers (Nifedipine/Amlodipine)' },
  { q: 'Nitrate tolerance is prevented by:', opts: ['A. Using long-acting nitrates continuously', 'B. Providing nitrate-free interval of 8-12 hours', 'C. Combining with verapamil', 'D. Using IV route only'], ans: 'B. Providing nitrate-free interval of 8-12 hours' },
  { q: 'Beta-blockers reduce anginal attacks by:', opts: ['A. Coronary vasodilation', 'B. Decreasing HR, contractility, and afterload → ↓ myocardial O2 demand', 'C. Increasing coronary blood flow', 'D. Dilating peripheral veins'], ans: 'B. Decreasing HR, contractility, and afterload → ↓ myocardial O2 demand' },
  { q: 'Ranolazine is a newer antianginal drug that acts by:', opts: ['A. Blocking L-type calcium channels', 'B. Blocking late sodium current (INa) → ↓ diastolic Ca²⁺ overload', 'C. Opening potassium channels', 'D. Inhibiting phosphodiesterase'], ans: 'B. Blocking late sodium current (INa) → ↓ diastolic Ca²⁺ overload' },
  { q: 'Nitroglycerin is stored in tightly closed glass containers because:', opts: ['A. It reacts with plastic due to volatility and adsorption', 'B. It is light sensitive', 'C. It reacts with atmospheric oxygen', 'D. It is water sensitive'], ans: 'A. It reacts with plastic due to volatility and adsorption' },
  { q: 'Which antianginal drug is contraindicated in Prinzmetal angina?', opts: ['A. Amlodipine', 'B. Nifedipine', 'C. Non-selective beta-blockers (e.g. Propranolol)', 'D. Diltiazem'], ans: 'C. Non-selective beta-blockers (e.g. Propranolol) - may worsen coronary spasm' },
  { q: 'The mechanism by which beta-blockers increase exercise tolerance in angina:', opts: ['A. Dilate coronary arteries directly', 'B. ↓ HR and contractility → ↓ O2 demand, allowing more work before ischemia threshold', 'C. Increase collateral circulation', 'D. Reduce platelet aggregation'], ans: 'B. ↓ HR and contractility → ↓ O2 demand, allowing more work before ischemia threshold' },
  { q: 'Amlodipine is preferred over verapamil in angina in patients with:',  opts: ['A. Atrial fibrillation', 'B. Supraventricular tachycardia', 'C. Heart failure (HFrEF)', 'D. Raynaud syndrome'], ans: 'C. Heart failure (HFrEF) - verapamil is negatively inotropic and contraindicated' },
  { q: 'Oral bioavailability of nitroglycerin is low (<10%) due to:', opts: ['A. Poor intestinal absorption', 'B. High first-pass hepatic metabolism (organic nitrate reductase)', 'C. Extensive protein binding', 'D. Renal excretion before systemic circulation'], ans: 'B. High first-pass hepatic metabolism (organic nitrate reductase)' },
  { q: 'Which combination is NOT appropriate in angina?', opts: ['A. Beta-blocker + long-acting nitrate', 'B. Beta-blocker + amlodipine', 'C. Verapamil + beta-blocker', 'D. Nitroglycerin + amlodipine'], ans: 'C. Verapamil + beta-blocker (both reduce HR and AV conduction → risk of complete heart block)' },
  { q: 'Trimetazidine in angina acts by:', opts: ['A. Vasodilation of coronary arteries', 'B. Inhibiting fatty acid oxidation → shifts metabolism to glucose oxidation (more efficient)', 'C. Reducing heart rate', 'D. Blocking calcium channels'], ans: 'B. Inhibiting fatty acid oxidation → shifts metabolism to glucose oxidation (more efficient)' },
  { q: 'Isosorbide mononitrate (ISMN) compared to isosorbide dinitrate (ISDN):', opts: ['A. Requires hepatic activation; less bioavailable', 'B. Does not require hepatic activation; 100% bioavailability', 'C. Only available as sublingual formulation', 'D. Has shorter duration of action'], ans: 'B. Does not require hepatic activation; 100% bioavailability' },
  { q: 'Sildenafil is absolutely contraindicated with nitrates because:', opts: ['A. Both cause tachycardia', 'B. Both inhibit PDE5 causing excessive cGMP accumulation → severe hypotension', 'C. Combined they cause renal failure', 'D. They cause serotonin syndrome'], ans: 'B. Both inhibit PDE5 causing excessive cGMP accumulation → severe hypotension' },
];

anginaMCQs.forEach((item, i) => mcqBlock(i + 1, item.q, item.opts, item.ans).forEach(p => children.push(p)));

// --- SAQs ---
children.push(pageBreak());
children.push(heading2('SHORT ANSWER QUESTIONS (SAQs)'));

const anginaSAQs = [
  {
    q: 'Write the mechanism of action, uses, and adverse effects of organic nitrates.',
    ans: [
      'Examples: Nitroglycerin (GTN), Isosorbide dinitrate (ISDN), Isosorbide mononitrate (ISMN), Amyl nitrite',
      '',
      'Mechanism:',
      '  • Denitration in vascular smooth muscle → release of nitric oxide (NO)',
      '  • NO activates soluble guanylyl cyclase → ↑ cGMP → activation of cGMP-dependent kinase',
      '  • Phosphorylation of myosin light chain kinase → smooth muscle relaxation',
      '  • At lower doses: primarily venodilation → ↓ preload (↓ LVEDP)',
      '  • At higher doses: arterial dilation → ↓ afterload',
      '  • In coronary arteries: dilate large epicardial vessels + collateral vessels',
      '',
      'Uses:',
      '  • Acute anginal attack (SL nitroglycerin)',
      '  • Prophylaxis of angina (long-acting nitrates)',
      '  • Acute MI (IV nitroglycerin)',
      '  • Acute LVF / pulmonary edema',
      '  • Esophageal spasm',
      '  • Anal fissure (topical GTN 0.2%)',
      '',
      'Adverse effects:',
      '  • Headache (most common - due to meningeal vessel dilation)',
      '  • Postural hypotension, dizziness, flushing',
      '  • Reflex tachycardia',
      '  • Tolerance (with continuous use; prevented by nitrate-free interval)',
      '  • Methemoglobinemia (high doses, especially amyl nitrite)',
      '',
      'Contraindication: Concurrent use of PDE5 inhibitors (sildenafil, tadalafil) - risk of severe hypotension',
    ],
  },
  {
    q: 'Classify antianginal drugs. What is the treatment of stable angina?',
    ans: [
      'CLASSIFICATION:',
      '1. Nitrates: GTN (sublingual, transdermal, IV), ISDN, ISMN, Amyl nitrite',
      '2. Beta-blockers: Atenolol, Metoprolol, Propranolol, Carvedilol',
      '3. Calcium channel blockers: Amlodipine, Nifedipine, Verapamil, Diltiazem',
      '4. Newer antianginals: Ranolazine, Trimetazidine, Ivabradine, Nicorandil',
      '5. Anti-platelet/Anti-ischemic: Aspirin, Statins (for underlying CAD)',
      '',
      'TREATMENT OF STABLE ANGINA:',
      'Acute attack: Sublingual nitroglycerin 0.3-0.6 mg (repeat every 5 min, max 3 doses)',
      '',
      'Prophylaxis:',
      '  • First line: Beta-blocker (atenolol/metoprolol) + low-dose aspirin + statin',
      '  • Add long-acting nitrate (ISMN) or CCB if not controlled',
      '  • If beta-blocker contraindicated: use CCB (amlodipine or diltiazem)',
      '  • Ranolazine: add-on if still symptomatic',
      '',
      'Modify risk factors: Treat hypertension, diabetes, dyslipidemia, smoking cessation',
    ],
  },
];

anginaSAQs.forEach((item, i) => saqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// --- LAQs ---
children.push(pageBreak());
children.push(heading2('LONG ANSWER QUESTIONS (LAQs)'));

const anginaLAQs = [
  {
    q: 'Classify antianginal drugs. Describe in detail the pharmacology of beta-blockers in angina. Compare the three types of angina and their drug management.',
    ans: [
      'CLASSIFICATION OF ANTIANGINAL DRUGS: (see SAQ above)',
      '',
      'BETA-BLOCKERS IN ANGINA:',
      '',
      'Mechanism:',
      '  • Competitive blockade of beta-1 (and beta-2 for non-selective) receptors',
      '  • ↓ HR (chronotropy) → more time for diastolic coronary perfusion',
      '  • ↓ Contractility (inotropy) → ↓ myocardial O2 consumption',
      '  • ↓ BP (afterload) → ↓ wall tension → ↓ O2 demand',
      '  • Increase diastolic filling time → better subendocardial perfusion',
      '',
      'Examples in angina:',
      '  • Atenolol 25-100 mg OD (cardioselective)',
      '  • Metoprolol 25-100 mg BD (cardioselective)',
      '  • Propranolol (non-selective; also useful in hypertensive heart disease)',
      '',
      'Contraindications in angina:',
      '  • Asthma / COPD (use cardioselective with caution)',
      '  • Prinzmetal angina (may worsen vasospasm via unopposed alpha stimulation)',
      '  • Significant bradycardia, high-degree AV block',
      '  • Severe peripheral arterial disease',
      '',
      '─────────────────────────────────────────────────────────────',
      'COMPARISON: THREE TYPES OF ANGINA',
      '─────────────────────────────────────────────────────────────',
      '',
      '1. STABLE ANGINA (Effort angina):',
      '   Pathophysiology: Fixed atherosclerotic plaque → demand ischemia on exertion',
      '   Trigger: Physical exertion, cold, emotional stress',
      '   ECG: ST depression during attack (subendocardial ischemia)',
      '   Treatment:',
      '     Acute: SL nitroglycerin',
      '     Prophylaxis: Beta-blocker (1st choice) + aspirin + statin',
      '     Add-on: Long-acting nitrate or CCB; Ranolazine if refractory',
      '',
      '2. UNSTABLE ANGINA (ACS):',
      '   Pathophysiology: Plaque rupture → partial thrombosis → dynamic obstruction',
      '   Trigger: At rest or minimal exertion',
      '   ECG: ST depression or T-wave changes at rest',
      '   Treatment:',
      '     Anti-thrombotic: Aspirin + P2Y12 inhibitor (Clopidogrel/Ticagrelor)',
      '     Anticoagulant: Heparin (LMWH/UFH)',
      '     Anti-ischemic: Beta-blocker + SL nitroglycerin + statin',
      '     Revascularization (PCI) for high-risk features',
      '',
      '3. PRINZMETAL (Vasospastic) ANGINA:',
      '   Pathophysiology: Focal coronary artery spasm → transmural ischemia',
      '   Trigger: At rest, early morning; may be induced by smoking, cocaine',
      '   ECG: ST elevation during attack (transmural ischemia)',
      '   Treatment:',
      '     First choice: Calcium channel blockers (Amlodipine, Diltiazem, Verapamil)',
      '     Second: Long-acting nitrates',
      '     AVOID: Beta-blockers (non-selective block → unopposed alpha → ↑ spasm)',
      '     AVOID: Aspirin (high dose aspirin may inhibit prostacyclin → spasm)',
    ],
  },
];

anginaLAQs.forEach((item, i) => laqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// ════════════════════════════════════════════════════════════════════════════
// SECTION 4 – HEMATINICS
// ════════════════════════════════════════════════════════════════════════════
children.push(pageBreak());
children.push(heading1('SECTION 4: HEMATINICS'));

// --- MCQs ---
children.push(heading2('MULTIPLE CHOICE QUESTIONS (MCQs)'));

const hemMCQs = [
  { q: 'Iron is primarily absorbed in which part of the GI tract?', opts: ['A. Stomach', 'B. Duodenum and proximal jejunum', 'C. Ileum', 'D. Colon'], ans: 'B. Duodenum and proximal jejunum' },
  { q: 'The form of iron absorbed by intestinal enterocytes is:', opts: ['A. Ferric (Fe³⁺)', 'B. Ferrous (Fe²⁺)', 'C. Transferrin-bound iron', 'D. Heme iron directly as ferric'], ans: 'B. Ferrous (Fe²⁺) - via DMT-1 (divalent metal transporter 1)' },
  { q: 'Vitamin C enhances iron absorption by:', opts: ['A. Forming chelates with iron', 'B. Reducing Fe³⁺ to Fe²⁺ and preventing iron precipitation', 'C. Increasing gastric pH', 'D. Stimulating erythropoietin'], ans: 'B. Reducing Fe³⁺ to Fe²⁺ and preventing iron precipitation' },
  { q: 'The most common cause of iron deficiency anemia in women of reproductive age:', opts: ['A. Poor dietary intake only', 'B. Chronic blood loss (menstruation)', 'C. Malabsorption syndrome', 'D. Chronic inflammation'], ans: 'B. Chronic blood loss (menstruation)' },
  { q: 'Expected rise in hemoglobin with oral iron therapy:', opts: ['A. 0.1-0.2 g/dL/week', 'B. 1-2 g/dL/week', 'C. 0.5-1 g/dL/day', 'D. 2-3 g/dL/week'], ans: 'A. 1-2 g/dL per week (approximately)' },
  { q: 'Which preparation is used for IV iron therapy?', opts: ['A. Ferrous sulfate', 'B. Ferrous gluconate', 'C. Iron sucrose / Ferric carboxymaltose', 'D. Carbonyl iron'], ans: 'C. Iron sucrose / Ferric carboxymaltose' },
  { q: 'The characteristic blood picture in folic acid deficiency is:', opts: ['A. Microcytic hypochromic anemia', 'B. Normocytic normochromic anemia', 'C. Macrocytic megaloblastic anemia', 'D. Hemolytic anemia with spherocytes'], ans: 'C. Macrocytic megaloblastic anemia' },
  { q: 'Folic acid is converted to its active form by:', opts: ['A. Vitamin B12-dependent methionine synthase', 'B. Dihydrofolate reductase (DHFR) → tetrahydrofolate (THF)', 'C. Thymidylate synthase', 'D. Intrinsic factor'], ans: 'B. Dihydrofolate reductase (DHFR) → tetrahydrofolate (THF)' },
  { q: 'Intrinsic factor (IF) is secreted by:', opts: ['A. Chief cells of stomach', 'B. Parietal cells of stomach', 'C. Brunner glands of duodenum', 'D. Goblet cells of ileum'], ans: 'B. Parietal cells of stomach' },
  { q: 'Vitamin B12 deficiency causes subacute combined degeneration of spinal cord because B12 is needed for:', opts: ['A. DNA synthesis in neurons', 'B. Myelin synthesis (via methylmalonyl-CoA → succinyl-CoA conversion)', 'C. Heme synthesis', 'D. Iron absorption'], ans: 'B. Myelin synthesis (via methylmalonyl-CoA → succinyl-CoA conversion)' },
  { q: 'Treatment of pernicious anemia requires:', opts: ['A. Oral folic acid', 'B. IM injection of cyanocobalamin (Vitamin B12) lifelong', 'C. Oral ferrous sulfate', 'D. IV iron therapy'], ans: 'B. IM injection of cyanocobalamin (Vitamin B12) lifelong (as IF is absent, oral B12 not absorbed)' },
  { q: 'Erythropoietin is used in anemia associated with:', opts: ['A. Iron deficiency', 'B. Vitamin B12 deficiency', 'C. Chronic kidney disease', 'D. Thalassemia'], ans: 'C. Chronic kidney disease (deficient EPO production)' },
  { q: 'Folic acid supplementation is recommended before and during early pregnancy to prevent:', opts: ['A. Iron deficiency anemia', 'B. Neural tube defects (spina bifida, anencephaly)', 'C. Pernicious anemia', 'D. Sickle cell crisis'], ans: 'B. Neural tube defects (spina bifida, anencephaly)' },
  { q: 'Acute iron poisoning treatment includes:', opts: ['A. Naloxone', 'B. Desferrioxamine (chelation therapy)', 'C. Dimercaprol (BAL)', 'D. Sodium bicarbonate'], ans: 'B. Desferrioxamine (chelation therapy)' },
  { q: 'Which drug inhibits folic acid synthesis and is used as a chemotherapeutic/antifolate?', opts: ['A. Metformin', 'B. Methotrexate (DHFR inhibitor)', 'C. Mesalazine', 'D. Methyldopa'], ans: 'B. Methotrexate (DHFR inhibitor) - can cause megaloblastic anemia' },
];

hemMCQs.forEach((item, i) => mcqBlock(i + 1, item.q, item.opts, item.ans).forEach(p => children.push(p)));

// --- SAQs ---
children.push(pageBreak());
children.push(heading2('SHORT ANSWER QUESTIONS (SAQs)'));

const hemSAQs = [
  {
    q: 'Describe the pharmacokinetics and therapeutic use of iron in iron deficiency anemia.',
    ans: [
      'PREPARATIONS:',
      '  Oral: Ferrous sulfate (most common), Ferrous gluconate, Ferrous fumarate, Carbonyl iron',
      '  Parenteral: Iron sucrose, Ferric carboxymaltose, Iron dextran',
      '',
      'PHARMACOKINETICS:',
      '  Absorption:',
      '    • Ferrous (Fe²⁺) form absorbed via DMT-1 in duodenum/jejunum',
      '    • Heme iron (meat) absorbed separately, more efficiently (~25%)',
      '    • Non-heme iron absorption: 5-10%',
      '    • Enhanced by: Vitamin C, acidic pH, meat, fasting state',
      '    • Reduced by: Phytates, tannins (tea/coffee), antacids, calcium, H2-blockers, tetracyclines',
      '  Distribution:',
      '    • Absorbed into blood → bound to transferrin → transported to bone marrow',
      '    • Stored as ferritin and hemosiderin (liver, spleen, bone marrow)',
      '  Excretion: No active excretion; lost only through blood loss, exfoliation of cells',
      '',
      'THERAPEUTIC USE:',
      '  Dose: Ferrous sulfate 325 mg (65 mg elemental iron) 2-3 times daily',
      '  Duration: 3-6 months (3 months to correct anemia + 3 months to replenish stores)',
      '  Monitor: Hb rise ~1-2 g/dL/week; reticulocytosis within 7-10 days',
      '',
      'ADVERSE EFFECTS (oral iron):',
      '  • GI: Nausea, constipation, dark stools, epigastric pain (most common)',
      '  • Take after meals to reduce GI side effects (but reduces absorption)',
      '  • Liquid iron: may stain teeth (use straw)',
      '',
      'PARENTERAL IRON:',
      '  Indications: Malabsorption, intolerance to oral iron, rapid repletion needed, IBD',
      '  Risk: Anaphylaxis (especially iron dextran); test dose required',
    ],
  },
  {
    q: 'Write a note on Vitamin B12 (Cyanocobalamin): sources, absorption, deficiency, and treatment.',
    ans: [
      'SOURCES: Animal products (meat, fish, eggs, dairy); absent in strict vegan diet',
      '',
      'ABSORPTION:',
      '  • B12 released from food by gastric acid and pepsin',
      '  • Binds to Intrinsic Factor (IF) secreted by gastric parietal cells',
      '  • B12-IF complex absorbed in terminal ileum via cubilin receptors',
      '  • Stored in liver (up to 3-5 year supply)',
      '',
      'FUNCTION:',
      '  • Cofactor for Methionine synthase: Homocysteine → Methionine (requires methylcobalamin)',
      '    - Also regenerates THF from methylTHF → needed for DNA synthesis',
      '  • Cofactor for Methylmalonyl-CoA mutase: Methylmalonyl-CoA → Succinyl-CoA',
      '    - Deficiency → methylmalonyl-CoA accumulates → abnormal myelin → SACD',
      '',
      'DEFICIENCY CAUSES:',
      '  • Pernicious anemia (autoimmune destruction of parietal cells → ↓ IF)',
      '  • Strict vegetarian/vegan diet',
      '  • Gastrectomy, terminal ileum resection, Crohn disease',
      '  • Metformin (impairs absorption), Prolonged PPI use',
      '  • Fish tapeworm (Diphyllobothrium latum)',
      '',
      'CLINICAL FEATURES:',
      '  • Megaloblastic anemia (macrocytic, hypersegmented neutrophils)',
      '  • Glossitis, angular stomatitis',
      '  • Subacute Combined Degeneration of Spinal Cord (SACD):',
      '    - Posterior columns (loss of vibration/proprioception)',
      '    - Lateral corticospinal tracts (upper motor neuron signs)',
      '  • Dementia, psychiatric changes',
      '  • Note: Folic acid deficiency does NOT cause SACD',
      '',
      'TREATMENT:',
      '  • Pernicious anemia: IM cyanocobalamin 1000 mcg daily for 7 days, then weekly for 4 weeks, then monthly LIFELONG',
      '  • Dietary deficiency: Oral cyanocobalamin 1000-2000 mcg daily (high-dose oral can achieve passive absorption)',
      '  • Important: Correct B12 BEFORE giving folic acid (treating with folate alone may worsen SACD)',
    ],
  },
  {
    q: 'Write a note on folic acid: its role, deficiency, and uses in clinical practice.',
    ans: [
      'SOURCES: Green leafy vegetables, legumes, liver, cereals (dietary folate)',
      '  Body stores: 5-10 mg (lasts only 3-4 months)',
      '',
      'ABSORPTION: Proximal small intestine (jejunum); converted to methyltetrahydrofolate in blood',
      '',
      'ACTIVE FORM: Tetrahydrofolate (THF) - generated by dihydrofolate reductase (DHFR)',
      '',
      'FUNCTIONS:',
      '  • DNA synthesis: THF donates one-carbon units for purine and thymidylate synthesis',
      '  • Amino acid metabolism: Homocysteine → Methionine (with B12)',
      '  • Neural tube development in embryo',
      '',
      'DEFICIENCY CAUSES:',
      '  • Poor dietary intake (most common)',
      '  • Malabsorption (celiac disease)',
      '  • Drugs: Methotrexate, Trimethoprim, Phenytoin (impair DHFR or absorption)',
      '  • Increased demand: Pregnancy, hemolytic anemia, dialysis',
      '',
      'CLINICAL FEATURES:',
      '  • Megaloblastic anemia (identical blood picture to B12 deficiency)',
      '  • Glossitis',
      '  • Neural tube defects in fetus (if deficient periconceptionally)',
      '  • No neurological deficits (unlike B12 deficiency)',
      '',
      'USES:',
      '  • Prevention of NTDs: 400-800 mcg daily starting 1 month before conception and through first trimester',
      '    (High-risk women - previous NTD, on antiepileptics: 5 mg/day)',
      '  • Treatment of megaloblastic anemia (5 mg OD for 4 months)',
      '  • Leucovorin (folinic acid): used to rescue normal cells from methotrexate toxicity',
    ],
  },
];

hemSAQs.forEach((item, i) => saqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// --- LAQs ---
children.push(pageBreak());
children.push(heading2('LONG ANSWER QUESTIONS (LAQs)'));

const hemLAQs = [
  {
    q: 'Classify hematinics. Discuss in detail the pharmacology of iron: mechanism of absorption, oral and parenteral preparations, adverse effects, and treatment of iron toxicity.',
    ans: [
      'CLASSIFICATION OF HEMATINICS:',
      '',
      '1. Iron preparations:',
      '   Oral: Ferrous sulfate, Ferrous gluconate, Ferrous fumarate, Carbonyl iron',
      '   Parenteral: Iron sucrose, Ferric carboxymaltose, Iron dextran, Ferumoxytol',
      '',
      '2. Vitamin B12 (Cyanocobalamin, Hydroxocobalamin)',
      '',
      '3. Folic acid (Folate, Folinic acid/Leucovorin)',
      '',
      '4. Erythropoiesis-stimulating agents:',
      '   Erythropoietin (EPO), Darbepoetin alfa, Epoetin alfa',
      '',
      '5. Others: Pyridoxine (sideroblastic anemia), Hydroxycarbamide (sickle cell)',
      '',
      '─────────────────────────────────────────────────────────────',
      'IRON - DETAILED PHARMACOLOGY:',
      '─────────────────────────────────────────────────────────────',
      '',
      'MECHANISM OF ABSORPTION:',
      '',
      'Step 1 – Luminal reduction:',
      '  • Dietary ferric iron (Fe³⁺) → reduced to Fe²⁺ by ferrireductase (Dcytb) at brush border',
      '  • Vitamin C and gastric acid facilitate this reduction',
      '',
      'Step 2 – Enterocyte uptake:',
      '  • Fe²⁺ enters enterocyte via DMT-1 (Divalent Metal Transporter 1)',
      '  • Heme iron: absorbed via heme carrier protein (HCP-1) → haem oxygenase releases Fe inside cell',
      '',
      'Step 3 – Intracellular storage or export:',
      '  • Stored as ferritin (mucosal block - lost when enterocyte exfoliates)',
      '  • Exported to blood via ferroportin (basolateral transporter)',
      '',
      'Step 4 – Oxidation and binding in plasma:',
      '  • Fe²⁺ → Fe³⁺ by hephaestin/ceruloplasmin',
      '  • Fe³⁺ binds to transferrin (plasma carrier) → delivered to bone marrow',
      '',
      'Regulation: Hepcidin (liver peptide) degrades ferroportin → reduces iron absorption in iron-replete states',
      '',
      'FACTORS AFFECTING ABSORPTION:',
      '  Enhance:',
      '    • Ascorbic acid (Vitamin C) - reduces Fe³⁺ to Fe²⁺',
      '    • Meat (heme iron - 25% absorbed)',
      '    • Fasting, iron deficiency state, increased erythropoiesis',
      '    • Acidic pH (gastric acid)',
      '  Inhibit:',
      '    • Phytates (cereals, legumes), oxalates, tannins (tea, coffee)',
      '    • Calcium, phosphates',
      '    • Antacids, H2 blockers, PPIs (↑ pH)',
      '    • Tetracyclines, quinolones (chelation in gut)',
      '    • Hepcidin (iron overload states)',
      '',
      'ORAL PREPARATIONS:',
      '  • Ferrous sulfate: 60-65 mg elemental iron per 325 mg tablet; cheapest and most widely used',
      '  • Ferrous gluconate: 35-37 mg elemental iron per 325 mg; better tolerated',
      '  • Ferrous fumarate: 106 mg elemental iron per 325 mg; high elemental iron content',
      '  • Carbonyl iron: slow release; lower risk of acute toxicity',
      '',
      '  Standard adult dose: 150-200 mg elemental iron/day in divided doses',
      '  Best absorbed: Empty stomach (1 hour before or 2 hours after food)',
      '  Duration: 3 months to correct anemia + 3 months to replenish stores = minimum 6 months',
      '  Monitoring: Reticulocytosis in 5-10 days; Hb rise 1-2 g/dL/week',
      '',
      'PARENTERAL IRON:',
      '  Indications:',
      '    • Malabsorption (celiac, Crohn disease)',
      '    • Intolerance to oral iron',
      '    • Non-compliance with oral therapy',
      '    • Severe iron deficiency requiring rapid repletion',
      '    • Functional iron deficiency in CKD with EPO therapy',
      '    • IBD (oral iron may worsen symptoms)',
      '',
      '  Preparations and routes:',
      '    • Iron sucrose (IV only): Low risk of anaphylaxis; preferred in CKD',
      '    • Ferric carboxymaltose (IV): Can give large doses (up to 1000 mg) at once; safe',
      '    • Iron dextran (IV or IM): Highest anaphylaxis risk; test dose mandatory',
      '    • Ferumoxytol (IV): Approved in USA for CKD',
      '',
      '  Adverse effects of parenteral iron:',
      '    • Anaphylaxis / hypersensitivity (especially iron dextran)',
      '    • Flushing, headache, myalgia, fever (infusion reaction)',
      '    • Hypotension',
      '    • Local pain, skin staining with IM injection (Z-track technique used)',
      '    • Hemosiderosis with overtreatment',
      '',
      'ADVERSE EFFECTS OF ORAL IRON:',
      '  • Nausea, vomiting, epigastric discomfort (most common)',
      '  • Constipation (dark tarry stools → may mask melena)',
      '  • Diarrhea (occasionally)',
      '  • Liquid iron stains teeth (use straw, rinse mouth)',
      '',
      '─────────────────────────────────────────────────────────────',
      'ACUTE IRON TOXICITY (OVERDOSE):',
      '─────────────────────────────────────────────────────────────',
      '',
      'Common in children ingesting adult iron tablets',
      '',
      'Stages:',
      '  Stage 1 (0.5-6 hrs): GI - nausea, vomiting, abdominal pain, hematemesis, bloody diarrhea',
      '  Stage 2 (6-24 hrs): Apparent recovery (may miss this stage clinically)',
      '  Stage 3 (12-48 hrs): Systemic toxicity - metabolic acidosis, shock, coma, hepatic failure',
      '  Stage 4 (2-6 wks): GI scarring - pyloric stenosis, bowel obstruction',
      '',
      'Treatment:',
      '  1. Gastric lavage (if recent ingestion)',
      '  2. Desferrioxamine (Deferoxamine) IV - chelates free iron → ferrioxamine excreted in urine (orange-red "vin rose" urine)',
      '     Dose: 15 mg/kg/hr IV',
      '  3. Supportive: IV fluids, correct acidosis',
      '  4. Oral deferiprone or subcutaneous deferoxamine: for chronic iron overload (thalassemia)',
      '',
      'CHRONIC IRON OVERLOAD (Hemochromatosis):',
      '  • Primary: HFE gene mutation',
      '  • Secondary: Repeated transfusions (thalassemia, sickle cell)',
      '  • Treatment: Phlebotomy (primary), Iron chelators (desferrioxamine, deferasirox, deferiprone)',
    ],
  },
];

hemLAQs.forEach((item, i) => laqBlock(i + 1, item.q, item.ans).forEach(p => children.push(p)));

// ─── FOOTER NOTE ────────────────────────────────────────────────────────────
children.push(pageBreak());
children.push(
  new Paragraph({
    children: [new TextRun({ text: 'QUICK REVISION TABLE: KEY DRUG FACTS', bold: true, size: 28, color: '1F4E79', font: 'Calibri' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 200, after: 200 },
  })
);

const revisionTable = [
  '► GTN (Nitroglycerin): Releases NO → ↑ cGMP → venodilation. Route: Sublingual (avoids first-pass). Use: Acute angina.',
  '► ACE Inhibitors: Inhibit ACE → ↓ Ang II → vasodilation + ↓ aldosterone. SE: Cough (bradykinin), Angioedema, Teratogenic.',
  '► ARBs: Block AT1 receptor. No cough. Same as ACE-I but NO bradykinin effect.',
  '► Amlodipine (CCB): Blocks L-Ca²⁺ channels in vascular SM → vasodilation. Safe in asthma, diabetes, pregnancy (not 1st trimester).',
  '► Digoxin: Inhibits Na+/K+ ATPase → ↑ intracellular Ca²⁺ → +ve inotropy. Toxicity precipitated by hypokalemia. Antidote: Fab antibody.',
  '► Furosemide: Loop diuretic → blocks Na+/K+/2Cl- in LOH. IV for acute pulmonary edema.',
  '► Spironolactone: Aldosterone antagonist → reduces cardiac fibrosis. Mortality benefit in HF (RALES trial). Monitor K+.',
  '► Sacubitril/Valsartan (ARNI): Neprilysin inhibitor + AT1 blocker → ↑ natriuretic peptides. Superior to ACE-I in HFrEF.',
  '► SGLT2 inhibitors: Osmotic diuresis, ↓ preload, direct cardiac benefit. Used in HFrEF and HFpEF.',
  '► Ferrous Sulfate: Oral iron. Absorbed as Fe²⁺ via DMT-1. Enhanced by Vit C. SE: Constipation, dark stools.',
  '► Desferrioxamine: Iron chelator. Treatment of acute iron poisoning and chronic iron overload.',
  '► Vitamin B12 (Cyanocobalamin): Required for myelin synthesis. Pernicious anemia → IM injections lifelong.',
  '► Folic Acid: Required for DNA synthesis. Prevents NTDs. Deficiency → Megaloblastic anemia (no SACD). Drug: Methotrexate inhibits DHFR → folic acid deficiency.',
  '► Methyldopa: Central alpha-2 agonist. Drug of choice for hypertension in pregnancy.',
  '► Hydralazine: Arteriolar dilator. SE: Reflex tachycardia, lupus-like syndrome. Used in hypertensive emergencies in pregnancy.',
];

revisionTable.forEach(line => children.push(para(line)));

// ─── DOCUMENT CREATION ───────────────────────────────────────────────────────
const doc = new Document({
  creator: 'Orris Pharmacology',
  title: 'Pharmacology MCQ SAQ LAQ - Antihypertensives Heart Failure Angina Hematinics',
  description: 'Exam-oriented question bank',
  styles: {
    paragraphStyles: [
      {
        id: 'Heading1',
        name: 'Heading 1',
        basedOn: 'Normal',
        next: 'Normal',
        run: { size: 32, bold: true, color: '1F4E79', font: 'Calibri' },
        paragraph: { spacing: { before: 400, after: 200 } },
      },
      {
        id: 'Heading2',
        name: 'Heading 2',
        basedOn: 'Normal',
        next: 'Normal',
        run: { size: 26, bold: true, color: '2E75B6', font: 'Calibri' },
        paragraph: { spacing: { before: 300, after: 150 } },
      },
      {
        id: 'Heading3',
        name: 'Heading 3',
        basedOn: 'Normal',
        next: 'Normal',
        run: { size: 24, bold: true, color: '375623', font: 'Calibri' },
        paragraph: { spacing: { before: 200, after: 100 } },
      },
    ],
  },
  sections: [
    {
      properties: {},
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: 'PHARMACOLOGY EXAM QUESTION BANK  |  Antihypertensives | Heart Failure | Angina | Hematinics', size: 18, color: '888888', font: 'Calibri' }),
              ],
              alignment: AlignmentType.CENTER,
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: 'Page ', size: 18, color: '888888', font: 'Calibri' }),
                new TextRun({ children: [PageNumber.CURRENT], size: 18, color: '888888', font: 'Calibri' }),
                new TextRun({ text: ' of ', size: 18, color: '888888', font: 'Calibri' }),
                new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 18, color: '888888', font: 'Calibri' }),
              ],
              alignment: AlignmentType.CENTER,
            }),
          ],
        }),
      },
      children,
    },
  ],
});

const OUTPUT = '/home/daytona/workspace/cardio-pharmacology-questions/Pharmacology_MCQ_SAQ_LAQ.docx';
Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync(OUTPUT, buf);
  console.log('SUCCESS: ' + OUTPUT);
}).catch(err => {
  console.error('ERROR:', err);
  process.exit(1);
});
Reading File
Editing File

~/cardio-pharmacology-questions/generate.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/cardio-pharmacology-questions/generate.js'

Hi

Hi! How can I help you?

Hopi opening statement in different cases before starting anything to get the concept in obstetrics and gynae the must mention things in the first of the hpis giving examples

The HPI opening statement in Obs & Gynae must immediately establish the patient's identity frame - age, parity, gestational age (if pregnant), and the chief complaint. This gives the examiner instant context before any details follow.
Here is a complete breakdown:

THE MUST-MENTION ELEMENTS IN THE HPI OPENING STATEMENT

For OBSTETRICS cases, always open with:

ElementWhy it matters
AgeRisk stratification (AMA ≥35, teenage pregnancy)
Gravida / ParaObstetric history at a glance
Gestational ageDetermines what is normal vs abnormal
LMP / EDDConfirms dating
Booking statusBooked vs unbooked
Chief complaintThe presenting problem

For GYNECOLOGY cases, always open with:

ElementWhy it matters
AgeAffects differential diagnosis entirely
Marital/sexual statusRelevant to many conditions
ParityRelevant to prolapse, DUB, fibroids
Menopausal statusPre/peri/post-menopausal
Chief complaintThe presenting problem

OBSTETRICS HPI OPENING EXAMPLES


1. ANTEPARTUM HEMORRHAGE (APH)

"Mrs. X, a 28-year-old G3P2, at 34 weeks gestation by LMP (EDD: [date]), booked, presented to the emergency department with a complaint of sudden, painless, bright red vaginal bleeding of 2 hours duration."
What you established immediately:
  • Age, parity, gestation - rules in/out placenta previa risk
  • "Painless" vs painful - distinguishes placenta previa from abruption
  • Sudden onset, bright red - suggests placenta previa
  • Booked - you know she has had antenatal care

2. PREECLAMPSIA / ECLAMPSIA

"Mrs. X, a 22-year-old primigravida, at 36 weeks gestation, booked, presented with a 2-day history of severe headache and blurring of vision, associated with facial puffiness noticed since morning."
What you established immediately:
  • Primigravida - highest risk group for preeclampsia
  • Late third trimester - peak incidence
  • Headache + visual disturbance - severe feature → risk of eclampsia
  • Facial puffiness - pathological edema

3. PRETERM LABOR

"Mrs. X, a 25-year-old G2P1, at 30 weeks gestation by LMP, booked, presented with intermittent lower abdominal cramping pain of 4 hours duration, associated with a mucoid discharge per vaginum, with no leaking of fluid."
What you established:
  • 30 weeks - clearly preterm (before 37 weeks)
  • Cramping (uterine contractions) + show - signs of labor
  • "No leaking" - distinguishes from PPROM

4. PRELABOUR RUPTURE OF MEMBRANES (PPROM)

"Mrs. X, a 30-year-old G2P1, at 32 weeks gestation, booked, presented with a sudden gush of clear watery fluid per vaginum 3 hours ago, with no associated abdominal pain or fever."
What you established:
  • Preterm gestation - PPROM (before 37 weeks)
  • Sudden gush of clear fluid - characteristic of membrane rupture
  • No pain - not in established labor yet
  • No fever - no chorioamnionitis at presentation

5. HYPEREMESIS GRAVIDARUM

"Mrs. X, a 20-year-old primigravida, at 10 weeks gestation, unbooked, presented with a 2-week history of persistent, severe, intractable vomiting occurring 8-10 times per day, associated with inability to tolerate oral fluids and significant weight loss."
What you established:
  • First trimester - peak time for hyperemesis
  • Primigravida - more commonly affected
  • Persistent, intractable - distinguishes from normal morning sickness
  • Frequency + weight loss - severity markers

6. POSTPARTUM HEMORRHAGE (PPH)

"Mrs. X, a 32-year-old G4P3, who delivered vaginally 2 hours ago at term of a live male infant weighing 4.2 kg, now presents with excessive, continuous per vaginal bleeding estimated at 600 mL, associated with dizziness."
What you established:
  • High parity (G4P4) - major risk factor for uterine atony
  • Time since delivery - primary PPH (within 24 hours)
  • Macrosomic baby (4.2 kg) - over-distended uterus → atony risk
  • 600 mL estimated loss - meets PPH definition (>500 mL vaginal delivery)
  • Dizziness - hemodynamic compromise

7. NORMAL LABOR (Exam OSCE)

"Mrs. X, a 26-year-old G1P0, at 39 weeks gestation, booked, presented in active labor with regular, painful uterine contractions every 3-4 minutes, each lasting 40-50 seconds, associated with a show and intact membranes."
What you established:
  • Term gestation - normal timing
  • Primigravida - progression of labor will differ from multigravida
  • Regular contractions with defined frequency/duration - active phase
  • Show present - cervical changes occurring
  • Membranes intact - SROM not yet occurred

GYNECOLOGY HPI OPENING EXAMPLES


8. DYSFUNCTIONAL UTERINE BLEEDING (DUB) / HEAVY MENSTRUAL BLEEDING

"Miss/Mrs. X, a 38-year-old P2, premenopausal, married, presented with a 6-month history of heavy, prolonged menstrual bleeding lasting 8-10 days per cycle, requiring 6-8 pads per day, associated with passage of clots."
What you established:
  • Age 38 - peak age for fibroids, DUB, endometrial pathology
  • Premenopausal - not postmenopausal bleeding (different differential)
  • Duration, heaviness, clots - quantifies the complaint
  • Pad count - objective severity marker

9. ECTOPIC PREGNANCY

"Miss X, a 24-year-old G1P0, sexually active, LMP 6 weeks ago (period overdue), presented with a 2-day history of right iliac fossa pain associated with light vaginal spotting. She gives a history of previous PID."
What you established:
  • Sexually active + amenorrhea - presume pregnant until proven otherwise
  • Right iliac fossa pain + spotting - classic ectopic triad
  • Previous PID - major risk factor (tubal damage)
  • Unconfirmed pregnancy - urine hCG must follow

10. FIBROID UTERUS (LEIOMYOMA)

"Mrs. X, a 35-year-old P1, premenopausal, presented with a 1-year history of lower abdominal fullness and heaviness, associated with heavy, painful periods and increasing urinary frequency."
What you established:
  • Age 35, premenopausal - peak fibroid age
  • Abdominal fullness - suggests large fibroid
  • Heavy periods + dysmenorrhea - submucous/intramural fibroid
  • Urinary frequency - pressure effect on bladder (cervical/broad ligament fibroid)

11. POSTMENOPAUSAL BLEEDING (PMB)

"Mrs. X, a 58-year-old P3, postmenopausal for 8 years, presented with a 3-week history of painless per vaginal bleeding, soaking 2 pads per day. She is not on any hormone replacement therapy."
What you established:
  • Postmenopausal - ANY bleeding is abnormal → endometrial carcinoma until excluded
  • Age 58 - high-risk age for endometrial cancer
  • Painless - endometrial ca is classically painless
  • Not on HRT - rules out withdrawal bleed as cause

12. PELVIC INFLAMMATORY DISEASE (PID)

"Miss X, a 21-year-old P0, sexually active with multiple partners, presented with a 5-day history of bilateral lower abdominal pain, associated with a purulent vaginal discharge and fever. Her LMP was 2 weeks ago and her urine pregnancy test is negative."
What you established:
  • Young, sexually active, multiple partners - risk profile for STI/PID
  • Bilateral pain + discharge + fever - classic PID triad
  • Pregnancy excluded - important before starting treatment
  • LMP 2 weeks ago - mid-cycle, not dysmenorrhea

QUICK FORMULA TO REMEMBER

OBSTETRICS OPENING =
Age + G/P status + Gestational age + Booking status
+ Chief complaint (onset, duration, character, severity)
+ 1-2 KEY associated features that point to the diagnosis

GYNECOLOGY OPENING =
Age + Parity + Menstrual status (pre/peri/post-menopausal)
+ Marital/sexual status (when relevant)
+ Chief complaint (onset, duration, character)
+ 1-2 KEY associated features

GOLDEN RULES FOR HPI OPENING IN OBS & GYNAE

  1. Never start without age + parity - they change everything
  2. In obstetrics, gestational age is non-negotiable - always state it
  3. "Painless" vs "painful" bleeding - say it explicitly, it differentiates major diagnoses
  4. Booking status - separates high-risk from monitored patients
  5. In gynecology, always state menopausal status - postmenopausal bleeding = cancer until proven otherwise
  6. Mention LMP even in gynecology - rules in/out pregnancy
  7. Quantify everything - number of pads, number of vomiting episodes, weeks of amenorrhea

Pharmacology: create a word document with all mcqs, saqs and laqs antihypertensive + heartfailure + angina +hematinics exam oriented

Reading File
Running Command

ls /home/daytona/workspace/ && node --version && ls /home/daytona/skills/docx/sc…

How to write complete labour pain in hopi systematically

The HPI for labour pain follows a strict systematic structure. Here is the complete framework with a worked example:

COMPLETE HPI FOR LABOUR PAIN - SYSTEMATIC FRAMEWORK


STEP 1 — OPENING STATEMENT (Identity Frame)

Always begin with:
"Mrs. X, a [age]-year-old G[#]P[#], at [gestational age] weeks gestation by LMP (EDD: [date]), [booked/unbooked], presented with [chief complaint]."
Example:
"Mrs. Amina, a 26-year-old G2P1, at 39 weeks gestation by LMP (EDD: 5th June 2026), booked at [hospital], presented with a complaint of labour pains of 6 hours duration."

STEP 2 — CHARACTERIZE THE PAIN (SOCRATES)

Work through each feature systematically:

S — Site

  • Where is the pain located?
  • True labour: starts in the lower back/lumbosacral region → radiates to the lower abdomen and inner thighs
  • False labour (Braxton Hicks): confined to abdomen only, not radiating
"The pain was located in the lower back, radiating to the lower abdomen and inner thighs bilaterally."

O — Onset

  • When did it start?
  • Was onset sudden or gradual?
  • True labour: gradual onset, progressively worsening
"The pain started gradually 6 hours prior to presentation, initially mild and infrequent, progressively increasing in intensity and frequency."

C — Character

  • What type of pain?
  • True labour: cramping, colicky, wave-like (intermittent)
  • The contraction builds up, peaks, then fades — this wave pattern is key
"The pain was cramping and wave-like in character, coming in waves that built up, peaked, and then subsided completely between episodes."

R — Radiation

  • Where does it go?
  • Labour: lower back → lower abdomen → inner thighs
"The pain radiated from the lower back to the lower abdomen and inner thighs."

A — Associated symptoms (most important section — see Step 3)


T — Timing / Pattern

This is CRITICAL in labour — you must describe:
FeatureTrue LabourFalse Labour
FrequencyRegular, progressiveIrregular
Duration per contraction30-60+ secondsShort, variable
IntervalShortening over timeNot shortening
ProgressionGets stronger, longer, closerDoes not progress
"The contractions were occurring every 5 minutes, each lasting approximately 45 seconds, and had been progressively increasing in frequency and intensity since onset."

E — Exacerbating / Relieving factors

  • Labour pain: not relieved by rest or change of position
  • Braxton Hicks: relieved by rest, hydration, change of position
"The pain was not relieved by rest or change of position and continued to increase despite these measures."

S — Severity

  • Pain score (1-10)
  • Effect on daily activity
"The pain was severe, scoring 8/10 on a numerical pain scale, and the patient was unable to carry out daily activities."

STEP 3 — ASSOCIATED SYMPTOMS (Most Examined Part)

Go through each systematically and state present or absent:

1. Show (Bloody Show)

  • Passage of blood-tinged mucus plug
  • Indicates cervical ripening and effacement
"She noticed passage of a blood-tinged mucous discharge (show) approximately 2 hours before the onset of pain."

2. Rupture of Membranes (ROM)

  • Ask: was there a sudden gush OR a slow trickle of fluid?
  • Character: clear, straw-coloured = normal; green/meconium-stained = fetal distress; foul-smelling = chorioamnionitis
"There was no leaking of fluid per vaginum, suggesting membranes are intact."
OR
"She noticed a sudden gush of clear, watery fluid per vaginum 1 hour prior to admission, suggestive of spontaneous rupture of membranes (SROM)."

3. Fetal Movements

  • Ask: is the baby still moving?
  • Decreased/absent fetal movements = fetal distress — must ask!
"Fetal movements were felt to be normal and present up until the time of admission, with the patient reporting approximately 10 movements in the last 2 hours."

4. Bleeding Per Vaginum

  • Any fresh red bleeding separate from show?
  • Bright red, painless = placenta previa
  • Painful + tender uterus = abruption
  • If both pain AND bleeding present together → emergency
"There was no fresh bleeding per vaginum apart from the show."

5. Urinary Symptoms

  • Increased frequency (baby's head pressing on bladder)
  • Difficulty passing urine (obstructed labor risk)
  • Burning micturition (UTI can trigger preterm labor)
"She complained of increased urinary frequency but no dysuria or hematuria."

6. Bowel Symptoms

  • Diarrhea / loose stools often precede labor onset (prostaglandin effect)
  • Constipation (common in pregnancy)
"She reported loose stools since the morning, which she attributed to the onset of labor."

7. Nausea and Vomiting

  • Common during active labor
  • Excessive vomiting → dehydration concern
"She experienced mild nausea with one episode of vomiting during the strong contractions."

8. Fever / Chills

  • If present: suspect chorioamnionitis (infection of membranes)
  • Important if membranes ruptured
"There was no fever, chills, or rigors."

9. Headache / Visual Disturbances / Epigastric Pain

  • Must ask in every obstetric patient - signs of preeclampsia/eclampsia
"She denied any headache, blurring of vision, or epigastric pain."

10. Swelling of Feet / Face

  • Pathological edema = preeclampsia
"There was mild pedal edema, present since 34 weeks, but no facial puffiness."

STEP 4 — ANTENATAL HISTORY (Brief but essential in labour HPI)

"She has been attending antenatal clinic regularly since 8 weeks gestation. Her blood group is B positive. She underwent 2 obstetric ultrasounds, both of which were reported as normal with cephalic presentation confirmed on last scan at 36 weeks. She was screened for gestational diabetes and pre-eclampsia, both of which were negative. Tetanus toxoid vaccination was administered. She was prescribed ferrous sulfate and folic acid throughout pregnancy."

STEP 5 — PREVIOUS OBSTETRIC HISTORY (relevant to current labour)

"Her previous pregnancy was uneventful — she delivered vaginally at term, a live female infant weighing 3.1 kg with no complications. There were no previous cesarean sections, instrumental deliveries, or postpartum hemorrhage."

STEP 6 — CONCLUDING SENTENCE

Always close the HPI with a summary that sets up your clinical assessment:
"In summary, this is a 26-year-old G2P1 at 39 weeks, presenting with progressive, regular, painful uterine contractions every 5 minutes, each lasting 45 seconds, associated with a show, intact membranes, and active fetal movements, consistent with a clinical picture of established labour, with no features to suggest a complication at this stage."

FULL WRITTEN HPI EXAMPLE — LABOUR PAIN

Mrs. Amina, a 26-year-old G2P1+0, at 39 weeks gestation by LMP (EDD: 5th June 2026), booked at General Hospital since 10 weeks, presented with a complaint of labour pains of 6 hours duration.
The pain started gradually 6 hours prior to admission, initially mild and occurring irregularly, but progressively increased in frequency, duration, and intensity. The pain was cramping and wave-like in character, located in the lower back and radiating to the lower abdomen and inner thighs bilaterally. Contractions are currently occurring every 5 minutes, each lasting approximately 45 seconds, and the patient was unable to carry out her daily activities, rating the pain 8/10 in severity. The pain was not relieved by rest or change of position.
Associated with the pain, she noticed a blood-tinged mucous discharge (show) approximately 2 hours before the onset of contractions. No leaking of fluid per vaginum was noted, suggesting intact membranes. Fetal movements were felt to be normal and active, with approximately 10 movements in the past 2 hours. She experienced one episode of vomiting and loose stools this morning. There was no fresh vaginal bleeding, no fever, no headache, no visual disturbances, and no epigastric pain. Mild bilateral pedal edema has been present since 34 weeks with no facial puffiness.
Antenatally, she attended clinic regularly. Blood group B positive. Two ultrasound scans were normal, confirming cephalic presentation at 36 weeks. Screened negative for GDM and pre-eclampsia. Received TT vaccine and was on iron and folate supplements throughout.
Her previous delivery was a normal vaginal delivery at term of a 3.1 kg live baby with no complications. No previous LSCS or instrumental delivery.
In summary, this G2P1 at 39 weeks is presenting with features consistent with established active labour, with no evidence of fetal distress, antepartum hemorrhage, or hypertensive complications at this time.

QUICK CHECKLIST — NEVER FORGET THESE

OPENING:       Age + G/P + Gestation + Booking + Chief complaint
PAIN:          Site / Onset / Character (wave-like) / Radiation
TIMING:        Frequency + Duration per contraction + Interval shortening
ASSOCIATED:    Show / ROM (gush or trickle, colour) / Fetal movements
               Fresh bleeding / Urinary / Bowel / Nausea/vomiting
               Fever / Headache / Visual changes / Epigastric pain / Edema
ANTENATAL:     Scans / Blood group / Screening tests / Vaccinations / Medications
PREVIOUS OB:   Mode of delivery / Complications / LSCS scar
SUMMARY:       One closing sentence with provisional diagnosis

Can history after the mother has delivered either through C sections or normal what could be the common complaints each of them separately

POSTPARTUM COMPLAINTS — AFTER NORMAL VAGINAL DELIVERY vs CAESAREAN SECTION


PART A: AFTER NORMAL VAGINAL DELIVERY (NVD)


1. PERINEAL PAIN / WOUND PAIN

Most common complaint after NVD
  • Due to: episiotomy, perineal tears (1st–4th degree), or labial lacerations
  • Character: burning, stinging, soreness at the perineum
  • Worsened by: sitting, walking, passing urine/stool
  • Ask about:
    • Was episiotomy done? Which side (mediolateral/midline)?
    • Degree of tear (if known)
    • Any signs of wound infection: swelling, discharge, foul smell, wound breakdown
    • Difficulty sitting — "ring cushion" use
"She complains of severe perineal pain and inability to sit comfortably since delivery, with noticed swelling and discharge from the episiotomy site."

2. DIFFICULTY IN PASSING URINE (Urinary Retention)

  • Very common in first 24–48 hours after NVD
  • Causes:
    • Perineal edema compressing urethra
    • Pain inhibiting micturition reflex
    • Epidural analgesia effect
    • Pudendal nerve neuropraxia
  • Ask: when did she last pass urine? Any burning? Any dribbling?
"She has been unable to pass urine since delivery 8 hours ago and complains of lower abdominal fullness and discomfort."

3. URINARY INCONTINENCE / STRESS INCONTINENCE

  • Leaking urine on coughing, sneezing, laughing
  • Due to: pelvic floor muscle damage, pudendal nerve injury during labor
  • More common after prolonged labor, macrosomic baby, instrumental delivery
  • May be temporary (resolves in weeks) or persistent

4. DIFFICULTY PASSING STOOL / CONSTIPATION

  • Fear of pain when straining (perineal wound)
  • Reduced bowel motility post-delivery
  • Dehydration, dietary changes
  • Ask: last bowel motion? Straining? Pain on defecation?
"She has not had a bowel motion since delivery 3 days ago, and is afraid to strain due to perineal pain."

5. HAEMORRHOIDS (PILES) — WORSENING

  • Pre-existing piles worsened by pushing/bearing down during second stage
  • Present as: perianal pain, itching, bleeding on defecation, prolapsed piles
  • Very common postpartum complaint

6. POSTPARTUM HEMORRHAGE (PRIMARY — within 24 hrs)

  • Excessive vaginal bleeding after delivery
  • Causes (4 T's): Tone (uterine atony — most common), Trauma (lacerations), Tissue (retained placenta), Thrombin (coagulopathy)
  • Ask: how many pads soaked? Passing clots? Dizziness/fainting?
"She complains of heavy per vaginal bleeding soaking 4 pads in 1 hour, associated with dizziness and passage of large clots, occurring 2 hours after delivery."

7. SECONDARY PPH (24 hrs – 6 weeks)

  • Heavy PV bleeding after initial normal lochia
  • Causes: retained products of conception (RPOC), endometritis, subinvolution of uterus
  • Associated: foul-smelling lochia, fever, uterine tenderness

8. ABNORMAL LOCHIA

  • Normal lochia: rubra (red, 1–4 days) → serosa (pink/brown, 4–10 days) → alba (white/yellow, up to 6 weeks)
  • Abnormal:
    • Foul-smelling lochia = endometritis
    • Heavy lochia beyond day 4 = retained products / subinvolution
    • Sudden increase after initial decrease = RPOC
"She noticed foul-smelling, brownish vaginal discharge with fever since day 3 post-delivery."

9. BREAST PROBLEMS

ComplaintCause
Breast engorgementMilk let-down on day 2–4; bilateral, painful, hard breasts
Nipple soreness / crackingIncorrect latching technique
MastitisBlocked duct + bacterial infection (Staph aureus); unilateral red hot tender breast + fever
Breast abscessUntreated mastitis → fluctuant swelling requiring drainage
Failure to lactateSheehan's syndrome, psychological, anatomical

10. AFTERPAINS (UTERINE CRAMPS)

  • Uterine involution contractions
  • More severe in multiparous women and during breastfeeding (oxytocin release)
  • Lower abdominal cramping, intermittent
  • Normal up to first few days; should resolve

11. POSTPARTUM DEPRESSION / BABY BLUES

  • Baby blues (day 3–5): tearfulness, anxiety, mood swings — normal, resolves spontaneously
  • PPD (2 weeks to 6 months): persistent low mood, inability to bond, insomnia, guilt — requires treatment
  • Postpartum psychosis (rare, within 2 weeks): hallucinations, confusion — emergency

12. PERINEAL WOUND INFECTION / DEHISCENCE

  • Redness, swelling, pus discharge, wound opening
  • Fever
  • Foul smell
  • Inability to sit

13. DEEP VEIN THROMBOSIS (DVT)

  • Calf pain, swelling, redness, warmth in one leg
  • Postpartum hypercoagulable state
  • Risk increases with prolonged labor, dehydration, immobility


PART B: AFTER CAESAREAN SECTION (LSCS)


1. WOUND PAIN (Most Dominant Complaint)

  • Pfannenstiel incision site pain
  • Character: sharp, burning, throbbing at lower abdomen
  • Worsened by: movement, coughing, getting up from bed, passing stool (straining)
  • Ask:
    • Type of anesthesia (spinal/epidural/GA)
    • Wound appearance: is it clean, swollen, discharging?
    • When was last analgesia given?
"She complains of severe lower abdominal wound pain, 9/10 in severity, worsened by movement and coughing, requiring regular analgesia."

2. WOUND INFECTION / DEHISCENCE

  • Signs: redness, warmth, swelling, pus/seropurulent discharge, wound opening
  • Fever, raised WBC
  • Risk factors: diabetes, obesity, emergency LSCS, prolonged surgery
  • Timing: usually day 3–7 post-op
"On day 5 post-LSCS, she presented with redness, swelling and yellowish discharge from the wound, associated with fever of 38.5°C."

3. ABDOMINAL DISTENSION / PARALYTIC ILEUS

  • Very common after LSCS, especially if general anesthesia used
  • Inability to pass flatus/stool
  • Abdominal bloating, discomfort
  • Ask: has she passed flatus? Any bowel motion? Nausea/vomiting?
  • Management: early ambulation, fluids, bowel stimulation
"She complains of progressive abdominal distension and inability to pass flatus since surgery 48 hours ago."

4. URINARY CATHETER DISCOMFORT / UTI

  • Indwelling Foley catheter placed during LSCS
  • After catheter removal: burning micturition, frequency, urgency
  • UTI risk: dysuria, cloudy urine, fever
  • Urinary retention after catheter removal
"Following catheter removal on day 1 post-op, she complains of burning micturition and increased frequency."

5. DIFFICULTY MOBILIZING / BACK PAIN

  • Spinal anesthesia: backache at injection site (common, usually temporary)
  • Muscle soreness from positioning on operating table
  • Hesitancy to walk due to wound pain
  • Post-dural puncture headache (if dural tap occurred): severe positional headache, worse when upright, relieved by lying flat
"She complains of a severe headache since spinal anesthesia, worse on sitting or standing and relieved completely on lying flat — consistent with a post-dural puncture headache."

6. NAUSEA AND VOMITING

  • Common after spinal anesthesia (hypotension-related) or GA
  • Opioid analgesic side effect (morphine given post-LSCS)
  • May affect ability to eat, breastfeed, mobilize

7. DEEP VEIN THROMBOSIS / PULMONARY EMBOLISM

  • LSCS carries higher DVT/PE risk than NVD
  • DVT: unilateral leg pain, swelling, redness, warmth
  • PE: sudden breathlessness, chest pain, hemoptysis, tachycardia
  • All LSCS patients need TED stockings + LMWH prophylaxis
"On day 3 post-LSCS, she presents with sudden onset breathlessness and right-sided pleuritic chest pain — PE must be excluded."

8. HAEMATOMA / SEROMA AT WOUND SITE

  • Collection of blood (haematoma) or serum (seroma) under the incision
  • Presents as: fluctuant swelling at wound, pain, sometimes with overlying bruising
  • If infected: fever, wound breakdown

9. POSTPARTUM HEMORRHAGE

  • After LSCS: PPH can still occur
  • Uterine atony (most common)
  • Bleeding from uterine angles/extensions of incision
  • Broad ligament haematoma (concealed)
  • Ask: how many pads? Dizziness? Drop in BP?

10. BREAST PROBLEMS

  • Same as after NVD (engorgement, mastitis, nipple soreness)
  • Breastfeeding initiation may be delayed due to:
    • Post-op pain limiting positioning
    • Effect of anesthesia/analgesia on alertness of baby
    • Delayed skin-to-skin contact

11. SHOULDER TIP PAIN

  • Diaphragmatic irritation from residual intraperitoneal blood or gas
  • Referred pain to right shoulder tip
  • Usually resolves within 24–48 hours
  • Distinguish from pulmonary cause
"She complains of right shoulder tip pain since surgery, likely referred pain from diaphragmatic irritation."

12. ILEUS vs BOWEL OBSTRUCTION

  • Prolonged inability to pass flatus/stool beyond 72 hours
  • Abdominal distension, vomiting
  • Adhesion-related obstruction can occur, especially with previous LSCS
  • Ask: any previous abdominal surgeries?

13. PSYCHOLOGICAL COMPLAINTS

  • Feelings of failure/guilt about not delivering vaginally
  • Emergency LSCS: anxiety, PTSD symptoms, flashbacks
  • Fear of future pregnancies (VBAC concern)
  • PPD equally common after LSCS


SIDE-BY-SIDE COMPARISON TABLE

ComplaintAfter NVDAfter LSCS
Wound painPerineal/episiotomyAbdominal incision
UrinaryRetention, stress incontinenceUTI post-catheter, retention
BowelConstipation, hemorrhoidsParalytic ileus, constipation
BleedingPPH (atony, RPOC, trauma)PPH (atony, incision bleeding)
InfectionPerineal wound, endometritisWound infection, endometritis
Specific painAfterpains, perineal burnShoulder tip pain, back pain
HeadacheRarePost-dural puncture headache
DVT/PE riskModerateHigher
BreastfeedingUsually immediateMay be delayed
PsychologicalBaby blues, PPDPPD, guilt, PTSD (emergency LSCS)
AmbulationEarlier, easierDelayed due to wound
Nausea/vomitingLess commonMore common (spinal/opioids)

QUICK MEMORY AID

AFTER NVD — think PERINEUM first, then BLEEDING, then BREASTFEEDING
  Perineal pain → Episiotomy wound → Retention → Constipation
  → PPH → Lochia abnormality → Breast problems → Baby blues

AFTER LSCS — think WOUND first, then GIT, then DVT, then HEADACHE
  Wound pain → Wound infection → Ileus → Urinary catheter issues
  → DVT/PE → Post-dural headache → Shoulder tip pain → Breast issues

Now write the hpi common in the nvd and cs

COMPLETE HPI WRITING — POSTPARTUM COMPLAINTS

AFTER NORMAL VAGINAL DELIVERY (NVD) AND CAESAREAN SECTION (CS)


PART A: AFTER NORMAL VAGINAL DELIVERY


HPI 1 — PERINEAL WOUND PAIN / EPISIOTOMY INFECTION

Mrs. X, a 28-year-old G2P2, delivered vaginally 4 days ago at 39 weeks gestation of a live female infant weighing 3.2 kg, with a right mediolateral episiotomy done, now presented with a complaint of worsening perineal pain and wound discharge of 2 days duration.
The pain was located at the perineum, at the episiotomy site, constant in character, rated 8/10 in severity, and significantly worsened by sitting, walking, and during micturition. It was not relieved by the paracetamol she was taking. She noticed a yellowish-greenish discharge from the wound with a foul odor since day 2 post-delivery, associated with swelling and redness at the site. She reported fever of 38.5°C since yesterday with chills. She denied any fresh vaginal bleeding, though lochia was present and described as brownish with no foul smell distinct from the wound discharge. She had no difficulty passing urine but experienced pain on micturition when urine touched the wound. She had not had a bowel motion since delivery due to fear of pain on straining.
Breastfeeding was initiated and ongoing. No headache, visual disturbances, or epigastric pain. No calf pain or swelling in the legs.
In summary, this is a G2P2 on day 4 post-NVD presenting with features consistent with episiotomy wound infection, characterized by local signs of infection, purulent discharge, and systemic fever.

HPI 2 — PRIMARY POSTPARTUM HEMORRHAGE (PPH)

Mrs. X, a 32-year-old G4P4, delivered vaginally 2 hours ago at 40 weeks gestation of a live male infant weighing 4.3 kg, now presented with a complaint of excessive per vaginal bleeding since delivery.
Immediately following delivery of the placenta, she was noted to have continuous, heavy, bright red vaginal bleeding. She has soaked 5 pads within 2 hours and is passing large clots. The bleeding has been persistent and non-abating. She complains of dizziness, lightheadedness, and feels she might faint on sitting up. She is also experiencing palpitations and feels cold and clammy. She denies abdominal pain at rest, though the uterus feels soft per the attending nurse. There is no known history of bleeding disorder and she was not on any anticoagulants. She had a similar episode of heavy bleeding after her 3rd delivery which resolved with an oxytocin injection.
She is a grand multipara, and the baby was macrosomic — both are major risk factors for uterine atony. Placenta was delivered complete. Episiotomy was not performed. No instrumental delivery.
No fever, no foul-smelling discharge. Breastfeeding not yet initiated.
In summary, this G4P4 grand multipara, 2 hours post-NVD of a macrosomic infant, is presenting with heavy per vaginal bleeding with hemodynamic compromise, consistent with primary PPH, most likely due to uterine atony.

HPI 3 — URINARY RETENTION AFTER NVD

Mrs. X, a 24-year-old primipara, delivered vaginally 10 hours ago at 38+5 weeks gestation following a prolonged second stage of 2.5 hours with vacuum-assisted delivery, now presents with inability to pass urine since delivery.
She has been unable to void since delivery despite feeling a strong urge to pass urine, associated with increasing lower abdominal discomfort and a sensation of fullness in the bladder. She describes the urge as very uncomfortable but every attempt to void produces only a few drops or nothing at all. She denies burning micturition, fever, or flank pain. No vaginal bleeding beyond normal lochia. Perineal pain is present at the episiotomy site but rated 5/10. Lochia is normal, red in color, and in moderate quantity.
She received epidural analgesia during labor. Delivery was vacuum-assisted due to prolonged second stage. Episiotomy was performed. She received oxytocin infusion post-delivery. She has had no bowel motion but is not distressed by this.
In summary, this primipara, 10 hours post-instrumental NVD with epidural analgesia, is presenting with acute urinary retention, likely multifactorial — perineal edema, epidural effect, and pudendal nerve neuropraxia from prolonged second stage.

HPI 4 — SECONDARY PPH / RETAINED PRODUCTS OF CONCEPTION

Mrs. X, a 26-year-old G1P1, delivered vaginally 12 days ago at 39 weeks gestation of a live infant, now presents with a complaint of sudden heavy per vaginal bleeding since this morning.
Lochia had initially been normal — red for 4 days, then gradually became pinkish-brown and was reducing appropriately. However, this morning she noticed a sudden, heavy, bright red, fresh per vaginal bleed, soaking 3 pads in 2 hours, associated with passage of greyish-white fleshy tissue and clots. The bleeding is associated with lower abdominal crampy pain and a foul-smelling vaginal discharge since yesterday, suggesting possible infection. She also reports a low-grade fever of 37.9°C since yesterday. She feels weak and dizzy. Breastfeeding has been ongoing.
She denies any trauma, instrumentation, or sexual intercourse since delivery. Placental delivery was described as "possibly incomplete" by the attending midwife at time of delivery.
In summary, this G1P1, day 12 post-NVD, presents with secondary PPH with associated features of endometritis and passage of tissue, strongly suggesting retained products of conception (RPOC) with secondary infection.

HPI 5 — MASTITIS AFTER NVD

Mrs. X, a 25-year-old primipara, delivered vaginally 10 days ago, now presents with a 3-day history of left breast pain, redness, and fever.
She noticed that her left breast became progressively hard, red, hot, and exquisitely tender over the past 3 days. The pain is constant, rated 7/10, worsened by touch and breastfeeding. She has been breastfeeding exclusively but has difficulty latching the baby on the left side due to pain, leading to milk stasis. She reports a fever of 38.8°C with rigors and general malaise since yesterday. The right breast is normal. No nipple discharge other than breast milk. No fluctuance noticed (no pus collection felt). She is otherwise well, lochia is normal, and no perineal complaints.
On direct questioning, she admits the baby's latch on the left side has been poor since birth.
In summary, this primipara on day 10 post-NVD presents with unilateral left breast inflammation, fever, and poor latch history, consistent with lactational mastitis, likely secondary to milk stasis and bacterial superinfection.


PART B: AFTER CAESAREAN SECTION (LSCS)


HPI 6 — WOUND INFECTION AFTER LSCS

Mrs. X, a 30-year-old G2P2, underwent elective lower segment caesarean section (LSCS) 6 days ago for a previous scar, delivered a live male infant of 3.5 kg, now presents with a complaint of wound pain, swelling, and discharge from the incision site of 3 days duration.
She was doing well for the first 2–3 days post-operatively with mild wound pain that was well-controlled with analgesics. However, from day 3 she noticed progressive redness, warmth, and swelling at the Pfannenstiel incision site. Since yesterday, she has noticed a yellowish-greenish, foul-smelling discharge oozing from the medial aspect of the wound, and the wound appears to have partially opened. The pain at the wound site has worsened to 8/10, and she is unable to stand straight or walk comfortably. She developed a fever of 39°C since last night with rigors. She denies any abdominal distension, nausea, or vomiting. Lochia is normal with no foul smell. No per vaginal bleeding. Urine output is normal. Breastfeeding is ongoing.
She is a known diabetic on insulin — a major risk factor for wound infection and poor healing. BMI is 34. The surgery lasted approximately 75 minutes.
In summary, this G2P2, day 6 post-LSCS, diabetic patient presents with classic features of surgical site infection (SSI) with partial wound dehiscence, requiring wound assessment, swab culture, and systemic antibiotics.

HPI 7 — PARALYTIC ILEUS / ABDOMINAL DISTENSION AFTER LSCS

Mrs. X, a 29-year-old G1P1, underwent emergency LSCS 3 days ago under general anesthesia for fetal distress, now presents with a complaint of abdominal distension, inability to pass flatus, and nausea of 2 days duration.
From day 1 post-operatively, she noticed progressive abdominal bloating and distension, associated with constant, diffuse abdominal discomfort rated 5/10. She has been unable to pass flatus or stool since the operation. She has had 3 episodes of vomiting today, bilious in nature. She is unable to tolerate oral feeds — every attempt to drink fluids results in nausea and vomiting. She has had no bowel sounds heard (per her nurse). She denies any fever. Wound pain is present but well-controlled. Urine output via catheter has been adequate. She has not had a bowel motion since surgery.
She underwent general anesthesia, received morphine via PCA post-operatively for pain management, and required extensive bowel handling during surgery due to dense adhesions from a previous appendicectomy 3 years ago.
In summary, this G1P1, day 3 post-emergency LSCS under GA, with prolonged surgery and opioid analgesia, presents with post-operative paralytic ileus, likely multifactorial — GA, morphine, bowel handling, and prior adhesions.

HPI 8 — POST-DURAL PUNCTURE HEADACHE AFTER LSCS

Mrs. X, a 23-year-old G1P1, underwent elective LSCS 2 days ago under spinal anesthesia, now presents with a severe headache since yesterday.
She developed a severe, throbbing headache over the occipital and frontal regions since yesterday, approximately 24 hours after spinal anesthesia. The headache is rated 9/10 and has a very characteristic positional nature — it is completely absent when she is lying flat but comes on within 30 seconds of sitting up or standing, and is promptly relieved on lying back down. It is associated with nausea, one episode of vomiting, neck stiffness, and photophobia. She denies any fever, visual disturbances, or weakness of limbs. No previous history of migraines. The headache is unlike any she has experienced before.
She recalls that the anesthesiologist made "two attempts" at the spinal injection, raising the concern for inadvertent dural tap. She has been unable to sit up to breastfeed her baby since the headache started.
In summary, this G1P1, day 2 post-LSCS under spinal anesthesia with possible difficult needle placement, presents with a classical post-dural puncture headache (PDPH), characterized by its strict postural nature, severe intensity, and onset within 24 hours of spinal anesthesia.

HPI 9 — DVT AFTER LSCS

Mrs. X, a 35-year-old G3P3, underwent elective LSCS 5 days ago for placenta previa, now presents with a complaint of right calf pain and swelling of 2 days duration.
She noticed progressive pain and swelling in the right lower leg starting 2 days after surgery. The pain is constant, aching in character, located in the right calf, rated 6/10, and worsened by walking and dorsiflexion of the foot. The affected calf is visibly swollen compared to the left, with overlying skin warmth and redness. She denies any breathlessness, chest pain, or hemoptysis (important to exclude PE). She has been relatively immobile since the surgery due to wound pain. She was not given thromboprophylaxis (TED stockings or LMWH) post-operatively, and was on bed rest for most of her antenatal admission due to placenta previa.
She is 35 years old (AMA), BMI 31, had LSCS (surgical risk), was immobile antenatally, and had no thromboprophylaxis — multiple risk factors for DVT.
In summary, this G3P3, day 5 post-LSCS, with multiple risk factors for venous thromboembolism, presents with clinical features strongly suggesting deep vein thrombosis (DVT) of the right lower limb, requiring urgent Doppler ultrasound and anticoagulation.

HPI 10 — PULMONARY EMBOLISM AFTER LSCS

Mrs. X, a 33-year-old G2P2, underwent emergency LSCS 4 days ago, now presents with a sudden onset of breathlessness and chest pain of 2 hours duration.
She was recovering normally post-LSCS until 2 hours ago when she suddenly developed severe breathlessness at rest. The breathlessness came on acutely, is persistent, and has not improved with lying down. Associated with the breathlessness is right-sided, sharp, pleuritic chest pain worsened by deep breathing. She also reports a single episode of coughing up a small amount of blood-tinged sputum. She denies fever, productive cough, or wheeze. No leg pain or swelling is reported (though this does not exclude PE). Heart rate is 118/min per the nurse. She is anxious and distressed.
She had an emergency LSCS for PPH, was immobile post-operatively, and received only 1 dose of LMWH. She had no antenatal thromboprophylaxis.
In summary, this G2P2, day 4 post-emergency LSCS, presents with sudden-onset pleuritic chest pain, hemoptysis, and tachycardia — this is a clinical emergency and pulmonary embolism must be excluded immediately.


MASTER TEMPLATE — POSTPARTUM HPI STRUCTURE

OPENING:
"Mrs. X, [age]-year-old G[#]P[#], delivered [vaginally/by LSCS]
[# hours/days] ago at [gestation] weeks of a [live/stillborn]
[male/female] infant weighing [X] kg [+any key intrapartum details],
now presents with [chief complaint] of [duration]."

THEN COVER IN ORDER:
1. ONSET — when exactly (hours/days post-delivery)
2. CHARACTER — type, severity, site of complaint
3. PROGRESSION — getting better/worse/same
4. ASSOCIATED SYMPTOMS — specific to the complaint
5. RELEVANT NEGATIVES — always deny the dangerous alternatives
6. LOCHIA — normal vs abnormal (always mention)
7. BREASTFEEDING — established, ongoing, or problems
8. GENERAL WELL-BEING — fever, appetite, mobility, mood
9. RISK FACTORS — mention the risk factors embedded in history
10. CLOSING SUMMARY — one sentence with working diagnosis

On the obstetrics part of the history what do u ask

OBSTETRIC HISTORY — COMPLETE SYSTEMATIC FRAMEWORK


WHY THE OBSTETRIC HISTORY IS SPECIAL

In any obstetric patient, the history has two patients — the mother and the fetus. Every question you ask is aimed at identifying risk to either or both. The obstetric history is taken in addition to the standard medical history and has its own dedicated sections.

THE COMPLETE OBSTETRIC HISTORY FRAMEWORK


SECTION 1 — MENSTRUAL HISTORY

Asked first — forms the foundation of all obstetric dating

Questions to ask:

QuestionWhy it matters
LMP — first day of last menstrual periodCalculates gestational age and EDD
Regularity of cyclesIrregular cycles → LMP unreliable for dating
Cycle lengthStandard is 28 days; adjust EDD if different
Duration of flowHeavy/light — baseline for comparison
Was LMP normal in flow and timing?An abnormal LMP may actually be implantation bleeding
Any contraception just before conception?OCP withdrawal bleed can mimic LMP and mislead dating

EDD Calculation (Naegele's Rule):

EDD = LMP + 9 months + 7 days OR LMP + 280 days (40 weeks)

Example:

"Her LMP was 1st September 2025, regular 28-day cycles, normal flow and duration. EDD calculated as 8th June 2026. Current gestational age is 39 weeks."

SECTION 2 — CURRENT PREGNANCY HISTORY (Present Pregnancy)

The most detailed section — goes trimester by trimester

A. BOOKING DETAILS

QuestionSignificance
Booked or unbooked?Unbooked = higher risk, no prior screening
Where booked?Hospital, clinic, private
Gestational age at first booking visit?Ideally before 12 weeks
How many ANC visits?Assess adequacy of care
"She booked at General Hospital at 10 weeks gestation and attended 7 antenatal visits regularly."

B. FIRST TRIMESTER (0 – 12 weeks)

QuestionSignificance
Nausea and vomitingNormal vs hyperemesis gravidarum
Any bleeding in 1st trimester?Threatened/complete/incomplete/missed abortion
Nuchal translucency scan done?Chromosomal anomaly screening
Dating ultrasound done?Confirms gestational age if LMP unreliable
Combined screening test (PAPP-A, free beta-hCG)?Down syndrome, trisomy risk
Any D&C or surgical procedure done?For incomplete abortion — risk of Asherman's
Medications taken in 1st trimester?Teratogen exposure
Fever or infections in 1st trimester?TORCH infections, rubella
"The first trimester was uneventful. A dating scan at 9 weeks confirmed gestational age consistent with LMP. No bleeding or pain. Nuchal translucency was 1.8 mm — normal."

C. SECOND TRIMESTER (13 – 28 weeks)

QuestionSignificance
Anomaly scan at 18–20 weeks?Structural fetal abnormalities
Any abnormalities found on scan?Placenta location, amniotic fluid, fetal anatomy
Fetal movements first felt (quickening)?Primigravida ~20 weeks; multigravida ~16–18 weeks
Any bleeding?Placenta previa, cervical incompetence
Cervical length scan done?Cervical incompetence screening
Any hospitalization?Threatened preterm labor, cervical suture
GDM screening (OGTT) done?At 24–28 weeks; result?
BP readings during this period?Early preeclampsia, chronic hypertension
Any infections (UTI, vaginal discharge)?Risk for preterm labor
"Anomaly scan at 20 weeks showed no structural fetal abnormalities. Placenta was posterior, clear of the os. AFI normal. OGTT at 26 weeks was negative for GDM. No bleeding or contractions during this trimester."

D. THIRD TRIMESTER (28 weeks – delivery)

QuestionSignificance
Repeat growth scans done?IUGR, macrosomia, placental position
Fetal presentation confirmed?Cephalic/breech/transverse
Any swelling of feet/face?Preeclampsia
Any headache, visual disturbances, epigastric pain?Severe features of preeclampsia
Any bleeding?APH — placenta previa vs abruption
BP readings — any hypertension?Gestational hypertension, PIH
Urine dipstick — any proteinuria?Preeclampsia
Any leaking of fluid?PPROM
Any contractions before term?Preterm labor
GBS swab done (35–37 weeks)?Group B Streptococcus — neonatal sepsis risk
Fetal kick chart maintained?Monitors fetal well-being
"In the third trimester, repeat growth scan at 34 weeks showed appropriate growth with cephalic presentation. No edema, no headache, no visual disturbances. BP consistently below 130/80 mmHg. No proteinuria on dipstick. No contractions or leaking before term."

E. INVESTIGATIONS DURING THIS PREGNANCY

Always ask about all routine investigations:
InvestigationNormal Finding to Confirm
Blood group and Rh typeIf Rh negative → Anti-D prophylaxis given?
Full blood countAnaemia? Thrombocytopenia?
Blood pressure readingsTrend throughout pregnancy
Urine microscopy / dipstickProtein, glucose, nitrites, cells
OGTT (24–28 wks)GDM screen result
VDRL/RPRSyphilis screening
HIV testPMTCT counselling and treatment
Hepatitis B surface antigenNeonatal vaccination planning
Rubella serologyImmune or susceptible
Thyroid functionHypothyroidism in pregnancy
Mid-stream urine cultureAsymptomatic bacteriuria
Ultrasound scansDating, anomaly, growth, placenta
"Blood group O positive. Hb was 10.2 g/dL at 28 weeks — on iron and folic acid supplementation. HIV negative. VDRL non-reactive. HBsAg negative. OGTT negative."

F. MEDICATIONS IN THIS PREGNANCY

MedicationReason
Folic acidNeural tube defect prevention
Ferrous sulfateIron deficiency anaemia
Aspirin (low dose)High-risk preeclampsia prevention
ProgesteroneThreatened miscarriage, cervical incompetence
Insulin / MetforminGDM management
AntihypertensivesMethyldopa, labetalol, nifedipine
AntibioticsUTI, GBS prophylaxis
Thyroid medicationsLevothyroxine for hypothyroidism
Anti-D immunoglobulinIf Rh negative
"She was prescribed ferrous sulfate 200 mg BD, folic acid 5 mg OD, and low-dose aspirin 75 mg OD from 12 weeks due to nulliparity and chronic hypertension."

G. VACCINATIONS

VaccineWhen given
Tetanus toxoid (TT)2 doses: ideally 1st at booking, 2nd 4 weeks later
Influenza vaccineRecommended any trimester
COVID-19 vaccineAs per national guidelines
Tdap (whooping cough)27–36 weeks ideally
"Tetanus toxoid: 2 doses received — first at 14 weeks, second at 18 weeks."

SECTION 3 — PAST OBSTETRIC HISTORY

Go through EVERY previous pregnancy in order — chronologically

For EACH previous pregnancy ask:

Year → GA at delivery → Mode of delivery → Sex and weight of baby
→ Outcome (alive/stillbirth/neonatal death) → Complications
QuestionSignificance
How many pregnancies? (Gravida)Establishes G/P status
How many deliveries? (Para)
How many living children?
Any miscarriages / abortions?Recurrent miscarriage — investigate cause
Any ectopic pregnancies?Risk for future ectopics
Any stillbirths or neonatal deaths?Cause — recurrence risk
Mode of previous deliveriesNVD / LSCS / Instrumental
Previous LSCS — what was the indication?Recurrent vs non-recurrent cause
Type of uterine incisionLSCS — risk of uterine rupture in VBAC
Any previous PPH?Recurrence risk — grand multipara
Previous prolonged labour?Suspect CPD
Previous big baby (macrosomia)?GDM, recurrence
Previous preeclampsia?High risk of recurrence
Previous preterm delivery?Risk for preterm in current pregnancy
Previous GDM?Risk of recurrence and Type 2 DM
Previous congenital anomaly?Genetic counselling, repeat anomaly scan
Previous Rh sensitization?Antibody titres monitoring

Example:

"G3P2+0. First pregnancy in 2018 — NVD at term, live male, 3.0 kg, no complications. Second pregnancy in 2021 — emergency LSCS at 37 weeks for fetal distress, live female, 2.9 kg, no PPH. No history of miscarriages, ectopics, or neonatal deaths."

SECTION 4 — GYNECOLOGICAL HISTORY

QuestionSignificance
Any previous gynaecological surgeries?Myomectomy, cervical surgery — affects delivery
History of fibroids?May obstruct labour, increase PPH risk
History of cervical procedures (LLETZ, cone biopsy)?Cervical incompetence, preterm risk
History of STIs / PID?Tubal damage, ectopic risk
Abnormal cervical smears?HPV — premalignant lesions
Any known uterine anomalies?Bicornuate, septate — miscarriage, malpresentation
Last Pap smear result?

SECTION 5 — MEDICAL AND SURGICAL HISTORY

QuestionSignificance
Diabetes mellitusGDM risk, macrosomia, stillbirth
Hypertension (pre-existing)Superimposed preeclampsia risk
Cardiac diseaseHigh-risk obstetrics
Thyroid diseaseHypothyroid/hyperthyroid in pregnancy
EpilepsyAntiepileptic drug teratogenicity
AsthmaSafe medications in pregnancy
SLE / antiphospholipid syndromeRecurrent miscarriage, IUGR, thrombosis
Renal diseasePreeclampsia, preterm delivery
Sickle cell disease / thalassaemiaAnaemia, crisis, transfusion
Thromboembolism historyAnticoagulation in pregnancy
Previous abdominal surgeriesAdhesions — difficult LSCS
HIV statusPMTCT — ARV therapy
TuberculosisDrug interactions, neonatal BCG

SECTION 6 — DRUG HISTORY AND ALLERGIES

  • All medications taken before and during pregnancy
  • Over-the-counter drugs, herbal remedies
  • Teratogenic drug exposure (Accutane, ACE inhibitors, warfarin, methotrexate, valproate)
  • Drug allergies — specify reaction type

SECTION 7 — FAMILY HISTORY

QuestionSignificance
Hypertension / diabetes in familyGenetic risk
Multiple pregnancies (twins)Familial dizygotic twinning
Congenital anomalies in familyGenetic counselling needed
Thalassaemia / haemoglobinopathyPartner screening, fetal genotype
Clotting disordersThrombophilia screening

SECTION 8 — SOCIAL HISTORY

QuestionSignificance
Marital statusSocial support
OccupationTeratogen exposure, physical demands
SmokingIUGR, placental abruption, prematurity
AlcoholFetal alcohol syndrome
Illicit drug useNAS, IUGR, HIV risk
Domestic violenceScreen sensitively — affects ALL pregnancies
Nutritional statusAnaemia, vitamin deficiencies
Financial/housing situationSocial risk factors
Religion / cultural beliefsBlood transfusion refusal, birth preferences
Support at homeWho will help postpartum?

COMPLETE OBSTETRIC HISTORY — QUICK CHECKLIST

1. MENSTRUAL HISTORY
   LMP → Cycle regularity → EDD calculation → Contraception before pregnancy

2. CURRENT PREGNANCY
   Booking details → 1st trimester (scans, bleeding, nausea)
   → 2nd trimester (anomaly scan, GDM, QF)
   → 3rd trimester (growth scans, presentation, BP, swelling)
   → Investigations (bloods, urine, scans)
   → Medications → Vaccinations

3. PAST OBSTETRIC HISTORY
   Each pregnancy: Year / GA / Mode of delivery / Baby outcome / Complications

4. GYNAECOLOGICAL HISTORY
   Surgeries / Fibroids / Cervical procedures / STIs / Smears

5. MEDICAL & SURGICAL HISTORY
   DM / HTN / Cardiac / Thyroid / Epilepsy / Haematological

6. DRUG HISTORY & ALLERGIES

7. FAMILY HISTORY
   HTN / DM / Twins / Anomalies / Haemoglobinopathies

8. SOCIAL HISTORY
   Smoking / Alcohol / Drugs / Domestic violence / Support

Pharmacology comprehensive notes on Autocoids pptx

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

ls /home/daytona/workspace/ && ls /home/daytona/skills/pptx/

Running Command

mkdir -p /home/daytona/workspace/autocoids-pptx && ls /home/daytona/workspace/au…

Writing File

~/autocoids-pptx/generate.js

"use strict";
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5 inches
pres.title = "Autocoids – Comprehensive Pharmacology Notes";
pres.author = "Pharmacology";

// ─── THEME ───────────────────────────────────────────────────────────────────
const C = {
  navy:    "0D1B2A",   // dominant dark
  teal:    "1B7A8A",   // accent
  gold:    "F4A52D",   // highlight / accent2
  white:   "FFFFFF",
  offWhite:"F0F4F8",
  lightBg: "E8F4F8",
  text:    "1A1A2E",
  subtext: "4A4A6A",
  green:   "1A7A4A",
  red:     "C0392B",
  purple:  "6C3483",
};

const FONT = "Calibri";

// ─── HELPERS ─────────────────────────────────────────────────────────────────
function titleSlide(title, subtitle) {
  const sl = pres.addSlide();
  // Full dark background
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.navy} });
  // Accent bar
  sl.addShape(pres.ShapeType.rect, { x:0, y:5.8, w:13.3, h:0.18, fill:{color: C.teal} });
  sl.addShape(pres.ShapeType.rect, { x:0, y:6.0, w:13.3, h:0.08, fill:{color: C.gold} });
  // Decorative left block
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.35, h:7.5, fill:{color: C.teal} });
  sl.addText("PHARMACOLOGY", { x:0.6, y:1.2, w:12, h:0.6, fontSize:14, color:C.gold, bold:true, fontFace:FONT, charSpacing:8 });
  sl.addText(title, { x:0.6, y:1.9, w:12, h:2.0, fontSize:46, color:C.white, bold:true, fontFace:FONT, wrap:true });
  sl.addShape(pres.ShapeType.rect, { x:0.6, y:4.0, w:2.5, h:0.06, fill:{color: C.gold} });
  sl.addText(subtitle, { x:0.6, y:4.2, w:12, h:0.7, fontSize:20, color:"AACFE4", italic:true, fontFace:FONT });
  sl.addText("Katzung's Basic & Clinical Pharmacology, 16e  |  Goodman & Gilman", { x:0.6, y:6.9, w:12, h:0.4, fontSize:10, color:"6699BB", fontFace:FONT });
  return sl;
}

function sectionDivider(sectionNum, title, subtitle) {
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.teal} });
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:7.5, fill:{color: C.navy}, transparency:20 });
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.5, h:7.5, fill:{color: C.gold} });
  sl.addText(`SECTION ${sectionNum}`, { x:0.8, y:1.8, w:12, h:0.5, fontSize:13, color:C.gold, bold:true, charSpacing:10, fontFace:FONT });
  sl.addText(title, { x:0.8, y:2.4, w:11.5, h:1.8, fontSize:42, color:C.white, bold:true, fontFace:FONT, wrap:true });
  sl.addText(subtitle, { x:0.8, y:4.3, w:11, h:0.6, fontSize:18, color:"CCEEFF", italic:true, fontFace:FONT });
  return sl;
}

// Standard content slide: title bar top, content box below
function contentSlide(title, bodyFn, bgColor) {
  const sl = pres.addSlide();
  const bg = bgColor || C.offWhite;
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:7.5, fill:{color: bg} });
  // Title bar
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:1.0, fill:{color: C.navy} });
  sl.addShape(pres.ShapeType.rect, { x:0, y:1.0, w:13.3, h:0.07, fill:{color: C.teal} });
  sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.35, h:1.0, fill:{color: C.gold} });
  sl.addText(title, { x:0.55, y:0.1, w:12.5, h:0.8, fontSize:22, color:C.white, bold:true, fontFace:FONT, valign:"middle" });
  bodyFn(sl);
  return sl;
}

function bullets(sl, items, x, y, w, h, fontSize, color, indent) {
  const textArr = items.map((it, i) => ({
    text: it.text || it,
    options: {
      bullet: it.bullet !== false ? { indent: indent || 15 } : false,
      bold: it.bold || false,
      color: it.color || color || C.text,
      fontSize: it.size || fontSize || 15,
      breakLine: i < items.length - 1,
      indentLevel: it.indent || 0,
    }
  }));
  sl.addText(textArr, { x, y, w, h, fontFace: FONT, valign: "top", wrap: true });
}

function box(sl, x, y, w, h, fill, text, textOpts) {
  sl.addShape(pres.ShapeType.rect, { x, y, w, h, fill:{ color: fill }, line:{ color:"DDDDDD", width:0.5 } });
  if (text) sl.addText(text, Object.assign({ x, y, w, h, fontFace:FONT, align:"center", valign:"middle" }, textOpts || {}));
}

function pill(sl, x, y, w, h, fill, text, textColor, fontSize) {
  sl.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill:{ color: fill }, rectRadius:0.12 });
  sl.addText(text, { x, y, w, h, fontSize: fontSize||13, color: textColor||C.white, bold:true, fontFace:FONT, align:"center", valign:"middle" });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ═══════════════════════════════════════════════════════════════════════════
titleSlide("AUTOCOIDS", "Histamine  •  Serotonin  •  Eicosanoids  •  Kinins  •  Nitric Oxide");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("What are Autocoids?", sl => {
  sl.addText([
    { text: "Autacoid", options:{bold:true, color:C.teal, fontSize:16} },
    { text: ' = from Greek ', options:{fontSize:15} },
    { text: '"autos" (self) + "akos" (remedy/agent)', options:{italic:true, fontSize:15} },
    { text: "\nLocally acting chemical mediators produced by tissues that act near their site of synthesis (paracrine / autocrine)", options:{fontSize:15} },
  ], { x:0.5, y:1.2, w:12.3, h:0.9, fontFace:FONT, wrap:true });

  // 5 boxes
  const cats = [
    { label:"HISTAMINE", fill:C.red,    sub:"H1/H2/H3/H4" },
    { label:"SEROTONIN\n(5-HT)", fill:"7B2D8B", sub:"5-HT1–7 receptors" },
    { label:"EICOSANOIDS",fill:C.teal,  sub:"PGs / TXA2 / LTs" },
    { label:"KININS",     fill:C.navy,  sub:"Bradykinin" },
    { label:"NITRIC\nOXIDE", fill:C.green, sub:"cGMP pathway" },
  ];
  cats.forEach((c,i) => {
    const x = 0.5 + i*2.55;
    sl.addShape(pres.ShapeType.roundRect, { x, y:2.25, w:2.3, h:2.2, fill:{color: c.fill}, rectRadius:0.15 });
    sl.addText(c.label, { x, y:2.35, w:2.3, h:1.2, fontSize:15, color:C.white, bold:true, fontFace:FONT, align:"center", valign:"middle" });
    sl.addShape(pres.ShapeType.rect, { x:x+0.15, y:3.55, w:2.0, h:0.06, fill:{color: C.gold} });
    sl.addText(c.sub, { x, y:3.65, w:2.3, h:0.6, fontSize:11, color:C.white, fontFace:FONT, align:"center" });
  });

  const props = [
    "Produced locally in tissues",
    "Act on nearby cells (paracrine) or the same cell (autocrine)",
    "Short half-life – rapid inactivation",
    "Not stored in classic endocrine glands",
    "Involved in: inflammation, allergy, hemostasis, pain, fever",
  ];
  bullets(sl, props.map(p=>({text:p, bullet:{indent:12}})), 0.5, 4.65, 12.3, 2.5, 13.5, C.subtext);
});

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 1 – HISTAMINE
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider(1, "HISTAMINE", "Chemistry • Synthesis • Storage • Receptors • Clinical Uses");

// SLIDE 3 – Histamine: Synthesis & Storage
contentSlide("Histamine – Synthesis, Storage & Release", sl => {
  sl.addText("Chemistry & Synthesis", { x:0.5, y:1.1, w:6, h:0.4, fontSize:15, color:C.teal, bold:true, fontFace:FONT });
  bullets(sl, [
    { text:"Formed by decarboxylation of L-histidine by L-histidine decarboxylase (HDC)", bold:false },
    { text:"Imidazole amine structure", bold:false },
    { text:"Widely distributed in nature – animal & plant tissues, venoms", bold:false },
    { text:"Most abundant in: Mast cells, Basophils, Enterochromaffin-like (ECL) cells of stomach, Platelets, CNS neurons", bold:true, color:C.teal },
  ], 0.5, 1.55, 6.2, 2.4, 13.5, C.text);

  sl.addShape(pres.ShapeType.rect, { x:7.0, y:1.1, w:5.8, h:5.8, fill:{color:"F8F4FF"}, line:{color:C.teal, width:1} });
  sl.addText("RELEASE STIMULI", { x:7.1, y:1.15, w:5.6, h:0.4, fontSize:13, color:C.navy, bold:true, fontFace:FONT, align:"center" });
  const triggers = [
    { t:"Immunological", d:"IgE cross-linking on mast cell", col:C.red },
    { t:"Chemical", d:"Morphine, codeine, vancomycin", col:"7B2D8B" },
    { t:"Mechanical", d:"Physical trauma, pressure", col:C.teal },
    { t:"Complement", d:"C3a, C5a (anaphylatoxins)", col:C.navy },
  ];
  triggers.forEach((tr,i) => {
    sl.addShape(pres.ShapeType.roundRect, { x:7.15, y:1.65+i*1.1, w:5.5, h:0.95, fill:{color:tr.col}, rectRadius:0.1 });
    sl.addText(tr.t, { x:7.2, y:1.68+i*1.1, w:2.0, h:0.45, fontSize:13, color:C.white, bold:true, fontFace:FONT, valign:"middle" });
    sl.addText(tr.d, { x:9.2, y:1.68+i*1.1, w:3.4, h:0.45, fontSize:12, color:C.white, fontFace:FONT, valign:"middle" });
  });

  sl.addText("Storage", { x:0.5, y:4.1, w:6, h:0.4, fontSize:15, color:C.teal, bold:true, fontFace:FONT });
  bullets(sl, [
    "Stored in secretory granules (bound to heparin proteoglycans in mast cells)",
    "Released by exocytosis (degranulation)",
    "Rapidly inactivated by: Histamine N-methyltransferase (main) and MAO",
  ], 0.5, 4.55, 6.2, 2.5, 13, C.text);
});

// SLIDE 4 – Histamine Receptors
contentSlide("Histamine Receptors – H1, H2, H3, H4", sl => {
  const recs = [
    { h:"H1", loc:"Smooth muscle\nBronchi, GIT, uterus\nVascular endothelium", mech:"Gq → PLC → IP3/DAG → ↑Ca²⁺", eff:"Bronchoconstriction\nVasodilatation + ↑ permeability\nPruritus, pain\nSlow HR (reflex)", drug:"Cetirizine, Loratadine\nDiphenhydramine\nChlorphenamine", col:C.red },
    { h:"H2", loc:"Gastric parietal cells\nHeart\nVascular SM", mech:"Gs → adenylyl cyclase → ↑cAMP", eff:"↑ Gastric acid secretion\n↑ HR (direct)\nVasodilatation", drug:"Ranitidine, Famotidine\nCimetidine (now less used)", col:C.teal },
    { h:"H3", loc:"CNS (presynaptic autoreceptors)\nPeripheral nerves", mech:"Gi → ↓cAMP", eff:"Inhibits histamine release\n(auto-feedback)\nInhibits other transmitters", drug:"Pitolisant (narcolepsy)", col:C.navy },
    { h:"H4", loc:"Immune cells\nEosinophils, mast cells\nBasophils", mech:"Gi → ↓cAMP", eff:"Chemotaxis of immune cells\nInflammatory signalling", drug:"Under investigation", col:"7B2D8B" },
  ];
  const colW = 3.1, startX = 0.3;
  recs.forEach((r,i) => {
    const x = startX + i*3.2;
    sl.addShape(pres.ShapeType.rect, { x, y:1.1, w:colW, h:5.9, fill:{color:r.col}, line:{color:"FFFFFF", width:0.5} });
    sl.addText(`H${i+1} Receptor`, { x, y:1.12, w:colW, h:0.42, fontSize:17, color:C.gold, bold:true, fontFace:FONT, align:"center" });
    sl.addShape(pres.ShapeType.rect, { x:x+0.05, y:1.55, w:colW-0.1, h:0.04, fill:{color:"FFFFFF"}, transparency:60 });
    const fields = [
      { label:"Location", val:r.loc },
      { label:"Mechanism", val:r.mech },
      { label:"Effects", val:r.eff },
      { label:"Blockers", val:r.drug },
    ];
    let yy = 1.65;
    fields.forEach(f => {
      sl.addText(f.label.toUpperCase(), { x:x+0.08, y:yy, w:colW-0.16, h:0.3, fontSize:9.5, color:C.gold, bold:true, fontFace:FONT, charSpacing:3 });
      yy += 0.3;
      sl.addText(f.val, { x:x+0.08, y:yy, w:colW-0.16, h:1.0, fontSize:11.5, color:C.white, fontFace:FONT, wrap:true });
      yy += 1.08;
    });
  });
});

// SLIDE 5 – H1 Antihistamines
contentSlide("H1 Antihistamines (H1-Receptor Antagonists)", sl => {
  // Generation comparison
  sl.addText("1st Generation", { x:0.5, y:1.1, w:5.8, h:0.4, fontSize:16, color:C.red, bold:true, fontFace:FONT });
  sl.addText("2nd Generation", { x:7.0, y:1.1, w:5.8, h:0.4, fontSize:16, color:C.teal, bold:true, fontFace:FONT });
  sl.addShape(pres.ShapeType.line, { x:6.65, y:1.1, w:0, h:5.9, line:{color:C.navy, width:1.5} });

  bullets(sl, [
    { text:"Lipophilic → cross BBB → CNS sedation", bold:true, color:C.red },
    { text:"Diphenhydramine (Benadryl)", bold:false },
    { text:"Chlorpheniramine", bold:false },
    { text:"Promethazine (also antiemetic)", bold:false },
    { text:"Hydroxyzine (anti-anxiety)", bold:false },
    { text:"Cyproheptadine (also anti-serotonin, appetite stimulant)", bold:false },
    { text:"Meclizine / Dimenhydrinate (motion sickness)", bold:false },
    { text:"PHARMACOLOGICAL EFFECTS:", bold:true, color:C.navy, size:13 },
    { text:"Sedation, anticholinergic (dry mouth, urinary retention, blurred vision)", bold:false, color:C.subtext },
    { text:"Anti-emetic, anti-motion sickness", bold:false, color:C.subtext },
    { text:"Local anaesthetic (membrane stabilising)", bold:false, color:C.subtext },
  ], 0.5, 1.6, 6.0, 5.0, 13, C.text);

  bullets(sl, [
    { text:"Hydrophilic / zwitterionic → do NOT cross BBB → non-sedating", bold:true, color:C.teal },
    { text:"Cetirizine (Zyrtec)", bold:false },
    { text:"Levocetirizine (active enantiomer of cetirizine)", bold:false },
    { text:"Loratadine (Claritin)", bold:false },
    { text:"Desloratadine (active metabolite)", bold:false },
    { text:"Fexofenadine (Allegra) – no cardiac effects", bold:false },
    { text:"Rupatadine (also PAF antagonist)", bold:false },
    { text:"Bilastine, Azelastine (nasal spray)", bold:false },
    { text:"ADVANTAGES:", bold:true, color:C.navy, size:13 },
    { text:"Once daily dosing, safe for driving", bold:false, color:C.subtext },
    { text:"Terfenadine/Astemizole (withdrawn – QT prolongation / Torsades)", bold:true, color:C.red },
  ], 7.0, 1.6, 6.0, 5.0, 13, C.text);
});

// SLIDE 6 – Uses of Antihistamines
contentSlide("Clinical Uses of H1 Antihistamines", sl => {
  const uses = [
    { title:"Allergic Conditions", items:["Allergic rhinitis (seasonal & perennial)", "Urticaria, angioedema", "Atopic dermatitis (itching)","Conjunctivitis"], col:C.red },
    { title:"Anaphylaxis", items:["Adjunct to epinephrine (NEVER replace epinephrine)","Controls urticaria & pruritus component","Given IM/IV in anaphylaxis"], col:"C0392B" },
    { title:"Motion Sickness\n& Vomiting", items:["Meclizine, dimenhydrinate, promethazine","Prevent nausea/vomiting of motion sickness","Post-op N&V (promethazine)"], col:C.teal },
    { title:"Sleep Aid", items:["Diphenhydramine – short-term insomnia","NOT recommended for chronic use","Tolerance develops quickly"], col:C.navy },
    { title:"Pruritus", items:["Topical diphenhydramine for local itch","Hydroxyzine – severe pruritus","Cholestatic pruritus"], col:"7B2D8B" },
    { title:"Cold Remedies", items:["Chlorpheniramine in OTC cold combinations","Dries up secretions (anticholinergic effect)","Limited evidence of benefit"], col:C.green },
  ];
  uses.forEach((u,i) => {
    const col = i % 3, row = Math.floor(i/3);
    const x = 0.4 + col*4.3, y = 1.2 + row*3.0;
    sl.addShape(pres.ShapeType.rect, { x, y, w:4.1, h:2.7, fill:{color:u.col}, line:{color:"FFFFFF", width:0.5} });
    sl.addText(u.title, { x:x+0.1, y:y+0.1, w:3.9, h:0.5, fontSize:13.5, color:C.gold, bold:true, fontFace:FONT, wrap:true });
    sl.addShape(pres.ShapeType.rect, { x:x+0.1, y:y+0.65, w:3.9, h:0.03, fill:{color:"FFFFFF"}, transparency:50 });
    u.items.forEach((it,ii) => {
      sl.addText("• "+it, { x:x+0.1, y:y+0.72+ii*0.55, w:3.9, h:0.5, fontSize:11, color:C.white, fontFace:FONT, wrap:true });
    });
  });
});

// SLIDE 7 – H2 Antagonists
contentSlide("H2-Receptor Antagonists", sl => {
  sl.addText([
    {text:"Mechanism: ", options:{bold:true, color:C.teal, fontSize:15}},
    {text:"Competitively block H2 receptors on gastric parietal cells → ↓ histamine-stimulated gastric acid secretion\nAlso reduce acid secreted in response to gastrin and acetylcholine (indirect effect)\nReduce both basal (nocturnal) and meal-stimulated acid output", options:{fontSize:14, color:C.text}},
  ], {x:0.5, y:1.15, w:12.3, h:1.3, fontFace:FONT, wrap:true});

  const drugs = [
    { name:"Cimetidine", note:"Prototype; inhibits CYP450 → many drug interactions; anti-androgenic (gynaecomastia)", col:C.teal },
    { name:"Ranitidine", note:"More potent; fewer interactions; WITHDRAWN (NDMA contamination concerns)", col:C.navy },
    { name:"Famotidine", note:"Most potent H2 blocker; no CYP450 inhibition; preferred currently", col:C.green },
    { name:"Nizatidine", note:"Similar to ranitidine; good oral bioavailability", col:"7B2D8B" },
  ];
  drugs.forEach((d,i) => {
    const x = 0.4 + (i%2)*6.45, y = 2.55 + Math.floor(i/2)*1.45;
    sl.addShape(pres.ShapeType.roundRect, {x, y, w:6.2, h:1.3, fill:{color:d.col}, rectRadius:0.1});
    sl.addText(d.name, {x:x+0.12, y:y+0.08, w:2.2, h:0.5, fontSize:15, color:C.gold, bold:true, fontFace:FONT});
    sl.addText(d.note, {x:x+0.12, y:y+0.55, w:6.0, h:0.65, fontSize:12, color:C.white, fontFace:FONT, wrap:true});
  });

  sl.addText("Clinical Uses", {x:0.5, y:5.5, w:5.8, h:0.4, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    "Peptic ulcer disease (PUD) – duodenal > gastric",
    "Gastro-oesophageal reflux disease (GERD)",
    "Zollinger-Ellison syndrome (PPIs now preferred)",
    "Prevention of stress ulcers in ICU patients",
    "Urticaria (H1 + H2 combination for refractory cases)",
  ], 0.5, 5.9, 6.2, 1.4, 12.5, C.text);

  sl.addText("Adverse Effects", {x:7.0, y:5.5, w:5.8, h:0.4, fontSize:15, color:C.red, bold:true, fontFace:FONT});
  bullets(sl, [
    "Generally well tolerated",
    "Cimetidine: gynaecomastia, impotence (anti-androgenic), confusion in elderly",
    "Headache, dizziness, constipation/diarrhoea",
    "↑ risk of C. difficile and pneumonia (all acid suppressants)",
  ], 7.0, 5.9, 6.0, 1.4, 12.5, C.text);
});

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 2 – SEROTONIN (5-HT)
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider(2, "SEROTONIN (5-HT)", "5-Hydroxytryptamine • Receptors • Agonists • Antagonists");

// SLIDE 8 – Serotonin basics
contentSlide("Serotonin – Synthesis, Distribution & Metabolism", sl => {
  sl.addText("5-Hydroxytryptamine (5-HT) = Serotonin", { x:0.5, y:1.12, w:12, h:0.45, fontSize:17, color:C.navy, bold:true, fontFace:FONT });

  sl.addText("Synthesis", {x:0.5, y:1.65, w:5.8, h:0.38, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    "L-Tryptophan → 5-hydroxytryptophan (rate-limiting step: tryptophan hydroxylase-1)",
    "5-HTP → 5-HT (by aromatic L-amino acid decarboxylase)",
    "Rate-limiting enzyme blocked by: p-chlorophenylalanine (PCPA / fenclonine)",
    "Telotristat ethyl: tryptophan hydroxylase inhibitor approved for carcinoid diarrhoea",
  ], 0.5, 2.08, 6.2, 2.0, 13, C.text);

  sl.addText("Distribution", {x:0.5, y:4.15, w:5.8, h:0.38, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    ">90% in enterochromaffin (EC) cells of GI tract",
    "~8% in platelets (concentrate via SERT – serotonin transporter)",
    "~1-2% in CNS (raphe nuclei of brainstem)",
    "Stored in vesicles; depleted by reserpine",
  ], 0.5, 4.55, 6.2, 2.6, 13, C.text);

  sl.addText("Metabolism & Inactivation", {x:7.0, y:1.65, w:5.8, h:0.38, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    "Primarily by MAO (monoamine oxidase) → 5-hydroxy-indoleacetic acid (5-HIAA)",
    "5-HIAA excreted in urine (↑ in carcinoid syndrome – diagnostic marker)",
    "Uptake back into neurons/platelets via SERT (blocked by SSRIs, TCAs)",
    "Reserpine depletes vesicular storage of 5-HT",
  ], 7.0, 2.08, 6.0, 2.0, 13, C.text);

  sl.addText("CNS Functions of Serotonin", {x:7.0, y:4.15, w:5.8, h:0.38, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    "Mood regulation (depression, anxiety)",
    "Sleep-wake cycle (promotes sleep initiation)",
    "Appetite suppression",
    "Temperature regulation",
    "Pain modulation (descending inhibition)",
    "Vomiting (via 5-HT3 in CTZ)",
  ], 7.0, 4.55, 6.0, 2.5, 13, C.text);
});

// SLIDE 9 – 5-HT Receptors
contentSlide("5-HT Receptors – Classification & Actions", sl => {
  const receptors = [
    { r:"5-HT1", mech:"Gi → ↓cAMP", loc:"CNS, blood vessels", effect:"Vasoconstriction (cerebral)\nInhibits NT release\nAnxiolysis", drug:"Sumatriptan (agonist – migraine)\nBuspirone (5-HT1A partial agonist)", col:C.navy },
    { r:"5-HT2", mech:"Gq → ↑IP3/DAG", loc:"Platelets, smooth muscle,\nCNS (cortex)", effect:"Platelet aggregation\nVasoconstriction / bronchoconstriction\nHallucinogenic effects", drug:"Clozapine, Ketanserin (antagonists)\nCyproheptadine", col:C.red },
    { r:"5-HT3", mech:"Ligand-gated\nNa+/K+ channel", loc:"CTZ, GI tract,\nvagal afferents", effect:"Nausea and vomiting\nGI motility\nPain signalling", drug:"Ondansetron, Granisetron\n(antagonists – antiemetics)", col:C.teal },
    { r:"5-HT4", mech:"Gs → ↑cAMP", loc:"GI tract,\nheart", effect:"↑ GI motility\n(prokinetic)", drug:"Metoclopramide (partial)\nMosapride, Prucalopride\n(agonists – IBS/constipation)", col:C.green },
  ];
  receptors.forEach((r,i) => {
    const x = 0.3 + i*3.2;
    sl.addShape(pres.ShapeType.rect, {x, y:1.1, w:3.1, h:5.9, fill:{color:r.col}});
    sl.addText(r.r + " Receptor", {x, y:1.15, w:3.1, h:0.45, fontSize:16, color:C.gold, bold:true, fontFace:FONT, align:"center"});
    sl.addShape(pres.ShapeType.rect, {x:x+0.08, y:1.62, w:2.94, h:0.04, fill:{color:"FFFFFF"}, transparency:50});
    [
      {label:"Mechanism", val:r.mech},
      {label:"Location", val:r.loc},
      {label:"Effects", val:r.effect},
      {label:"Key Drugs", val:r.drug},
    ].forEach((f,fi) => {
      const yy = 1.72 + fi*1.3;
      sl.addText(f.label.toUpperCase(), {x:x+0.1, y:yy, w:2.9, h:0.28, fontSize:9, color:C.gold, bold:true, fontFace:FONT, charSpacing:2});
      sl.addText(f.val, {x:x+0.1, y:yy+0.28, w:2.9, h:0.95, fontSize:11.5, color:C.white, fontFace:FONT, wrap:true});
    });
  });
});

// SLIDE 10 – Serotonin Clinical Applications
contentSlide("Serotonin: Clinical Pharmacology", sl => {
  sl.addText("KEY CLINICAL APPLICATIONS", {x:0.5, y:1.1, w:12.3, h:0.38, fontSize:15, color:C.gold, bold:true, charSpacing:5, fontFace:FONT});

  const apps = [
    { title:"MIGRAINE\n(Triptans)", body:"Sumatriptan, Zolmitriptan, Rizatriptan\n5-HT1B/1D agonists → cranial vasoconstriction\n→ inhibit neuropeptide release\nPO/SC/nasal; use within 1hr of headache\nContra: ischaemic heart disease, uncontrolled HTN", col:C.navy },
    { title:"CARCINOID\nSYNDROME", body:"Carcinoid tumour (enterochromaffin cells) secretes excess 5-HT\nFeatures: flushing, diarrhoea, bronchoconstriction, tricuspid disease\n↑ urinary 5-HIAA (diagnostic marker)\nTreatment: Octreotide, Telotristat\nSerotonin antagonists: Cyproheptadine, Ketanserin", col:"7B2D8B" },
    { title:"ANTI-EMETICS\n(5-HT3 Blockers)", body:"Ondansetron, Granisetron, Palonosetron\nBlock 5-HT3 in CTZ and GI vagal afferents\nPost-chemo N&V, post-op N&V\nSafe in pregnancy (ondansetron)\nAEs: Headache, constipation, QT prolongation", col:C.teal },
    { title:"DEPRESSION\n(SERT Blockers)", body:"SSRIs block SERT → ↑ synaptic 5-HT\nFluoxetine, Escitalopram, Sertraline\nSerotonin Syndrome: hyperthermia, clonus, agitation, tachycardia\n(due to excess 5-HT – drug-drug interaction)\nTreatment of syndrome: Cyproheptadine + supportive", col:C.red },
    { title:"IBS / CONSTIPATION\n(5-HT4 Agonists)", body:"Prucalopride → potent 5-HT4 agonist\nUsed in chronic constipation, IBS-C\nIncreases colonic motility\nMosapride: 5-HT4 agonist + weak 5-HT3 antagonist\nDoes NOT cross BBB – no CNS effects", col:C.green },
    { title:"ANXIETY / DEPRESSION\n(5-HT1A Partial Agonist)", body:"Buspirone: 5-HT1A partial agonist\nUsed in Generalised Anxiety Disorder (GAD)\nNon-benzodiazepine, non-addictive\nOnset: 2-4 weeks (no acute anxiolysis)\nNo sedation, no dependence, no withdrawal", col:"B7950B" },
  ];
  apps.forEach((a,i) => {
    const col = i%3, row = Math.floor(i/3);
    const x = 0.3 + col*4.35, y = 1.55 + row*2.85;
    sl.addShape(pres.ShapeType.roundRect, {x, y, w:4.15, h:2.7, fill:{color:a.col}, rectRadius:0.12});
    sl.addText(a.title, {x:x+0.1, y:y+0.08, w:3.95, h:0.6, fontSize:13, color:C.gold, bold:true, fontFace:FONT, wrap:true});
    sl.addText(a.body, {x:x+0.1, y:y+0.72, w:3.95, h:1.88, fontSize:11, color:C.white, fontFace:FONT, wrap:true});
  });
});

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 3 – EICOSANOIDS
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider(3, "EICOSANOIDS", "Prostaglandins • Thromboxanes • Leukotrienes • Lipoxins");

// SLIDE 11 – Eicosanoid synthesis overview
contentSlide("Eicosanoids – Synthesis Pathways", sl => {
  sl.addText("All eicosanoids are derived from 20-carbon polyunsaturated fatty acids (mainly Arachidonic Acid)", {x:0.5, y:1.12, w:12.3, h:0.5, fontSize:14, color:C.subtext, italic:true, fontFace:FONT, wrap:true});

  // Cascade boxes
  pill(sl, 0.5, 1.75, 12.3, 0.55, C.navy, "MEMBRANE PHOSPHOLIPIDS", C.white, 15);
  sl.addShape(pres.ShapeType.rect, {x:6.4, y:2.32, w:0.08, h:0.5, fill:{color:C.teal}});
  pill(sl, 2.0, 2.82, 3.5, 0.52, C.teal, "PHOSPHOLIPASE A2", C.white, 13);
  sl.addText("(blocked by glucocorticoids via lipocortin)", {x:5.7, y:2.88, w:4.5, h:0.42, fontSize:11.5, color:C.subtext, italic:true, fontFace:FONT});
  sl.addShape(pres.ShapeType.rect, {x:6.4, y:3.37, w:0.08, h:0.5, fill:{color:C.teal}});
  pill(sl, 2.5, 3.87, 8.3, 0.52, C.navy, "ARACHIDONIC ACID  (from membrane phospholipids)", C.white, 14);
  sl.addShape(pres.ShapeType.rect, {x:2.8, y:4.42, w:0.08, h:0.5, fill:{color:C.red}});
  sl.addShape(pres.ShapeType.rect, {x:9.7, y:4.42, w:0.08, h:0.5, fill:{color:C.teal}});

  // COX pathway
  sl.addShape(pres.ShapeType.rect, {x:0.3, y:4.92, w:5.7, h:2.45, fill:{color:"FEF0F0"}, line:{color:C.red, width:1}});
  sl.addText("COX PATHWAY (Cyclooxygenase)", {x:0.35, y:4.97, w:5.6, h:0.42, fontSize:13.5, color:C.red, bold:true, fontFace:FONT, align:"center"});
  sl.addText("Enzymes: COX-1 (constitutive) & COX-2 (inducible)\nBlocked by: NSAIDs (non-selective), Aspirin (irreversible)\nCelecoxib, Rofecoxib (COX-2 selective)\n\nProducts:\n  PGE2 – pain, fever, vasodilation, cytoprotection\n  PGI2 (Prostacyclin) – vasodilation, ↓ platelet aggregation\n  TXA2 (Thromboxane A2) – vasoconstriction, ↑ platelet aggregation", {x:0.4, y:5.42, w:5.55, h:1.88, fontSize:11, color:C.text, fontFace:FONT, wrap:true});

  // LOX pathway
  sl.addShape(pres.ShapeType.rect, {x:7.3, y:4.92, w:5.7, h:2.45, fill:{color:"EEF8F0"}, line:{color:C.teal, width:1}});
  sl.addText("LOX PATHWAY (Lipoxygenase)", {x:7.35, y:4.97, w:5.6, h:0.42, fontSize:13.5, color:C.green, bold:true, fontFace:FONT, align:"center"});
  sl.addText("Enzyme: 5-Lipoxygenase (5-LOX)\nBlocked by: Zileuton (5-LOX inhibitor)\n\nProducts:\n  LTB4 – chemotaxis of neutrophils, PMN\n  LTC4, LTD4, LTE4 – cysteinyl leukotrienes\n    (slow reacting substances of anaphylaxis – SRS-A)\n    → bronchoconstriction, ↑ mucus, vascular permeability\n  Blocked by: Montelukast, Zafirlukast (LT receptor antagonists)", {x:7.4, y:5.42, w:5.55, h:1.88, fontSize:11, color:C.text, fontFace:FONT, wrap:true});
});

// SLIDE 12 – Prostaglandins
contentSlide("Prostaglandins – Receptors, Effects & Clinical Uses", sl => {
  const pgs = [
    { pg:"PGE2", rec:"EP1–EP4", effect:"Vasodilation, pain sensitisation, fever (hypothalamus), uterine contraction (EP3 in late pregnancy), bronchodilation (EP2)", use:"Misoprostol (EP3/EP1 agonist): cervical ripening, labour induction, PPH prevention, peptic ulcer", col:C.red },
    { pg:"PGI2\n(Prostacyclin)", rec:"IP", effect:"Potent vasodilation, inhibits platelet aggregation (↑cAMP in platelets), reduces pulmonary hypertension", use:"Epoprostenol, Iloprost, Treprostinil: pulmonary arterial hypertension (PAH)", col:C.teal },
    { pg:"PGF2α", rec:"FP", effect:"Uterine contraction, vasoconstriction, bronchoconstriction, ↑ IOP reduction", use:"Carboprost (15-methyl PGF2α): refractory PPH\nLatanoprost, Bimatoprost: glaucoma (↓ IOP)", col:C.navy },
    { pg:"TXA2", rec:"TP", effect:"Potent vasoconstriction, platelet aggregation, bronchoconstriction\nShort half-life (30 seconds)", use:"Aspirin: irreversibly inhibits TXA2 synthesis (antiplatelet)\nTP receptor blocked by Ramatroban", col:"7B2D8B" },
  ];
  pgs.forEach((p,i) => {
    const x = 0.3 + (i%2)*6.55, y = 1.1 + Math.floor(i/2)*3.05;
    sl.addShape(pres.ShapeType.rect, {x, y, w:6.3, h:2.9, fill:{color:p.col}, line:{color:"FFFFFF", width:0.5}});
    sl.addText(p.pg, {x:x+0.1, y:y+0.08, w:2.2, h:0.55, fontSize:18, color:C.gold, bold:true, fontFace:FONT});
    sl.addText("Receptor: "+p.rec, {x:x+2.4, y:y+0.18, w:3.8, h:0.38, fontSize:12, color:C.gold, fontFace:FONT});
    sl.addShape(pres.ShapeType.rect, {x:x+0.1, y:y+0.68, w:6.1, h:0.04, fill:{color:"FFFFFF"}, transparency:60});
    sl.addText("Effects: "+p.effect, {x:x+0.1, y:y+0.75, w:6.1, h:1.05, fontSize:11, color:C.white, fontFace:FONT, wrap:true});
    sl.addText("Uses: "+p.use, {x:x+0.1, y:y+1.85, w:6.1, h:0.95, fontSize:11, color:C.gold, fontFace:FONT, wrap:true});
  });
});

// SLIDE 13 – Leukotrienes & NSAIDs
contentSlide("Leukotrienes & Anti-Eicosanoid Drugs", sl => {
  sl.addText("LEUKOTRIENES", {x:0.5, y:1.1, w:5.8, h:0.4, fontSize:16, color:C.red, bold:true, fontFace:FONT});
  bullets(sl, [
    { text:"LTB4: potent neutrophil chemoattractant (inflammatory bowel disease, psoriasis)", bold:false },
    { text:"Cysteinyl-LTs (LTC4, LTD4, LTE4):", bold:true, color:C.teal },
    { text:"= Slow Reacting Substances of Anaphylaxis (SRS-A)", bold:false, color:C.subtext },
    { text:"Bronchoconstriction (more potent than histamine)", bold:true, color:C.red },
    { text:"↑ Mucus secretion, mucosal oedema", bold:false },
    { text:"↑ Vascular permeability", bold:false },
    { text:"Key role in ASTHMA, URTICARIA, ALLERGIC RHINITIS", bold:true, color:C.navy },
  ], 0.5, 1.55, 6.0, 3.5, 13, C.text);

  sl.addShape(pres.ShapeType.line, {x:6.75, y:1.1, w:0, h:6.2, line:{color:C.navy, width:1.5}});

  sl.addText("ANTI-LEUKOTRIENE DRUGS", {x:7.0, y:1.1, w:5.8, h:0.4, fontSize:16, color:C.teal, bold:true, fontFace:FONT});
  const antiLT = [
    { drug:"Zileuton", mech:"5-LOX inhibitor → blocks ALL leukotriene synthesis", use:"Asthma (oral, 4x/day)", ae:"Hepatotoxicity (monitor LFTs)" },
    { drug:"Montelukast", mech:"Cys-LT1 receptor antagonist (blocks LTC4/LTD4/LTE4)", use:"Asthma prophylaxis, allergic rhinitis, exercise-induced bronchoconstriction", ae:"Neuropsychiatric (depression, suicidal ideation – FDA warning)" },
    { drug:"Zafirlukast", mech:"Cys-LT1 receptor antagonist", use:"Asthma prophylaxis (adults)", ae:"Hepatitis (monitor LFTs)" },
  ];
  antiLT.forEach((d,i) => {
    sl.addShape(pres.ShapeType.roundRect, {x:7.05, y:1.55+i*1.85, w:5.9, h:1.7, fill:{color:i===0?C.navy:i===1?C.teal:C.green}, rectRadius:0.1});
    sl.addText(d.drug, {x:7.15, y:1.6+i*1.85, w:2.5, h:0.42, fontSize:15, color:C.gold, bold:true, fontFace:FONT});
    sl.addText("MOA: "+d.mech, {x:7.15, y:2.02+i*1.85, w:5.7, h:0.42, fontSize:11.5, color:C.white, fontFace:FONT, wrap:true});
    sl.addText("Use: "+d.use, {x:7.15, y:2.44+i*1.85, w:5.7, h:0.38, fontSize:11, color:"CCEEFF", fontFace:FONT, wrap:true});
    sl.addText("AE: "+d.ae, {x:7.15, y:2.82+i*1.85, w:5.7, h:0.32, fontSize:10.5, color:C.gold, fontFace:FONT, wrap:true});
  });

  sl.addText("NSAIDs: Mechanism Summary", {x:0.5, y:5.15, w:6.0, h:0.4, fontSize:14, color:C.navy, bold:true, fontFace:FONT});
  sl.addText("Inhibit COX-1 and/or COX-2 → ↓ PG synthesis → antipyretic, analgesic, anti-inflammatory effects\nAspirin: IRREVERSIBLE COX inhibition → used as antiplatelet (75-325mg/day)\nNon-selective NSAIDs (Ibuprofen, Diclofenac): reversible; GI adverse effects (↓ PGE2 cytoprotection)\nCOX-2 selective (Celecoxib): fewer GI effects; ↑ cardiovascular risk (↓ PGI2, TXA2 unopposed)\nParacetamol: weak COX inhibition; antipyretic-analgesic; safe GI profile; hepatotoxic in overdose", {x:0.5, y:5.6, w:6.0, h:1.7, fontSize:11.5, color:C.text, fontFace:FONT, wrap:true});
});

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 4 – KININS
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider(4, "KININS (BRADYKININ)", "The Kallikrein-Kinin System");

// SLIDE 14 – Bradykinin
contentSlide("Bradykinin – Synthesis, Effects & Clinical Relevance", sl => {
  // Synthesis cascade
  sl.addText("SYNTHESIS CASCADE", {x:0.5, y:1.12, w:12.3, h:0.38, fontSize:14, color:C.gold, bold:true, charSpacing:5, fontFace:FONT});
  const steps = [
    { label:"Kininogens\n(HMW & LMW)\nin plasma/tissues", col:C.navy },
    { label:"Kallikreins\n(tissue & plasma)\n[serine proteases]", col:C.teal },
    { label:"BRADYKININ\n(nonapeptide)", col:C.red },
    { label:"Inactive fragments\nby ACE (kininase II)\nby NEP (neprilysin)", col:C.subtext },
  ];
  steps.forEach((s,i) => {
    sl.addShape(pres.ShapeType.roundRect, {x:0.4+i*3.25, y:1.6, w:3.0, h:1.0, fill:{color:s.col}, rectRadius:0.1});
    sl.addText(s.label, {x:0.4+i*3.25, y:1.62, w:3.0, h:0.96, fontSize:11.5, color:C.white, bold:false, fontFace:FONT, align:"center", valign:"middle", wrap:true});
    if(i<3) sl.addText("→", {x:3.38+i*3.25, y:1.88, w:0.25, h:0.45, fontSize:20, color:C.navy, bold:true, fontFace:FONT, align:"center"});
  });

  sl.addText("Receptors: B1 (inducible, inflammation) and B2 (constitutive, mediates most effects)", {x:0.5, y:2.7, w:12.3, h:0.45, fontSize:13.5, color:C.navy, bold:true, fontFace:FONT});

  sl.addText("Pharmacological Effects", {x:0.5, y:3.25, w:5.8, h:0.38, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    { text:"Vasodilation (endothelial NO and PGI2 release) → ↓ BP", bold:true, color:C.teal },
    { text:"↑ Vascular permeability → oedema, wheal", bold:false },
    { text:"Pain and hyperalgesia (sensitises nociceptors)", bold:true, color:C.red },
    { text:"Bronchoconstriction (asthma – less potent than histamine)", bold:false },
    { text:"Stimulates sensory nerve endings → cough", bold:true, color:C.red },
    { text:"Stimulates uterine smooth muscle", bold:false },
    { text:"↑ Renal blood flow, natriuresis", bold:false },
  ], 0.5, 3.68, 6.0, 3.4, 13, C.text);

  sl.addText("Clinical Relevance", {x:7.0, y:3.25, w:5.8, h:0.38, fontSize:15, color:C.teal, bold:true, fontFace:FONT});
  bullets(sl, [
    { text:"ACE Inhibitor Cough:", bold:true, color:C.red },
    { text:"ACE (= kininase II) degrades bradykinin → ACE-I blocks this → bradykinin accumulates → cough + angioedema", bold:false, color:C.subtext },
    { text:"ACE Inhibitor Angioedema:", bold:true, color:C.red },
    { text:"Bradykinin-mediated; does not respond to antihistamines/corticosteroids; treat with icatibant (B2 antagonist) or C1-esterase inhibitor", bold:false, color:C.subtext },
    { text:"ARBs (Losartan):", bold:true, color:C.navy },
    { text:"Do NOT inhibit ACE → bradykinin levels unchanged → NO cough", bold:false, color:C.subtext },
    { text:"Icatibant: Selective B2 receptor antagonist – hereditary angioedema", bold:true, color:C.green },
    { text:"Berotralstat: Plasma kallikrein inhibitor – prophylaxis of hereditary angioedema", bold:false },
  ], 7.0, 3.68, 6.0, 3.4, 13, C.text);
});

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 5 – NITRIC OXIDE
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider(5, "NITRIC OXIDE (NO)", "Endogenous Vasodilator & Signalling Molecule");

// SLIDE 15 – Nitric Oxide
contentSlide("Nitric Oxide – Synthesis, Mechanism & Clinical Uses", sl => {
  sl.addText("SYNTHESIS:", {x:0.5, y:1.12, w:2.2, h:0.4, fontSize:14, color:C.teal, bold:true, fontFace:FONT});
  sl.addText("L-Arginine + O₂ → NO + L-Citrulline   (enzyme: Nitric Oxide Synthase – NOS)", {x:2.7, y:1.12, w:10.0, h:0.4, fontSize:14, color:C.text, fontFace:FONT});

  const nos = [
    {name:"nNOS\n(NOS-1)", loc:"Neurons", const:"Constitutive", func:"Neurotransmission\nLong-term potentiation", col:C.navy},
    {name:"iNOS\n(NOS-2)", loc:"Macrophages, immune cells", const:"Inducible", func:"Large amounts of NO\nAntimicrobial, septic shock", col:C.red},
    {name:"eNOS\n(NOS-3)", loc:"Vascular endothelium", const:"Constitutive", func:"Vasodilation, ↓ BP\nAntiplatelet, antithrombotic", col:C.teal},
  ];
  nos.forEach((n,i) => {
    const x = 0.5 + i*4.25;
    sl.addShape(pres.ShapeType.roundRect, {x, y:1.62, w:4.0, h:2.2, fill:{color:n.col}, rectRadius:0.12});
    sl.addText(n.name, {x:x+0.1, y:1.68, w:3.8, h:0.55, fontSize:17, color:C.gold, bold:true, fontFace:FONT, align:"center"});
    sl.addText("Location: "+n.loc, {x:x+0.1, y:2.28, w:3.8, h:0.38, fontSize:11.5, color:C.white, fontFace:FONT});
    sl.addText(n.const, {x:x+0.1, y:2.65, w:3.8, h:0.3, fontSize:11, color:C.gold, italic:true, fontFace:FONT});
    sl.addText(n.func, {x:x+0.1, y:2.98, w:3.8, h:0.75, fontSize:11.5, color:C.white, fontFace:FONT, wrap:true});
  });

  sl.addText("MECHANISM OF ACTION", {x:0.5, y:3.95, w:5.8, h:0.4, fontSize:14, color:C.gold, bold:true, fontFace:FONT});
  bullets(sl, [
    "NO activates soluble guanylyl cyclase (sGC) in smooth muscle",
    "↑ cGMP → activates cGMP-dependent protein kinase (PKG)",
    "PKG phosphorylates myosin light chain kinase → ↓ Ca²⁺ → smooth muscle relaxation",
    "→ VASODILATION (especially venous/arterial at higher doses)",
    "cGMP degraded by PDE5 (inhibited by sildenafil → ↑ NO effect)",
  ], 0.5, 4.38, 6.0, 2.85, 13, C.text);

  sl.addText("CLINICAL APPLICATIONS", {x:7.0, y:3.95, w:5.8, h:0.4, fontSize:14, color:C.gold, bold:true, fontFace:FONT});
  bullets(sl, [
    { text:"Nitrates (GTN, Isosorbide dinitrate): donate NO → angina, acute LVF", bold:true, color:C.teal },
    { text:"Inhaled NO: pulmonary hypertension in newborns (PPHN)", bold:true, color:C.teal },
    { text:"Sildenafil (PDE5 inhibitor): erectile dysfunction, PAH; CONTRAINDICATED with nitrates → severe hypotension", bold:true, color:C.red },
    { text:"Sodium nitroprusside: releases NO → arterial+venous dilation → hypertensive emergency; cyanide toxicity at high doses", bold:false },
    { text:"Septic shock: iNOS overactivation → massive NO → refractory vasodilation (treated with NOS inhibitors in trials)", bold:false },
  ], 7.0, 4.38, 6.0, 2.85, 13, C.text);
});

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 16 – COMPARISON SUMMARY TABLE
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Autocoids – Comparison at a Glance", sl => {
  const headers = ["AUTOCOID", "SOURCE", "KEY RECEPTOR", "MAIN EFFECT", "KEY DRUG / ANTAGONIST"];
  const rows = [
    ["Histamine", "Mast cells, Basophils, ECL cells", "H1, H2, H3, H4", "Allergy, bronchoconstriction, acid secretion, vasodilation", "Cetirizine (H1), Famotidine (H2), Pitolisant (H3)"],
    ["Serotonin (5-HT)", "EC cells (GIT), Platelets, Raphe nuclei", "5-HT1 to 5-HT7", "Mood, vasoconstriction, GI motility, vomiting, platelet aggregation", "Sumatriptan, Ondansetron, SSRIs, Buspirone"],
    ["PGE2", "All tissues (COX-1/2 from AA)", "EP1–EP4", "Pain, fever, vasodilation, uterine contraction", "Misoprostol (agonist); NSAIDs (↓ synthesis)"],
    ["PGI2", "Vascular endothelium", "IP", "Vasodilation, ↓ platelet aggregation", "Epoprostenol (agonist – PAH)"],
    ["TXA2", "Platelets", "TP", "Vasoconstriction, ↑ platelet aggregation", "Aspirin (irreversible COX block)"],
    ["LTC4/D4/E4", "Mast cells, eosinophils (5-LOX)", "CysLT1", "Bronchoconstriction, ↑ mucus, oedema", "Montelukast (antagonist); Zileuton (↓ synthesis)"],
    ["Bradykinin", "Kininogens via Kallikrein", "B1, B2", "Vasodilation, pain, ↑ permeability, cough", "Icatibant (B2 antagonist)"],
    ["Nitric Oxide", "Endothelium, neurons, macrophages", "sGC → ↑ cGMP", "Vasodilation, neurotransmission, antimicrobial", "Nitrates (NO donors); Sildenafil (↑ cGMP)"],
  ];
  const colW = [1.8, 2.3, 2.0, 3.5, 2.95];
  const startX = 0.25;
  let x = startX;
  headers.forEach((h,i) => {
    sl.addShape(pres.ShapeType.rect, {x, y:1.1, w:colW[i], h:0.52, fill:{color:C.navy}});
    sl.addText(h, {x:x+0.04, y:1.12, w:colW[i]-0.08, h:0.48, fontSize:11, color:C.gold, bold:true, fontFace:FONT, align:"center", valign:"middle", wrap:true});
    x += colW[i];
  });
  rows.forEach((row, ri) => {
    let rx = startX;
    const bgColor = ri%2===0 ? "EEF3FB" : C.white;
    row.forEach((cell, ci) => {
      sl.addShape(pres.ShapeType.rect, {x:rx, y:1.62+ri*0.73, w:colW[ci], h:0.71, fill:{color:bgColor}, line:{color:"CCCCCC", width:0.3}});
      sl.addText(cell, {x:rx+0.04, y:1.64+ri*0.73, w:colW[ci]-0.08, h:0.67, fontSize:10, color:ci===0?C.navy:C.text, bold:ci===0, fontFace:FONT, valign:"middle", wrap:true});
      rx += colW[ci];
    });
  });
});

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 17 – HIGH-YIELD EXAM FACTS
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("HIGH-YIELD EXAM FACTS – Autocoids", sl => {
  sl.addShape(pres.ShapeType.rect, {x:0, y:0, w:13.3, h:7.5, fill:{color:C.navy}});
  sl.addShape(pres.ShapeType.rect, {x:0, y:0, w:0.35, h:7.5, fill:{color:C.gold}});
  sl.addShape(pres.ShapeType.rect, {x:0, y:1.0, w:13.3, h:0.07, fill:{color:C.teal}});
  sl.addText("HIGH-YIELD EXAM FACTS", {x:0.55, y:0.1, w:12.5, h:0.8, fontSize:22, color:C.white, bold:true, fontFace:FONT, valign:"middle"});

  const facts = [
    { t:"Histamine + Gastric acid:", d:"ECL cells release histamine → H2 receptors on parietal cells → ↑ acid. Blocked by H2 antagonists (Famotidine) and PPIs." },
    { t:"ACE inhibitor cough:", d:"Due to bradykinin accumulation (ACE = kininase II). Switch to ARB (no cough). Angioedema: treat with Icatibant." },
    { t:"Serotonin Syndrome:", d:"Excess 5-HT → hyperthermia, clonus, agitation. Treat with Cyproheptadine (5-HT2 antagonist). Can occur with SSRIs + MAOIs, Linezolid, Tramadol." },
    { t:"Aspirin paradox:", d:"Low dose aspirin: ↓ TXA2 (platelets, irreversible) > ↓ PGI2 (endothelium) → net antiplatelet. High dose: blocks both → may REDUCE antiplatelet benefit." },
    { t:"Montelukast warning:", d:"FDA black box – neuropsychiatric effects (suicidal ideation, depression). Use caution especially in children." },
    { t:"Sildenafil + Nitrates:", d:"ABSOLUTELY CONTRAINDICATED. Both ↑ cGMP → synergistic hypotension → fatal." },
    { t:"Triple whammy in asthma:", d:"Histamine (H1) + Leukotrienes (CysLT1) + Prostanoids (TXA2) all cause bronchoconstriction. Treatment targets each pathway." },
    { t:"Carcinoid syndrome markers:", d:"↑ urinary 5-HIAA (serotonin metabolite). Flushing + diarrhoea + tricuspid disease. Octreotide for symptom control." },
    { t:"Glucocorticoids:", d:"Inhibit Phospholipase A2 (via lipocortin/annexin-A1) → block ALL eicosanoid synthesis (PGs + LTs). Broadest anti-inflammatory action." },
    { t:"PAH treatment options:", d:"Prostacyclin analogues (Epoprostenol, Iloprost), PDE5 inhibitors (Sildenafil), Endothelin antagonists (Bosentan), inhaled NO." },
  ];

  const col1 = facts.slice(0,5), col2 = facts.slice(5);
  col1.forEach((f,i) => {
    sl.addText([
      {text:"► "+f.t+" ", options:{bold:true, color:C.gold, fontSize:12.5}},
      {text:f.d, options:{color:"CCDDFF", fontSize:12}},
    ], {x:0.55, y:1.2+i*1.2, w:6.2, h:1.1, fontFace:FONT, wrap:true});
  });
  col2.forEach((f,i) => {
    sl.addText([
      {text:"► "+f.t+" ", options:{bold:true, color:C.gold, fontSize:12.5}},
      {text:f.d, options:{color:"CCDDFF", fontSize:12}},
    ], {x:7.1, y:1.2+i*1.2, w:6.0, h:1.1, fontFace:FONT, wrap:true});
  });
});

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 18 – IMPORTANT DRUG LIST (Quick Revision)
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Important Drugs – Autocoids Quick Revision", sl => {
  const cats = [
    { cat:"H1 BLOCKERS", col:C.red, drugs:"1st Gen: Diphenhydramine, Chlorpheniramine, Promethazine, Cyproheptadine, Meclizine\n2nd Gen: Cetirizine, Levocetirizine, Loratadine, Desloratadine, Fexofenadine\n⚠ Withdrawn: Terfenadine, Astemizole (QT prolongation)" },
    { cat:"H2 BLOCKERS", col:C.teal, drugs:"Famotidine (preferred), Cimetidine (CYP450 inhibitor, anti-androgenic), Ranitidine (withdrawn – NDMA), Nizatidine\nUse: PUD, GERD, stress ulcers" },
    { cat:"5-HT AGONISTS", col:"7B2D8B", drugs:"Triptans (Sumatriptan, Zolmitriptan): migraine – 5-HT1B/1D agonists\nProkinetics (Prucalopride, Mosapride): IBS-C – 5-HT4 agonists\nBuspirone: GAD – 5-HT1A partial agonist" },
    { cat:"5-HT ANTAGONISTS", col:C.navy, drugs:"Ondansetron/Granisetron: 5-HT3 antagonists – antiemetics\nCyproheptadine: H1 + 5-HT2 blocker – carcinoid, serotonin syndrome\nMetoclopramide: partial 5-HT4 agonist + D2 blocker – prokinetic" },
    { cat:"ANTI-EICOSANOIDS", col:C.green, drugs:"NSAIDs (Ibuprofen, Diclofenac): COX-1 + COX-2 inhibitors\nCelecoxib: COX-2 selective (↓ GI SE, ↑ CV risk)\nAspirin: irreversible COX inhibition (antiplatelet)\nMontelukast/Zafirlukast: CysLT1 antagonists (asthma)\nZileuton: 5-LOX inhibitor" },
    { cat:"EICOSANOID AGONISTS", col:"B7950B", drugs:"Misoprostol (PGE1 analogue): PUD, cervical ripening, PPH prevention\nCarboprost (PGF2α): refractory PPH\nLatanoprost (PGF2α): glaucoma\nEpoprostenol/Treprostinil (PGI2): PAH\nAlprostadil (PGE1): erectile dysfunction, ductus arteriosus" },
  ];
  cats.forEach((c,i) => {
    const col = i%2, row = Math.floor(i/2);
    const x = 0.3 + col*6.6, y = 1.1 + row*2.05;
    sl.addShape(pres.ShapeType.rect, {x, y, w:6.4, h:1.95, fill:{color:c.col}});
    sl.addText(c.cat, {x:x+0.1, y:y+0.08, w:6.2, h:0.38, fontSize:13, color:C.gold, bold:true, fontFace:FONT, charSpacing:4});
    sl.addText(c.drugs, {x:x+0.1, y:y+0.52, w:6.2, h:1.38, fontSize:11, color:C.white, fontFace:FONT, wrap:true});
  });
  sl.addShape(pres.ShapeType.rect, {x:0.3, y:7.2, w:12.7, h:0.22, fill:{color:C.teal}});
  sl.addText("Ref: Katzung BG. Basic & Clinical Pharmacology, 16th ed. | Goodman & Gilman's Pharmacological Basis of Therapeutics, 14th ed.", {x:0.5, y:7.22, w:12.3, h:0.2, fontSize:9, color:C.white, fontFace:FONT, align:"center"});
});

// ─── WRITE FILE ──────────────────────────────────────────────────────────────
const OUT = "/home/daytona/workspace/autocoids-pptx/Autocoids_Pharmacology.pptx";
pres.writeFile({ fileName: OUT })
  .then(() => console.log("SUCCESS: " + OUT))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/autocoids-pptx && node generate.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…

Running Command

python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/autocoids…

The PPTX is valid — 23 slides, 579 KB. Here is your download link:

Autocoids Pharmacology

Presentation · PPTX


What's inside (23 slides):

SlidesContent
1Title slide
2What are Autocoids? (overview with all 5 categories)
3–7HISTAMINE — Synthesis & Release, H1/H2/H3/H4 Receptors, 1st vs 2nd Gen Antihistamines, Clinical Uses of H1 blockers, H2 antagonists
8–10SEROTONIN (5-HT) — Synthesis/Distribution/Metabolism, 5-HT Receptors (5-HT1–4), Clinical pharmacology (Triptans, Carcinoid, Ondansetron, SSRIs, IBS, Buspirone)
11–13EICOSANOIDS — COX vs LOX synthesis pathways, Prostaglandins & TXA2 (PGE2, PGI2, PGF2α), Leukotrienes & Anti-eicosanoid drugs
14BRADYKININ — Kallikrein-Kinin system, Effects, ACE inhibitor cough/angioedema
15NITRIC OXIDE — NOS isoforms (nNOS/iNOS/eNOS), cGMP mechanism, Clinical uses
16Master comparison table (all autocoids side-by-side)
1710 High-yield exam facts (dark theme)
18Complete drug list for quick revision
This is a shared conversation. Sign in to Orris to start your own chat.