MBBS 2nd year PHARMACOLOGY Portions: CVS, ENDOCRINE AND CANCER CHEMOTHERAPY Marks:30 (pattern -3marks x 8 and remaining MCQS) Can you give me all the questions with answers which they may ask for 3 marks in the form of PDF

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

mkdir -p /tmp/workspace/pharma-exam && ls /tmp/workspace/

Writing File

~/pharma-exam/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import ListFlowable, ListItem

OUTPUT = "/tmp/workspace/pharma-exam/Pharma_3Mark_QA_MBBS2.pdf"

doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2*cm, bottomMargin=2*cm
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    "TitleStyle", parent=styles["Title"],
    fontSize=18, textColor=colors.HexColor("#1a3a5c"),
    spaceAfter=6, alignment=TA_CENTER, fontName="Helvetica-Bold"
)
subtitle_style = ParagraphStyle(
    "SubTitle", parent=styles["Normal"],
    fontSize=11, textColor=colors.HexColor("#2d6ea8"),
    spaceAfter=4, alignment=TA_CENTER, fontName="Helvetica-Bold"
)
section_style = ParagraphStyle(
    "SectionStyle", parent=styles["Heading1"],
    fontSize=14, textColor=colors.white,
    spaceBefore=14, spaceAfter=6,
    fontName="Helvetica-Bold",
    backColor=colors.HexColor("#1a3a5c"),
    leftIndent=-10, rightIndent=-10,
    leading=20
)
q_style = ParagraphStyle(
    "QuestionStyle", parent=styles["Normal"],
    fontSize=11, textColor=colors.HexColor("#1a3a5c"),
    spaceBefore=10, spaceAfter=4,
    fontName="Helvetica-Bold", leading=15
)
a_label_style = ParagraphStyle(
    "ALabelStyle", parent=styles["Normal"],
    fontSize=10, textColor=colors.HexColor("#b05000"),
    spaceBefore=2, spaceAfter=1,
    fontName="Helvetica-Bold"
)
a_style = ParagraphStyle(
    "AnswerStyle", parent=styles["Normal"],
    fontSize=10, textColor=colors.HexColor("#222222"),
    spaceBefore=2, spaceAfter=6,
    fontName="Helvetica", leading=15,
    alignment=TA_JUSTIFY
)
bullet_style = ParagraphStyle(
    "BulletStyle", parent=styles["Normal"],
    fontSize=10, textColor=colors.HexColor("#222222"),
    spaceBefore=1, spaceAfter=1,
    fontName="Helvetica", leading=14,
    leftIndent=15
)
note_style = ParagraphStyle(
    "NoteStyle", parent=styles["Normal"],
    fontSize=9, textColor=colors.HexColor("#555555"),
    spaceAfter=4, fontName="Helvetica-Oblique",
    leftIndent=15, borderPad=4
)
footer_style = ParagraphStyle(
    "FooterStyle", parent=styles["Normal"],
    fontSize=8, textColor=colors.grey,
    alignment=TA_CENTER, fontName="Helvetica"
)

def section_header(text):
    return [
        Spacer(1, 0.3*cm),
        Table([[Paragraph(text, ParagraphStyle(
            "SH", parent=styles["Normal"],
            fontSize=13, textColor=colors.white,
            fontName="Helvetica-Bold", alignment=TA_LEFT
        ))]],
        colWidths=[17*cm],
        style=TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#1a3a5c")),
            ("TOPPADDING", (0,0), (-1,-1), 7),
            ("BOTTOMPADDING", (0,0), (-1,-1), 7),
            ("LEFTPADDING", (0,0), (-1,-1), 12),
        ])),
        Spacer(1, 0.2*cm),
    ]

def q_block(num, question, answer_lines, note=None):
    items = []
    items.append(Paragraph(f"Q{num}. {question}", q_style))
    items.append(Paragraph("Answer:", a_label_style))
    for line in answer_lines:
        if line.startswith("•"):
            items.append(Paragraph(line, bullet_style))
        else:
            items.append(Paragraph(line, a_style))
    if note:
        items.append(Paragraph(f"<i>Exam tip: {note}</i>", note_style))
    items.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#cccccc"), spaceAfter=4))
    return KeepTogether(items)

# ======================== QUESTIONS DATA ========================

questions = {
    "SECTION A: CARDIOVASCULAR PHARMACOLOGY": [
        (
            "Write a short note on Digoxin (Cardiac Glycoside).",
            [
                "Digoxin is a cardiac glycoside obtained from Digitalis lanata.",
                "<b>Mechanism of Action:</b>",
                "• Inhibits Na⁺/K⁺-ATPase pump on cardiac myocytes.",
                "• This raises intracellular Na⁺, which reduces Ca²⁺ expulsion via Na⁺/Ca²⁺ exchanger.",
                "• Increased intracellular Ca²⁺ (stored in sarcoplasmic reticulum) → positive inotropic effect.",
                "• Also has a vagomimetic (parasympathomimetic) effect: slows SA node rate and AV conduction.",
                "<b>Uses:</b>",
                "• Chronic symptomatic heart failure (as add-on therapy).",
                "• Rate control in atrial fibrillation (AF) and atrial flutter.",
                "• Does NOT reduce mortality but reduces rehospitalization.",
                "<b>Adverse Effects (Digoxin toxicity):</b>",
                "• GI: Nausea, vomiting, diarrhea, abdominal pain.",
                "• Cardiac: Arrhythmias (PAT with block, bigeminy, VF), bradycardia.",
                "• CNS: Visual disturbances (yellow-green vision – xanthopsia), confusion.",
                "• Hypokalaemia, hypomagnesaemia, and hypercalcaemia increase toxicity risk.",
                "<b>Treatment of toxicity:</b> Digoxin-specific antibody fragments (Digibind/DigiFab).",
            ],
            "Draw the mechanism diagram: Na/K pump → ↑Na⁺ → ↓Ca²⁺ expulsion → ↑contractility"
        ),
        (
            "Classify antihypertensive drugs. Write the mechanism and uses of ACE inhibitors.",
            [
                "<b>Classification of Antihypertensives:</b>",
                "• Diuretics: Thiazides (hydrochlorothiazide), Loop (furosemide), K⁺-sparing (spironolactone).",
                "• Beta-blockers: Propranolol, atenolol, metoprolol.",
                "• Calcium channel blockers: Amlodipine, nifedipine, verapamil, diltiazem.",
                "• ACE Inhibitors: Enalapril, lisinopril, ramipril.",
                "• Angiotensin Receptor Blockers (ARBs): Losartan, valsartan.",
                "• Alpha-blockers: Prazosin, terazosin.",
                "• Centrally acting: Clonidine, methyldopa.",
                "• Direct vasodilators: Hydralazine, minoxidil.",
                "<b>ACE Inhibitors – Mechanism:</b>",
                "• Block conversion of Angiotensin I → Angiotensin II (by ACE enzyme).",
                "• Angiotensin II is a potent vasoconstrictor and stimulates aldosterone secretion.",
                "• Result: Vasodilation + reduced Na⁺/water retention → BP falls.",
                "• Also reduce bradykinin breakdown → ↑vasodilation (also causes dry cough).",
                "<b>Uses:</b>",
                "• Hypertension (first-line, especially in diabetics with proteinuria).",
                "• Heart failure (reduce preload and afterload).",
                "• Post-MI cardioprotection, diabetic nephropathy.",
                "<b>Key ADRs:</b> Dry cough (bradykinin), angioedema (contraindicated in 2nd/3rd trimester pregnancy), hyperkalaemia.",
            ],
            "Remember: ACE inhibitors end in '-pril'; ARBs end in '-sartan'."
        ),
        (
            "Classify and write the mechanism and clinical uses of calcium channel blockers (CCBs).",
            [
                "<b>Classification:</b>",
                "• Dihydropyridines (DHP): Amlodipine, nifedipine, felodipine – mainly vascular.",
                "• Non-DHP: Verapamil (phenylalkylamine) – mainly cardiac; Diltiazem (benzothiazepine) – both.",
                "<b>Mechanism of Action:</b>",
                "• Block L-type voltage-gated calcium channels in vascular smooth muscle and cardiac tissue.",
                "• In vascular smooth muscle → vasodilation → ↓peripheral resistance → ↓BP.",
                "• In heart (non-DHP): ↓SA node rate (negative chronotropy), ↓AV conduction (negative dromotropy), ↓contractility (negative inotropy).",
                "<b>Uses:</b>",
                "• Hypertension (amlodipine – drug of choice in elderly, isolated systolic HTN).",
                "• Angina pectoris (all types including vasospastic/Prinzmetal – nifedipine).",
                "• Supraventricular tachycardia (SVT), AF rate control – verapamil/diltiazem.",
                "• Raynaud's phenomenon – nifedipine.",
                "<b>ADRs:</b> Reflex tachycardia (DHP), flushing, pedal edema, constipation (verapamil), bradycardia (non-DHP).",
                "<b>Contraindication:</b> Verapamil + beta-blocker → severe bradycardia/AV block.",
            ],
            None
        ),
        (
            "Write a short note on Beta-adrenergic blockers – classification, mechanism, uses, and side effects.",
            [
                "<b>Classification:</b>",
                "• Non-selective (β₁ + β₂): Propranolol, nadolol, timolol.",
                "• Cardioselective (β₁): Atenolol, metoprolol, bisoprolol.",
                "• With intrinsic sympathomimetic activity (ISA): Pindolol, acebutolol.",
                "• With alpha-blocking activity: Carvedilol, labetalol.",
                "<b>Mechanism of Action:</b>",
                "• Competitively block β-adrenergic receptors.",
                "• β₁ blockade: ↓HR, ↓BP, ↓cardiac output, ↓renin release.",
                "• β₂ blockade: Bronchoconstriction, peripheral vasoconstriction.",
                "<b>Uses:</b>",
                "• Hypertension, angina pectoris, tachyarrhythmias.",
                "• Post-MI (mortality reduction), heart failure (carvedilol, metoprolol, bisoprolol).",
                "• Thyrotoxicosis (propranolol – controls symptoms).",
                "• Glaucoma (timolol eye drops), migraine prophylaxis, anxiety.",
                "<b>Side Effects:</b>",
                "• Bronchospasm (avoid in asthmatics – use cardioselective).",
                "• Bradycardia, hypotension, fatigue, cold extremities.",
                "• Masking of hypoglycaemia symptoms in diabetics.",
                "• Abrupt withdrawal → rebound angina/hypertension.",
            ],
            "Carvedilol and bisoprolol are the β-blockers approved for CHF."
        ),
        (
            "Write a note on diuretics used in heart failure. Classify them with examples.",
            [
                "<b>Classification of Diuretics:</b>",
                "• Loop diuretics: Furosemide, torsemide, bumetanide (act on thick ascending limb – inhibit NKCC2).",
                "• Thiazide diuretics: Hydrochlorothiazide, chlorthalidone (inhibit NaCl cotransporter in DCT).",
                "• K⁺-sparing: Spironolactone (aldosterone antagonist), amiloride, triamterene.",
                "• Carbonic anhydrase inhibitors: Acetazolamide.",
                "• Osmotic: Mannitol.",
                "<b>Diuretics in Heart Failure:</b>",
                "• Loop diuretics (furosemide) are the mainstay – powerful, reduce fluid overload rapidly.",
                "• Spironolactone – reduces mortality in severe HF (RALES trial); blocks aldosterone-mediated remodeling.",
                "• Thiazides – used in mild-moderate HF or added to loop diuretics for resistant oedema.",
                "<b>Mechanism – Furosemide:</b>",
                "• Inhibits Na⁺-K⁺-2Cl⁻ (NKCC2) cotransporter in thick ascending limb of loop of Henle.",
                "• Increases excretion of Na⁺, K⁺, Cl⁻, water → reduces circulating volume → reduces preload.",
                "<b>ADRs of Loop Diuretics:</b> Hypokalaemia, hypocalcaemia, hypomagnesaemia, ototoxicity (high doses), hyperuricaemia.",
            ],
            None
        ),
        (
            "Write a short note on antiarrhythmic drugs – classification (Vaughan Williams) with examples.",
            [
                "Antiarrhythmic drugs are classified by the Vaughan Williams classification:",
                "<b>Class I – Na⁺ Channel Blockers:</b>",
                "• IA: Quinidine, procainamide, disopyramide – moderate rate slowing, ↑APD.",
                "• IB: Lidocaine, mexiletine – fast rate slowing, ↓APD (ventricular arrhythmias).",
                "• IC: Flecainide, propafenone – slow rate slowing, no APD change (life-threatening arrhythmias).",
                "<b>Class II – β-Blockers:</b> Propranolol, metoprolol, atenolol – slows SA/AV nodes.",
                "<b>Class III – K⁺ Channel Blockers:</b>",
                "• Amiodarone (also class I/II/IV properties), sotalol, ibutilide, dofetilide.",
                "• Prolong action potential duration and refractory period.",
                "<b>Class IV – Ca²⁺ Channel Blockers:</b> Verapamil, diltiazem – slow SA/AV conduction.",
                "<b>Unclassified:</b> Adenosine (drug of choice for SVT), digoxin, atropine.",
                "<b>Key drug – Amiodarone:</b>",
                "• Broadest spectrum antiarrhythmic; used in AF, VT, VF.",
                "• Adverse effects: Pulmonary fibrosis, thyroid dysfunction (contains iodine), corneal deposits, photosensitivity, hepatotoxicity.",
            ],
            "Adenosine is DOC for acute SVT; Amiodarone for refractory/life-threatening arrhythmias."
        ),
        (
            "Write a short note on antianginal drugs.",
            [
                "Angina pectoris is chest pain due to myocardial ischaemia. Treatment aims to ↑O₂ supply and ↓O₂ demand.",
                "<b>1. Organic Nitrates:</b>",
                "• Drugs: Glyceryl trinitrate (GTN), isosorbide dinitrate (ISDN), isosorbide mononitrate.",
                "• Mechanism: Release NO → activates guanylyl cyclase → ↑cGMP → smooth muscle relaxation.",
                "• Effects: Venodilation (↓preload) > arteriodilation (↓afterload) → ↓O₂ demand; also dilates coronary collaterals.",
                "• Use: Acute angina attack (sublingual GTN), prophylaxis (long-acting nitrates).",
                "• ADR: Headache (meningeal vasodilation), postural hypotension, reflex tachycardia, tolerance with prolonged use.",
                "<b>2. Beta-blockers:</b> ↓HR and contractility → ↓O₂ demand. First-line for stable angina.",
                "<b>3. Calcium Channel Blockers:</b> Vasodilation + ↓HR (non-DHP). DOC for Prinzmetal/vasospastic angina.",
                "<b>4. Ranolazine:</b> Inhibits late Na⁺ current → reduces Ca²⁺ overload; used in chronic stable angina.",
                "<b>5. Ivabradine:</b> Inhibits If ('funny current') in SA node → ↓HR without affecting BP or contractility.",
                "<b>Combined therapy:</b> Nitrate + β-blocker (complementary – β-blocker prevents reflex tachycardia from nitrate).",
            ],
            None
        ),
        (
            "Write a short note on drugs used in heart failure – classify with mechanisms.",
            [
                "<b>Goals:</b> Reduce symptoms, hospitalizations, and mortality.",
                "<b>1. ACE Inhibitors/ARBs:</b> Reduce preload + afterload; reverse cardiac remodeling. First-line.",
                "<b>2. Beta-blockers:</b> Carvedilol, metoprolol succinate, bisoprolol – reduce mortality (↓sympathetic activation).",
                "<b>3. Diuretics:</b> Furosemide (loop) for fluid overload; spironolactone/eplerenone for mortality benefit.",
                "<b>4. Cardiac Glycosides – Digoxin:</b> Positive inotropy; reduces rehospitalization, no mortality benefit.",
                "<b>5. Vasodilators:</b>",
                "• Nitrates (isosorbide dinitrate): Venodilators, reduce preload.",
                "• Hydralazine: Arteriodilator, reduces afterload. Hydralazine + nitrate = mortality benefit in African Americans.",
                "<b>6. ARNI – Sacubitril/Valsartan (Entresto):</b> Neprilysin inhibitor + ARB; superior to ACE inhibitor in HFrEF.",
                "<b>7. SGLT2 Inhibitors:</b> Dapagliflozin, empagliflozin – reduce HF hospitalization and mortality (newer evidence).",
                "<b>8. Ivabradine:</b> For HFrEF with HR >70 bpm in sinus rhythm.",
                "<b>Acute decompensated HF:</b> IV furosemide, IV dobutamine/dopamine (inotropes), IV nitroprusside.",
            ],
            "The 'fantastic four' for HFrEF: ACE-I/ARB, β-blocker, MRA (spironolactone), SGLT2 inhibitor."
        ),
    ],
    "SECTION B: ENDOCRINE PHARMACOLOGY": [
        (
            "Classify insulin preparations. Write the mechanism of action and complications of insulin therapy.",
            [
                "<b>Classification by Duration of Action:</b>",
                "• Rapid-acting: Insulin lispro, aspart, glulisine (onset 15 min, peak 1-2 h, duration 3-5 h).",
                "• Short-acting (Regular): Human insulin (onset 30-60 min, peak 2-4 h, duration 6-8 h).",
                "• Intermediate-acting: NPH/Isophane (onset 2-4 h, peak 6-10 h, duration 12-18 h).",
                "• Long-acting (basal): Glargine, detemir (onset 2-4 h, no peak, duration 20-24 h).",
                "• Ultra long-acting: Degludec (>42 hours).",
                "• Premixed: 70/30 (70% NPH + 30% Regular), Mixtard.",
                "<b>Mechanism of Action:</b>",
                "• Binds to insulin receptor (tyrosine kinase receptor) on cell surface.",
                "• Activates GLUT-4 translocation → glucose uptake into muscle and adipose.",
                "• Promotes glycogenesis, lipogenesis, protein synthesis; inhibits glycogenolysis and gluconeogenesis.",
                "<b>Complications:</b>",
                "• Hypoglycaemia – most common and dangerous (treat with glucose/glucagon).",
                "• Lipodystrophy (lipoatrophy or lipohypertrophy) at injection sites.",
                "• Weight gain.",
                "• Insulin resistance (high-dose requirement).",
                "• Local allergy at injection site.",
                "• Somogyi effect (rebound hyperglycaemia after nocturnal hypoglycaemia).",
                "• Dawn phenomenon (early morning hyperglycaemia due to counter-regulatory hormones).",
            ],
            "Glargine cannot be mixed with other insulins due to acidic pH."
        ),
        (
            "Classify oral hypoglycaemic agents (OHAs) with mechanism and examples.",
            [
                "<b>1. Sulphonylureas (SUs):</b>",
                "• 1st gen: Chlorpropamide, tolbutamide. 2nd gen: Glibenclamide, glipizide, gliclazide, glimepiride.",
                "• Mechanism: Close ATP-sensitive K⁺ channels on β-cells → depolarization → Ca²⁺ influx → insulin release.",
                "• ADR: Hypoglycaemia (most common), weight gain, disulfiram-like reaction (chlorpropamide).",
                "<b>2. Biguanides:</b>",
                "• Metformin – DRUG OF CHOICE for T2DM (especially obese patients).",
                "• Mechanism: Activates AMPK → ↓hepatic gluconeogenesis, ↑peripheral glucose uptake.",
                "• ADR: GI upset (nausea, diarrhea), lactic acidosis (rare, contraindicated in renal failure).",
                "• Does NOT cause hypoglycaemia alone (insulin-independent). Does NOT cause weight gain.",
                "<b>3. Thiazolidinediones (TZDs/Glitazones):</b>",
                "• Pioglitazone, rosiglitazone.",
                "• Mechanism: PPAR-γ agonists → improve insulin sensitivity in muscle and adipose.",
                "• ADR: Weight gain, fluid retention, CHF, fractures, bladder cancer (pioglitazone).",
                "<b>4. DPP-4 Inhibitors (Gliptins):</b> Sitagliptin, vildagliptin. Inhibit DPP-4 → ↑GLP-1/GIP → ↑insulin release (glucose-dependent). Weight neutral.",
                "<b>5. GLP-1 Receptor Agonists:</b> Liraglutide, semaglutide, exenatide. ↑Insulin, ↓glucagon, ↓appetite. Weight loss benefit.",
                "<b>6. SGLT2 Inhibitors:</b> Dapagliflozin, empagliflozin. Block glucose reabsorption in PCT → glucosuria. CV and renal benefits.",
                "<b>7. Alpha-glucosidase inhibitors:</b> Acarbose, miglitol. ↓Postprandial hyperglycaemia. ADR: Flatulence.",
                "<b>8. Meglitinides:</b> Repaglinide, nateglinide. Rapid-acting insulin secretagogues.",
            ],
            "Metformin is contraindicated in eGFR <30 mL/min/1.73m²."
        ),
        (
            "Write the mechanism of action of antithyroid drugs. What are their uses and side effects?",
            [
                "<b>Antithyroid Drugs (Thionamides):</b>",
                "• Propylthiouracil (PTU) and Carbimazole/Methimazole.",
                "<b>Mechanisms of Action:</b>",
                "• <b>Primary:</b> Inhibit thyroid peroxidase (TPO) enzyme → block organification (oxidation of I⁻ → I₂) and coupling of iodotyrosines (MIT + DIT → T3/T4).",
                "• <b>PTU only:</b> Also inhibits peripheral conversion of T4 → T3 (by inhibiting deiodinase). This makes PTU preferred in thyroid storm.",
                "<b>Uses:</b>",
                "• Hyperthyroidism / Graves disease (long-term medical management).",
                "• Pre-operative preparation before thyroidectomy.",
                "• Thyroid storm (PTU preferred due to peripheral conversion inhibition).",
                "• PTU preferred in 1st trimester of pregnancy (carbimazole associated with aplasia cutis).",
                "• Carbimazole preferred in 2nd/3rd trimester (PTU – hepatotoxicity risk).",
                "<b>Adverse Effects:</b>",
                "• Agranulocytosis (most dangerous – patient should report sore throat/fever immediately).",
                "• Hypothyroidism and goiter (from TSH overstimulation).",
                "• Skin rash, arthralgia, fever.",
                "• PTU: Hepatotoxicity (fulminant), ANCA-positive vasculitis.",
                "• Carbimazole: Aplasia cutis in neonate (if used in 1st trimester).",
                "<b>Other antithyroid agents:</b> Radioactive iodine (¹³¹I), potassium iodide (Wolf-Chaikoff effect), lithium, beta-blockers (symptomatic relief).",
            ],
            "Agranulocytosis is the most feared ADR – occurs in ~0.5% of patients."
        ),
        (
            "Write a short note on corticosteroids – classification, mechanism, uses, and adverse effects.",
            [
                "<b>Classification:</b>",
                "• Glucocorticoids: Hydrocortisone, prednisolone, methylprednisolone, dexamethasone, betamethasone.",
                "• Mineralocorticoids: Fludrocortisone, aldosterone (endogenous).",
                "• Mixed: Hydrocortisone has both GC and MC activity.",
                "<b>Mechanism of Action:</b>",
                "• Bind to intracellular glucocorticoid receptors (GR) in cytoplasm.",
                "• GC-receptor complex → translocates to nucleus → binds GRE (glucocorticoid response elements).",
                "• Upregulates anti-inflammatory proteins (lipocortin/annexin-1 → inhibits phospholipase A₂ → ↓arachidonic acid → ↓prostaglandins, leukotrienes).",
                "• Downregulates pro-inflammatory cytokines (IL-1, IL-2, IL-6, TNF-α).",
                "<b>Uses:</b>",
                "• Anti-inflammatory/immunosuppressive: Asthma, SLE, RA, IBD, nephrotic syndrome.",
                "• Replacement therapy: Addison's disease, congenital adrenal hyperplasia.",
                "• Cerebral edema (dexamethasone), anti-emetic (dexamethasone).",
                "• Fetal lung maturity (betamethasone/dexamethasone in preterm labour).",
                "• Anaphylaxis, spinal cord injury (methylprednisolone).",
                "<b>Adverse Effects (with prolonged use – 'Cushingoid' features):</b>",
                "• Hyperglycaemia, osteoporosis, HPA axis suppression, infections.",
                "• Peptic ulcer, weight gain, moon face, buffalo hump, striae.",
                "• Cataracts, glaucoma, myopathy, psychiatric effects.",
                "• Electrolyte imbalance: Na⁺ retention, K⁺ loss (mineralocorticoid effect).",
                "<b>Withdrawal:</b> Abrupt withdrawal → Addisonian crisis (from HPA suppression).",
            ],
            "Dexamethasone has the highest anti-inflammatory potency with negligible mineralocorticoid activity."
        ),
        (
            "Write a short note on thyroid hormones – synthesis, mechanism of action, and uses of levothyroxine.",
            [
                "<b>Synthesis of Thyroid Hormones:</b>",
                "• Step 1: Iodide trapping – I⁻ actively transported into follicular cells via Na⁺/I⁻ symporter (NIS).",
                "• Step 2: Organification – I⁻ oxidized to I₂ by TPO; iodination of tyrosine residues on thyroglobulin → MIT and DIT.",
                "• Step 3: Coupling – MIT + DIT → T3; DIT + DIT → T4 (by TPO).",
                "• Step 4: Storage as colloid; release triggered by TSH-stimulated proteolysis of thyroglobulin.",
                "• T4 is main secreted form; T3 is the active form (T4 → T3 by peripheral deiodinase).",
                "<b>Mechanism of Action:</b>",
                "• T3 enters nucleus and binds to thyroid hormone receptors (TRs) → gene transcription.",
                "• Effects: ↑BMR, ↑protein synthesis, normal growth/development, myelination of CNS.",
                "• ↑β-receptor expression (explains tachycardia in hyperthyroidism).",
                "<b>Levothyroxine (L-T4) – Uses:</b>",
                "• Hypothyroidism (primary, secondary, tertiary).",
                "• Myxedema coma (IV levothyroxine + hydrocortisone).",
                "• Cretinism prevention (neonatal screening).",
                "• TSH suppression in well-differentiated thyroid carcinoma.",
                "<b>Monitoring:</b> TSH level is best indicator of adequacy of replacement.",
                "<b>Drug interactions:</b> Antacids, calcium, iron reduce absorption (take levothyroxine on empty stomach, 30-60 min before food).",
            ],
            None
        ),
        (
            "Write a short note on glucagon – mechanism, uses, and adverse effects.",
            [
                "Glucagon is a peptide hormone secreted by α-cells of pancreatic islets of Langerhans.",
                "<b>Mechanism of Action:</b>",
                "• Binds to glucagon receptors (Gs-coupled) on liver → activates adenylyl cyclase → ↑cAMP → protein kinase A.",
                "• Promotes: Glycogenolysis (→ ↑blood glucose), gluconeogenesis, ketogenesis.",
                "• In heart: Positive inotropic and chronotropic effects.",
                "<b>Pharmacological Uses:</b>",
                "• Severe hypoglycaemia (when IV glucose not available; given IM/SC/IV).",
                "• β-blocker and CCB overdose (glucagon can bypass the blocked receptors).",
                "• Radiology – GI hypotonic radiography (relaxes GI smooth muscle).",
                "• Pheochromocytoma diagnosis (provocative test – stimulates catecholamine release).",
                "• Endoscopic procedures (relax GI tract).",
                "<b>Adverse Effects:</b> Nausea, vomiting, hyperglycaemia, tachycardia.",
            ],
            None
        ),
    ],
    "SECTION C: CANCER CHEMOTHERAPY": [
        (
            "Classify anticancer drugs with examples and mechanisms.",
            [
                "<b>1. Alkylating Agents:</b>",
                "• Nitrogen mustards: Cyclophosphamide, ifosfamide, chlorambucil, melphalan.",
                "• Nitrosoureas: Carmustine (BCNU), lomustine (CCNU) – cross BBB.",
                "• Others: Busulfan, dacarbazine, cisplatin, carboplatin (platinum analogues).",
                "• Mechanism: Form covalent cross-links between DNA strands (guanine N7 position) → prevent DNA replication. Cell cycle non-specific.",
                "<b>2. Antimetabolites:</b>",
                "• Folate antagonists: Methotrexate (MTX) – inhibits dihydrofolate reductase (DHFR) → ↓tetrahydrofolate → ↓DNA/RNA synthesis.",
                "• Pyrimidine analogues: 5-Fluorouracil (5-FU) – inhibits thymidylate synthase; Cytarabine, capecitabine.",
                "• Purine analogues: 6-Mercaptopurine (6-MP), 6-thioguanine, fludarabine.",
                "• S-phase specific (generally).",
                "<b>3. Plant (Natural) Products:</b>",
                "• Vinca alkaloids: Vincristine, vinblastine – bind tubulin, inhibit microtubule polymerization → metaphase arrest.",
                "• Taxanes: Paclitaxel, docetaxel – stabilize microtubules → prevent depolymerization → mitotic arrest.",
                "• Topoisomerase inhibitors: Etoposide (topo II), irinotecan/topotecan (topo I).",
                "• Camptothecins: Irinotecan, topotecan.",
                "<b>4. Antitumour Antibiotics:</b>",
                "• Anthracyclines: Doxorubicin, daunorubicin – intercalate DNA + generate free radicals.",
                "• Bleomycin – causes DNA strand breaks (G2-phase specific).",
                "• Mitomycin C, actinomycin D.",
                "<b>5. Hormonal Agents:</b> Tamoxifen (ER antagonist – breast Ca), flutamide (androgen receptor antagonist – prostate Ca), aromatase inhibitors (anastrozole, letrozole).",
                "<b>6. Targeted/Biological Agents:</b>",
                "• Imatinib (BCR-ABL tyrosine kinase inhibitor – CML).",
                "• Rituximab (anti-CD20 monoclonal antibody – B-cell lymphoma).",
                "• Trastuzumab (anti-HER2 – breast Ca).",
            ],
            "Cisplatin, vincristine, methotrexate – all have distinct unique toxicities (nephrotoxicity, SIADH, mucositis)."
        ),
        (
            "Write a short note on methotrexate – mechanism, uses, adverse effects, and rescue therapy.",
            [
                "<b>Class:</b> Antimetabolite (folate antagonist).",
                "<b>Mechanism of Action:</b>",
                "• Structural analogue of folic acid; enters cell via folate transporters.",
                "• Inhibits dihydrofolate reductase (DHFR) enzyme → blocks conversion of dihydrofolate (DHF) → tetrahydrofolate (THF).",
                "• ↓THF → ↓one-carbon transfer reactions → ↓synthesis of purines (adenine, guanine) and thymidylate (TMP) → ↓DNA, RNA, and protein synthesis.",
                "• Also polyglutamated intracellularly → prolonged action.",
                "• S-phase specific (acts during DNA synthesis).",
                "<b>Uses:</b>",
                "• Cancers: ALL (acute lymphoblastic leukemia), NHL, choriocarcinoma, breast, osteosarcoma, head and neck cancers.",
                "• Non-cancerous: Rheumatoid arthritis, psoriasis, psoriatic arthritis, Crohn's disease, ectopic pregnancy.",
                "<b>Adverse Effects:</b>",
                "• Myelosuppression (bone marrow suppression) – most important.",
                "• Mucositis/stomatitis, nausea, vomiting.",
                "• Hepatotoxicity (hepatic fibrosis with chronic use).",
                "• Pulmonary toxicity (methotrexate pneumonitis).",
                "• Nephrotoxicity (high dose).",
                "• Teratogenic (contraindicated in pregnancy).",
                "<b>Leucovorin (Folinic Acid) Rescue:</b>",
                "• Given after high-dose MTX to rescue normal (non-tumor) cells.",
                "• Leucovorin bypasses DHFR → restores folate pathway in normal cells.",
                "• Timing critical: Give 24-42 hours after MTX, not before.",
            ],
            "Leucovorin rescue is given with high-dose MTX to protect normal rapidly-dividing cells."
        ),
        (
            "Write a short note on cyclophosphamide – mechanism, uses, and adverse effects.",
            [
                "<b>Class:</b> Alkylating agent (nitrogen mustard derivative).",
                "<b>Mechanism of Action:</b>",
                "• Prodrug – activated by hepatic CYP450 enzymes to active metabolites: phosphoramide mustard and acrolein.",
                "• Phosphoramide mustard: Cross-links DNA strands at N7 of guanine → DNA replication inhibited.",
                "• Cell cycle non-specific (kills both cycling and non-cycling cells).",
                "<b>Uses (Oncology):</b>",
                "• Breast cancer, ovarian cancer, lymphomas (Hodgkin's and NHL).",
                "• Multiple myeloma, leukemias, neuroblastoma.",
                "• Part of CHOP regimen (C=cyclophosphamide, H=doxorubicin, O=vincristine, P=prednisolone) for NHL.",
                "<b>Non-Oncological Uses:</b>",
                "• Severe SLE (lupus nephritis), rheumatoid arthritis, nephrotic syndrome, Wegener's granulomatosis.",
                "• Bone marrow transplant conditioning.",
                "<b>Adverse Effects:</b>",
                "• Haemorrhagic cystitis (due to acrolein) – UNIQUE toxicity; prevented by adequate hydration + Mesna (mercaptoethane sulfonate).",
                "• Myelosuppression, immunosuppression.",
                "• Nausea, vomiting, alopecia.",
                "• SIADH (syndrome of inappropriate ADH secretion) → hyponatraemia.",
                "• Gonadal toxicity (infertility), teratogenicity.",
                "• Secondary malignancies (bladder cancer, leukemia) with long-term use.",
            ],
            "Mesna is given to prevent haemorrhagic cystitis by neutralizing acrolein."
        ),
        (
            "Write the adverse effects of commonly used anticancer drugs – organ-specific toxicities.",
            [
                "<b>Myelosuppression (all cytotoxics):</b>",
                "• Neutropenia → infections; Thrombocytopenia → bleeding; Anaemia → fatigue.",
                "• Most common dose-limiting toxicity. Nadir: 10-14 days post-treatment.",
                "• Vincristine and bleomycin: Minimal myelosuppression (exceptions).",
                "<b>Cardiotoxicity:</b>",
                "• Doxorubicin (anthracyclines) → dose-dependent dilated cardiomyopathy (free radical damage).",
                "• Prevented by: Dexrazoxane (iron chelator – free radical scavenger), liposomal formulation.",
                "• Maximum cumulative dose: Doxorubicin 550 mg/m² (or 450 mg/m² with chest radiation).",
                "<b>Nephrotoxicity:</b>",
                "• Cisplatin – proximal tubular damage. Prevented by vigorous IV hydration + mannitol diuresis, amifostine.",
                "• Methotrexate (high dose) – precipitates in tubules (alkalinize urine).",
                "<b>Pulmonary Toxicity (Pulmonary Fibrosis):</b>",
                "• Bleomycin – G2-phase arrest, causes DNA strand breaks; pulmonary fibrosis is dose-limiting toxicity.",
                "• Also: Busulfan, carmustine (BCNU), methotrexate.",
                "<b>Neurotoxicity:</b>",
                "• Vincristine – peripheral neuropathy (most characteristic), constipation, SIADH, ptosis.",
                "• Cisplatin – ototoxicity (irreversible hearing loss), peripheral neuropathy.",
                "• Ifosfamide – encephalopathy.",
                "<b>Haemorrhagic cystitis:</b> Cyclophosphamide, ifosfamide (acrolein) → Mesna for prevention.",
                "<b>Alopecia (reversible):</b> Doxorubicin, cyclophosphamide, paclitaxel.",
                "<b>Hyperuricaemia:</b> Tumour lysis syndrome (especially with leukemia treatment) → allopurinol/rasburicase.",
                "<b>5-FU specific:</b> Hand-foot syndrome (palmar-plantar erythrodysaesthesia), cerebellar ataxia.",
            ],
            "Remember: Bleomycin → lungs; Doxorubicin → heart; Cisplatin → kidneys+ears; Vincristine → nerves."
        ),
        (
            "Write a short note on vinca alkaloids – mechanism, uses, and toxicity.",
            [
                "<b>Vinca alkaloids:</b> Vincristine, vinblastine, vinorelbine – derived from the periwinkle plant Vinca rosea.",
                "<b>Mechanism of Action:</b>",
                "• Bind to β-tubulin subunit of tubulin dimers → inhibit polymerization of tubulin into microtubules.",
                "• Disrupts mitotic spindle → cells arrested in metaphase (M-phase specific).",
                "<b>Vincristine:</b>",
                "• Uses: ALL (cornerstone of treatment), Hodgkin's lymphoma (MOPP regimen), Wilms tumor, rhabdomyosarcoma, neuroblastoma.",
                "• Toxicity: PERIPHERAL NEUROPATHY (most characteristic) – paresthesia, loss of deep tendon reflexes, foot drop, constipation (autonomic).",
                "• Also: SIADH (hyponatraemia), alopecia.",
                "• Minimal myelosuppression (unique – not dose-limiting).",
                "<b>Vinblastine:</b>",
                "• Uses: Hodgkin's lymphoma (ABVD regimen), testicular cancer, Kaposi's sarcoma.",
                "• Toxicity: MYELOSUPPRESSION (dose-limiting) – different from vincristine.",
                "• Also: Nausea, mucositis, peripheral neuropathy (less than vincristine).",
                "<b>Vinorelbine:</b> Non-small cell lung cancer, breast cancer.",
                "<b>Key Distinction:</b>",
                "• Vincristine → neurotoxicity (not myelosuppression).",
                "• Vinblastine → myelosuppression (not severe neurotoxicity).",
            ],
            "Vincristine = nervous system; Vinblastine = bone marrow – easy mnemonic!"
        ),
        (
            "Write a short note on tamoxifen – mechanism, uses, and side effects.",
            [
                "<b>Class:</b> Selective Estrogen Receptor Modulator (SERM).",
                "<b>Mechanism of Action:</b>",
                "• Competitively binds to estrogen receptors (ERα and ERβ).",
                "• Acts as an ANTAGONIST in breast tissue → blocks estrogen-stimulated proliferation of breast cancer cells.",
                "• Acts as an AGONIST in bone (prevents osteoporosis) and uterus (endometrial proliferation).",
                "• Requires metabolic activation by CYP2D6 → active metabolite endoxifen.",
                "<b>Uses:</b>",
                "• ER-positive (hormone receptor-positive) breast cancer – first-line hormonal therapy.",
                "• Adjuvant therapy post-surgery (5-10 years duration).",
                "• Prevention of breast cancer in high-risk women.",
                "• Metastatic breast cancer.",
                "• Infertility (off-label – induces ovulation by blocking estrogen feedback at hypothalamus/pituitary).",
                "<b>Adverse Effects:</b>",
                "• Hot flashes (most common).",
                "• Endometrial carcinoma (due to uterine agonist effect) – regular uterine monitoring needed.",
                "• Venous thromboembolism (DVT, PE).",
                "• Cataract formation.",
                "• Teratogenic (contraindicated in pregnancy).",
                "• Bone loss in premenopausal women (minor).",
                "<b>Resistance:</b> ER gene mutations; CYP2D6 polymorphisms reduce conversion to active endoxifen.",
            ],
            "For postmenopausal women, aromatase inhibitors (anastrozole, letrozole) are preferred over tamoxifen."
        ),
        (
            "Write a short note on cisplatin – mechanism, uses, and adverse effects.",
            [
                "<b>Class:</b> Platinum analogue (alkylating-like agent).",
                "<b>Mechanism of Action:</b>",
                "• Undergoes aquation (hydrolysis in low-chloride intracellular environment) → aqua complexes.",
                "• Aqua complexes form intrastrand and interstrand cross-links between N7 atoms of adjacent guanine residues on DNA.",
                "• Inhibits DNA replication and transcription → cell death.",
                "• Cell cycle non-specific.",
                "<b>Uses:</b>",
                "• Testicular cancer (highly curative – BEP regimen: Bleomycin + Etoposide + cisPlatin).",
                "• Ovarian cancer, bladder cancer, cervical cancer.",
                "• Lung cancer (NSCLC, SCLC), head and neck cancers.",
                "• Osteosarcoma, neuroblastoma.",
                "<b>Adverse Effects:</b>",
                "• NEPHROTOXICITY (most important dose-limiting toxicity) – proximal tubular necrosis.",
                "  Prevention: Aggressive IV saline hydration + mannitol + amifostine.",
                "• OTOTOXICITY – irreversible sensorineural hearing loss (damage to hair cells in organ of Corti).",
                "• PERIPHERAL NEUROPATHY (sensory > motor) – numbness, tingling.",
                "• Severe nausea and vomiting (most emetogenic agent; requires ondansetron + dexamethasone).",
                "• Myelosuppression (moderate, less than most alkylating agents).",
                "• Hypomagnesaemia, hypokalaemia (tubular wasting).",
                "• Secondary malignancies (long-term).",
            ],
            "Cisplatin's unique triple toxicity: Nephrotoxicity + Ototoxicity + Peripheral neuropathy."
        ),
    ]
}

# ======================== BUILD PDF ========================
story = []

# Cover page content
story.append(Spacer(1, 1.5*cm))
story.append(Paragraph("MBBS 2nd Year Pharmacology", title_style))
story.append(Paragraph("3-Mark Question Bank with Answers", subtitle_style))
story.append(Spacer(1, 0.4*cm))

# Info box
info_data = [
    ["Portions", "CVS | Endocrine | Cancer Chemotherapy"],
    ["Exam Pattern", "8 questions × 3 marks + MCQs = 30 marks"],
    ["Total Questions", f"{sum(len(v) for v in questions.values())} High-Yield 3-Mark Questions"],
    ["Reference", "Katzung, Lippincott Pharmacology, Rang & Dale"],
]
info_table = Table(info_data, colWidths=[4.5*cm, 12.5*cm])
info_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (0,-1), colors.HexColor("#dde8f5")),
    ("BACKGROUND", (1,0), (1,-1), colors.HexColor("#f5f9ff")),
    ("FONTNAME", (0,0), (0,-1), "Helvetica-Bold"),
    ("FONTNAME", (1,0), (1,-1), "Helvetica"),
    ("FONTSIZE", (0,0), (-1,-1), 10),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 10),
    ("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#aaaaaa")),
    ("ROWBACKGROUNDS", (0,0), (-1,-1), [colors.HexColor("#edf3fb"), colors.HexColor("#f5f9ff")]),
]))
story.append(info_table)
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph(
    "Prepared for MBBS 2nd Year Final Examination preparation. Each answer is structured for "
    "3-mark questions (approximately 6-8 key points). Read the exam tip where provided for scoring strategies.",
    ParagraphStyle("InfoText", parent=styles["Normal"], fontSize=9.5, textColor=colors.HexColor("#444"),
                   fontName="Helvetica-Oblique", alignment=TA_CENTER)
))
story.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor("#1a3a5c"), spaceBefore=12, spaceAfter=12))

# Build questions
q_global = 1
for section_name, qs in questions.items():
    story.extend(section_header(section_name))
    for (question, answer_lines, note) in qs:
        story.append(q_block(q_global, question, answer_lines, note))
        q_global += 1

# Footer note
story.append(Spacer(1, 1*cm))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#aaaaaa")))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
    "This question bank was compiled from authoritative pharmacology textbooks including Katzung's Basic & Clinical Pharmacology (16th Ed.), "
    "Lippincott Illustrated Reviews: Pharmacology, and Goodman & Gilman's Pharmacological Basis of Therapeutics. "
    "All content is for educational purposes. Verify drug doses with current prescribing guidelines before clinical use.",
    footer_style
))

doc.build(story)
print(f"PDF generated: {OUTPUT}")
Running Command

cd /tmp/workspace/pharma-exam && python generate_pdf.py

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.