attachment
attachment
attachment
attachment
attachment
attachment

Give me answers in detail

Reading File
analyse_media
analyse_media
analyse_media
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Your notes cover three major pharmacology sections. Here are detailed answers for every topic listed, organized by section.

SECTION 1: CARDIOVASCULAR SYSTEM


10-MARK TOPICS


1. ACE Inhibitors

Drugs: Captopril, Enalapril, Lisinopril, Ramipril, Perindopril, Fosinopril, Benazepril
Mechanism of Action: ACE (Angiotensin Converting Enzyme) inhibitors block the conversion of Angiotensin I → Angiotensin II. Angiotensin II normally:
  • Causes vasoconstriction (raises BP)
  • Stimulates aldosterone release (causing Na+/water retention)
  • Causes cardiac and vascular hypertrophy
ACE inhibitors also prevent the breakdown of bradykinin (which is normally degraded by ACE), so bradykinin accumulates, leading to vasodilation (via NO and prostaglandins) and the well-known side effect of dry cough.
Pharmacological Effects:
  • Reduce peripheral vascular resistance (afterload)
  • Reduce aldosterone → reduce preload (less Na+/water retention)
  • Reduce cardiac hypertrophy and remodeling
  • Preserve renal function in diabetic nephropathy (reduce intraglomerular pressure via efferent arteriolar dilation)
Therapeutic Uses:
  1. Hypertension (drug of choice in diabetics + hypertension)
  2. Heart failure (reduce afterload and preload)
  3. Post-MI (reduce mortality and ventricular remodeling)
  4. Diabetic nephropathy (renoprotective)
  5. Chronic kidney disease with proteinuria
  6. Left ventricular dysfunction (asymptomatic)
Pharmacokinetics:
  • Captopril: active drug, short-acting, given 2-3x/day
  • Enalapril: prodrug (enalaprilat is active), longer-acting
  • Most are eliminated renally; reduce dose in renal impairment
Adverse Effects:
  1. Dry, persistent cough (most common - due to bradykinin accumulation) - switch to ARB
  2. Hyperkalemia (less aldosterone)
  3. Hypotension (especially first-dose, in volume-depleted patients)
  4. Angioedema (rare but potentially fatal; due to bradykinin)
  5. Teratogenic (contraindicated in pregnancy - causes fetal renal agenesis)
  6. Taste disturbances (captopril specifically - contains sulfhydryl group)
  7. Neutropenia (rare, with captopril)
  8. Acute renal failure in bilateral renal artery stenosis
Contraindications: Pregnancy, bilateral renal artery stenosis, history of angioedema, severe aortic stenosis.

2. Angiotensin Receptor Blockers (ARBs)

Drugs: Losartan, Valsartan, Candesartan, Irbesartan, Telmisartan, Olmesartan
Mechanism of Action: ARBs block the AT1 receptor (the main receptor mediating the harmful effects of Angiotensin II). Unlike ACE inhibitors:
  • They do NOT affect bradykinin, so NO dry cough
  • They provide more complete blockade of Ang II effects (Ang II made by alternative pathways is also blocked)
Therapeutic Uses: Same as ACE inhibitors - hypertension, heart failure, diabetic nephropathy, post-MI. Used as alternative when ACE inhibitor causes cough or angioedema.
Adverse Effects:
  • Hyperkalemia
  • Hypotension
  • Teratogenic (contraindicated in pregnancy)
  • NO cough
  • Rare angioedema (do NOT use if prior ACE-inhibitor angioedema)
Losartan special note: Has uricosuric property (reduces uric acid) - useful in hypertensive patients with gout.

3. Organic Nitrates

Drugs: Glyceryl trinitrate (GTN/Nitroglycerin), Isosorbide dinitrate (ISDN), Isosorbide mononitrate (ISMN), Amyl nitrite
Mechanism of Action: Organic nitrates are prodrugs. They release nitric oxide (NO) in vascular smooth muscle. NO activates guanylyl cyclase → ↑cGMP → activates protein kinase G → dephosphorylation of myosin light chain → vascular smooth muscle relaxation.
Pharmacological Effects:
  • Venodilation (at low doses): reduces preload (↓venous return, ↓ventricular filling, ↓wall tension)
  • Arteriolar dilation (at higher doses): reduces afterload
  • Dilates coronary arteries, especially collaterals and epicardial vessels
  • Redistributes coronary blood flow to ischemic subendocardium
Therapeutic Uses:
  1. Acute angina attack: Sublingual GTN (onset 1-2 min, duration 20-30 min)
  2. Prophylaxis of angina: ISDN or ISMN (oral)
  3. Acute LVF/pulmonary edema: IV GTN
  4. Unstable angina
  5. Esophageal spasm (smooth muscle relaxation)
  6. Cyanide poisoning (amyl nitrite - historical)
Pharmacokinetics:
  • GTN: extensive first-pass metabolism; sublingual/transdermal routes bypass liver
  • ISMN: no first-pass metabolism; oral route effective
Adverse Effects:
  1. Headache (throbbing - due to cerebral vasodilation) - most common
  2. Postural hypotension, dizziness, syncope
  3. Reflex tachycardia
  4. Methemoglobinemia (high doses)
  5. Tolerance: develops with continuous use (nitrate-free period of 8-12 hours needed)
Contraindications: Sildenafil/PDE-5 inhibitors (severe hypotension), severe hypotension, severe anemia, raised ICP.

4. Calcium Channel Blockers (CCBs)

Classification:
GroupDrugsMain Effect
Dihydropyridines (DHPs)Nifedipine, Amlodipine, Felodipine, NicardipinePredominantly vascular
PhenylalkylaminesVerapamilPredominantly cardiac (heart)
BenzothiazepinesDiltiazemIntermediate (heart + vessels)
Mechanism of Action: Block L-type voltage-gated calcium channels in:
  • Vascular smooth muscle → vasodilation (all CCBs)
  • Cardiac muscle → negative inotropic effect (mainly verapamil/diltiazem)
  • SA/AV node → negative chronotropy and dromotropy (mainly verapamil/diltiazem)
Pharmacological Effects:
  • Vasodilation (reduce peripheral resistance → lower BP)
  • Coronary dilation → increased coronary blood flow
  • Verapamil/diltiazem: slow HR, slow AV conduction, reduce cardiac contractility
Therapeutic Uses:
Dihydropyridines (e.g., Amlodipine, Nifedipine):
  1. Hypertension (first-line)
  2. Angina (vasospastic/Prinzmetal angina - drug of choice; stable angina)
  3. Raynaud's phenomenon
  4. Subarachnoid hemorrhage (Nimodipine - prevents cerebral vasospasm)
Verapamil/Diltiazem:
  1. Hypertension
  2. Angina (stable)
  3. Supraventricular tachyarrhythmias (SVT, AF, atrial flutter - slow AV conduction)
Adverse Effects:
  • DHPs: flushing, headache, peripheral edema, reflex tachycardia (especially nifedipine)
  • Verapamil: constipation (most common), bradycardia, AV block, cardiac depression
  • Diltiazem: intermediate - bradycardia, AV block, less constipation than verapamil
Contraindications:
  • Verapamil: NOT with beta-blockers (risk of complete heart block), NOT in Wolff-Parkinson-White syndrome with AF
  • All CCBs: avoid in severe LV dysfunction (verapamil/diltiazem)

5. Cardiac Glycosides (Digoxin)

Drug: Digoxin (from Digitalis lanata), Digitoxin (from D. purpurea)
Mechanism of Action: Digoxin inhibits Na+/K+-ATPase (the sodium pump) on cardiac cell membranes. This leads to:
  1. ↑Intracellular Na+ → Na+/Ca2+ exchanger is less able to extrude Ca2+ → ↑intracellular Ca2+ → positive inotropic effect (stronger contraction)
  2. Negative chronotropic effect (slows heart rate)
  3. Negative dromotropic effect (slows AV conduction - prolongs PR interval)
  4. Positive bathmotropic effect (increases ventricular automaticity - pro-arrhythmic in toxicity)
Therapeutic Uses:
  1. Heart failure with reduced ejection fraction (HFrEF) - reduces symptoms, improves exercise tolerance
  2. Atrial fibrillation/flutter - ventricular rate control (slows AV conduction)
  3. Atrial tachyarrhythmias
Pharmacokinetics:
  • Oral bioavailability: ~70%
  • Narrow therapeutic index (therapeutic range: 0.5-2.0 ng/mL)
  • Half-life: ~36 hours
  • Renal elimination (reduce dose in renal failure)
  • Hypokalemia potentiates toxicity (K+ and digoxin compete at Na+/K+-ATPase)
Toxicity (Digitalis Toxicity):
  • GI: nausea, vomiting, anorexia (earliest signs)
  • CNS: visual disturbances (xanthopsia - yellow/green vision), confusion, headache
  • Cardiac: virtually any arrhythmia - PVCs (most common), bigeminy, VT, AV block, PAT with block
Precipitating factors for toxicity: Hypokalemia, hypomagnesemia, hypercalcemia, hypothyroidism, renal failure, drug interactions (amiodarone, verapamil, quinidine - all increase digoxin levels).
Treatment of toxicity: Stop digoxin, correct electrolytes (K+, Mg2+), digoxin-specific antibody fragments (Fab fragments - Digibind) for life-threatening toxicity.

5-MARK TOPICS (Cardiovascular)


1. Sodium Nitroprusside

Mechanism: Direct NO donor; dilates both arteries and veins equally (balanced vasodilator). Requires IV infusion.
Uses:
  1. Hypertensive emergencies (drug of choice for most)
  2. Controlled hypotension during surgery
  3. Severe heart failure (acute)
  4. Aortic dissection (combined with beta-blocker)
Adverse Effects:
  1. Cyanide toxicity (nitroprusside is metabolized to cyanide; use thiocyanate monitor in prolonged use)
  2. Severe hypotension
  3. Reflex tachycardia
  4. Methemoglobinemia
Antidote for cyanide toxicity: Sodium thiosulfate

2. Classification of Antihypertensive Drugs

ClassExamples
DiureticsHydrochlorothiazide, Furosemide, Spironolactone
Beta-blockersAtenolol, Metoprolol, Propranolol
ACE InhibitorsEnalapril, Ramipril, Lisinopril
ARBsLosartan, Valsartan, Telmisartan
CCBsAmlodipine, Nifedipine, Verapamil
Centrally actingClonidine, Methyldopa
Alpha-1 blockersPrazosin, Doxazosin
VasodilatorsHydralazine, Minoxidil, Sodium nitroprusside
JNC guidelines first-line agents: ACE inhibitor or ARB + CCB + thiazide diuretic.

3. Pharmacotherapy of Acute MI

Immediate management (MONA):
  • M - Morphine (IV, for pain and anxiety; also reduces preload)
  • O - Oxygen (if SpO2 <94%)
  • N - Nitrates (sublingual GTN for chest pain, unless hypotension)
  • A - Aspirin (300 mg stat loading, then 75 mg daily - antiplatelet)
Antiplatelet therapy:
  • Aspirin + a P2Y12 inhibitor (Clopidogrel/Ticagrelor/Prasugrel) = DAPT (dual antiplatelet therapy)
Reperfusion:
  • Primary PCI (percutaneous coronary intervention) - preferred if within 12 hours
  • Thrombolysis (if PCI not available within 120 min): Streptokinase, Alteplase, Reteplase, Tenecteplase
Other drugs:
  • Beta-blockers (e.g., metoprolol): reduce HR and myocardial O2 demand, reduce mortality, prevent reinfarction
  • ACE inhibitors/ARBs: reduce ventricular remodeling, reduce mortality (especially if EF reduced)
  • Statins: high-intensity statin (atorvastatin 80 mg) - plaque stabilization
  • Anticoagulants: Heparin (UFH or LMWH), fondaparinux - prevent thrombus extension
  • GPIIb/IIIa inhibitors: Abciximab, Eptifibatide - used during PCI

4. Lignocaine (Lidocaine)

Class: Class IB antiarrhythmic (Na+ channel blocker)
Mechanism: Blocks fast Na+ channels preferentially in depolarized/ischemic tissue. Shortens action potential duration and effective refractory period. Selective for ventricles.
Uses:
  1. Ventricular arrhythmias (VT, VF) - especially post-MI, digital toxicity
  2. Local anesthetic (with/without adrenaline)
Route: IV only (extensive first-pass oral metabolism)
Adverse Effects: CNS toxicity at high doses - dizziness, perioral paresthesia, convulsions; cardiac depression

5. Amiodarone

Class: Class III antiarrhythmic (K+ channel blocker), but has properties of all 4 classes
Mechanism: Primarily blocks K+ channels → prolongs action potential and refractory period. Also blocks Na+/Ca2+ channels and has anti-adrenergic (alpha + beta) effects.
Uses:
  1. Ventricular tachycardia/fibrillation (VT/VF) - drug of choice in cardiac arrest
  2. Atrial fibrillation/flutter - conversion to sinus rhythm and maintenance
  3. Wolff-Parkinson-White syndrome
  4. Supraventricular tachycardias
Adverse Effects (very many due to iodine content and long half-life):
  1. Pulmonary toxicity (most serious - pneumonitis/fibrosis)
  2. Thyroid: hypothyroidism OR hyperthyroidism (drug contains 37% iodine)
  3. Hepatotoxicity
  4. Corneal microdeposits (most common - usually asymptomatic)
  5. Photosensitivity, blue-grey skin discoloration
  6. Peripheral neuropathy
  7. Bradycardia, prolonged QT interval
Half-life: Extremely long (40-55 days). Drug interactions: increases levels of digoxin, warfarin.

6. Adenosine

Mechanism: Activates adenosine A1 receptors in the AV node → hyperpolarizes AV nodal cells → transiently blocks AV conduction.
Uses:
  1. Drug of choice for acute termination of paroxysmal SVT (PSVT)
  2. Diagnostic agent to unmask atrial flutter
Half-life: Extremely short (~10 seconds); given as rapid IV bolus.
Adverse Effects: Transient chest pain, flushing, dyspnea, bronchospasm (avoid in asthma). Transient sinus arrest/AV block (brief).
Contraindications: Asthma, COPD, 2nd/3rd degree AV block, sick sinus syndrome. Antagonized by theophylline/caffeine; potentiated by dipyridamole.

3-MARK TOPICS (Cardiovascular)


1. Beta-Blockers in Angina and Hypertension

Drugs: Propranolol (non-selective), Atenolol, Metoprolol (beta-1 selective), Carvedilol (alpha+beta), Nebivolol.
Mechanism: Block beta-1 receptors in heart → ↓HR, ↓contractility, ↓BP → ↓myocardial O2 demand.
In Angina:
  • Reduce angina by decreasing heart rate and contractility → less O2 demand
  • Preferred in stable angina, and after MI
  • NOT first choice in vasospastic (Prinzmetal) angina (can worsen vasospasm by unopposed alpha activity)
In Hypertension:
  • Reduce cardiac output
  • Reduce renin release
  • Central mechanism
  • First-line in young hypertensives, hypertensives with CAD, post-MI, heart failure with reduced EF
Adverse Effects: Bradycardia, AV block, bronchospasm (non-selective - avoid in asthma), cold extremities, fatigue, impotence, mask hypoglycemia (diabetics), dyslipidemia (raise TG, lower HDL).
Contraindications: Asthma/COPD, uncompensated heart failure, 2nd/3rd degree AV block, sick sinus syndrome, Raynaud's disease.

2. Centrally Acting Sympatholytics - Clonidine

Mechanism: Alpha-2 agonist in the brainstem (nucleus tractus solitarius) → reduces sympathetic outflow → ↓HR, ↓BP, ↓peripheral resistance.
Uses:
  1. Hypertension (second-line, often used in resistant hypertension)
  2. Hypertensive emergency (oral/parenteral)
  3. Opioid withdrawal
  4. ADHD (off-label)
  5. Menopausal hot flashes
  6. Anesthetic premedication
Adverse Effects:
  1. Sedation and dry mouth (most common)
  2. Rebound hypertension on abrupt withdrawal (dangerous - taper slowly)
  3. Bradycardia
  4. Sexual dysfunction
  5. Depression
Other centrally acting drug: Methyldopa - drug of choice for hypertension in pregnancy.

3. Vasodilators

Direct acting vasodilators:
  • Hydralazine: Arteriolar dilator; used in hypertension, hypertensive crisis in pregnancy, heart failure (with nitrate). Adverse effects: reflex tachycardia, lupus-like syndrome (high doses), fluid retention.
  • Minoxidil: Potent arteriolar dilator (K+ channel opener); used for resistant hypertension. Adverse effects: hypertrichosis (used topically for alopecia), fluid retention, reflex tachycardia, pericardial effusion.
  • Sodium nitroprusside: Balanced vasodilator (see above).
  • Diazoxide: K+ channel opener; IV for hypertensive emergencies; also inhibits insulin secretion → used in insulinoma.

SECTION 2: BLOOD AND BLOOD FORMATION


5-MARK TOPICS


1. Hypolipidemic Drugs - Classification

Class I: HMG-CoA Reductase Inhibitors (Statins)
  • Drugs: Lovastatin, Simvastatin, Atorvastatin, Rosuvastatin, Pravastatin, Fluvastatin, Pitavastatin
  • MOA: Competitively inhibit HMG-CoA reductase (rate-limiting step in cholesterol synthesis in liver) → ↓intracellular cholesterol → upregulate LDL receptors → ↑LDL clearance from blood
  • Effects: ↓LDL-C (20-60%), ↓TG, modest ↑HDL; also pleiotropic effects (anti-inflammatory, plaque stabilization)
  • Uses: Primary prevention and secondary prevention of cardiovascular events; familial hypercholesterolemia
  • Adverse Effects: Myopathy/rhabdomyolysis (especially with fibrates, CYP3A4 inhibitors), elevated liver enzymes, new-onset diabetes
Class II: Bile Acid Sequestrants (Resins)
  • Drugs: Cholestyramine, Colestipol, Colesevelam
  • MOA: Bind bile acids in intestine → interrupt enterohepatic recirculation → liver uses more cholesterol to make bile acids → upregulates LDL receptors
  • Uses: Type IIa hypercholesterolemia; pruritus in cholestasis
  • Adverse Effects: Constipation, bloating; malabsorption of fat-soluble vitamins (A, D, E, K); interfere with absorption of many drugs
Class III: Fibric Acid Derivatives (Fibrates)
  • Drugs: Gemfibrozil, Fenofibrate, Bezafibrate, Clofibrate
  • MOA: Activate PPAR-alpha receptors → ↑lipoprotein lipase activity → ↑TG clearance; also ↓VLDL synthesis, modest ↑HDL
  • Uses: Hypertriglyceridemia, mixed dyslipidemia (type III, IV, V); first-line for TG >500 mg/dL (prevents pancreatitis)
  • Adverse Effects: GI upset, gallstones (↑cholesterol secretion in bile), myopathy (especially with statins), hepatotoxicity
Class IV: Nicotinic Acid (Niacin)
  • MOA: Inhibits lipolysis in adipose tissue → ↓free fatty acids → ↓hepatic VLDL synthesis; most effectively ↑HDL-C
  • Uses: Hypertriglyceridemia, low HDL, mixed dyslipidemia
  • Adverse Effects: Flushing and pruritus (prostaglandin-mediated; reduce with aspirin), hyperglycemia, hyperuricemia, hepatotoxicity, acanthosis nigricans
Class V: Cholesterol Absorption Inhibitors
  • Drug: Ezetimibe
  • MOA: Inhibits NPC1L1 transporter in intestinal brush border → ↓cholesterol absorption
  • Used in combination with statins
Class VI: PCSK9 Inhibitors (Newer)
  • Drugs: Evolocumab, Alirocumab (monoclonal antibodies)
  • MOA: Inhibit PCSK9 → ↑LDL receptor recycling → ↑LDL clearance

Tx of Type I Hypercholesterolemia (Familial Hypercholesterolemia - Homozygous):
  • Statins less effective (no functional LDL receptors)
  • LDL apheresis, PCSK9 inhibitors, lomitapide

2. Plasma Volume Expanders

Classification:
A. Colloids (macromolecules - stay in vasculature longer):
  1. Natural: Human albumin (4% or 20%), Fresh frozen plasma (FFP)
  2. Synthetic:
    • Dextrans (Dextran 40, Dextran 70): polysaccharides; Dextran 40 improves microcirculation (↓RBC aggregation, ↓viscosity)
    • Hydroxyethyl starch (HES): risk of coagulopathy, renal impairment
    • Gelatin solutions (Haemaccel, Gelofusine)
B. Crystalloids (distribute to extracellular space):
  1. Normal saline (0.9% NaCl)
  2. Ringer's lactate (most physiological crystalloid)
  3. Glucose solutions
Uses: Hypovolemic shock, burns, major surgery, hemorrhage.
Dextran special uses:
  • Dextran 40: prevents deep vein thrombosis, improves peripheral vascular disease
  • Can cause anaphylaxis; interfere with blood grouping

3. Thrombolytics (Fibrinolytics)

Mechanism: All convert plasminogen → plasmin → plasmin breaks down fibrin clots.
DrugGenerationDetails
Streptokinase1stNon-fibrin-specific; antigenic; allergic reactions; given by IV infusion; cheaper
Urokinase1stNon-fibrin-specific; non-antigenic; expensive
Alteplase (t-PA)2ndFibrin-specific; activated only at clot site; short half-life
Reteplase2ndFibrin-specific; can give as bolus
Tenecteplase3rdMost fibrin-specific; single IV bolus; longest half-life
Uses:
  1. Acute STEMI (if PCI not available within 120 min) - streptokinase/alteplase/tenecteplase
  2. Massive pulmonary embolism
  3. Acute ischemic stroke (alteplase within 4.5 hours)
  4. DVT (massive)
  5. Peripheral arterial thrombosis
Contraindications: Active internal bleeding, recent surgery/trauma (<10 days), recent stroke (<3 months), severe hypertension, aortic dissection, pregnancy.
Adverse Effects: Bleeding (most common), reperfusion arrhythmias, intracranial hemorrhage (most serious), allergic reactions (streptokinase).

4. Antiplatelet Drugs - Classification, MOA, Uses

Classification:
A. COX-1 Inhibitors:
  • Aspirin: Irreversibly inhibits COX-1 → ↓TXA2 synthesis in platelets → ↓platelet aggregation. Low dose (75-150 mg daily). Platelet effect lasts 7-10 days (platelet lifespan).
  • Uses: Prevention of MI and stroke; unstable angina; post-CABG; DAPT in ACS
B. P2Y12 ADP Receptor Antagonists:
  • Clopidogrel: Prodrug; irreversible P2Y12 blocker (requires CYP2C19 for activation - poor metabolizers do not respond)
  • Ticagrelor: Direct-acting (no prodrug activation needed); reversible P2Y12 blocker; faster onset
  • Prasugrel: Prodrug; faster activation; more potent; higher bleeding risk
  • Uses: ACS, DAPT with aspirin, post-coronary stent
C. GPIIb/IIIa Inhibitors:
  • Abciximab (monoclonal antibody), Eptifibatide, Tirofiban
  • Block final common pathway of platelet aggregation (fibrinogen binding)
  • IV only; used during PCI
D. PDE Inhibitors (↑cAMP in platelets):
  • Dipyridamole, Cilostazol
  • Used in peripheral vascular disease (cilostazol), stroke prevention (dipyridamole + aspirin = Aggrenox)

Rational use of prophylactic aspirin in MI:
  • Aspirin irreversibly inhibits platelet COX-1 → prevents TXA2-mediated platelet aggregation → reduces risk of coronary thrombosis
  • Low dose (75-150 mg/day) is effective; higher doses may inhibit prostacyclin (PGI2) in vessel wall (which is anti-thrombotic) without extra benefit
  • Indicated: All patients with established CAD, ACS, post-MI, post-stent, post-stroke/TIA
  • Risk-benefit must be weighed in primary prevention (especially elderly)

5. Anticoagulants - Classification (Antithrombotics)

A. Parenteral Anticoagulants:
  1. Unfractionated Heparin (UFH):
    • MOA: Binds antithrombin III → ↑its activity 1000x → inhibits Factor Xa and IIa (thrombin) equally (1:1)
    • Monitor with aPTT (goal: 1.5-2.5x normal)
    • Antidote: Protamine sulfate
    • Uses: DVT/PE (treatment), ACS, during cardiac surgery, dialysis
    • Complications: Bleeding, HIT (Heparin-Induced Thrombocytopenia - immune-mediated, type II), osteoporosis (long-term), hypoaldosteronism
  2. Low Molecular Weight Heparin (LMWH) - Enoxaparin, Dalteparin:
    • MOA: Mainly anti-Factor Xa (Xa:IIa ratio = 2-4:1)
    • Does NOT need monitoring (predictable pharmacokinetics)
    • SC injection; longer half-life than UFH
    • Less HIT risk
    • Antidote: Protamine sulfate (partially reverses)
  3. Fondaparinux: Selective Factor Xa inhibitor; synthetic pentasaccharide; NO HIT risk; no antidote.
B. Oral Anticoagulants:
  1. Warfarin:
    • MOA: Inhibits Vitamin K epoxide reductase → ↓synthesis of Vitamin K-dependent clotting factors (II, VII, IX, X) and Proteins C and S
    • Monitor with INR (goal usually 2-3)
    • Onset: 2-5 days (because existing factors must be depleted); "lag period"
    • Antidote: Vitamin K (slow reversal, 6-24h), FFP/4-factor PCC (rapid reversal)
    • Interactions: Many drug and food interactions (CYP2C9 substrate)
    • Uses: AF (prevent stroke), DVT/PE (long-term), mechanical heart valves, antiphospholipid syndrome
  2. Direct Oral Anticoagulants (DOACs):
    • Factor Xa inhibitors: Rivaroxaban, Apixaban, Edoxaban
    • Direct thrombin inhibitors: Dabigatran
    • No monitoring needed; fewer interactions; predictable pharmacokinetics
    • Reversal agents: Idarucizumab (dabigatran), Andexanet alfa (Xa inhibitors)

10-MARK TOPICS (Blood)


1. Anticoagulants - Parenteral and Oral (Full detail above)

Iron - Absorption and Storage (Haematinics)

Iron Absorption:
  • Daily requirement: 8-18 mg/day (men 8 mg; women of reproductive age 18 mg; pregnant women 27 mg)
  • Dietary iron: 10-20 mg/day → only 10% absorbed
  • Ferrous (Fe2+) is better absorbed than ferric (Fe3+); ascorbic acid (Vitamin C) converts Fe3+ to Fe2+ → enhances absorption
  • Absorbed in proximal duodenum and proximal jejunum by DMT-1 (divalent metal transporter 1)
  • Inside enterocyte: used directly or stored as ferritin
  • Exported to blood via ferroportin (regulated by hepcidin - master regulator of iron homeostasis)
  • In blood: carried by transferrin (apotransferrin + 2 Fe3+)
  • Stored as ferritin (liver, spleen, bone marrow) and hemosiderin (insoluble form, in overload)
Oral Preparations:
  • Ferrous sulphate (most commonly used, cheapest)
  • Ferrous gluconate, Ferrous fumarate
  • Dosing: 200 mg ferrous sulphate (65 mg elemental iron) 2-3x/day
  • Side effects: Nausea, GI upset, constipation or diarrhea, black stools
  • Take on empty stomach (better absorption, but more GI side effects)
  • Response: Reticulocytosis in 7-10 days; Hb rise ~1 g/dL per week
Parenteral Preparations (for iron deficiency when oral not tolerated/not absorbed):
  • Iron sucrose (Venofer), Iron dextran, Ferric carboxymaltose, Sodium ferric gluconate
  • Given IV (IM causes staining, pain)
  • Risk of anaphylaxis with iron dextran (test dose required)
  • Uses: Chronic kidney disease (CKD), IBD, malabsorption syndromes, severe iron deficiency, intolerance to oral iron
Acute Iron Poisoning: Nausea, vomiting, GI hemorrhage → shock → acidosis. Treatment: Gastric lavage, desferrioxamine (chelating agent - IV/IM).

Vitamin B12

Source: Animal products (meat, eggs, dairy); synthesized by gut bacteria but not well absorbed.
Absorption:
  • Requires Intrinsic Factor (IF) (secreted by gastric parietal cells)
  • B12 + IF complex → absorbed in terminal ileum by cubilin receptors
  • Stored in liver (3-5 years stores)
Deficiency causes:
  1. Pernicious anemia (autoimmune destruction of parietal cells/IF)
  2. Strict veganism
  3. Gastric surgery (gastrectomy - lose parietal cells)
  4. Terminal ileum disease (Crohn's disease)
  5. Fish tapeworm (Diphyllobothrium latum) - competes for B12
Clinical features:
  • Megaloblastic anemia (↑MCV, hypersegmented neutrophils)
  • Subacute combined degeneration of spinal cord (posterior and lateral columns)
  • Glossitis (beefy red tongue)
  • Peripheral neuropathy
Treatment:
  • Hydroxocobalamin IM (preferred - binds to plasma proteins, longer action)
  • Cyanocobalamin (synthetic, shorter acting)
  • Oral B12 (large doses can be absorbed in pernicious anemia by passive diffusion - 1-2%)

Folic Acid

Role: Tetrahydrofolate (THF) is essential for purine and pyrimidine synthesis → DNA synthesis → required for rapidly dividing cells (RBCs, GI epithelium, fetus).
Deficiency causes: Inadequate intake, malabsorption (celiac), increased demand (pregnancy, hemolysis), drugs (methotrexate, trimethoprim, phenytoin, sulfasalazine).
Clinical features: Megaloblastic anemia (same as B12 but NO neurological features).
Treatment: Folic acid 5 mg daily orally; 400 mcg/day in pregnancy (prevention of neural tube defects).
Leucovorin (Folinic acid): Reduced folate; bypasses DHFR block by methotrexate; used as "rescue" therapy.

Erythropoietin (EPO)

Physiology: Glycoprotein hormone produced mainly by peritubular fibroblasts of the kidney (85%) and liver (15%) in response to hypoxia. Stimulates erythroid progenitor cells in bone marrow to proliferate and differentiate.
Recombinant EPO preparations:
  • Epoetin alfa (Eprex)
  • Epoetin beta
  • Darbepoetin alfa (longer half-life - weekly dosing)
  • Methoxy polyethylene glycol-epoetin beta (CERA - monthly dosing)
Uses:
  1. Anemia of chronic kidney disease (most important indication)
  2. Anemia due to cancer chemotherapy
  3. Anemia in HIV (zidovudine therapy)
  4. Pre-surgery (autologous blood donation stimulation)
  5. Myelodysplastic syndrome
Administration: SC or IV injection; requires iron supplementation for optimal response.
Adverse Effects:
  1. Hypertension (most common serious adverse effect - increase BP monitoring)
  2. Thrombosis/thromboembolic events
  3. Flu-like symptoms
  4. Pure red cell aplasia (rare - due to anti-EPO antibodies - with SC route of epoetin alfa)
  5. Headache

SECTION 3: CHEMOTHERAPY


10-MARK TOPICS


1. Fluoroquinolones

Drugs: Nalidixic acid (1st gen), Norfloxacin (2nd gen), Ciprofloxacin (3rd gen - most used), Ofloxacin, Levofloxacin, Moxifloxacin (4th gen)
Mechanism of Action: Inhibit DNA gyrase (topoisomerase II) - primarily in gram-negative bacteria, and topoisomerase IV - primarily in gram-positive bacteria. These enzymes are required for DNA replication, transcription, and repair. Fluoroquinolones are bactericidal.
Spectrum:
  • Ciprofloxacin: Excellent gram-negative coverage (Pseudomonas, E. coli, Klebsiella, H. influenzae, Salmonella, Shigella)
  • Levofloxacin, Moxifloxacin: Extended to gram-positives (S. pneumoniae) and atypicals (Mycoplasma, Chlamydia, Legionella) - "respiratory fluoroquinolones"
Therapeutic Uses:
  1. UTI (especially complicated UTI, prostatitis - ciprofloxacin/ofloxacin)
  2. Respiratory tract infections (Levofloxacin, Moxifloxacin - community-acquired pneumonia)
  3. Enteric fever / Typhoid (ciprofloxacin)
  4. Gonorrhea
  5. Anthrax (ciprofloxacin - drug of choice for post-exposure prophylaxis)
  6. Tuberculosis (second-line - levofloxacin/moxifloxacin)
  7. Osteomyelitis
Pharmacokinetics:
  • Excellent oral bioavailability (comparable to IV)
  • Wide tissue distribution; penetrates well into prostate
  • Chelated by divalent cations (antacids with Mg2+, Al3+, Ca2+, Fe2+) → reduced absorption (take 2 hours apart)
  • Mostly renally excreted (adjust dose in renal failure); Moxifloxacin - fecal
Adverse Effects:
  1. GI effects (nausea, vomiting - most common)
  2. CNS effects (headache, dizziness, rarely seizures, hallucinations) - especially in elderly
  3. Tendinopathy and tendon rupture (Achilles tendon - especially with corticosteroids)
  4. QT prolongation (especially moxifloxacin)
  5. Phototoxicity (avoid sun exposure)
  6. Arthropathy (damage to cartilage in young animals) → contraindicated in children, pregnancy, breastfeeding
  7. C. difficile colitis

2. Beta-Lactam Antibiotics

Mechanism of Action: All beta-lactams bind to and inhibit Penicillin Binding Proteins (PBPs) (which are transpeptidases that cross-link peptidoglycan chains in the bacterial cell wall). This prevents cell wall synthesis → osmotic lysis → bactericidal effect.

A. Penicillins

Classification:
GroupDrugsSpectrum
Natural penicillinsPenicillin G (IV), Penicillin V (oral)Narrow: Streptococcus, Neisseria, Clostridium, Spirochetes, Actinomyces
AminopenicillinsAmpicillin, AmoxicillinExtended: gram-positives + gram-negatives (E. coli, H. influenzae, Salmonella, Listeria)
Anti-staph penicillinsCloxacillin, Flucloxacillin, Methicillin, NafcillinMSSA (staph producing penicillinase)
Anti-pseudomonalPiperacillin, TicarcillinPseudomonas aeruginosa + gram-negatives
Beta-lactamase inhibitors (added to protect penicillin from enzymatic degradation):
  • Clavulanic acid + Amoxicillin = Augmentin (Co-amoxiclav)
  • Sulbactam + Ampicillin = Unasyn
  • Tazobactam + Piperacillin = Tazocin/Zosyn
Penicillin G:
  • Drug of choice for: Streptococcal pharyngitis, syphilis (T. pallidum), meningococcal meningitis, gas gangrene (Clostridium), rheumatic fever prophylaxis, actinomycosis
  • Adverse effects: Hypersensitivity reactions (most important - anaphylaxis, urticaria, serum sickness); neurotoxicity (high doses - seizures); electrolyte disturbances (large doses of Na+ or K+ penicillin G)

B. Cephalosporins

Generations:
GenerationExamplesCoverage
1stCefazolin (IV), Cefalexin (oral)Gram-positives > gram-negatives; surgical prophylaxis
2ndCefuroxime, CefaclorBroader gram-negative; H. influenzae, Moraxella
3rdCeftriaxone, Cefotaxime, CeftazidimeBroader gram-negatives; meningitis (cross BBB); Ceftazidime covers Pseudomonas
4thCefepimeAnti-pseudomonal + gram-positives
5thCeftarolineMRSA activity
Ceftriaxone: Drug of choice for gonorrhea, meningococcal meningitis, typhoid fever (alternatives). Long half-life (once daily dosing).

C. Carbapenems

Drugs: Imipenem (+ cilastatin), Meropenem, Ertapenem, Doripenem
Spectrum: Broadest of all antibiotics - gram-positives, gram-negatives, anaerobes; resistant to most beta-lactamases. Effective against most MDR organisms.
  • Imipenem + Cilastatin: Cilastatin inhibits renal dehydropeptidase (which inactivates imipenem)
  • Uses: Severe/nosocomial infections, febrile neutropenia, MDR gram-negative infections, intra-abdominal sepsis
  • Adverse: Seizures (imipenem - especially in renal failure or high doses); meropenem has less seizure risk

D. Monobactams

Drug: Aztreonam
Spectrum: Gram-negatives ONLY (including Pseudomonas); safe in penicillin allergy (no cross-reactivity with penicillin, except in ceftazidime-allergic patients).

3. Macrolide Antibiotics

Drugs: Erythromycin, Clarithromycin, Azithromycin, Roxithromycin, Spiramycin
Mechanism: Bind to 50S ribosomal subunit (23S rRNA) → block translocation step of protein synthesis → bacteriostatic (bactericidal at high concentrations).
Spectrum: Gram-positives, atypical organisms (Mycoplasma, Chlamydia, Legionella, Ureaplasma), some gram-negatives (H. influenzae - azithromycin/clarithromycin), Helicobacter pylori (clarithromycin), MAC (Mycobacterium avium complex).
Azithromycin:
  • Unique pharmacokinetics: very long half-life (~68 hours), concentrated in tissues (high tissue:plasma ratio); 5-day course equivalent to longer course
  • Uses: Community-acquired pneumonia (atypicals), URTI, STI (Chlamydia - single 1 g dose), traveler's diarrhea, MAC prophylaxis
Clarithromycin:
  • H. pylori triple therapy (with PPI + amoxicillin)
  • MAC prophylaxis and treatment
  • Respiratory infections
Adverse Effects:
  1. GI effects (most common - nausea, vomiting, diarrhea, abdominal cramps); erythromycin is a motilin agonist (used as prokinetic)
  2. Cholestatic jaundice (erythromycin estolate - avoid in pregnancy/liver disease)
  3. QT prolongation (especially azithromycin, clarithromycin)
  4. Ototoxicity (high dose erythromycin IV)
  5. Drug interactions: CYP3A4 inhibitors (erythromycin, clarithromycin - increase levels of statins, warfarin, etc.)

4. Antitubercular Drugs

First-line drugs (RIPES):
DrugMOASide Effects
RifampicinInhibits DNA-dependent RNA polymeraseOrange-red urine/body fluids; hepatotoxicity; potent CYP inducer; drug interactions (reduces efficacy of OCP, warfarin, etc.); flu-like syndrome
Isoniazid (INH)Inhibits mycolic acid synthesis (inhibits InhA) - prodrug activated by KatGPeripheral neuropathy (prevent with pyridoxine/Vit B6); hepatotoxicity; drug-induced lupus; psychosis; slow vs fast acetylators
PyrazinamideMechanism uncertain - disrupts membrane energy metabolism; active in acidic environment (inside macrophages)Hepatotoxicity (most common serious); hyperuricemia (gout); arthralgia
EthambutolInhibits arabinosyl transferase → ↓arabinogalactan synthesis in cell wallOptic neuritis (dose-dependent, reversible); ↓visual acuity, red-green color blindness; contraindicated in children <5 years (cannot report visual symptoms)
StreptomycinAminoglycoside; inhibits 30S ribosome; only injectable first-line agentOtotoxicity (vestibular > cochlear); nephrotoxicity; teratogenic
Standard ATT regimen:
  • Intensive phase (2 months): RIPE (Rifampicin + Isoniazid + Pyrazinamide + Ethambutol)
  • Continuation phase (4 months): RI (Rifampicin + Isoniazid)

5. Antimalarial Drugs - Chloroquine

Classification of antimalarials:
GroupDrugsStage active against
4-AminoquinolinesChloroquine, Hydroxychloroquine, AmodiaquineBlood schizontocide; chloroquine also gametocidal for P.vivax/ovale
Aryl alcoholsQuinine, Mefloquine, HalofantrineBlood schizontocide
Artemisinin derivativesArtemisinin, Artesunate, Artemether, DihydroartemisininFastest acting blood schizontocide; active against all stages
8-AminoquinolinesPrimaquine, TafenoquineHypnozoitocidal (P. vivax/ovale liver stages); gametocidal
AntifolatesPyrimethamine, Proguanil, SulfadoxineBlood schizontocide
AntibioticsDoxycycline, Tetracycline, ClindamycinBlood schizontocide (slow acting)
HydroxynaphthoquinoneAtovaquone (+ proguanil = Malarone)Blood + liver stages
Chloroquine:
  • MOA: Accumulates in parasite food vacuole → inhibits hemozoin formation → toxic free heme accumulates → kills parasite
  • Uses: P. vivax, P. ovale, P. malariae (susceptible strains); prophylaxis in chloroquine-sensitive areas; rheumatoid arthritis, SLE (antimalarial effect)
  • Adverse effects: GI upset, pruritus (especially in dark-skinned patients), headache; chronic toxicity - retinopathy (most serious - irreversible, dose-dependent; requires regular ophthalmological monitoring), cardiomyopathy; hypersensitivity; contraindicated in psoriasis, porphyria
Primaquine: Only drug active against liver hypnozoites (P. vivax/ovale) - prevents relapse. Causes hemolytic anemia in G6PD-deficient patients (must screen for G6PD deficiency before use).

5-MARK TOPICS (Chemotherapy)


Clotrimazole / Antifungal Drugs

Classification of Antifungals:
ClassDrugsMOA
AzolesFluconazole, Itraconazole, Voriconazole, Ketoconazole, Clotrimazole, MiconazoleInhibit CYP51 (lanosterol 14-alpha demethylase) → ↓ergosterol synthesis → ↑toxic sterol precursors
PolyenesAmphotericin B, NystatinBind ergosterol → form pores in membrane → ion leakage → cell death
EchinocandinsCaspofungin, Micafungin, AnidulafunginInhibit beta-1,3-glucan synthase → ↓cell wall synthesis
AntimetabolitesFlucytosine (5-FC)Converted to 5-FU inside fungal cells → inhibits DNA/RNA synthesis
AllylaminesTerbinafine, NaftifineInhibit squalene epoxidase → ↓ergosterol; ↑squalene (toxic)
MorpholinesAmorolfineInhibit ergosterol synthesis
Amphotericin B:
  • Drug of choice for: Aspergillosis, Cryptococcal meningitis (with flucytosine), Histoplasmosis, Coccidioidomycosis, Mucormycosis
  • Adverse effects: Nephrotoxicity (dose-limiting - most serious); infusion-related reactions (fever, chills, rigors - "shake and bake" - premedicate with paracetamol/hydrocortisone); hypokalemia, hypomagnesemia; anemia
  • Liposomal formulation (AmBisome) - less nephrotoxic; preferred for CNS infections
Fluconazole:
  • Drug of choice for Cryptococcal meningitis maintenance therapy, oral/esophageal/vaginal candidiasis, Coccidioidomycosis
  • Well-tolerated; CYP2C9/3A4 inhibitor (drug interactions)
Ketoconazole: No longer first-line (hepatotoxicity, endocrine effects); still used topically (seborrheic dermatitis, pityriasis versicolor).

Fluoroquinolones (see above)

Beta-Lactamase Inhibitors

Drugs: Clavulanic acid, Sulbactam, Tazobactam, Avibactam
  • "Suicide inhibitors" - bind irreversibly to beta-lactamase enzymes
  • Used in combination with amoxicillin, ampicillin, piperacillin to restore their effectiveness against beta-lactamase-producing organisms
  • No antibacterial activity alone

Aminoglycosides

Drugs: Streptomycin, Gentamicin, Tobramycin, Amikacin, Neomycin, Kanamycin, Netilmicin
MOA: Bind irreversibly to 30S ribosomal subunit → misreading of mRNA → abnormal/toxic proteins inserted into membrane → concentration-dependent bactericidal.
Spectrum: Mainly aerobic gram-negative bacteria (E. coli, Klebsiella, Pseudomonas, Enterobacter); synergistic with beta-lactams against enterococci and streptococci.
Uses:
  1. Severe gram-negative infections (sepsis, pneumonia, UTI, meningitis)
  2. Streptomycin: Tuberculosis, Brucellosis, Plague, Tularemia
  3. Gentamicin/tobramycin: Pseudomonas infections, endocarditis (synergy)
  4. Neomycin: Topical; pre-operative gut decontamination (oral)
Adverse Effects (most important):
  1. Ototoxicity (cochlear - high-frequency hearing loss, tinnitus; vestibular - vertigo, nystagmus) - irreversible
  2. Nephrotoxicity (acute tubular necrosis - reversible usually; monitor creatinine and drug levels)
  3. Neuromuscular blockade (especially in myasthenia gravis, post-anaesthesia)
  4. Teratogenic (avoid in pregnancy - fetal ototoxicity)
Contraindications: Avoid concurrent furosemide (synergistic ototoxicity), nephrotoxic drugs.

Tetracyclines

Drugs: Tetracycline, Doxycycline, Minocycline, Tigecycline (glycylcycline)
MOA: Bind reversibly to 30S ribosomal subunit → block aminoacyl-tRNA from binding to A-site → inhibit protein synthesis → bacteriostatic.
Spectrum: Broad - gram-positives, gram-negatives, atypicals (Rickettsia, Chlamydia, Mycoplasma, Spirochetes), Brucella, H. pylori.
Uses:
  1. Chlamydial infections (LGV, psittacosis, trachoma)
  2. Rickettsial diseases (RMSF, typhus, Q fever) - drug of choice
  3. Brucellosis (doxycycline + rifampicin)
  4. Cholera (doxycycline)
  5. Lyme disease (doxycycline)
  6. Malaria prophylaxis
  7. Acne vulgaris (oral and topical)
  8. Syphilis (alternative to penicillin)
Adverse Effects:
  1. GI effects (most common - take with water, avoid dairy within 2 hours)
  2. Photosensitivity (especially doxycycline)
  3. Hepatotoxicity (IV, high doses)
  4. Antianabolic effects (increase BUN in renal failure patients)
  5. Teeth discoloration and enamel hypoplasia in children - chelate calcium
  6. Bone growth retardation in children
  7. Contraindicated in children under 8 years and pregnant women
  8. Vestibular toxicity (minocycline - dizziness)

Dapsone

Drug class: Sulfone
MOA: Inhibits dihydropteroate synthase (same target as sulfonamides) → ↓folate synthesis in bacteria → bacteriostatic.
Uses:
  1. Leprosy (MDT in leprosy - dapsone + rifampicin + clofazimine)
  2. Dermatitis herpetiformis (drug of choice)
  3. PCP (Pneumocystis jirovecii pneumonia) - prophylaxis and treatment (alternative to TMP-SMX)
  4. Malaria prophylaxis (with pyrimethamine)
Adverse Effects:
  1. Hemolytic anemia - especially in G6PD deficiency
  2. Methemoglobinemia
  3. Peripheral neuropathy
  4. Dapsone hypersensitivity syndrome ("dapsone syndrome") - fever, rash, lymphadenopathy
  5. Agranulocytosis (rare)

Ketoconazole / Fluconazole / Amphotericin B (see Antifungals above)


Nucleoside Reverse Transcriptase Inhibitors (NRTIs)

Drugs: Zidovudine (AZT), Lamivudine (3TC), Emtricitabine (FTC), Tenofovir (TDF), Abacavir, Stavudine, Didanosine
MOA: Incorporated into viral DNA as chain terminators → inhibit HIV reverse transcriptase (by competitive inhibition) → no proviral DNA synthesis.
Adverse Effects:
  • Zidovudine: Bone marrow suppression (anemia, neutropenia), myopathy, nail pigmentation, lactic acidosis
  • Tenofovir: Nephrotoxicity, bone demineralization (Fanconi syndrome)
  • Abacavir: Hypersensitivity reaction (HLA-B*5701 screening before use - potentially fatal)
  • Class effect: Lactic acidosis, hepatic steatosis (mitochondrial toxicity)

3-MARK TOPICS (Chemotherapy)


Leprosy Action / Dapsone

MDT for Paucibacillary leprosy (PB - 1-5 lesions): Rifampicin (monthly supervised) + Dapsone (daily self-administered) - 6 months.
MDT for Multibacillary leprosy (MB - >5 lesions): Rifampicin + Dapsone + Clofazimine - 12 months.
Clofazimine:
  • MOA: Binds to guanine residues of DNA; also has anti-inflammatory effect
  • Uses: MB leprosy; dapsone-resistant leprosy; MAC infections
  • Adverse: Skin pigmentation (orange-brown to black) - reversible over months/years; GI effects

Drugs Used for Acute Attack of Malaria

i) Uncomplicated P. falciparum malaria:
  • Artemisinin-based Combination Therapy (ACT) is the standard:
    • Artemether + Lumefantrine (Coartem) - most used globally
    • Artesunate + Amodiaquine
    • Artesunate + Mefloquine
    • Artesunate + Sulfadoxine-Pyrimethamine
ii) Severe/complicated P. falciparum malaria:
  • IV Artesunate - drug of choice (superior to IV Quinine)
  • IV Quinine (if artesunate not available) + Doxycycline/Clindamycin
iii) P. vivax/P. ovale malaria:
  • Chloroquine (if susceptible) + Primaquine (to eradicate liver hypnozoites/prevent relapse)
  • Primaquine contraindicated in G6PD deficiency and pregnancy

Albendazole / Mebendazole (Antihelminthics)

MOA: Bind to beta-tubulin → inhibit tubulin polymerization → prevent formation of intracellular microtubules → impair glucose uptake in helminths → death.
Mebendazole: Not well absorbed (stays in gut - useful for intestinal helminths; not useful for tissue infections). Albendazole: Well-absorbed (with fatty food); active against both intestinal and tissue helminths.
Uses:
  • Roundworm (Ascaris), pinworm (Enterobius), hookworm (Necator, Ancylostoma): Albendazole/Mebendazole
  • Hydatid disease (Echinococcus granulosus): Albendazole (long-term, often with surgery/PAIR)
  • Neurocysticercosis (Taenia solium - brain): Albendazole
  • Strongyloides: Albendazole (Ivermectin preferred)
  • Filariasis: Albendazole + DEC or Albendazole + Ivermectin
Adverse effects: Generally well-tolerated; GI effects; hepatotoxicity (high-dose/long-term); teratogenic (avoid in 1st trimester of pregnancy).

Ivermectin

MOA: Binds to glutamate-gated Cl- channels (invertebrate-specific) → increases Cl- permeability → hyperpolarization → paralysis and death of parasite.
Uses:
  1. Onchocerciasis (River blindness) - drug of choice
  2. Strongyloidiasis
  3. Filariasis (Lymphatic filariasis program - WHO MDA)
  4. Scabies and pediculosis (topical or oral)
  5. Cutaneous larva migrans

Anticancer Drugs - Classification

ClassMechanismExamples
Alkylating agentsCross-link DNA strands → prevent DNA replicationCyclophosphamide, Ifosfamide, Chlorambucil, Melphalan, Busulfan, Carmustine
AntimetabolitesBlock nucleotide synthesis or DNA synthesisMethotrexate (DHFR inhibitor), 5-FU (thymidylate synthase inhibitor), Cytarabine, Gemcitabine, 6-MP, 6-TG
Plant alkaloids (Vinca)Inhibit tubulin polymerization → prevent spindle formation → arrest in metaphaseVincristine, Vinblastine, Vinorelbine
TaxanesPromote tubulin polymerization → prevent spindle disassembly → arrest in metaphasePaclitaxel, Docetaxel
Topoisomerase inhibitorsTopotecan, Irinotecan (topo I); Etoposide, Teniposide (topo II)
Antitumor antibioticsDoxorubicin (anthracycline), Bleomycin, Mitomycin C, Actinomycin D
Platinum compoundsIntra/interstrand cross-linking of DNACisplatin, Carboplatin, Oxaliplatin
Monoclonal antibodiesTargeted therapyRituximab (anti-CD20), Trastuzumab (anti-HER2), Bevacizumab (anti-VEGF)
Tyrosine kinase inhibitorsImatinib (BCR-ABL), Gefitinib/Erlotinib (EGFR)
HormonalBlock hormone-driven tumor growthTamoxifen, Anastrozole, Flutamide, Bicalutamide
Cyclophosphamide:
  • Alkylating agent; prodrug activated in liver (by CYP) to active metabolite phosphoramide mustard
  • Uses: Lymphoma, leukemia, breast cancer, ovarian cancer, autoimmune diseases (RA, SLE, vasculitis), organ transplantation
  • Adverse: Hemorrhagic cystitis (due to acrolein - toxic metabolite; prevent with mesna + adequate hydration), bone marrow suppression, nausea/vomiting, alopecia, immunosuppression, SIADH, infertility
Methotrexate:
  • Antimetabolite; inhibits DHFR (dihydrofolate reductase) → ↓THF → ↓purine and thymidylate synthesis → ↓DNA synthesis
  • Uses: Acute lymphoblastic leukemia, lymphoma, breast cancer, osteosarcoma; also RA, psoriasis, ectopic pregnancy
  • Adverse: Myelosuppression, mucositis, hepatotoxicity (cirrhosis with chronic use), pulmonary fibrosis, teratogenic
  • Leucovorin rescue (folinic acid) given after high-dose MTX to protect normal cells
Vinca alkaloids (Vincristine/Vinblastine):
  • Vincristine: Peripheral neuropathy (dose-limiting), alopecia, minimal myelosuppression; used in ALL, lymphoma, Wilms tumor
  • Vinblastine: Myelosuppression (dose-limiting); used in Hodgkin lymphoma, testicular cancer

RENAL PHARMACOLOGY


Classification of Diuretics

ClassDrugsSite of ActionMechanism
Loop diureticsFurosemide, Bumetanide, Ethacrynic acid, TorsemideThick ascending limb of loop of HenleBlock Na+/K+/2Cl- cotransporter (NKCC2)
ThiazidesHydrochlorothiazide (HCTZ), Chlorthalidone, IndapamideDistal convoluted tubuleBlock Na+/Cl- cotransporter (NCC)
K+-sparingSpironolactone, Eplerenone; Amiloride, TriamtereneCollecting duct/tubuleSpiro: Aldosterone antagonist; Amiloride: block ENaC
OsmoticMannitolProximal tubule, loop, collecting ductOsmotic retention of water in tubule
CA inhibitorsAcetazolamideProximal tubuleBlock carbonic anhydrase → ↓HCO3- reabsorption
Antidiuretic hormone antagonistsConivaptan, Tolvaptan (Vaptans)Collecting ductBlock V2 receptors

Carbonic Anhydrase Inhibitors - Acetazolamide

MOA: Inhibits carbonic anhydrase in proximal tubule → ↓H+ secretion → ↓Na+/H+ exchange → ↓NaHCO3 reabsorption → HCO3-, Na+, K+, water excreted in urine → weak diuresis; metabolic acidosis develops.
Uses:
  1. Glaucoma (↓aqueous humor formation - CA inhibition in ciliary body) - main use
  2. Altitude sickness prophylaxis (alkalizes urine; stimulates breathing by causing metabolic acidosis)
  3. Epilepsy (petit mal/absence seizures - adjunct)
  4. Metabolic alkalosis (corrects alkalosis)
  5. Cystinuria, uric acid stone prophylaxis (alkalinizes urine)
Adverse: Metabolic hyperchloremic acidosis, hypokalemia, paresthesias, renal stones (calcium phosphate), sulfonamide allergy, teratogenic.

Osmotic Diuretics - Mannitol

MOA: Freely filtered but not reabsorbed → increases tubular osmolality → retains water in tubule → ↑urine output; also expands plasma volume transiently, reduces blood viscosity.
Uses:
  1. Cerebral edema/raised ICP (reduces brain volume) - most important
  2. Acute glaucoma (lowers IOP)
  3. Acute renal failure (prevents oliguria/anuria - to maintain tubular flow)
  4. Hemolysis during urological procedures (hypotonic solution for irrigation - washout of hemolysed RBCs)
Adverse: Initial plasma volume expansion (dangerous in heart failure, pulmonary edema), dehydration, hypernatremia (if inadequate water replacement), hyponatremia (dilutional - with large doses).

Loop Diuretics - Furosemide

MOA: Block NKCC2 co-transporter in thick ascending limb → ↓reabsorption of Na+, K+, Cl-, Ca2+, Mg2+ → large diuresis (can lose 15-20% of filtered load).
Uses:
  1. Pulmonary edema (acute LVF) - drug of choice
  2. Chronic heart failure - symptom relief
  3. Hypertension (not first-line, but used in resistant/volume-overloaded hypertension)
  4. Nephrotic syndrome, cirrhosis (with aldosterone antagonist)
  5. Hypercalcemia (↑urinary Ca2+ excretion)
  6. Hyperkalemia (promote K+ excretion)
  7. Hyponatremia (with 0.9% saline)
  8. Acute renal failure (maintain urine output)
Adverse:
  1. Hypokalemic metabolic alkalosis (most common electrolyte disturbance)
  2. Hyponatremia, hypomagnesemia, hypocalcemia
  3. Ototoxicity (especially at high doses or with aminoglycosides - additive risk)
  4. Hyperuricemia (gout precipitation)
  5. Hyperglycemia (less than thiazides)
  6. Dehydration, postural hypotension
  7. Sulfonamide allergy (cross-reactivity possible)

Potassium-Sparing Diuretics

i) Spironolactone (Aldosterone Antagonist):
  • Competitively blocks mineralocorticoid receptor (aldosterone receptor) in collecting duct
  • ↓Na+ reabsorption, ↓K+ secretion
  • Onset: 2-3 days (blocks aldosterone's genomic action - takes time)
  • Uses: Primary hyperaldosteronism (Conn's syndrome), secondary hyperaldosteronism (heart failure, cirrhosis, nephrotic syndrome), heart failure (reduces mortality - RALES trial), hypertension (add-on), hirsutism/PCOS (anti-androgenic effect)
  • Adverse: Hyperkalemia, gynecomastia (binds androgen receptors), menstrual irregularities
Eplerenone: More selective aldosterone antagonist (less anti-androgen effect - no gynecomastia); used in HFrEF post-MI (EPHESUS trial), hypertension.
ii) Amiloride, Triamterene:
  • Directly block ENaC (epithelial sodium channel) in collecting duct
  • ↓Na+ reabsorption, ↓K+ secretion
  • Not dependent on aldosterone levels
  • Uses: Hypertension, heart failure (in combination with loop/thiazide diuretics to prevent hypokalemia), Liddle syndrome (triamterene)

Antidiuretic Hormone (ADH/Vasopressin) - Antidiuretics

ADH (Vasopressin) physiology: Released from posterior pituitary in response to ↑osmolality or ↓blood volume → acts on V2 receptors in collecting duct → inserts aquaporin-2 (AQP2) channels → ↑water reabsorption → concentrated urine.
Vasopressin (ADH) analogs - Desmopressin (DDAVP):
  • Selective V2 agonist (no V1/pressor effect at low doses)
  • Uses: Central diabetes insipidus (drug of choice), nocturnal enuresis, hemophilia A and von Willebrand disease (releases stored vWF and Factor VIII), primary nocturnal enuresis
V2 receptor antagonists (Vaptans):
  • Tolvaptan (oral), Conivaptan (IV)
  • Block V2 receptors → ↑free water excretion (aquaresis - water loss without Na+ loss)
  • Uses: Hyponatremia (especially euvolemic/hypervolemic hyponatremia - SIADH, heart failure, cirrhosis)

Sources: Lippincott Illustrated Reviews: Pharmacology (9781975170561); Goodman & Gilman's Pharmacological Basis of Therapeutics (9781264258079); Katzung's Basic and Clinical Pharmacology, 16th Ed (9781260463309); Braunwald's Heart Disease (9780323722193); The Essentials of Forensic Medicine and Toxicology 36th Ed (9789366165257).

Create a comprehensive study guide PDF for exam preparation

Reading File
Running Command

ls -la /tmp/workspace/ && mkdir -p /tmp/workspace/pharma-study-guide && echo "Directory ready"

Writing File

~/pharma-study-guide/generate_pdf.py

#!/usr/bin/env python3
"""
Comprehensive Pharmacology Study Guide PDF Generator
Covers: Cardiovascular System, Blood & Blood Formation, Chemotherapy, Renal Pharmacology
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import HRFlowable
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.colors import HexColor
import os

# ── Color Palette ──────────────────────────────────────────────────────────────
DARK_BLUE    = HexColor('#1A3A5C')
MED_BLUE     = HexColor('#2E6DA4')
LIGHT_BLUE   = HexColor('#D6E8F7')
ACCENT_GREEN = HexColor('#1E7A4E')
LIGHT_GREEN  = HexColor('#D6F0E3')
ACCENT_RED   = HexColor('#C0392B')
LIGHT_RED    = HexColor('#FDECEA')
ACCENT_PURP  = HexColor('#6C3483')
LIGHT_PURP   = HexColor('#EDE0F5')
GOLD         = HexColor('#D4AC0D')
LIGHT_GOLD   = HexColor('#FEF9E7')
LIGHT_GREY   = HexColor('#F5F5F5')
MID_GREY     = HexColor('#BDBDBD')
DARK_GREY    = HexColor('#424242')
WHITE        = colors.white
BLACK        = colors.black

# ── Document Setup ─────────────────────────────────────────────────────────────
OUTPUT_PATH = '/tmp/workspace/pharma-study-guide/Pharmacology_Study_Guide.pdf'
PAGE_W, PAGE_H = A4
MARGIN = 1.8 * cm

def build_styles():
    base = getSampleStyleSheet()

    styles = {
        'cover_title': ParagraphStyle(
            'cover_title', fontSize=32, textColor=WHITE,
            fontName='Helvetica-Bold', alignment=TA_CENTER, spaceAfter=6, leading=40
        ),
        'cover_sub': ParagraphStyle(
            'cover_sub', fontSize=14, textColor=HexColor('#D6E8F7'),
            fontName='Helvetica', alignment=TA_CENTER, spaceAfter=4
        ),
        'chapter_title': ParagraphStyle(
            'chapter_title', fontSize=20, textColor=WHITE,
            fontName='Helvetica-Bold', alignment=TA_CENTER, leading=26
        ),
        'section_title': ParagraphStyle(
            'section_title', fontSize=13, textColor=DARK_BLUE,
            fontName='Helvetica-Bold', spaceBefore=10, spaceAfter=4, leading=17
        ),
        'subsection_title': ParagraphStyle(
            'subsection_title', fontSize=11, textColor=MED_BLUE,
            fontName='Helvetica-Bold', spaceBefore=7, spaceAfter=3, leading=15
        ),
        'drug_name': ParagraphStyle(
            'drug_name', fontSize=10, textColor=ACCENT_GREEN,
            fontName='Helvetica-Bold', spaceBefore=4, spaceAfter=2, leading=14
        ),
        'body': ParagraphStyle(
            'body', fontSize=9.5, textColor=DARK_GREY,
            fontName='Helvetica', spaceBefore=2, spaceAfter=2,
            leading=14, alignment=TA_JUSTIFY
        ),
        'bullet': ParagraphStyle(
            'bullet', fontSize=9.5, textColor=DARK_GREY,
            fontName='Helvetica', spaceBefore=1, spaceAfter=1,
            leading=13, leftIndent=14, bulletIndent=4
        ),
        'sub_bullet': ParagraphStyle(
            'sub_bullet', fontSize=9, textColor=DARK_GREY,
            fontName='Helvetica', spaceBefore=1, spaceAfter=1,
            leading=12, leftIndent=28, bulletIndent=16
        ),
        'warning_box': ParagraphStyle(
            'warning_box', fontSize=9, textColor=ACCENT_RED,
            fontName='Helvetica-Bold', spaceBefore=2, spaceAfter=2,
            leading=13, leftIndent=8
        ),
        'tip_box': ParagraphStyle(
            'tip_box', fontSize=9, textColor=ACCENT_GREEN,
            fontName='Helvetica-Bold', spaceBefore=2, spaceAfter=2,
            leading=13, leftIndent=8
        ),
        'table_header': ParagraphStyle(
            'table_header', fontSize=8.5, textColor=WHITE,
            fontName='Helvetica-Bold', alignment=TA_CENTER, leading=11
        ),
        'table_cell': ParagraphStyle(
            'table_cell', fontSize=8, textColor=DARK_GREY,
            fontName='Helvetica', leading=11
        ),
        'marks_badge': ParagraphStyle(
            'marks_badge', fontSize=9, textColor=WHITE,
            fontName='Helvetica-Bold', alignment=TA_CENTER
        ),
        'footer': ParagraphStyle(
            'footer', fontSize=7.5, textColor=MID_GREY,
            fontName='Helvetica', alignment=TA_CENTER
        ),
        'toc_chapter': ParagraphStyle(
            'toc_chapter', fontSize=11, textColor=DARK_BLUE,
            fontName='Helvetica-Bold', spaceBefore=6, spaceAfter=2, leading=15
        ),
        'toc_topic': ParagraphStyle(
            'toc_topic', fontSize=9.5, textColor=DARK_GREY,
            fontName='Helvetica', spaceBefore=1, spaceAfter=1,
            leading=13, leftIndent=16
        ),
    }
    return styles

# ── Helper Flowables ───────────────────────────────────────────────────────────
def section_header(title, color=DARK_BLUE, styles=None):
    """A colored banner for section titles."""
    tbl = Table([[Paragraph(title, styles['chapter_title'])]], colWidths=[PAGE_W - 2*MARGIN])
    tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), color),
        ('TOPPADDING',    (0,0), (-1,-1), 8),
        ('BOTTOMPADDING', (0,0), (-1,-1), 8),
        ('LEFTPADDING',   (0,0), (-1,-1), 12),
        ('RIGHTPADDING',  (0,0), (-1,-1), 12),
        ('ROUNDEDCORNERS', [6]),
    ]))
    return tbl

def marks_box(label, color=GOLD, styles=None):
    """Small colored badge showing mark weight."""
    tbl = Table([[Paragraph(label, styles['marks_badge'])]], colWidths=[3.5*cm])
    tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), color),
        ('TOPPADDING',    (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('LEFTPADDING',   (0,0), (-1,-1), 8),
        ('RIGHTPADDING',  (0,0), (-1,-1), 8),
        ('ROUNDEDCORNERS', [4]),
    ]))
    return tbl

def info_box(title, content_lines, bg_color=LIGHT_BLUE, title_color=DARK_BLUE, styles=None):
    """Colored info/alert box."""
    inner = []
    inner.append(Paragraph(f"<b>{title}</b>", ParagraphStyle(
        'ib_title', fontSize=9, textColor=title_color, fontName='Helvetica-Bold', leading=13)))
    for line in content_lines:
        inner.append(Paragraph(line, ParagraphStyle(
            'ib_body', fontSize=8.5, textColor=DARK_GREY, fontName='Helvetica', leading=12)))
    tbl = Table([[inner]], colWidths=[PAGE_W - 2*MARGIN - 8])
    tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg_color),
        ('TOPPADDING',    (0,0), (-1,-1), 6),
        ('BOTTOMPADDING', (0,0), (-1,-1), 6),
        ('LEFTPADDING',   (0,0), (-1,-1), 10),
        ('RIGHTPADDING',  (0,0), (-1,-1), 10),
        ('BOX', (0,0), (-1,-1), 0.8, title_color),
        ('ROUNDEDCORNERS', [4]),
    ]))
    return tbl

def make_table(headers, rows, col_widths, styles, alt_color=LIGHT_GREY):
    """Styled data table."""
    header_row = [Paragraph(h, styles['table_header']) for h in headers]
    data = [header_row]
    for row in rows:
        data.append([Paragraph(str(cell), styles['table_cell']) for cell in row])
    tbl = Table(data, colWidths=col_widths, repeatRows=1)
    ts = [
        ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
        ('GRID', (0,0), (-1,-1), 0.4, MID_GREY),
        ('TOPPADDING',    (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('LEFTPADDING',   (0,0), (-1,-1), 5),
        ('RIGHTPADDING',  (0,0), (-1,-1), 5),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]
    for i in range(1, len(data)):
        if i % 2 == 0:
            ts.append(('BACKGROUND', (0,i), (-1,i), alt_color))
    tbl.setStyle(TableStyle(ts))
    return tbl

def hr(styles):
    return HRFlowable(width='100%', thickness=0.5, color=MID_GREY, spaceAfter=4, spaceBefore=4)

def sp(n=6):
    return Spacer(1, n)

# ══════════════════════════════════════════════════════════════════════════════
# CONTENT BUILDERS
# ══════════════════════════════════════════════════════════════════════════════

def build_cover(story, styles):
    # Full-page color cover
    story.append(Spacer(1, 2.5*cm))
    cover_tbl = Table([
        [Paragraph("PHARMACOLOGY", styles['cover_title'])],
        [Paragraph("Comprehensive Exam Study Guide", styles['cover_sub'])],
        [Spacer(1, 0.4*cm)],
        [Paragraph("Cardiovascular System  •  Blood & Blood Formation", styles['cover_sub'])],
        [Paragraph("Chemotherapy  •  Renal Pharmacology", styles['cover_sub'])],
        [Spacer(1, 1.5*cm)],
        [Paragraph("10-Mark  |  5-Mark  |  3-Mark Topics", ParagraphStyle(
            'badge', fontSize=13, textColor=GOLD, fontName='Helvetica-Bold',
            alignment=TA_CENTER))],
        [Spacer(1, 2.5*cm)],
        [Paragraph("Based on KD Tripathi & Lippincott Pharmacology", ParagraphStyle(
            'ref', fontSize=10, textColor=HexColor('#A9CCE3'),
            fontName='Helvetica', alignment=TA_CENTER))],
    ], colWidths=[PAGE_W - 2*MARGIN])
    cover_tbl.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
        ('TOPPADDING', (0,0), (-1,-1), 8),
        ('BOTTOMPADDING', (0,0), (-1,-1), 8),
        ('LEFTPADDING', (0,0), (-1,-1), 20),
        ('RIGHTPADDING', (0,0), (-1,-1), 20),
        ('BOX', (0,0), (-1,-1), 2, GOLD),
        ('ROUNDEDCORNERS', [10]),
    ]))
    story.append(cover_tbl)
    story.append(PageBreak())


def build_toc(story, styles):
    story.append(section_header("TABLE OF CONTENTS", DARK_BLUE, styles))
    story.append(sp(10))

    chapters = [
        ("1. CARDIOVASCULAR SYSTEM", [
            "ACE Inhibitors (10M)", "Angiotensin Receptor Blockers - ARBs (10M)",
            "Organic Nitrates (10M)", "Calcium Channel Blockers - CCBs (10M)",
            "Cardiac Glycosides / Digoxin (10M)", "Sodium Nitroprusside (5M)",
            "Classification of Antihypertensives (5M)", "Pharmacotherapy of Acute MI (5M)",
            "Lignocaine (5M)", "Amiodarone (5M)", "Adenosine (5M)",
            "Beta-Blockers in Angina & Hypertension (3M)",
            "Centrally Acting Sympatholytics / Clonidine (3M)", "Vasodilators (3M)",
        ]),
        ("2. BLOOD & BLOOD FORMATION", [
            "Hypolipidemic Drug Classification (5M)", "HMG-CoA Reductase Inhibitors / Statins (5M)",
            "Plasma Volume Expanders (5M)", "Thrombolytics / Fibrinolytics (5M)",
            "Antiplatelet Drugs (5M)", "Anticoagulants: Heparin & Warfarin (10M)",
            "Iron: Absorption, Oral & Parenteral Preparations (10M)",
            "Vitamin B12 (5M)", "Folic Acid (5M)", "Erythropoietin (5M)",
            "Anti-thrombotic Drugs / Streptokinase (3M)",
            "Clopidogrel (3M)", "Rational Use of Aspirin in MI (3M)",
        ]),
        ("3. CHEMOTHERAPY", [
            "Fluoroquinolones (10M)", "Beta-Lactam Antibiotics (10M)",
            "Penicillins (10M)", "Cephalosporins - Generations (10M)",
            "Carbapenems & Monobactams (10M)", "Macrolide Antibiotics (5M)",
            "Antitubercular Drugs (10M)", "Antimalarial Drugs / Chloroquine (10M)",
            "Antifungal Drugs (5M)", "Aminoglycosides (5M)", "Tetracyclines (5M)",
            "Dapsone (5M)", "Anticancer Drug Classification (5M)",
            "Cyclophosphamide & Methotrexate (5M)", "Vinca Alkaloids (5M)",
            "Leprosy / Clofazimine (3M)", "Antimalarials in Acute Attack (3M)",
            "Albendazole / Mebendazole (3M)", "Ivermectin (3M)",
        ]),
        ("4. RENAL PHARMACOLOGY", [
            "Classification of Diuretics (5M)", "Carbonic Anhydrase Inhibitors (5M)",
            "Osmotic Diuretics / Mannitol (5M)", "Loop Diuretics / Furosemide (5M)",
            "Thiazide Diuretics (5M)", "Potassium-Sparing Diuretics (5M)",
            "Antidiuretics / Vasopressin / Desmopressin (5M)",
        ]),
    ]
    for chap_title, topics in chapters:
        story.append(Paragraph(chap_title, styles['toc_chapter']))
        for t in topics:
            story.append(Paragraph(f"• {t}", styles['toc_topic']))
        story.append(sp(4))
    story.append(PageBreak())


# ──────────────────────────────────────────────────────────────────────────────
# CHAPTER 1: CARDIOVASCULAR SYSTEM
# ──────────────────────────────────────────────────────────────────────────────

def build_cvs(story, styles):
    story.append(section_header("CHAPTER 1: CARDIOVASCULAR SYSTEM", MED_BLUE, styles))
    story.append(sp(8))

    # ── ACE INHIBITORS ──
    story.append(KeepTogether([
        marks_box("★ 10 MARKS", GOLD, styles),
        sp(4),
        Paragraph("1. ACE INHIBITORS", styles['section_title']),
        hr(styles),
    ]))

    story.append(Paragraph("<b>Drugs:</b> Captopril, Enalapril, Lisinopril, Ramipril, Perindopril, Fosinopril, Benazepril", styles['body']))
    story.append(sp(4))

    story.append(Paragraph("Mechanism of Action", styles['subsection_title']))
    story.append(Paragraph(
        "ACE (Angiotensin Converting Enzyme) inhibitors block the conversion of <b>Angiotensin I → Angiotensin II</b>. "
        "Angiotensin II normally causes vasoconstriction, stimulates aldosterone release (Na+/water retention), and promotes "
        "cardiac/vascular hypertrophy. ACE inhibitors also prevent bradykinin degradation → bradykinin accumulates → "
        "vasodilation via NO and prostaglandins (causes the characteristic dry cough).", styles['body']))
    story.append(sp(4))

    story.append(Paragraph("Therapeutic Uses", styles['subsection_title']))
    uses = [
        "Hypertension — <b>drug of choice in diabetics</b>",
        "Heart failure (reduce afterload and preload)",
        "Post-MI (reduce mortality, ventricular remodeling)",
        "Diabetic nephropathy — renoprotective (reduce intraglomerular pressure)",
        "Chronic kidney disease with proteinuria",
        "Left ventricular dysfunction (asymptomatic)",
    ]
    for u in uses:
        story.append(Paragraph(f"• {u}", styles['bullet']))

    story.append(sp(4))
    story.append(Paragraph("Adverse Effects", styles['subsection_title']))
    ae = [
        ("<b>Dry persistent cough</b> (most common — bradykinin↑) → switch to ARB", ACCENT_RED),
        ("Hyperkalemia (↓aldosterone)", None),
        ("First-dose hypotension (volume-depleted patients)", None),
        ("<b>Angioedema</b> (rare but potentially fatal — bradykinin)", ACCENT_RED),
        ("<b>TERATOGENIC</b> — contraindicated in pregnancy (fetal renal agenesis)", ACCENT_RED),
        ("Taste disturbances (captopril — sulfhydryl group)", None),
        ("Acute renal failure in bilateral renal artery stenosis", None),
    ]
    for line, c in ae:
        story.append(Paragraph(f"• {line}", styles['bullet']))

    story.append(sp(4))
    story.append(info_box(
        "⚠ CONTRAINDICATIONS",
        ["Pregnancy • Bilateral renal artery stenosis • History of angioedema • Severe aortic stenosis"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── ARBs ──
    story.append(KeepTogether([
        Paragraph("2. ANGIOTENSIN RECEPTOR BLOCKERS (ARBs)", styles['section_title']),
        hr(styles),
    ]))
    story.append(Paragraph("<b>Drugs:</b> Losartan, Valsartan, Candesartan, Irbesartan, Telmisartan, Olmesartan", styles['body']))
    story.append(Paragraph("Mechanism of Action", styles['subsection_title']))
    story.append(Paragraph(
        "Block AT₁ receptor → prevent all effects of Angiotensin II. Unlike ACEi, they do <b>NOT affect bradykinin</b> — "
        "so NO dry cough. More complete blockade of Ang II effects (including Ang II formed by chymase pathway). "
        "<b>Losartan</b> has a uricosuric property — useful in hypertensive patients with gout.", styles['body']))

    story.append(Paragraph("Key Differences from ACE Inhibitors", styles['subsection_title']))
    diff_data = [
        ["Property", "ACE Inhibitors", "ARBs"],
        ["Mechanism", "Block ACE enzyme", "Block AT₁ receptor"],
        ["Bradykinin", "↑ (cough, angioedema)", "Unaffected"],
        ["Cough", "Yes (common)", "No"],
        ["Angioedema", "Yes (rare)", "Very rare"],
        ["Ang II blockade", "Incomplete", "More complete"],
        ["Use in pregnancy", "Contraindicated", "Contraindicated"],
    ]
    story.append(make_table(diff_data[0], diff_data[1:], [5*cm, 5.5*cm, 5.5*cm], styles))
    story.append(sp(8))

    # ── ORGANIC NITRATES ──
    story.append(KeepTogether([
        Paragraph("3. ORGANIC NITRATES", styles['section_title']),
        hr(styles),
    ]))
    story.append(Paragraph("<b>Drugs:</b> Glyceryl trinitrate (GTN/Nitroglycerin), ISDN, ISMN, Amyl nitrite", styles['body']))
    story.append(Paragraph("Mechanism of Action", styles['subsection_title']))
    story.append(Paragraph(
        "Prodrugs that release <b>Nitric Oxide (NO)</b> in vascular smooth muscle → activates guanylyl cyclase → "
        "↑cGMP → protein kinase G activation → dephosphorylation of myosin light chain → <b>vascular smooth muscle relaxation</b>. "
        "At low doses: mainly <b>venodilation</b> (↓preload). At higher doses: arteriolar dilation (↓afterload).", styles['body']))

    story.append(Paragraph("Therapeutic Uses", styles['subsection_title']))
    uses = [
        "Acute angina: Sublingual GTN (onset 1–2 min, duration 20–30 min) — FIRST LINE",
        "Prophylaxis: ISDN or ISMN oral",
        "Acute LVF/pulmonary edema: IV GTN",
        "Unstable angina; Controlled hypotension in surgery",
    ]
    for u in uses:
        story.append(Paragraph(f"• {u}", styles['bullet']))

    story.append(sp(4))
    story.append(info_box(
        "⚠ IMPORTANT — Nitrate Tolerance",
        ["Develops with continuous use. Require a nitrate-free interval of 8–12 hours (usually at night)."],
        LIGHT_GOLD, GOLD, styles
    ))
    story.append(info_box(
        "CONTRAINDICATIONS",
        ["Sildenafil/PDE-5 inhibitors (severe hypotension) • Severe hypotension • Raised ICP"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── CCBs ──
    story.append(KeepTogether([
        Paragraph("4. CALCIUM CHANNEL BLOCKERS (CCBs)", styles['section_title']),
        hr(styles),
    ]))
    story.append(Paragraph("Mechanism of Action", styles['subsection_title']))
    story.append(Paragraph(
        "Block L-type voltage-gated Ca²⁺ channels in vascular smooth muscle and myocardium. "
        "↓Vascular Ca²⁺ → vasodilation. Verapamil/Diltiazem additionally slow SA/AV node conduction "
        "(negative chronotropy and dromotropy) and reduce contractility.", styles['body']))

    ccb_data = [
        ["Class", "Drugs", "Main Effect", "Key Uses"],
        ["Dihydropyridines (DHPs)", "Nifedipine, Amlodipine, Felodipine, Nimodipine", "Predominantly vascular", "Hypertension, Stable/Vasospastic angina, Raynaud's, Subarachnoid haemorrhage (Nimodipine)"],
        ["Phenylalkylamines", "Verapamil", "Predominantly cardiac", "SVT, AF rate control, Angina, HTN; Contraindicated with beta-blockers"],
        ["Benzothiazepines", "Diltiazem", "Intermediate", "SVT, Angina, HTN; Less bradycardia than verapamil"],
    ]
    story.append(make_table(ccb_data[0], ccb_data[1:], [3.5*cm, 4.5*cm, 3.5*cm, 4.5*cm], styles))
    story.append(sp(4))
    story.append(Paragraph("<b>Adverse Effects:</b> DHPs — flushing, peripheral edema, reflex tachycardia (nifedipine). "
                           "Verapamil — constipation (most common), bradycardia, AV block. "
                           "Diltiazem — bradycardia, AV block (intermediate).", styles['body']))
    story.append(sp(8))

    # ── CARDIAC GLYCOSIDES ──
    story.append(KeepTogether([
        Paragraph("5. CARDIAC GLYCOSIDES (DIGOXIN)", styles['section_title']),
        hr(styles),
    ]))
    story.append(Paragraph("Mechanism of Action", styles['subsection_title']))
    story.append(Paragraph(
        "Inhibits <b>Na⁺/K⁺-ATPase</b> (sodium pump) → ↑intracellular Na⁺ → Na⁺/Ca²⁺ exchanger less active "
        "→ ↑intracellular Ca²⁺ → <b>positive inotropic effect</b>. Also: negative chronotropic (↓HR), "
        "negative dromotropic (↓AV conduction, prolongs PR interval), positive bathmotropic "
        "(↑ventricular automaticity — pro-arrhythmic in toxicity).", styles['body']))

    story.append(Paragraph("Digitalis Toxicity", styles['subsection_title']))
    tox_data = [
        ["System", "Features"],
        ["GI (earliest)", "Nausea, vomiting, anorexia"],
        ["CNS", "Visual disturbances (xanthopsia — yellow/green vision), confusion, headache"],
        ["Cardiac (most serious)", "PVCs (most common), bigeminy, VT, AV block, PAT with block"],
    ]
    story.append(make_table(tox_data[0], tox_data[1:], [4*cm, 12*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "Precipitating Factors for Toxicity",
        ["Hypokalemia ★ • Hypomagnesemia • Hypercalcemia • Hypothyroidism • Renal failure",
         "Drug interactions: Amiodarone, Verapamil, Quinidine — all ↑digoxin levels"],
        LIGHT_PURP, ACCENT_PURP, styles
    ))
    story.append(info_box(
        "Treatment of Toxicity",
        ["Stop digoxin • Correct K⁺ and Mg²⁺ • Digoxin-Fab antibody fragments (Digibind) — for life-threatening toxicity"],
        LIGHT_BLUE, MED_BLUE, styles
    ))
    story.append(PageBreak())

    # ── 5-MARK CVS TOPICS ──
    story.append(marks_box("★ 5 MARKS", MED_BLUE, styles))
    story.append(sp(6))
    story.append(Paragraph("PHARMACOTHERAPY OF ACUTE MI", styles['section_title']))
    story.append(hr(styles))

    mi_data = [
        ["Drug / Class", "Role", "Notes"],
        ["Aspirin 300 mg stat", "Antiplatelet", "Irreversibly inhibits COX-1 → ↓TXA₂; then 75 mg/day maintenance"],
        ["Clopidogrel/Ticagrelor (P2Y12 blocker)", "Antiplatelet (DAPT)", "Dual antiplatelet therapy with aspirin"],
        ["Morphine IV", "Analgesia", "Reduce pain, preload; caution: respiratory depression"],
        ["Nitrates (SL GTN)", "Vasodilation", "Reduce chest pain; avoid if hypotensive"],
        ["Oxygen", "Correct hypoxia", "Only if SpO₂ < 94%"],
        ["Beta-blockers (Metoprolol)", "↓HR, ↓O₂ demand", "Reduce mortality; avoid in acute decompensated HF"],
        ["ACE Inhibitors", "Remodeling prevention", "Start within 24 h if no contraindication; especially if EF↓"],
        ["Statins (Atorvastatin 80 mg)", "Plaque stabilization", "Start immediately; high-intensity statin"],
        ["Heparin (UFH/LMWH)", "Anticoagulation", "Prevent thrombus extension; fondaparinux in NSTEMI"],
        ["Primary PCI / Thrombolysis", "Reperfusion", "PCI preferred; Thrombolysis if PCI >120 min away"],
    ]
    story.append(make_table(mi_data[0], mi_data[1:], [4.5*cm, 3.5*cm, 8*cm], styles))
    story.append(sp(8))

    story.append(Paragraph("AMIODARONE", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph("<b>Class:</b> Class III antiarrhythmic (K⁺ channel blocker) — also has Class I, II, IV properties.", styles['body']))
    story.append(Paragraph(
        "<b>Uses:</b> VT/VF (drug of choice in cardiac arrest), AF/flutter (cardioversion + maintenance), WPW syndrome.", styles['body']))
    story.append(Paragraph("Adverse Effects — 'THYROID, LUNG, LIVER, EYE, SKIN':", styles['subsection_title']))
    ae_amio = [
        "Pulmonary toxicity (most serious — pneumonitis/fibrosis)",
        "Thyroid dysfunction: hypo- OR hyperthyroidism (37% iodine content)",
        "Hepatotoxicity",
        "Corneal microdeposits (most common — usually asymptomatic)",
        "Blue-grey skin pigmentation, photosensitivity",
        "Peripheral neuropathy; Bradycardia; QT prolongation",
        "Drug interactions: ↑Digoxin levels, ↑Warfarin effect (reduce doses)",
    ]
    for a in ae_amio:
        story.append(Paragraph(f"• {a}", styles['bullet']))
    story.append(sp(4))
    story.append(info_box(
        "Pharmacokinetics — KEY",
        ["Half-life: 40–55 days (extremely long). IV loading dose needed for urgent use."],
        LIGHT_GOLD, GOLD, styles
    ))
    story.append(sp(8))

    story.append(Paragraph("ADENOSINE", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "<b>Mechanism:</b> Activates adenosine A₁ receptors in AV node → hyperpolarizes AV nodal cells → "
        "transiently blocks AV conduction. <b>Half-life: ~10 seconds</b> (extremely short). "
        "Given as rapid IV bolus.", styles['body']))
    story.append(Paragraph(
        "<b>Use:</b> Drug of choice for acute termination of <b>paroxysmal SVT (PSVT)</b>; also diagnostic (unmask atrial flutter).", styles['body']))
    story.append(info_box(
        "⚠ Contraindications & Interactions",
        ["CONTRAINDICATED in: Asthma/COPD, 2nd/3rd degree AV block, sick sinus syndrome",
         "ANTAGONIZED by: Theophylline/Caffeine (block adenosine receptors)",
         "POTENTIATED by: Dipyridamole (inhibits adenosine breakdown)"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── 3-MARK CVS ──
    story.append(marks_box("★ 3 MARKS", ACCENT_GREEN, styles))
    story.append(sp(6))
    story.append(Paragraph("BETA-BLOCKERS", styles['section_title']))
    story.append(hr(styles))
    bb_data = [
        ["Drug", "Selectivity", "Special Property"],
        ["Propranolol", "Non-selective β1+β2", "Membrane stabilizing; Lipophilic (crosses BBB)"],
        ["Atenolol, Metoprolol", "β1-selective (cardioselective)", "Safer in mild asthma; preferred post-MI"],
        ["Carvedilol", "Non-selective β + α1", "Used in heart failure; vasodilatory"],
        ["Nebivolol", "β1-selective", "Also releases NO → vasodilation"],
        ["Labetalol", "Non-selective β + α1", "IV in hypertensive emergencies; safe in pregnancy"],
    ]
    story.append(make_table(bb_data[0], bb_data[1:], [3.5*cm, 5*cm, 7.5*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "⚠ Contraindications",
        ["Asthma/COPD (non-selective) • Uncompensated heart failure • 2nd/3rd degree AV block",
         "Sick sinus syndrome • Raynaud's disease • AVOID abrupt withdrawal (rebound angina/MI)"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(PageBreak())


# ──────────────────────────────────────────────────────────────────────────────
# CHAPTER 2: BLOOD AND BLOOD FORMATION
# ──────────────────────────────────────────────────────────────────────────────

def build_blood(story, styles):
    story.append(section_header("CHAPTER 2: BLOOD AND BLOOD FORMATION", ACCENT_GREEN, styles))
    story.append(sp(8))

    story.append(marks_box("★ 5 MARKS", GOLD, styles))
    story.append(sp(6))

    # ── HYPOLIPIDEMIC ──
    story.append(Paragraph("1. HYPOLIPIDEMIC DRUGS — CLASSIFICATION", styles['section_title']))
    story.append(hr(styles))

    hlip_data = [
        ["Class", "Drugs", "Mechanism", "Main Effect"],
        ["HMG-CoA Reductase Inhibitors (Statins)", "Atorvastatin, Rosuvastatin, Simvastatin, Lovastatin, Pravastatin", "Competitively inhibit HMG-CoA reductase → ↓cholesterol synthesis → ↑LDL receptor expression", "↓LDL 20–60%; modest ↑HDL; ↓TG; pleiotropic effects"],
        ["Bile Acid Sequestrants", "Cholestyramine, Colestipol, Colesevelam", "Bind bile acids in intestine → ↑LDL receptor expression", "↓LDL; may ↑TG"],
        ["Fibrates", "Gemfibrozil, Fenofibrate, Clofibrate", "PPAR-α activation → ↑lipoprotein lipase → ↑TG clearance", "↓TG most effectively; modest ↑HDL; ↓VLDL"],
        ["Niacin (Nicotinic Acid)", "Niacin", "↓Adipose lipolysis → ↓FFA → ↓VLDL synthesis", "Best ↑HDL; ↓TG; ↓LDL"],
        ["Cholesterol Absorption Inhibitor", "Ezetimibe", "Inhibit NPC1L1 in intestinal brush border", "↓Intestinal cholesterol absorption; add-on to statins"],
        ["PCSK9 Inhibitors", "Evolocumab, Alirocumab", "Inhibit PCSK9 → ↑LDL receptor recycling", "↓LDL 50–60%; used in familial hypercholesterolemia"],
    ]
    story.append(make_table(hlip_data[0], hlip_data[1:], [3.5*cm, 3.5*cm, 5*cm, 4*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "Statin Adverse Effects — IMPORTANT",
        ["Myopathy/Rhabdomyolysis (↑risk with fibrates, CYP3A4 inhibitors — especially simvastatin/lovastatin)",
         "Elevated liver enzymes (check LFTs) • New-onset diabetes (high-intensity statins) • Teratogenic (avoid in pregnancy)"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── THROMBOLYTICS ──
    story.append(Paragraph("2. THROMBOLYTICS (FIBRINOLYTICS)", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "<b>Common Mechanism:</b> All convert <b>plasminogen → plasmin</b> → plasmin breaks down fibrin clots.", styles['body']))
    story.append(sp(4))
    tl_data = [
        ["Drug", "Generation", "Fibrin Specificity", "Key Notes"],
        ["Streptokinase", "1st", "Non-specific", "Antigenic; allergic reactions; cheap; given by IV infusion; NOT used >5 days apart"],
        ["Urokinase", "1st", "Non-specific", "Non-antigenic; expensive"],
        ["Alteplase (t-PA)", "2nd", "Fibrin-specific", "Short half-life; standard for ischemic stroke (within 4.5 h); IV bolus + infusion"],
        ["Reteplase", "2nd", "Fibrin-specific", "Can give as IV bolus"],
        ["Tenecteplase (TNK-tPA)", "3rd", "Most specific", "Single IV bolus; longest half-life; used in STEMI"],
    ]
    story.append(make_table(tl_data[0], tl_data[1:], [3.5*cm, 2.2*cm, 3*cm, 7.3*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "⚠ Absolute Contraindications",
        ["Active internal bleeding • Recent surgery/trauma <10 days • Recent stroke <3 months",
         "Severe uncontrolled hypertension • Aortic dissection • Pregnancy"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── ANTIPLATELET ──
    story.append(Paragraph("3. ANTIPLATELET DRUGS", styles['section_title']))
    story.append(hr(styles))
    ap_data = [
        ["Class", "Drugs", "Mechanism", "Notes"],
        ["COX-1 Inhibitor", "Aspirin", "Irreversibly inhibits COX-1 → ↓TXA₂ in platelets", "Effect lasts 7–10 days (platelet lifespan); low dose 75–150 mg/day"],
        ["P2Y12 ADP Antagonists", "Clopidogrel, Ticagrelor, Prasugrel", "Block P2Y12 receptor → ↓ADP-mediated platelet aggregation", "Clopidogrel: prodrug (CYP2C19); Ticagrelor: direct-acting, reversible; Prasugrel: more potent"],
        ["GPIIb/IIIa Inhibitors", "Abciximab, Eptifibatide, Tirofiban", "Block final common pathway (fibrinogen binding to GPIIb/IIIa)", "IV only; used during PCI"],
        ["PDE Inhibitors", "Dipyridamole, Cilostazol", "↑cAMP → ↓platelet activation", "Cilostazol: peripheral arterial disease; Dipyridamole + aspirin = Aggrenox (stroke prevention)"],
    ]
    story.append(make_table(ap_data[0], ap_data[1:], [3.5*cm, 3.5*cm, 4.5*cm, 4.5*cm], styles))
    story.append(sp(8))

    # ── ANTICOAGULANTS ──
    story.append(marks_box("★ 10 MARKS", GOLD, styles))
    story.append(sp(6))
    story.append(Paragraph("4. ANTICOAGULANTS", styles['section_title']))
    story.append(hr(styles))

    ac_data = [
        ["Drug", "Route", "Mechanism", "Monitor", "Antidote", "Key Uses"],
        ["Unfractionated Heparin (UFH)", "IV/SC", "Binds ATIII → inhibits Xa + IIa (1:1)", "aPTT (1.5–2.5× normal)", "Protamine sulfate", "DVT/PE, ACS, cardiac surgery, dialysis"],
        ["LMWH (Enoxaparin, Dalteparin)", "SC", "Mainly anti-Xa (Xa:IIa = 2–4:1)", "NOT required (predictable PK)", "Protamine (partial)", "DVT prophylaxis/treatment; ACS; pregnancy"],
        ["Fondaparinux", "SC", "Selective anti-Xa only", "NOT required", "None", "DVT/PE; no HIT risk"],
        ["Warfarin", "Oral", "Inhibit Vit K epoxide reductase → ↓Factors II,VII,IX,X + Protein C,S", "INR (goal 2–3)", "Vit K (slow) / FFP/PCC (rapid)", "AF, DVT/PE, mechanical valves, antiphospholipid syndrome"],
        ["Dabigatran (DOAC)", "Oral", "Direct thrombin inhibitor (Factor IIa)", "NOT required", "Idarucizumab", "AF, VTE prevention/treatment"],
        ["Rivaroxaban, Apixaban (DOACs)", "Oral", "Direct Factor Xa inhibitor", "NOT required", "Andexanet alfa", "AF, VTE prevention/treatment"],
    ]
    story.append(make_table(ac_data[0], ac_data[1:], [3.2*cm, 1.6*cm, 3.8*cm, 2.5*cm, 2.5*cm, 2.4*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "HIT — Heparin-Induced Thrombocytopenia",
        ["Type II (immune-mediated): IgG antibodies against heparin-PF4 complex → platelet activation → THROMBOSIS",
         "Paradox: low platelets but HIGH RISK of thrombosis!",
         "Management: STOP heparin immediately → start non-heparin anticoagulant (Argatroban, Bivalirudin, Fondaparinux)"],
        LIGHT_PURP, ACCENT_PURP, styles
    ))
    story.append(PageBreak())

    # ── IRON ──
    story.append(Paragraph("5. IRON — ABSORPTION & PREPARATIONS", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph("Iron Absorption Pathway:", styles['subsection_title']))
    iron_steps = [
        "Dietary Fe³⁺ reduced to Fe²⁺ by Vitamin C (ascorbic acid) or brush border reductase",
        "Absorbed in <b>proximal duodenum and jejunum</b> via <b>DMT-1</b> (divalent metal transporter 1)",
        "Inside enterocyte: used or stored as <b>ferritin</b>",
        "Exported to blood via <b>ferroportin</b> (controlled by hepcidin — master regulator of iron homeostasis)",
        "In blood: transported by <b>transferrin</b> (binds 2 Fe³⁺)",
        "Stored as ferritin (liver, spleen, BM) or hemosiderin (insoluble, iron overload)",
    ]
    for step in iron_steps:
        story.append(Paragraph(f"• {step}", styles['bullet']))

    story.append(sp(4))
    iron_prep_data = [
        ["Preparation", "Route", "Key Points"],
        ["Ferrous sulphate (most used)", "Oral", "200 mg tab (65 mg elemental iron); 2–3×/day; take on empty stomach for better absorption; black stools, GI upset"],
        ["Ferrous gluconate, Ferrous fumarate", "Oral", "Less GI side effects than sulphate; more expensive"],
        ["Iron sucrose (Venofer)", "IV", "Safe; no test dose needed; used in CKD, IBD"],
        ["Ferric carboxymaltose", "IV", "Can give large dose in single infusion; expensive"],
        ["Iron dextran", "IV/IM", "Oldest; risk of anaphylaxis (test dose mandatory); IM causes staining"],
    ]
    story.append(make_table(iron_prep_data[0], iron_prep_data[1:], [4*cm, 2*cm, 10*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "Response to Oral Iron Therapy",
        ["Reticulocytosis: 7–10 days (earliest sign of response)",
         "Haemoglobin rise: ~1 g/dL per week",
         "Continue 3–6 months after Hb normalises (to replenish stores)"],
        LIGHT_GREEN, ACCENT_GREEN, styles
    ))
    story.append(info_box(
        "Acute Iron Poisoning — Treatment",
        ["Gastric lavage (early) → Desferrioxamine IV/IM (chelating agent — antidote)"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── ERYTHROPOIETIN ──
    story.append(Paragraph("6. ERYTHROPOIETIN (EPO)", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "Glycoprotein hormone produced by peritubular fibroblasts of the kidney (85%) and liver (15%) "
        "in response to hypoxia. Stimulates erythroid progenitor cells in bone marrow.", styles['body']))

    epo_data = [
        ["Preparation", "Half-Life", "Dosing"],
        ["Epoetin alfa/beta", "~8 hours", "SC or IV, 3×/week"],
        ["Darbepoetin alfa", "~25 hours", "Weekly dosing"],
        ["Methoxy-PEG epoetin beta (CERA)", "~130 hours", "Monthly dosing"],
    ]
    story.append(make_table(epo_data[0], epo_data[1:], [5*cm, 4*cm, 7*cm], styles))
    story.append(sp(4))
    story.append(Paragraph("<b>Uses:</b> Anaemia of CKD (most important) • Chemotherapy-induced anaemia • HIV (AZT therapy) • Pre-surgical autologous donation", styles['body']))
    story.append(info_box(
        "Adverse Effects",
        ["Hypertension (most common serious AE — monitor BP closely)",
         "Thromboembolism • Flu-like symptoms",
         "Pure red cell aplasia (rare — anti-EPO antibodies, especially SC epoetin alfa)"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(PageBreak())


# ──────────────────────────────────────────────────────────────────────────────
# CHAPTER 3: CHEMOTHERAPY
# ──────────────────────────────────────────────────────────────────────────────

def build_chemo(story, styles):
    story.append(section_header("CHAPTER 3: CHEMOTHERAPY", ACCENT_PURP, styles))
    story.append(sp(8))

    story.append(marks_box("★ 10 MARKS", GOLD, styles))
    story.append(sp(6))

    # ── FLUOROQUINOLONES ──
    story.append(Paragraph("1. FLUOROQUINOLONES", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "<b>MOA:</b> Inhibit <b>DNA gyrase (topoisomerase II)</b> in gram-negative bacteria and "
        "<b>topoisomerase IV</b> in gram-positive bacteria → prevent DNA replication and repair → <b>BACTERICIDAL</b>.", styles['body']))

    fq_data = [
        ["Generation", "Drugs", "Spectrum", "Key Uses"],
        ["1st", "Nalidixic acid", "Gram-negative (limited)", "Urinary tract (historical)"],
        ["2nd", "Norfloxacin, Ciprofloxacin, Ofloxacin", "Gram-negative (broad incl. Pseudomonas — Cipro)", "UTI, prostatitis, enteric fever, gonorrhea, anthrax"],
        ["3rd ('Respiratory')", "Levofloxacin", "Gram-negative + Gram-positive + atypicals", "CAP, HAP, TB (2nd line), UTI"],
        ["4th", "Moxifloxacin", "Broadest (incl. anaerobes, MRSA-like activity)", "CAP, TB (2nd line) — NOT for UTI (no renal excretion)"],
    ]
    story.append(make_table(fq_data[0], fq_data[1:], [2.5*cm, 4*cm, 4.5*cm, 5*cm], styles))
    story.append(sp(4))
    story.append(Paragraph("<b>Adverse Effects:</b>", styles['subsection_title']))
    fq_ae = [
        "GI effects (most common — nausea, vomiting)",
        "CNS effects (dizziness, rarely seizures) — especially elderly",
        "<b>Tendinopathy / Achilles tendon rupture</b> (especially with corticosteroids — risk in elderly)",
        "QT prolongation (especially moxifloxacin)",
        "Photosensitivity",
        "<b>Arthropathy / cartilage damage</b> → CONTRAINDICATED in children (<18 yrs) and PREGNANCY",
        "Chelation by divalent cations (antacids, iron, calcium) → take 2 hours apart",
    ]
    for ae in fq_ae:
        story.append(Paragraph(f"• {ae}", styles['bullet']))
    story.append(sp(8))

    # ── BETA-LACTAMS ──
    story.append(Paragraph("2. BETA-LACTAM ANTIBIOTICS", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "<b>Common MOA:</b> Bind to <b>Penicillin Binding Proteins (PBPs)</b> / transpeptidases → inhibit peptidoglycan "
        "cross-linking → prevent cell wall synthesis → osmotic lysis → <b>BACTERICIDAL</b>.", styles['body']))
    story.append(sp(4))

    story.append(Paragraph("A. PENICILLINS", styles['subsection_title']))
    pen_data = [
        ["Subgroup", "Drugs", "Spectrum", "Key Clinical Uses"],
        ["Natural penicillins", "Penicillin G (IV), Penicillin V (oral)", "Narrow — Streptococcus, Neisseria, Spirochetes, Clostridium", "Syphilis (DOC), Streptococcal pharyngitis, Meningococcal meningitis, Gas gangrene, Rheumatic fever prophylaxis"],
        ["Aminopenicillins", "Ampicillin, Amoxicillin", "Extended — gram+ + gram−: E. coli, H. influenzae, Salmonella, Listeria", "UTI, otitis media, Salmonellosis, H. pylori (amoxicillin), Listeria meningitis"],
        ["Anti-staphylococcal", "Cloxacillin, Flucloxacillin, Methicillin", "MSSA (penicillinase-producing Staph aureus)", "Skin/soft tissue MSSA infections, osteomyelitis"],
        ["Anti-pseudomonal", "Piperacillin, Ticarcillin", "Broad gram-negative incl. Pseudomonas", "Serious gram-negative + pseudomonal infections (usually + BLI)"],
        ["BLI Combinations", "Amoxicillin + Clavulanate (Augmentin), Ampicillin + Sulbactam, Piperacillin + Tazobactam", "Protects penicillin from beta-lactamase destruction", "Polymicrobial infections, ESBL organisms, intra-abdominal sepsis"],
    ]
    story.append(make_table(pen_data[0], pen_data[1:], [3*cm, 3.5*cm, 4*cm, 5.5*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "Penicillin Adverse Effects",
        ["Hypersensitivity reactions (MOST IMPORTANT) — anaphylaxis, urticaria, serum sickness",
         "10% cross-reactivity with cephalosporins • Neurotoxicity (seizures — high doses) • Electrolyte disturbances (K+/Na+ overload)"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(6))

    story.append(Paragraph("B. CEPHALOSPORINS — GENERATIONS", styles['subsection_title']))
    ceph_data = [
        ["Generation", "Key Drugs", "Coverage", "Main Uses"],
        ["1st", "Cefazolin (IV), Cefalexin (oral)", "Gram+ > Gram−; limited gram-neg", "Surgical prophylaxis (DOC), Skin/soft tissue, UTI (cefalexin)"],
        ["2nd", "Cefuroxime, Cefaclor, Cefoxitin", "Broader gram-neg (H. influenzae, Moraxella); Cefoxitin: anaerobes", "Respiratory infections, UTI, surgical prophylaxis (abdominal)"],
        ["3rd", "Ceftriaxone, Cefotaxime, Ceftazidime", "Broad gram-neg; BBB penetration (meningitis); Ceftazidime: Pseudomonas", "Meningitis (Ceftriaxone DOC), Gonorrhea, Typhoid, Sepsis, Hospital infections"],
        ["4th", "Cefepime", "Broad gram+ and gram-neg; anti-pseudomonal", "Febrile neutropenia, nosocomial infections, Pseudomonas"],
        ["5th", "Ceftaroline, Ceftolozane-Tazobactam", "MRSA activity (Ceftaroline)", "MRSA skin infections, CAP with resistant organisms"],
    ]
    story.append(make_table(ceph_data[0], ceph_data[1:], [2*cm, 4*cm, 4*cm, 6*cm], styles))
    story.append(sp(6))

    story.append(Paragraph("C. CARBAPENEMS & MONOBACTAMS", styles['subsection_title']))
    carb_data = [
        ["Drug", "Class", "Spectrum", "Key Notes"],
        ["Imipenem + Cilastatin", "Carbapenem", "BROADEST — gram+, gram−, anaerobes; resistant to most β-lactamases", "Cilastatin inhibits renal dehydropeptidase (prevents imipenem inactivation); Seizure risk!"],
        ["Meropenem", "Carbapenem", "Similar to imipenem", "Less seizure risk; preferred for CNS infections"],
        ["Ertapenem", "Carbapenem", "NOT for Pseudomonas/Acinetobacter", "Once-daily dosing; outpatient use"],
        ["Aztreonam", "Monobactam", "GRAM-NEGATIVE ONLY (incl. Pseudomonas)", "SAFE in penicillin allergy (no cross-reactivity); no gram+ or anaerobic coverage"],
    ]
    story.append(make_table(carb_data[0], carb_data[1:], [3.5*cm, 2.5*cm, 4*cm, 6*cm], styles))
    story.append(PageBreak())

    # ── ANTITUBERCULAR ──
    story.append(Paragraph("3. ANTITUBERCULAR DRUGS (ATT)", styles['section_title']))
    story.append(hr(styles))
    att_data = [
        ["Drug", "MOA", "Key Adverse Effects", "Special Notes"],
        ["Rifampicin (R)", "Inhibits DNA-dependent RNA polymerase", "Orange-red body fluids (warn patient!); Hepatotoxicity; Potent CYP inducer (↓OCP, warfarin, etc.); Flu-like syndrome", "Most bactericidal; sterilizing drug; treats latent TB"],
        ["Isoniazid (H/INH)", "Inhibits mycolic acid synthesis (InhA); prodrug activated by KatG catalase", "Peripheral neuropathy (prevent with Vit B6/Pyridoxine); Hepatotoxicity; Drug-induced lupus; Psychosis", "Fast vs slow acetylators (NAT2); Slow acetylators → more peripheral neuropathy"],
        ["Pyrazinamide (Z)", "Disrupts membrane energy; active in acidic pH inside macrophages", "Hepatotoxicity (most serious); Hyperuricemia (gout); Arthralgia", "Only drug effective in acidic environment; sterilizing drug; used first 2 months"],
        ["Ethambutol (E)", "Inhibits arabinosyl transferase → ↓arabinogalactan in cell wall", "Optic neuritis: ↓visual acuity, red-green colour blindness (dose-dependent, reversible)", "Contraindicated in children <5 yrs and renal failure (without dose adjustment)"],
        ["Streptomycin (S)", "Binds 30S ribosome (aminoglycoside)", "Ototoxicity (vestibular > cochlear); Nephrotoxicity; Teratogenic", "Only injectable 1st-line drug; NOT used in pregnancy"],
    ]
    story.append(make_table(att_data[0], att_data[1:], [2.5*cm, 4*cm, 4.5*cm, 5*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "Standard ATT Regimen (WHO)",
        ["INTENSIVE PHASE (2 months): R + H + Z + E (4-drug RHZE)",
         "CONTINUATION PHASE (4 months): R + H (2-drug RH)",
         "Total duration: 6 months for drug-sensitive pulmonary TB"],
        LIGHT_BLUE, MED_BLUE, styles
    ))
    story.append(sp(8))

    # ── ANTIMALARIALS ──
    story.append(Paragraph("4. ANTIMALARIAL DRUGS", styles['section_title']))
    story.append(hr(styles))
    anti_mal_data = [
        ["Drug", "Class", "Action", "Key Uses / Notes"],
        ["Chloroquine", "4-Aminoquinoline", "↓Heme polymerization → toxic free heme accumulates (blood schizontocide)", "P. vivax, P. ovale, P. malariae; prophylaxis in sensitive areas; RA/SLE; retinopathy (chronic toxicity)"],
        ["Primaquine", "8-Aminoquinoline", "Hypnozoitocidal — kills liver hypnozoites; gametocidal", "ONLY drug for P. vivax/ovale relapse prevention; causes haemolysis in G6PD deficiency — SCREEN FIRST"],
        ["Artesunate / Artemether", "Artemisinin", "Generates free radicals → alkylates parasitic proteins (fastest acting)", "DOC for severe falciparum malaria (IV Artesunate); ACT for uncomplicated falciparum (Artemether + Lumefantrine)"],
        ["Mefloquine", "Aryl alcohol", "Blood schizontocide", "Prophylaxis and treatment of chloroquine-resistant P. falciparum; CNS side effects"],
        ["Quinine + Doxycycline", "Quinoline + Antibiotic", "Blood schizontocide", "Severe malaria (if artesunate unavailable); IV Quinine; cinchonism (tinnitus, deafness, nausea)"],
        ["Pyrimethamine + Sulfadoxine (SP)", "Antifolate combination", "Inhibit DHFR + DHPS → ↓folate synthesis", "Treatment of uncomplicated falciparum (ACT partner); IPTp in pregnancy (intermittent preventive treatment)"],
        ["Atovaquone + Proguanil (Malarone)", "Hydroxynaphthoquinone", "Inhibit mitochondrial electron transport", "Prophylaxis and treatment of falciparum; no cross-resistance with chloroquine"],
    ]
    story.append(make_table(anti_mal_data[0], anti_mal_data[1:], [2.8*cm, 3*cm, 3.5*cm, 6.7*cm], styles))
    story.append(PageBreak())

    # ── ANTIFUNGALS ──
    story.append(marks_box("★ 5 MARKS", MED_BLUE, styles))
    story.append(sp(6))
    story.append(Paragraph("5. ANTIFUNGAL DRUGS", styles['section_title']))
    story.append(hr(styles))
    af_data = [
        ["Class", "Drugs", "MOA", "Key Uses & Notes"],
        ["Azoles", "Fluconazole, Itraconazole, Voriconazole, Ketoconazole, Clotrimazole (topical)", "Inhibit CYP51 (lanosterol 14α-demethylase) → ↓ergosterol synthesis → toxic sterol precursors accumulate", "Fluconazole: Candida, Cryptococcal meningitis maintenance; Voriconazole: DOC for Aspergillosis; CYP3A4 inhibitors"],
        ["Polyenes", "Amphotericin B, Nystatin (topical)", "Bind ergosterol → form pores → ion leakage → cell death (fungicidal)", "AmB: DOC for systemic fungal infections (Aspergillus, Cryptococcus, Mucormycosis, Histoplasma); Nephrotoxicity (dose-limiting)"],
        ["Echinocandins", "Caspofungin, Micafungin, Anidulafungin", "Inhibit β-1,3-glucan synthase → ↓fungal cell wall synthesis", "Candida (incl. Fluconazole-resistant); Aspergillosis (salvage); Safe in renal impairment"],
        ["Allylamines", "Terbinafine, Naftifine", "Inhibit squalene epoxidase → ↓ergosterol; toxic squalene accumulation", "Dermatophyte infections (tinea unguium/onychomycosis — terbinafine oral is DOC)"],
        ["Antimetabolite", "Flucytosine (5-FC)", "Converted to 5-FU inside fungal cells → inhibit thymidylate synthase", "Cryptococcal meningitis (combined with Amphotericin B); resistance develops rapidly — never use alone"],
    ]
    story.append(make_table(af_data[0], af_data[1:], [2.8*cm, 3.2*cm, 4*cm, 6*cm], styles))
    story.append(sp(4))
    story.append(info_box(
        "Amphotericin B — Adverse Effects (IMPORTANT)",
        ["Nephrotoxicity (dose-limiting — most serious; pre-hydrate; monitor creatinine)",
         "Infusion reactions (fever, chills, rigors — 'Shake and Bake'; premedicate with paracetamol + hydrocortisone)",
         "Hypokalemia + Hypomagnesemia (tubular dysfunction) • Normochromic normocytic anaemia",
         "Liposomal AmB (AmBisome) = less nephrotoxic; preferred for CNS infections"],
        LIGHT_RED, ACCENT_RED, styles
    ))
    story.append(sp(8))

    # ── ANTICANCER ──
    story.append(Paragraph("6. ANTICANCER DRUG CLASSIFICATION", styles['section_title']))
    story.append(hr(styles))
    cancer_data = [
        ["Class", "Examples", "MOA", "Key Toxicities"],
        ["Alkylating Agents", "Cyclophosphamide, Ifosfamide, Busulfan, Chlorambucil, Cisplatin", "Cross-link DNA strands → prevent replication (cell-cycle non-specific)", "Haemorrhagic cystitis (cyclophosphamide/ifosfamide — acrolein; prevent with MESNA); myelosuppression; nephrotoxicity (cisplatin)"],
        ["Antimetabolites", "Methotrexate, 5-FU, Cytarabine, Gemcitabine, 6-Mercaptopurine", "Methotrexate: inhibits DHFR; 5-FU: inhibits thymidylate synthase → ↓DNA synthesis (S-phase specific)", "Myelosuppression, mucositis, hepatotoxicity (MTX), pulmonary fibrosis (MTX), teratogenic; Leucovorin rescue for MTX"],
        ["Vinca Alkaloids", "Vincristine, Vinblastine, Vinorelbine", "Inhibit tubulin polymerisation → prevent spindle formation → metaphase arrest", "Vincristine: peripheral neuropathy (dose-limiting); Vinblastine: myelosuppression (dose-limiting); alopecia"],
        ["Taxanes", "Paclitaxel, Docetaxel", "Promote tubulin polymerisation → prevent spindle disassembly → metaphase arrest", "Myelosuppression, peripheral neuropathy, hypersensitivity (paclitaxel — premedicate)"],
        ["Anthracyclines", "Doxorubicin, Daunorubicin, Epirubicin", "Intercalate DNA; inhibit topoisomerase II; generate free radicals", "Cardiotoxicity (dose-related, irreversible DCM — cumulative dose limit!); red urine; alopecia"],
        ["Platinum Compounds", "Cisplatin, Carboplatin, Oxaliplatin", "Intra/interstrand DNA cross-links", "Cisplatin: nephrotoxicity (most serious — hydrate!), ototoxicity, peripheral neuropathy, severe N&V"],
        ["Topoisomerase Inhibitors", "Etoposide (Topo II), Topotecan, Irinotecan (Topo I)", "Inhibit topoisomerase → DNA strand breaks", "Myelosuppression; irinotecan — severe diarrhoea"],
        ["Monoclonal Antibodies", "Rituximab (CD20), Trastuzumab (HER2), Bevacizumab (VEGF)", "Targeted receptor blockade or ADCC", "Trastuzumab: cardiotoxicity; Bevacizumab: hypertension, wound healing impairment"],
    ]
    story.append(make_table(cancer_data[0], cancer_data[1:], [3*cm, 4*cm, 4*cm, 5*cm], styles))
    story.append(PageBreak())


# ──────────────────────────────────────────────────────────────────────────────
# CHAPTER 4: RENAL PHARMACOLOGY
# ──────────────────────────────────────────────────────────────────────────────

def build_renal(story, styles):
    story.append(section_header("CHAPTER 4: RENAL PHARMACOLOGY", ACCENT_RED, styles))
    story.append(sp(8))

    story.append(marks_box("★ 5 MARKS", GOLD, styles))
    story.append(sp(6))

    story.append(Paragraph("CLASSIFICATION OF DIURETICS", styles['section_title']))
    story.append(hr(styles))
    diur_data = [
        ["Class", "Drugs", "Site of Action", "Mechanism", "Electrolyte Effects"],
        ["Loop Diuretics", "Furosemide, Bumetanide, Ethacrynic acid, Torsemide", "Thick ascending limb (Loop of Henle)", "Block NKCC2 (Na⁺/K⁺/2Cl⁻ cotransporter)", "↓K⁺, ↓Na⁺, ↓Cl⁻, ↓Ca²⁺, ↓Mg²⁺; metabolic alkalosis"],
        ["Thiazides", "HCTZ, Chlorthalidone, Indapamide, Metolazone", "Distal convoluted tubule (DCT)", "Block NCC (Na⁺/Cl⁻ cotransporter)", "↓K⁺, ↓Na⁺, ↑Ca²⁺ (reabsorption); metabolic alkalosis"],
        ["K⁺-Sparing", "Spironolactone, Eplerenone (aldosterone antagonists); Amiloride, Triamterene (ENaC blockers)", "Collecting duct", "Block aldosterone receptor or ENaC directly", "↑K⁺ (hyperkalemia risk); mild Na⁺ loss"],
        ["Carbonic Anhydrase Inhibitors", "Acetazolamide", "Proximal convoluted tubule (PCT)", "Block carbonic anhydrase → ↓HCO₃⁻ reabsorption", "↑K⁺ loss; metabolic hyperchloremic ACIDOSIS"],
        ["Osmotic", "Mannitol", "PCT, Loop, Collecting duct", "Osmotic retention of water", "Dilutional; plasma expansion first"],
        ["Vaptans (ADH antagonists)", "Tolvaptan (oral), Conivaptan (IV)", "Collecting duct", "Block V2 receptors → ↓AQP2 insertion", "Free water loss without Na⁺ loss (aquaresis)"],
    ]
    story.append(make_table(diur_data[0], diur_data[1:], [2.8*cm, 3.5*cm, 2.8*cm, 3.5*cm, 3.4*cm], styles))
    story.append(sp(8))

    # ── FUROSEMIDE ──
    story.append(Paragraph("LOOP DIURETICS — FUROSEMIDE", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph("<b>Mechanism:</b> Blocks NKCC2 in thick ascending limb → most potent diuresis (up to 25% of filtered Na⁺). Also has venodilation (reduces preload even before diuresis begins — important in acute pulmonary oedema).", styles['body']))

    furo_uses = [
        "<b>Acute pulmonary oedema (LVF)</b> — drug of choice",
        "Chronic heart failure (symptom relief)",
        "Hypercalcaemia (↑urinary Ca²⁺ excretion — combined with IV saline)",
        "Hypertension (resistant/volume-overloaded)",
        "Nephrotic syndrome, cirrhotic ascites",
        "Acute renal failure (maintain urine flow)",
        "Hyperkalemia",
    ]
    story.append(Paragraph("Therapeutic Uses:", styles['subsection_title']))
    for u in furo_uses:
        story.append(Paragraph(f"• {u}", styles['bullet']))

    story.append(Paragraph("Adverse Effects:", styles['subsection_title']))
    furo_ae = [
        "<b>Hypokalaemic metabolic alkalosis</b> (most common — supplement K⁺)",
        "Hyponatraemia, hypomagnesaemia, hypocalcaemia",
        "<b>Ototoxicity</b> (high IV doses, or combined with aminoglycosides — additive!)",
        "Hyperuricaemia (precipitate gout)",
        "Hyperglycaemia (mild)",
        "Dehydration, postural hypotension",
        "Sulfonamide allergy (cross-reactivity possible with thiazides too)",
    ]
    for ae in furo_ae:
        story.append(Paragraph(f"• {ae}", styles['bullet']))
    story.append(sp(8))

    # ── THIAZIDES ──
    story.append(Paragraph("THIAZIDE DIURETICS", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "<b>MOA:</b> Block NCC in DCT → moderate diuresis. Unique: <b>↑Ca²⁺ reabsorption</b> (useful in hypercalciuria/calcium stones). "
        "Lose effectiveness in renal failure (GFR <30 mL/min) — use loop diuretics instead.", styles['body']))

    story.append(Paragraph("<b>Thiazide Uses:</b>", styles['subsection_title']))
    thia_uses = [
        "Hypertension — first-line (especially in elderly, Black patients)",
        "Heart failure (mild-moderate)",
        "Nephrogenic diabetes insipidus (paradoxical — ↓urine volume via ↑PCT reabsorption)",
        "Hypercalciuria / Calcium nephrolithiasis",
        "Osteoporosis prevention",
    ]
    for u in thia_uses:
        story.append(Paragraph(f"• {u}", styles['bullet']))

    story.append(info_box(
        "Thiazide Adverse Effects — 'HyperGLUC'",
        ["Hyperglycaemia (↓insulin secretion) • Hyperlipidaemia (↑LDL, TG) • Hyperuricaemia (gout)",
         "Hypokalaemia + metabolic alkalosis • Hyponatraemia (most serious) • Hypercalcaemia"],
        LIGHT_GOLD, GOLD, styles
    ))
    story.append(sp(8))

    # ── POTASSIUM-SPARING ──
    story.append(Paragraph("POTASSIUM-SPARING DIURETICS", styles['section_title']))
    story.append(hr(styles))

    ks_data = [
        ["Drug", "MOA", "Uses", "Adverse Effects"],
        ["Spironolactone", "Competitive aldosterone antagonist → blocks mineralocorticoid receptor in collecting duct", "Hyperaldosteronism (Conn's — DOC), HFrEF (↓mortality — RALES trial), cirrhotic ascites, hypertension (add-on), PCOS/hirsutism (anti-androgen)", "Hyperkalemia; Gynecomastia, menstrual irregularities (anti-androgen effect); Onset delayed 2–3 days"],
        ["Eplerenone", "Selective aldosterone antagonist (more selective than spironolactone)", "HFrEF post-MI (EPHESUS trial), hypertension", "Hyperkalemia; NO gynecomastia (selective — no anti-androgen)"],
        ["Amiloride", "Directly blocks ENaC (Na⁺ channel) in collecting duct — independent of aldosterone", "Hypertension (add-on), prevention of hypokalaemia with loop/thiazide, Liddle syndrome", "Hyperkalemia; GI effects"],
        ["Triamterene", "Same as amiloride (ENaC blocker)", "Same as amiloride", "Hyperkalemia; Renal stones (triamterene stones); Folate deficiency"],
    ]
    story.append(make_table(ks_data[0], ks_data[1:], [2.5*cm, 4.5*cm, 4*cm, 5*cm], styles))
    story.append(sp(8))

    # ── ADH/VASOPRESSIN ──
    story.append(Paragraph("ANTIDIURETICS — VASOPRESSIN & DESMOPRESSIN", styles['section_title']))
    story.append(hr(styles))
    story.append(Paragraph(
        "<b>ADH Physiology:</b> Released from posterior pituitary in response to ↑osmolality or ↓blood volume → "
        "V2 receptors on collecting duct → inserts Aquaporin-2 (AQP2) channels → ↑water reabsorption → "
        "concentrated urine. V1 receptors on vessels → vasoconstriction.", styles['body']))
    story.append(sp(4))

    adh_data = [
        ["Drug", "Receptor Selectivity", "Route", "Uses"],
        ["Desmopressin (DDAVP)", "Selective V2 agonist (no V1/pressor effect at low doses)", "Intranasal, SC, IV, Oral", "Central diabetes insipidus (DOC); Nocturnal enuresis; Haemophilia A and vWD (releases stored vWF + Factor VIII); Nocturnal polyuria"],
        ["Vasopressin (ADH)", "V1 + V2 agonist", "IV/SC", "Septic shock (vasopressor — V1); Central DI; Bleeding oesophageal varices (V1 — splanchnic vasoconstriction)"],
        ["Terlipressin", "V1 agonist (predominantly)", "IV bolus", "Hepatorenal syndrome (with albumin — DOC); Oesophageal varices"],
        ["Tolvaptan (Vaptan)", "V2 ANTAGONIST", "Oral", "Euvolemic/hypervolemic hyponatraemia (SIADH, HF, cirrhosis) — aquaresis; ADPKD (slows cyst growth)"],
        ["Conivaptan", "V1A + V2 ANTAGONIST", "IV", "Hyponatraemia in hospitalised patients"],
    ]
    story.append(make_table(adh_data[0], adh_data[1:], [3*cm, 3.5*cm, 2*cm, 7.5*cm], styles))
    story.append(sp(8))

    # ── QUICK REFERENCE TABLE ──
    story.append(section_header("QUICK REFERENCE: DRUG OF CHOICE (DOC) SUMMARY", HexColor('#2C3E50'), styles))
    story.append(sp(8))
    doc_data = [
        ["Condition", "Drug of Choice", "Notes"],
        ["Hypertension in Diabetes", "ACE Inhibitor (e.g. Enalapril)", "Also renoprotective; ARB if ACEi not tolerated"],
        ["Hypertension in Pregnancy", "Methyldopa (1st line), Labetalol, Nifedipine", "ACEi/ARBs CONTRAINDICATED"],
        ["Hypertensive Emergency", "IV Sodium Nitroprusside (most), IV Labetalol", "Aortic dissection: Labetalol; Pre-eclampsia: IV Labetalol or MgSO₄"],
        ["Acute Angina Attack", "Sublingual GTN (nitroglycerin)", "Onset 1–2 min"],
        ["Vasospastic (Prinzmetal) Angina", "Calcium Channel Blocker (Nifedipine)", "Beta-blockers contraindicated"],
        ["Acute Pulmonary Oedema", "IV Furosemide + IV GTN + Morphine", "Oxygen if SpO₂ <94%"],
        ["Acute Paroxysmal SVT", "Adenosine (IV rapid bolus)", "Verapamil if adenosine fails"],
        ["Ventricular Fibrillation (cardiac arrest)", "Amiodarone (IV)", "After defibrillation + CPR"],
        ["Digoxin Toxicity", "Digoxin-specific Fab antibodies (Digibind)", "Correct K⁺ and Mg²⁺; stop digoxin"],
        ["Acute MI", "Aspirin + Clopidogrel + Primary PCI", "Tenecteplase if PCI unavailable"],
        ["Syphilis", "Benzathine Penicillin G IM", "Doxycycline if penicillin-allergic"],
        ["Severe Falciparum Malaria", "IV Artesunate", "Oral ACT for uncomplicated"],
        ["P. vivax Relapse Prevention", "Primaquine", "Screen G6PD before use"],
        ["Cryptococcal Meningitis", "IV Amphotericin B + Flucytosine (induction)", "Then Fluconazole (maintenance)"],
        ["Invasive Aspergillosis", "Voriconazole", "Liposomal AmB alternative"],
        ["Anaemia of CKD", "Erythropoietin (Epoetin/Darbepoetin)", "With IV Iron supplementation"],
        ["Iron Poisoning", "Desferrioxamine (IV/IM)", "Chelating agent"],
        ["Cerebral Oedema / Raised ICP", "IV Mannitol (osmotic)", "Also dexamethasone for vasogenic oedema"],
        ["Hyperaldosteronism (Conn's)", "Spironolactone", "Eplerenone if gynecomastia is a problem"],
        ["Central Diabetes Insipidus", "Desmopressin (DDAVP)", "Intranasal or oral"],
        ["Haemophilia A + vWD (acute)", "Desmopressin (DDAVP)", "Releases stored vWF + Factor VIII"],
    ]
    story.append(make_table(doc_data[0], doc_data[1:], [5.5*cm, 5*cm, 5.5*cm], styles))
    story.append(PageBreak())

    # ── MEMORY AIDS ──
    story.append(section_header("MEMORY AIDS & EXAM TIPS", HexColor('#1A3A5C'), styles))
    story.append(sp(8))

    mnemonics = [
        ("ACE Inhibitor Side Effects — 'CAPTOPRIL'",
         ["C — Cough (dry)", "A — Angioedema", "P — Proteinuria (↑in bilateral RAS)",
          "T — Teratogenic (pregnancy)", "O — hypOtension (first dose)",
          "P — Potassium ↑ (hyperkalemia)", "R — Renal failure (bilateral RAS)",
          "I — ↑Immunosuppression (neutropenia — captopril)", "L — Loss of taste (captopril)"],
         LIGHT_BLUE, DARK_BLUE),
        ("Digitalis Toxicity Features — 'GI + CNS + HEART'",
         ["GI (EARLIEST): Anorexia, nausea, vomiting",
          "CNS: Xanthopsia (yellow-green vision), confusion, headache",
          "HEART (WORST): ANY arrhythmia — PVCs (most common), bigeminy, PAT with block, VT, VF"],
         LIGHT_PURP, ACCENT_PURP),
        ("Warfarin Vitamin K Factors — 'Ten Two's'",
         ["Factors inhibited: II (prothrombin), VII, IX, X",
          "Proteins inhibited: Protein C and Protein S (anticoagulant — fall first → transient pro-thrombotic state!)",
          "Mnemonic: '1972' = I, IX, VII, II"],
         LIGHT_GREEN, ACCENT_GREEN),
        ("ATT Drug Side Effects — Quick Recall",
         ["R — Rifampicin: Red urine, CYP inducer, Hepatotoxicity",
          "I — INH: Isoniazid: peripheral neuropathy (B6!), hepatotoxicity",
          "P — Pyrazinamide: Hepatotoxicity (most), gout (hyperuricaemia)",
          "E — Ethambutol: Eye (optic neuritis)",
          "S — Streptomycin: Sensorineural hearing loss, vestibular damage"],
         LIGHT_GOLD, GOLD),
        ("Thiazide Adverse Effects — 'HyperGLUC'",
         ["Hyper-Glycaemia • Hyper-Lipidaemia • Hyper-Uricaemia • Hyper-Calcaemia",
          "Hypo-Kalaemia • Hypo-Natraemia (most serious — dilutional)"],
         LIGHT_RED, ACCENT_RED),
        ("Beta-Lactam Mnemonics",
         ["PenS = Penicillinase-Sensitive (pen G, pen V, aminopenicillins, anti-pseudo)",
          "PenR = Penicillinase-Resistant = Cloxacillin, Flucloxacillin (anti-staph)",
          "3rd gen cephalosporins cross BBB = treat MENINGITIS (CeftRiaxone)",
          "Aztreonam = GRAM NEGATIVE ONLY + SAFE in penicillin allergy"],
         LIGHT_BLUE, MED_BLUE),
    ]
    for title, lines, bg, fg in mnemonics:
        story.append(info_box(title, lines, bg, fg, styles))
        story.append(sp(6))

    story.append(PageBreak())


def build_quick_summary(story, styles):
    story.append(section_header("EXAM QUICK SUMMARY — ALL SECTIONS", DARK_BLUE, styles))
    story.append(sp(8))

    # High-yield comparison table
    story.append(Paragraph("HIGH-YIELD COMPARISONS", styles['section_title']))
    story.append(hr(styles))

    comp_data = [
        ["Topic", "Key Differentiator"],
        ["UFH vs LMWH", "UFH: monitor aPTT, reverse with protamine fully, risk of HIT; LMWH: no monitoring, SC, predictable, less HIT"],
        ["Streptokinase vs Alteplase", "SK: antigenic, cheap, non-fibrin-specific; Alteplase: fibrin-specific, safer, used in stroke"],
        ["Verapamil vs Nifedipine", "Verapamil: heart (bradycardia, constipation) — don't combine with beta-blocker; Nifedipine: vessels (flushing, oedema, reflex tachycardia)"],
        ["Clopidogrel vs Ticagrelor", "Clopidogrel: prodrug (CYP2C19), irreversible; Ticagrelor: direct acting, reversible, faster onset"],
        ["Cisplatin vs Carboplatin", "Cisplatin: more nephrotoxic + ototoxic; Carboplatin: more myelosuppressive but less nephro/oto"],
        ["Vincristine vs Vinblastine", "Vincristine: Neuropathy (dose-limiting); Vinblastine: Myelosuppression (dose-limiting)"],
        ["Chloroquine vs Primaquine", "Chloroquine: blood schizontocide; Primaquine: liver hypnozoites (vivax/ovale relapse prevention); risk in G6PD"],
        ["Amphotericin B vs Fluconazole", "AmB: broadest spectrum, nephrotoxic; Fluconazole: narrower (candida/crypto), oral, well-tolerated"],
        ["ACEi vs ARB", "ACEi: bradykinin↑ → cough + angioedema; ARB: no bradykinin effect → no cough"],
        ["Furosemide vs HCTZ", "Furosemide: loop (powerful, ↓Ca²⁺); HCTZ: thiazide (moderate, ↑Ca²⁺ — use in nephrolithiasis)"],
        ["Spironolactone vs Amiloride", "Spironolactone: aldosterone antagonist (gynecomastia); Amiloride: ENaC blocker (no hormonal effects)"],
        ["Desmopressin vs Vasopressin", "Desmopressin: V2-selective (no pressor); Vasopressin: V1+V2 (pressor + antidiuretic)"],
    ]
    story.append(make_table(comp_data[0], comp_data[1:], [5*cm, 11*cm], styles))
    story.append(sp(8))

    story.append(Paragraph("MARKS DISTRIBUTION SUMMARY", styles['section_title']))
    story.append(hr(styles))
    marks_data = [
        ["Section", "10-Mark Topics", "5-Mark Topics", "3-Mark Topics"],
        ["Cardiovascular System", "ACE Inhibitors, ARBs, Organic Nitrates, CCBs, Cardiac Glycosides", "Sodium Nitroprusside, Classification Antihypertensives, Acute MI pharmacotherapy, Lignocaine, Amiodarone, Adenosine", "Beta-blockers (angina/HTN), Clonidine, Vasodilators"],
        ["Blood & Blood Formation", "Anticoagulants (parenteral+oral), Iron absorption & preparations, Anticoagulant pharmacology", "Hypolipidemic classification, Plasma volume expanders, Thrombolytics, Antiplatelets, VitB12, Folic acid, EPO", "Antithrombolytics, Clopidogrel, Aspirin in MI"],
        ["Chemotherapy", "Fluoroquinolones, Beta-lactams, Macrolides, ATT drugs, Antimalarials", "Antifungals, Aminoglycosides, Tetracyclines, Dapsone, Anticancer classification, Cyclophosphamide, Methotrexate, Vinca alkaloids", "Leprosy drugs, Malaria acute attack, Albendazole, Ivermectin"],
        ["Renal Pharmacology", "-", "Diuretic classification, Acetazolamide, Mannitol, Furosemide, Thiazides, K⁺-sparing diuretics, Antidiuretics", "-"],
    ]
    story.append(make_table(marks_data[0], marks_data[1:], [3.5*cm, 5*cm, 4.5*cm, 3*cm], styles))
    story.append(PageBreak())


def on_page(canvas, doc):
    """Add header and footer to each page."""
    canvas.saveState()
    w, h = A4
    # Header bar
    canvas.setFillColor(DARK_BLUE)
    canvas.rect(MARGIN, h - 1.2*cm, w - 2*MARGIN, 0.6*cm, fill=1, stroke=0)
    canvas.setFillColor(WHITE)
    canvas.setFont('Helvetica-Bold', 8)
    canvas.drawString(MARGIN + 5, h - 0.9*cm, "PHARMACOLOGY STUDY GUIDE")
    canvas.drawRightString(w - MARGIN - 5, h - 0.9*cm, "Exam Preparation")
    # Footer
    canvas.setFillColor(MID_GREY)
    canvas.setFont('Helvetica', 7.5)
    canvas.drawCentredString(w/2, 0.7*cm, f"Page {doc.page}  |  Based on KD Tripathi & Lippincott Pharmacology")
    canvas.restoreState()


def main():
    os.makedirs(os.path.dirname(OUTPUT_PATH), exist_ok=True)
    doc = SimpleDocTemplate(
        OUTPUT_PATH,
        pagesize=A4,
        leftMargin=MARGIN,
        rightMargin=MARGIN,
        topMargin=1.5*cm,
        bottomMargin=1.5*cm,
        title="Pharmacology Study Guide",
        author="Orris AI",
        subject="Pharmacology Exam Preparation"
    )

    styles = build_styles()
    story = []

    build_cover(story, styles)
    build_toc(story, styles)
    build_cvs(story, styles)
    build_blood(story, styles)
    build_chemo(story, styles)
    build_renal(story, styles)
    build_quick_summary(story, styles)

    doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
    print(f"PDF generated successfully: {OUTPUT_PATH}")
    import os
    size = os.path.getsize(OUTPUT_PATH)
    print(f"File size: {size / 1024:.1f} KB")


if __name__ == '__main__':
    main()
Running Command

cd /tmp/workspace/pharma-study-guide && python3 generate_pdf.py 2>&1

Editing File

~/pharma-study-guide/generate_pdf.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/pharma-study-guide/generate_pdf.py'
Editing File

~/pharma-study-guide/generate_pdf.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/pharma-study-guide/generate_pdf.py'
Running Command

cd /tmp/workspace/pharma-study-guide && python3 generate_pdf.py 2>&1

Running Command

cd /tmp/workspace/pharma-study-guide && python3 -c " from pypdf import PdfReader r = PdfReader('Pharmacology_Study_Guide.pdf') print(f'Pages: {len(r.pages)}') print(f'Title: {r.metadata.title}') for i, p in enumerate(r.pages[:3]): txt = p.extract_text()[:80] print(f'Page {i+1}: {txt!r}') "

Your comprehensive pharmacology study guide PDF is ready:

Pharmacology Study Guide

PDF Document · PDF


What's inside the PDF (22 pages):
SectionContent
Cover PageTitle, section overview, source references
Table of ContentsAll topics listed by chapter with mark weightage
Chapter 1 — Cardiovascular SystemACE Inhibitors, ARBs, Organic Nitrates, CCBs, Cardiac Glycosides, Acute MI Pharmacotherapy, Amiodarone, Adenosine, Beta-Blockers, Clonidine
Chapter 2 — Blood & Blood FormationHypolipidemic classification, Thrombolytics, Antiplatelets, Anticoagulants (full table), Iron preparations, Erythropoietin
Chapter 3 — ChemotherapyFluoroquinolones, Beta-Lactams (all generations), ATT drugs, Antimalarials, Antifungals, Anticancer drug classification
Chapter 4 — Renal PharmacologyDiuretic classification, Furosemide, Thiazides, K⁺-sparing, ADH/Desmopressin
Quick ReferenceDrug of Choice (DOC) table for 21 conditions, High-yield comparison table (UFH vs LMWH, ACEi vs ARB, etc.)
Memory Aids6 mnemonics including CAPTOPRIL, HyperGLUC, ATT RIPES side effects
Design features: Color-coded chapter banners, styled tables with alternating rows, warning boxes for contraindications/adverse effects, mark-weight badges (10M/5M/3M), header and page footer on every page.
This is a shared conversation. Sign in to Orris to start your own chat.