Generate an exam oriented notes on the chapter ANS and autacoids under following heading..cholinergic and anticholinergic drugs , adrenergic and anti adrenegic drugs, autacoid : serotonin and drugs acting or serotonergic system , autacoids : histamine and antihistamine and treatment of migraine..make a simple , concise and easily understandable notes in TABLE format a

Reading File
I'll extract the relevant chapters from the Shanbhag Pharmacology PDF and generate comprehensive exam-oriented table notes. Let me read the PDF content first.
Running Command

python3 -c " from pypdf import PdfReader reader = PdfReader('/home/daytona/workspace/attachments/43c42365-5489-4475-93e7-b6e29730bcbc/Shanbhag Pharmacology.pdf') print(f'Total pages: {len(reader.pages)}') # Print first few pages to find table of contents for i in range(0, 15): text = reader.pages[i].extract_text() print(f'--- PAGE {i+1} ---') print(text[:500]) print() "

Chapter 2 is Autonomic Pharmacology (page 46) and Chapter 6 is Autacoids (page 230). Let me extract all the relevant content now.
Running Command

python3 -c " from pypdf import PdfReader reader = PdfReader('/home/daytona/workspace/attachments/43c42365-5489-4475-93e7-b6e29730bcbc/Shanbhag Pharmacology.pdf') # Chapter 2: Autonomic Pharmacology - pages 46-97 (book pages), PDF pages ~57-108 # Extract pages 55-110 (0-indexed) text = '' for i in range(55, 112): page_text = reader.pages[i].extract_text() if page_text: text += f'\n\n=== PDF PAGE {i+1} ===\n' + page_text print(text[:8000]) " 2>/dev/null

The page numbers don't match directly. Let me find the right pages for ANS and Autacoids chapters.
Running Command

python3 -c " from pypdf import PdfReader reader = PdfReader('/home/daytona/workspace/attachments/43c42365-5489-4475-93e7-b6e29730bcbc/Shanbhag Pharmacology.pdf') # Search for Autonomic/Cholinergic chapter start for i in range(50, 130): text = reader.pages[i].extract_text() if text and ('Cholinergic' in text or 'cholinergic' in text or 'AUTONOMIC' in text or 'Autonomic' in text): print(f'PDF page {i+1}: {text[:200]}') print('---') " 2>/dev/null

Now I have the page locations. Let me extract the full ANS and Autacoids content in parallel.
Running Command

python3 -c " from pypdf import PdfReader reader = PdfReader('/home/daytona/workspace/attachments/43c42365-5489-4475-93e7-b6e29730bcbc/Shanbhag Pharmacology.pdf') # Chapter 2: ANS pages - PDF pages 65-117 (0-indexed 64-116) text = '' for i in range(64, 117): page_text = reader.pages[i].extract_text() if page_text: text += f'\n\n=== PDF PAGE {i+1} ===\n' + page_text with open('/home/daytona/workspace/ans_content.txt', 'w') as f: f.write(text) print(f'ANS chapter extracted: {len(text)} chars') " 2>/dev/null

Running Command

python3 -c " from pypdf import PdfReader reader = PdfReader('/home/daytona/workspace/attachments/43c42365-5489-4475-93e7-b6e29730bcbc/Shanbhag Pharmacology.pdf') # Find autacoids chapter (Chapter 6, page 230) for i in range(240, 310): text = reader.pages[i].extract_text() if text and ('Histamine' in text or 'Serotonin' in text or '5-Hydroxytryptamine' in text or 'HISTAMINE' in text or 'Autacoid' in text): print(f'PDF page {i+1}: {text[:200]}') print('---') " 2>/dev/null

Running Command

python3 -c " from pypdf import PdfReader reader = PdfReader('/home/daytona/workspace/attachments/43c42365-5489-4475-93e7-b6e29730bcbc/Shanbhag Pharmacology.pdf') # Chapter 6: Autacoids pages 249-270 (0-indexed 248-269) text = '' for i in range(248, 278): page_text = reader.pages[i].extract_text() if page_text: text += f'\n\n=== PDF PAGE {i+1} ===\n' + page_text with open('/home/daytona/workspace/autacoids_content.txt', 'w') as f: f.write(text) print(f'Autacoids chapter extracted: {len(text)} chars') " 2>/dev/null

Now let me read the extracted content to build the notes:
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have enough content from both chapters to create comprehensive exam-oriented notes. Let me read the adrenergic and migraine sections:
Reading File
Reading File
I have sufficient content from the book. Now let me read the DOCX skill and create the comprehensive notes document.
Reading File
Now let me create the comprehensive DOCX with all the table-format exam notes:
Running Command

mkdir -p /home/daytona/workspace/ans-notes && cat > /home/daytona/workspace/ans-notes/generate_notes.js << 'JSEOF' const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType, VerticalAlign, PageBreak, TableOfContents } = require('docx'); const fs = require('fs'); // Color scheme const HEADER_BG = "1B3A6B"; // Dark blue for section headers const SUBHEAD_BG = "2E75B6"; // Medium blue for sub-headers const ALT_ROW = "D6E4F0"; // Light blue for alternating rows const WHITE = "FFFFFF"; const YELLOW_BG = "FFF2CC"; // Yellow highlight for key facts function headerCell(text, colspan = 1, bgColor = HEADER_BG) { return new TableCell({ columnSpan: colspan, shading: { fill: bgColor, type: ShadingType.CLEAR }, verticalAlign: VerticalAlign.CENTER, children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text, bold: true, color: WHITE, size: 20 })] })] }); } function subHeaderCell(text, colspan = 1) { return new TableCell({ columnSpan: colspan, shading: { fill: SUBHEAD_BG, type: ShadingType.CLEAR }, verticalAlign: VerticalAlign.CENTER, children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text, bold: true, color: WHITE, size: 18 })] })] }); } function dataCell(text, bold = false, bgColor = WHITE, color = "000000") { return new TableCell({ shading: { fill: bgColor, type: ShadingType.CLEAR }, verticalAlign: VerticalAlign.TOP, children: [new Paragraph({ children: [new TextRun({ text, bold, size: 18, color })] })] }); } function sectionHeading(text) { return new Paragraph({ heading: HeadingLevel.HEADING_1, spacing: { before: 400, after: 200 }, children: [new TextRun({ text, bold: true, size: 32, color: "1B3A6B" })] }); } function subHeading(text) { return new Paragraph({ heading: HeadingLevel.HEADING_2, spacing: { before: 200, after: 100 }, children: [new TextRun({ text, bold: true, size: 26, color: "2E75B6" })] }); } function note(text) { return new Paragraph({ spacing: { before: 80, after: 80 }, children: [new TextRun({ text: "★ " + text, italics: true, size: 17, color: "C00000" })] }); } function spacer() { return new Paragraph({ spacing: { before: 120, after: 120 }, children: [new TextRun("")] }); } // ============================================= // TABLE BUILDERS // ============================================= // 1. CHOLINERGIC DRUGS TABLE function cholinergicTable() { const rows = [ new TableRow({ children: [headerCell("CHOLINERGIC DRUGS (CHOLINOMIMETICS / PARASYMPATHOMIMETICS)", 4)] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Type / MOA"), subHeaderCell("Uses"), subHeaderCell("Adverse Effects")] }), // DIRECT ACTING - CHOLINE ESTERS new TableRow({ children: [headerCell("DIRECT ACTING — Choline Esters", 4, "2E75B6")] }), new TableRow({ children: [ dataCell("Acetylcholine (ACh)", true, ALT_ROW), dataCell("Muscarinic + Nicotinic agonist; rapidly hydrolysed by cholinesterases", false, ALT_ROW), dataCell("No clinical use (too short-acting)", false, ALT_ROW), dataCell("Bradycardia, bronchoconstriction, hypotension", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Bethanechol", true), dataCell("Selective M3 agonist; NOT hydrolysed by cholinesterases; no nicotinic action", false), dataCell("Postoperative urinary retention; paralytic ileus", false), dataCell("Abdominal cramps, diarrhoea, bradycardia; CI in asthma/peptic ulcer", false) ]}), new TableRow({ children: [ dataCell("Carbachol", true, ALT_ROW), dataCell("Muscarinic + Nicotinic; resistant to cholinesterases", false, ALT_ROW), dataCell("Glaucoma (eye drops)", false, ALT_ROW), dataCell("Bradycardia, bronchoconstriction", false, ALT_ROW) ]}), // DIRECT ACTING - ALKALOIDS new TableRow({ children: [headerCell("DIRECT ACTING — Alkaloids", 4, "2E75B6")] }), new TableRow({ children: [ dataCell("Pilocarpine", true), dataCell("Tertiary amine; muscarinic > nicotinic; crosses blood–brain barrier (BBB)", false), dataCell("1. Glaucoma (reduces IOP by miosis + ciliary muscle contraction)\n2. Xerostomia (dry mouth in Sjogren's)", false), dataCell("Sweating, salivation, lacrimation, GI upset; CI: asthma", false) ]}), new TableRow({ children: [ dataCell("Muscarine", true, ALT_ROW), dataCell("Pure muscarinic agonist (mushroom alkaloid)", false, ALT_ROW), dataCell("No therapeutic use; toxicological importance", false, ALT_ROW), dataCell("SLUDGE: Salivation, Lacrimation, Urination, Defaecation, GI distress, Emesis", false, ALT_ROW) ]}), // INDIRECT ACTING - ANTICHOLINESTERASES new TableRow({ children: [headerCell("INDIRECT ACTING — Anticholinesterases (AChE Inhibitors)", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Type"), subHeaderCell("Uses"), subHeaderCell("Key Points")] }), new TableRow({ children: [ dataCell("Physostigmine", true), dataCell("Reversible; tertiary amine (crosses BBB)", false), dataCell("1. Atropine poisoning (antidote)\n2. Glaucoma", false), dataCell("Crosses BBB; causes central effects; caution: bradycardia", false) ]}), new TableRow({ children: [ dataCell("Neostigmine", true, ALT_ROW), dataCell("Reversible; quaternary ammonium (does NOT cross BBB); direct + indirect action on NMJ", false, ALT_ROW), dataCell("1. Myasthenia gravis\n2. Postoperative urinary retention/ileus\n3. Reversal of non-depolarizing NM blockade\n4. Curare poisoning", false, ALT_ROW), dataCell("Does NOT cross BBB; no central effects; preferred over physostigmine in MG", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Pyridostigmine", true), dataCell("Reversible; quaternary ammonium", false), dataCell("Myasthenia gravis (preferred — longer duration, twice daily SR)", false), dataCell("Less potent than neostigmine; better tolerated by MG patients", false) ]}), new TableRow({ children: [ dataCell("Edrophonium", true, ALT_ROW), dataCell("Reversible; very short action (8–10 min) — binds only anionic site", false, ALT_ROW), dataCell("1. Diagnosis of myasthenia gravis (Tensilon test)\n2. Differentiate myasthenic crisis vs cholinergic crisis\n3. Curare poisoning (rapid onset)", false, ALT_ROW), dataCell("Rapid onset, short duration (8–10 min); IV use only", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Organophosphates\n(Parathion, Malathion, Sarin)", true), dataCell("IRREVERSIBLE; phosphorylate AChE", false), dataCell("Parathion/Malathion: pesticides\nSarin/Soman: nerve agents (warfare)", false), dataCell("Toxicity = SLUDGE + BBQ (Bradycardia, Bronchospasm, Qseizures); Antidote: Atropine + Pralidoxime", false) ]}), new TableRow({ children: [ dataCell("Donepezil, Rivastigmine, Galantamine", true, ALT_ROW), dataCell("Reversible AChE inhibitors; increase CNS ACh", false, ALT_ROW), dataCell("Alzheimer's disease (cognitive enhancers)", false, ALT_ROW), dataCell("Donepezil: once daily; Rivastigmine: patch available; GI side effects common", false, ALT_ROW) ]}), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // 2. ANTICHOLINERGIC DRUGS TABLE function anticholinergicTable() { const rows = [ new TableRow({ children: [headerCell("ANTICHOLINERGIC DRUGS (ANTIMUSCARINICS)", 4)] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("MOA / Type"), subHeaderCell("Uses"), subHeaderCell("Adverse Effects / Notes")] }), // Atropine new TableRow({ children: [headerCell("ATROPINE — The Prototype Antimuscarinic", 4, "2E75B6")] }), new TableRow({ children: [ dataCell("Atropine", true, YELLOW_BG), dataCell("Non-selective competitive M1/M2/M3 blocker; alkaloid from Atropa belladonna", false, YELLOW_BG), dataCell("1. Preanaesthetic medication (dries secretions)\n2. OPC poisoning (antidote)\n3. Bradycardia (vagolysis)\n4. Peptic ulcer (rarely)\n5. Motion sickness (scopolamine preferred)\n6. Uveitis/Iritis (cycloplegia)\n7. Eye: refraction testing (mydriasis)\n8. Biliary/renal colic (antispasmodic)", false, YELLOW_BG), dataCell("Dry mouth, urinary retention, constipation, tachycardia, mydriasis, cycloplegia, blurred vision, flushing\nCI: Glaucoma, BPH, pyloric stenosis\nMnemonic: HOT as a hare, DRY as a bone, RED as a beet, BLIND as a bat, MAD as a hatter", false, YELLOW_BG) ]}), // Actions of Atropine new TableRow({ children: [headerCell("PHARMACOLOGICAL ACTIONS OF ATROPINE (Organ-wise)", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Organ/System"), subHeaderCell("Receptor Blocked"), subHeaderCell("Effect"), subHeaderCell("Clinical Relevance")] }), new TableRow({ children: [dataCell("Heart", true), dataCell("M2"), dataCell("Tachycardia (initial low dose → transient bradycardia)"), dataCell("Used in sinus bradycardia, heart block")] }), new TableRow({ children: [dataCell("Eye", true, ALT_ROW), dataCell("M3", false, ALT_ROW), dataCell("Mydriasis + Cycloplegia (7–10 days)", false, ALT_ROW), dataCell("Refraction testing; CI in glaucoma", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Glands", true), dataCell("M3"), dataCell("Decreased ALL secretions (except milk and bile)"), dataCell("Dryness of mouth, reduced sweating")] }), new TableRow({ children: [dataCell("GIT", true, ALT_ROW), dataCell("M3", false, ALT_ROW), dataCell("Decreased tone + motility; constipation", false, ALT_ROW), dataCell("Biliary/renal colic relief", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Urinary Bladder", true), dataCell("M3"), dataCell("Detrusor relaxation → urinary retention"), dataCell("Avoid in elderly men/BPH")] }), new TableRow({ children: [dataCell("Bronchi", true, ALT_ROW), dataCell("M3", false, ALT_ROW), dataCell("Bronchodilation + dries secretions", false, ALT_ROW), dataCell("Ipratropium preferred in COPD", false, ALT_ROW)] }), new TableRow({ children: [dataCell("CNS", true), dataCell("M1"), dataCell("Anti-Parkinson effect; restlessness, delirium at high doses"), dataCell("Used in Parkinsonism (benztropine)")] }), // Atropine Substitutes new TableRow({ children: [headerCell("ATROPINE SUBSTITUTES", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Selectivity"), subHeaderCell("Uses"), subHeaderCell("Key Points")] }), new TableRow({ children: [dataCell("Scopolamine (Hyoscine)", true), dataCell("Nonselective antimuscarinic; more CNS sedation"), dataCell("Motion sickness (transdermal patch), preanaesthetic medication"), dataCell("Causes sedation; longer duration than atropine")] }), new TableRow({ children: [dataCell("Homatropine", true, ALT_ROW), dataCell("Eye — M3", false, ALT_ROW), dataCell("Mydriasis for refraction (shorter duration than atropine: 1–3 days)", false, ALT_ROW), dataCell("Semisynthetic; less potent than atropine", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Tropicamide", true), dataCell("Eye — M3"), dataCell("Shortest acting mydriatic/cycloplegic (4–6 hrs); preferred for refraction testing"), dataCell("Fastest onset and shortest duration")] }), new TableRow({ children: [dataCell("Cyclopentolate", true, ALT_ROW), dataCell("Eye — M3", false, ALT_ROW), dataCell("Cycloplegic refraction in children", false, ALT_ROW), dataCell("Duration 24 hrs", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Ipratropium / Tiotropium", true), dataCell("M3 in bronchi (quaternary — no systemic absorption)"), dataCell("COPD, Bronchial asthma; Tiotropium: once daily (long-acting)"), dataCell("Minimal systemic effects; given by inhalation")] }), new TableRow({ children: [dataCell("Pirenzepine", true, ALT_ROW), dataCell("Selective M1 blocker (gastric)", false, ALT_ROW), dataCell("Peptic ulcer (reduces gastric acid)", false, ALT_ROW), dataCell("Less dry mouth/constipation than atropine", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Oxybutynin / Tolterodine / Solifenacin", true), dataCell("M3 bladder selectivity"), dataCell("Overactive bladder / urge incontinence"), dataCell("Tolterodine: fewer dry mouth complaints; Solifenacin: once daily")] }), new TableRow({ children: [dataCell("Benztropine / Trihexyphenidyl", true, ALT_ROW), dataCell("Central M1 blocker", false, ALT_ROW), dataCell("Parkinson's disease (drug-induced or idiopathic); reduce tremor + rigidity", false, ALT_ROW), dataCell("Not useful for bradykinesia", false, ALT_ROW)] }), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // 3. ADRENERGIC DRUGS TABLE function adrenergicTable() { const rows = [ new TableRow({ children: [headerCell("ADRENERGIC AGONISTS (SYMPATHOMIMETICS)", 5)] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Receptors"), subHeaderCell("MOA / Type"), subHeaderCell("Uses"), subHeaderCell("Adverse Effects")] }), // CATECHOLAMINES new TableRow({ children: [headerCell("DIRECT-ACTING CATECHOLAMINES", 5, "2E75B6")] }), new TableRow({ children: [ dataCell("Adrenaline (Epinephrine)", true, YELLOW_BG), dataCell("α1, α2, β1, β2, β3", false, YELLOW_BG), dataCell("Endogenous catecholamine; secreted by adrenal medulla (80%); DOC for anaphylaxis", false, YELLOW_BG), dataCell("1. Anaphylactic shock (IM 1:1000 = 1mg/mL, 0.3–0.5 mL)\n2. Cardiac arrest (IV/intracardiac)\n3. With LA (prolongs duration, 1:100,000)\n4. Bronchial asthma (SC)\n5. Open-angle glaucoma (reduces IOP)\n6. Haemostasis (topical)\n7. Nasal decongestant", false, YELLOW_BG), dataCell("Palpitation, hypertension, anxiety, arrhythmias, cerebral haemorrhage\nCI: Hypertension, IHD, with halothane", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("Noradrenaline (Norepinephrine)", true, ALT_ROW), dataCell("α1, α2, β1 (no β2)", false, ALT_ROW), dataCell("Endogenous NT; α > β; marked vasoconstriction; reflex bradycardia", false, ALT_ROW), dataCell("Cardiogenic/septic shock (IV infusion)\nHypotension states (ICU)", false, ALT_ROW), dataCell("Hypertension, intense vasoconstriction; extravasation causes tissue necrosis", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Dopamine", true), dataCell("D1, D2, β1 (low dose), α1 (high dose)", false), dataCell("Dose-dependent receptor selectivity:\n• Low (2–5 µg/kg/min): D1 → renal/mesenteric vasodilation\n• Medium (5–10): β1 → ↑CO\n• High (>10): α1 → vasoconstriction", false), dataCell("Cardiogenic shock, heart failure with renal impairment", false), dataCell("Nausea, tachycardia, arrhythmias at high doses", false) ]}), new TableRow({ children: [ dataCell("Dobutamine", true, ALT_ROW), dataCell("β1 > β2", false, ALT_ROW), dataCell("Synthetic; direct β1 agonist; ↑CO with minimal HR change; does NOT cause renal vasodilation", false, ALT_ROW), dataCell("Acute heart failure, cardiogenic shock; cardiac stress testing", false, ALT_ROW), dataCell("Tachycardia, arrhythmias; tolerance on prolonged use", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Isoprenaline (Isoproterenol)", true), dataCell("β1 + β2 (non-selective β)", false), dataCell("Potent β agonist; ↑HR, ↑CO, bronchodilation, vasodilation", false), dataCell("AV block (historically); severe bradycardia; Rarely used now", false), dataCell("Tachyarrhythmias, angina; largely obsolete", false) ]}), // SELECTIVE β2 AGONISTS new TableRow({ children: [headerCell("SELECTIVE β2 AGONISTS (Bronchodilators)", 5, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Duration"), subHeaderCell("MOA"), subHeaderCell("Uses"), subHeaderCell("Adverse Effects")] }), new TableRow({ children: [ dataCell("Salbutamol (Albuterol)", true, ALT_ROW), dataCell("Short-acting (SABA; 4–6 hr)", false, ALT_ROW), dataCell("Selective β2 → bronchodilation, uterine relaxation, ↑glycogenolysis", false, ALT_ROW), dataCell("Acute bronchial asthma (DOC), COPD, tocolysis (premature labour)", false, ALT_ROW), dataCell("Tremor (β2 skeletal muscle), tachycardia, hypokalaemia", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Terbutaline", true), dataCell("Short-acting (SABA)", false), dataCell("Selective β2 agonist", false), dataCell("Asthma; tocolysis (SC/oral)", false), dataCell("Same as salbutamol; tremor, tachycardia", false) ]}), new TableRow({ children: [ dataCell("Formoterol / Salmeterol", true, ALT_ROW), dataCell("Long-acting (LABA; 12 hr)", false, ALT_ROW), dataCell("Selective β2, long duration", false, ALT_ROW), dataCell("Maintenance in asthma/COPD (combined with ICS)", false, ALT_ROW), dataCell("Not for acute attacks; tolerance possible", false, ALT_ROW) ]}), // α AGONISTS new TableRow({ children: [headerCell("ALPHA (α) AGONISTS", 5, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Receptor"), subHeaderCell("MOA"), subHeaderCell("Uses"), subHeaderCell("Notes")] }), new TableRow({ children: [ dataCell("Phenylephrine", true), dataCell("α1 selective", false), dataCell("Vasoconstriction; raises BP; reflex bradycardia; active mydriasis (no cycloplegia)", false), dataCell("Nasal decongestant; pupillary dilation (no cycloplegia); hypotension in spinal anaesthesia", false), dataCell("Pure α1; no cardiac stimulation; short-acting", false) ]}), new TableRow({ children: [ dataCell("Clonidine", true, ALT_ROW), dataCell("α2 agonist (central)", false, ALT_ROW), dataCell("Stimulates central α2 → ↓sympathetic outflow → ↓BP and ↓HR", false, ALT_ROW), dataCell("Hypertension; opioid withdrawal; ADHD; menopausal flushes; migraine prophylaxis", false, ALT_ROW), dataCell("Sedation, dry mouth; rebound hypertension on sudden withdrawal", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Methyldopa", true), dataCell("False NT → α2 agonist (central)", false), dataCell("Converted to α-methylNA → acts on central α2 → ↓BP; DOC for hypertension in pregnancy", false), dataCell("Hypertension in pregnancy (DOC)", false), dataCell("Sedation, positive Coombs test, hepatotoxicity, drug fever", false) ]}), // INDIRECT / MIXED ACTING new TableRow({ children: [headerCell("INDIRECT / MIXED ACTING SYMPATHOMIMETICS", 5, "2E75B6")] }), new TableRow({ children: [ dataCell("Ephedrine", true, ALT_ROW), dataCell("α + β (indirect > direct)", false, ALT_ROW), dataCell("Releases NA + weak direct agonism; oral bioavailability; crosses BBB", false, ALT_ROW), dataCell("Hypotension due to spinal anaesthesia (IV; DOC); nasal decongestant; mild asthma (oral)", false, ALT_ROW), dataCell("Tachyphylaxis; hypertension, insomnia; plant alkaloid (Ephedra sinica)", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Amphetamine", true), dataCell("α + β indirect", false), dataCell("Releases stored monoamines (NA, DA, 5-HT); CNS stimulant", false), dataCell("ADHD; narcolepsy (dextroamphetamine)", false), dataCell("High abuse potential; psychosis, dependence; controlled drug", false) ]}), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // 4. ANTI-ADRENERGIC DRUGS TABLE function antiAdrenergicTable() { const rows = [ new TableRow({ children: [headerCell("ANTI-ADRENERGIC DRUGS (ADRENOCEPTOR BLOCKERS)", 5)] }), // Alpha blockers new TableRow({ children: [headerCell("ALPHA (α) BLOCKERS", 5, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Type / Selectivity"), subHeaderCell("MOA"), subHeaderCell("Uses"), subHeaderCell("Adverse Effects")] }), new TableRow({ children: [ dataCell("Phentolamine", true), dataCell("Non-selective α1 + α2; reversible (competitive)", false), dataCell("Blocks α receptors → vasodilation; α2 block → reflex tachycardia (nasal congestion AE)", false), dataCell("1. Diagnosis of pheochromocytoma (Regitine test)\n2. Hypertensive crisis in pheochromocytoma\n3. Control BP during surgery for pheo", false), dataCell("Postural hypotension, reflex tachycardia, nasal stuffiness", false) ]}), new TableRow({ children: [ dataCell("Phenoxybenzamine", true, ALT_ROW), dataCell("Non-selective α1 + α2; IRREVERSIBLE", false, ALT_ROW), dataCell("Irreversible covalent bond with α receptors; prolonged action", false, ALT_ROW), dataCell("Preoperative management of pheochromocytoma", false, ALT_ROW), dataCell("Prolonged postural hypotension, nasal congestion, inhibits ejaculation", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Prazosin / Terazosin / Doxazosin", true), dataCell("Selective α1 blocker", false), dataCell("Blocks postsynaptic α1 only → vasodilation; no tachycardia (preserves α2 feedback)", false), dataCell("1. Hypertension\n2. Benign prostatic hyperplasia (BPH) — relaxes bladder neck/prostate\n3. Raynaud's disease", false), dataCell("First-dose syncope (take at bedtime); postural hypotension; less tachycardia than phentolamine", false) ]}), new TableRow({ children: [ dataCell("Tamsulosin", true, ALT_ROW), dataCell("α1A selective (prostate > vasculature)", false, ALT_ROW), dataCell("Selective for α1A receptors in prostate/bladder neck; minimal BP effect", false, ALT_ROW), dataCell("BPH (preferred — minimal BP lowering)", false, ALT_ROW), dataCell("Retrograde ejaculation; minimal hypotension", false, ALT_ROW) ]}), // Beta blockers new TableRow({ children: [headerCell("BETA (β) BLOCKERS", 5, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Selectivity / Properties"), subHeaderCell("MOA"), subHeaderCell("Uses"), subHeaderCell("Adverse Effects / CI")] }), new TableRow({ children: [ dataCell("Propranolol", true, YELLOW_BG), dataCell("Non-selective β1+β2; no ISA; membrane stabilizing (MSA)", false, YELLOW_BG), dataCell("Blocks β1+β2; ↓HR, ↓CO, ↓BP, ↓renin; β2 blockade causes bronchoconstriction", false, YELLOW_BG), dataCell("1. Hypertension\n2. Angina\n3. Arrhythmias (AF, SVT)\n4. Thyrotoxicosis (controls symptoms)\n5. Migraine prophylaxis\n6. Essential tremor\n7. Anxiety (situational)\n8. IHSS\n9. Pheochromocytoma (after α-blocker)", false, YELLOW_BG), dataCell("Bronchoconstriction (CI: asthma), bradycardia, AV block, cold extremities, fatigue, masks hypoglycaemia\nMasks tachycardia of hypoglycaemia (not sweating)", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("Metoprolol / Atenolol / Bisoprolol", true), dataCell("Cardioselective β1 (safer in asthma at low doses)", false), dataCell("Preferential β1 blockade; reduces HR and CO; less bronchoconstriction", false), dataCell("Hypertension, angina, arrhythmias, heart failure (bisoprolol/carvedilol/metoprolol reduce mortality in CHF)", false), dataCell("Less bronchospasm; mask hypoglycaemia; bradycardia; fatigue", false) ]}), new TableRow({ children: [ dataCell("Carvedilol", true, ALT_ROW), dataCell("Non-selective β + α1 blocker; no ISA; antioxidant", false, ALT_ROW), dataCell("β blockade + α1 vasodilation; reduces afterload", false, ALT_ROW), dataCell("Chronic heart failure (reduces mortality); hypertension", false, ALT_ROW), dataCell("Postural hypotension, dizziness; contraindicated in severe asthma", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Labetalol", true), dataCell("α1 + β1 + β2 blocker (ratio α:β = 1:3 oral, 1:7 IV)", false), dataCell("Combined α + β blockade; lowers BP without reflex tachycardia", false), dataCell("Hypertensive emergencies (IV); hypertension in pregnancy (safe)", false), dataCell("Postural hypotension; bronchospasm; dizziness", false) ]}), new TableRow({ children: [ dataCell("Pindolol / Acebutolol", true, ALT_ROW), dataCell("Non-selective / β1 selective WITH ISA", false, ALT_ROW), dataCell("ISA = Intrinsic sympathomimetic activity — partial agonism; less bradycardia at rest", false, ALT_ROW), dataCell("Hypertension (less suitable for angina/arrhythmia due to ISA)", false, ALT_ROW), dataCell("Less resting bradycardia, less cold extremities; not preferred in tachyarrhythmias", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Esmolol", true), dataCell("β1 selective; ultra-short acting (t½ = 9 min); metabolized by RBC esterases", false), dataCell("IV only; rapid onset; cardiac β1 blockade", false), dataCell("Perioperative hypertension/tachycardia; SVT; thyroid storm", false), dataCell("Short-acting → useful when precise titration needed; IV only", false) ]}), // CONTRAINDICATIONS TABLE new TableRow({ children: [headerCell("β-BLOCKER CONTRAINDICATIONS & PRECAUTIONS", 5, "C00000")] }), new TableRow({ children: [subHeaderCell("Contraindication"), subHeaderCell("Reason", 4)] }), new TableRow({ children: [dataCell("Bronchial asthma / COPD", true), dataCell("β2 blockade → bronchoconstriction (non-selective worse)", false, WHITE, "000000", 4)] }), new TableRow({ children: [dataCell("AV block / sick sinus syndrome", true, ALT_ROW), dataCell("↓AV conduction → complete heart block", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Diabetes mellitus", true), dataCell("Masks tachycardia of hypoglycaemia (sweating still present); delays recovery from hypoglycaemia")] }), new TableRow({ children: [dataCell("Peripheral vascular disease", true, ALT_ROW), dataCell("β2 blockade → vasoconstriction → worsens ischaemia", false, ALT_ROW)] }), new TableRow({ children: [dataCell("Phaeochromocytoma (without α-blocker)", true), dataCell("Unopposed α stimulation → severe hypertension — ALWAYS give α-blocker first")] }), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // 5. SEROTONIN TABLE function serotoninTable() { const rows = [ new TableRow({ children: [headerCell("SEROTONIN (5-HT) — AGONISTS AND ANTAGONISTS", 4)] }), // Basics new TableRow({ children: [headerCell("5-HT RECEPTOR SUBTYPES (Key ones)", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Receptor"), subHeaderCell("Location"), subHeaderCell("Effect when stimulated"), subHeaderCell("Clinical Relevance")] }), new TableRow({ children: [dataCell("5-HT1A", true), dataCell("Brain (raphe nuclei); presynaptic autoreceptor"), dataCell("↓Anxiety, ↓depression"), dataCell("Target for buspirone (anxiolytic); antidepressants")] }), new TableRow({ children: [dataCell("5-HT1B/1D", true, ALT_ROW), dataCell("Cranial blood vessels, trigeminal nerve terminals", false, ALT_ROW), dataCell("Vasoconstriction of dilated cranial vessels; ↓neuropeptide release", false, ALT_ROW), dataCell("TARGET for TRIPTANS in migraine", false, ALT_ROW)] }), new TableRow({ children: [dataCell("5-HT2A", true), dataCell("Smooth muscle, platelets, brain"), dataCell("Vasoconstriction, platelet aggregation, bronchoconstriction"), dataCell("Target for atypical antipsychotics; cyproheptadine; ketanserin")] }), new TableRow({ children: [dataCell("5-HT3", true, ALT_ROW), dataCell("CTZ, gut, vagal afferents", false, ALT_ROW), dataCell("Nausea, vomiting, ↑GI motility", false, ALT_ROW), dataCell("TARGET for ondansetron/granisetron (antiemetics)", false, ALT_ROW)] }), new TableRow({ children: [dataCell("5-HT4", true), dataCell("GIT"), dataCell("↑GI motility, prokinesis"), dataCell("Target for metoclopramide (partial), mosapride")] }), // 5-HT AGONISTS new TableRow({ children: [headerCell("5-HT AGONISTS / SEROTONERGIC DRUGS", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Receptor"), subHeaderCell("Uses"), subHeaderCell("Notes / AEs")] }), new TableRow({ children: [ dataCell("Sumatriptan", true, YELLOW_BG), dataCell("5-HT1B/1D agonist (selective)", false, YELLOW_BG), dataCell("Acute migraine attack (DOC for moderate-severe migraine)", false, YELLOW_BG), dataCell("Oral, SC (fastest), nasal; t½ = 2 hr; chest tightness, flushing, paresthesia\nCI: IHD, hypertension, PVD, pregnancy; Do NOT combine with ergots (within 24 hrs)", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("Other Triptans\n(Rizatriptan, Zolmitriptan, Eletriptan, Frovatriptan, Naratriptan)", true), dataCell("5-HT1B/1D agonist", false), dataCell("Acute migraine (oral; some also nasal — zolmitriptan)", false), dataCell("Frovatriptan/Naratriptan: longer t½ (less headache recurrence); better oral bioavailability than sumatriptan", false) ]}), new TableRow({ children: [ dataCell("Buspirone", true, ALT_ROW), dataCell("5-HT1A partial agonist", false, ALT_ROW), dataCell("Generalized anxiety disorder (GAD); no dependence", false, ALT_ROW), dataCell("Slow onset (2–4 weeks); no sedation, no dependence; not for panic attacks", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("SSRIs (Fluoxetine, Sertraline, Paroxetine, etc.)", true), dataCell("Block 5-HT reuptake transporter (SERT) → ↑synaptic 5-HT", false), dataCell("Depression, anxiety disorders, OCD, panic disorder, PTSD", false), dataCell("Sexual dysfunction, GI upset, insomnia; serotonin syndrome risk with MAOIs; safe in pregnancy (sertraline preferred)", false) ]}), // 5-HT ANTAGONISTS new TableRow({ children: [headerCell("5-HT ANTAGONISTS", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Receptor Blocked"), subHeaderCell("Uses"), subHeaderCell("Key Notes")] }), new TableRow({ children: [ dataCell("Ondansetron / Granisetron / Tropisetron", true, YELLOW_BG), dataCell("5-HT3 antagonist", false, YELLOW_BG), dataCell("1. Chemotherapy-induced nausea/vomiting (CINV) — DOC\n2. Postoperative N&V\n3. Radiation-induced vomiting", false, YELLOW_BG), dataCell("Well tolerated; headache, constipation; preferred over metoclopramide in CINV", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("Cyproheptadine", true), dataCell("5-HT2A + H1 antagonist (dual)", false), dataCell("1. Carcinoid syndrome (controls flushing/diarrhoea)\n2. Postgastrectomy dumping syndrome\n3. Allergic conditions (antihistamine effect)\n4. Appetite stimulant (weight gain)", false), dataCell("Sedation, dry mouth, weight gain; also useful in serotonin syndrome", false) ]}), new TableRow({ children: [ dataCell("Ketanserin", true, ALT_ROW), dataCell("5-HT2A + α1 antagonist", false, ALT_ROW), dataCell("Hypertension (antihypertensive)", false, ALT_ROW), dataCell("Dual mechanism; useful in Raynaud's disease", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Methysergide", true), dataCell("5-HT2A/2C antagonist", false), dataCell("Prophylaxis of migraine (no longer commonly used)", false), dataCell("Long-term use → retroperitoneal/pulmonary/cardiac fibrosis; drug holiday mandatory", false) ]}), new TableRow({ children: [ dataCell("Atypical Antipsychotics\n(Clozapine, Olanzapine, Risperidone, Quetiapine)", true, ALT_ROW), dataCell("5-HT2 + D2 blockade", false, ALT_ROW), dataCell("Schizophrenia, bipolar disorder", false, ALT_ROW), dataCell("5-HT2 blockade reduces EPS compared to typical antipsychotics", false, ALT_ROW) ]}), // ERGOT ALKALOIDS new TableRow({ children: [headerCell("ERGOT ALKALOIDS", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("MOA"), subHeaderCell("Uses"), subHeaderCell("AEs / Notes")] }), new TableRow({ children: [ dataCell("Ergotamine", true, YELLOW_BG), dataCell("Partial agonist at 5-HT1B/1D + α-adrenergic agonist; vasoconstriction of cranial vessels", false, YELLOW_BG), dataCell("Acute migraine (oral/sublingual/rectal); combined with caffeine (Cafergot)", false, YELLOW_BG), dataCell("Ergotism: peripheral vasospasm, gangrene, uterine contraction\nCI: pregnancy, PVD, IHD, hypertension\nDo NOT combine with triptans (within 24 hrs)", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("Ergometrine (Ergonovine)", true), dataCell("Partial agonist at 5-HT2A; α-adrenergic agonism; potent uterotonic", false), dataCell("Postpartum haemorrhage (IM/IV); active management of 3rd stage of labour", false), dataCell("Nausea, vomiting, rise in BP; minimal vasoconstrictive effect compared to ergotamine", false) ]}), new TableRow({ children: [ dataCell("Bromocriptine", true, ALT_ROW), dataCell("Semisynthetic ergot; D2 agonist → ↓prolactin", false, ALT_ROW), dataCell("1. Parkinsonism\n2. Hyperprolactinaemia / galactorrhoea\n3. Acromegaly", false, ALT_ROW), dataCell("Nausea, postural hypotension; lung fibrosis with long use", false, ALT_ROW) ]}), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // 6. HISTAMINE TABLE function histamineTable() { const rows = [ new TableRow({ children: [headerCell("HISTAMINE RECEPTORS AND EFFECTS", 4)] }), new TableRow({ children: [subHeaderCell("Receptor"), subHeaderCell("Location"), subHeaderCell("Effect when stimulated"), subHeaderCell("Pharmacological Significance")] }), new TableRow({ children: [ dataCell("H1", true, YELLOW_BG), dataCell("Smooth muscle (bronchi, gut, uterus), endothelium, CNS", false, YELLOW_BG), dataCell("Bronchoconstriction, ↑capillary permeability, pruritus, pain, vasodilation (↓BP)", false, YELLOW_BG), dataCell("Blocked by H1-antihistamines; involved in allergy, anaphylaxis", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("H2", true), dataCell("Gastric parietal cells, heart", false), dataCell("↑Gastric acid secretion, ↑HR (weak)", false), dataCell("Blocked by H2-blockers (ranitidine, famotidine, cimetidine) — peptic ulcer treatment", false) ]}), new TableRow({ children: [ dataCell("H3", true, ALT_ROW), dataCell("Presynaptic autoreceptor (brain, lung, skin)", false, ALT_ROW), dataCell("↓Histamine synthesis and release", false, ALT_ROW), dataCell("Modulates histamine levels; agonists ↓histamine", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("H4", true), dataCell("Mast cells, eosinophils, leukocytes", false), dataCell("Chemotaxis, cytokine secretion", false), dataCell("Role in inflammation; target for future allergy drugs", false) ]}), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } function antihistamineTable() { const rows = [ new TableRow({ children: [headerCell("H1-ANTIHISTAMINES — CLASSIFICATION AND COMPARISON", 5)] }), new TableRow({ children: [subHeaderCell("Feature"), subHeaderCell("1st Generation"), subHeaderCell("2nd Generation"), subHeaderCell("Examples"), subHeaderCell("Key Points")] }), // General comparison new TableRow({ children: [ dataCell("Cross BBB?", true, ALT_ROW), dataCell("YES (lipophilic) → sedation", false, ALT_ROW), dataCell("NO (hydrophilic, P-gp efflux) → non-sedating", false, ALT_ROW), dataCell("", false, ALT_ROW), dataCell("2nd gen preferred for daytime use", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Anticholinergic effects", true), dataCell("YES — dry mouth, urinary retention, blurred vision, constipation", false), dataCell("MINIMAL", false), dataCell("", false), dataCell("1st gen cause more side effects", false) ]}), new TableRow({ children: [ dataCell("Duration of action", true, ALT_ROW), dataCell("4–6 hours (most)", false, ALT_ROW), dataCell("12–24 hours (longer)", false, ALT_ROW), dataCell("", false, ALT_ROW), dataCell("2nd gen: once or twice daily dosing", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Anti-emetic / Anti-vertigo", true), dataCell("YES (promethazine, dimenhydrinate, cyclizine)", false), dataCell("NO (most have no anti-emetic effect)", false), dataCell("", false), dataCell("1st gen used for motion sickness/vertigo", false) ]}), new TableRow({ children: [ dataCell("Local anaesthetic action", true, ALT_ROW), dataCell("YES (diphenhydramine)", false, ALT_ROW), dataCell("NO", false, ALT_ROW), dataCell("", false, ALT_ROW), dataCell("Diphenhydramine: topical LA", false, ALT_ROW) ]}), // First generation list new TableRow({ children: [headerCell("1ST GENERATION H1-BLOCKERS", 5, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Special Properties"), subHeaderCell("Uses"), subHeaderCell("AEs"), subHeaderCell("Notes")] }), new TableRow({ children: [ dataCell("Diphenhydramine", true, ALT_ROW), dataCell("Sedating; LA action; anticholinergic", false, ALT_ROW), dataCell("Allergy, motion sickness, insomnia, cough suppressant (antitussive)", false, ALT_ROW), dataCell("Sedation, dry mouth, blurred vision, urinary retention", false, ALT_ROW), dataCell("Prototype first-gen antihistamine", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Dimenhydrinate", true), dataCell("Diphenhydramine + 8-chlorotheophylline", false), dataCell("Motion sickness (oral)", false), dataCell("Sedation, dry mouth", false), dataCell("Combination product", false) ]}), new TableRow({ children: [ dataCell("Promethazine", true, ALT_ROW), dataCell("Strong sedative, antiemetic, anticholinergic, antipsychotic (phenothiazine)", false, ALT_ROW), dataCell("Motion sickness, preanaesthetic, antiemetic, allergic reactions", false, ALT_ROW), dataCell("Marked sedation, extrapyramidal effects (rare)", false, ALT_ROW), dataCell("Most sedating; avoid in children <2 yrs (risk of respiratory depression)", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Chlorpheniramine (CPM)", true), dataCell("Less sedating among 1st gen; potent H1 blocker", false), dataCell("Allergic rhinitis, urticaria, drug reactions; common cold preparations", false), dataCell("Mild sedation, dry mouth", false), dataCell("Available in most OTC preparations (e.g., with paracetamol)", false) ]}), new TableRow({ children: [ dataCell("Cyclizine / Meclizine", true, ALT_ROW), dataCell("Anti-emetic, anti-vertigo", false, ALT_ROW), dataCell("Motion sickness, N&V of pregnancy (meclizine); vertigo", false, ALT_ROW), dataCell("Sedation, dry mouth", false, ALT_ROW), dataCell("Meclizine: low teratogenic risk; preferred in pregnancy N&V", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Cinnarizine", true), dataCell("H1 blocker + Ca2+ channel blocker (in vestibular cells)", false), dataCell("Vertigo (Meniere's disease), motion sickness, peripheral vascular disease", false), dataCell("Sedation, weight gain, extrapyramidal effects (rare)", false), dataCell("Calcium channel blocking in vestibular cells → relieves vertigo", false) ]}), new TableRow({ children: [ dataCell("Cyproheptadine", true, ALT_ROW), dataCell("H1 + 5-HT2A blocker; appetite stimulant", false, ALT_ROW), dataCell("Allergy; carcinoid syndrome; appetite stimulant (underweight children)", false, ALT_ROW), dataCell("Sedation, dry mouth, weight gain", false, ALT_ROW), dataCell("Dual H1 + 5-HT2A antagonist; useful in serotonin syndrome", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Hydroxyzine", true), dataCell("H1 blocker + anxiolytic (histamine + CNS)", false), dataCell("Anxiety, pruritus, preoperative sedation", false), dataCell("Sedation, dry mouth", false), dataCell("No dependence; used in generalized anxiety", false) ]}), // Second generation list new TableRow({ children: [headerCell("2ND GENERATION H1-BLOCKERS", 5, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug"), subHeaderCell("Properties"), subHeaderCell("Uses"), subHeaderCell("AEs"), subHeaderCell("Notes")] }), new TableRow({ children: [ dataCell("Cetirizine", true, YELLOW_BG), dataCell("Non-sedating (mild sedation possible); active metabolite of hydroxyzine", false, YELLOW_BG), dataCell("Allergic rhinitis, urticaria, atopic dermatitis, conjunctivitis", false, YELLOW_BG), dataCell("Mild sedation (compared to others in gen 2), dry mouth (minimal)", false, YELLOW_BG), dataCell("Most widely used 2nd gen; once daily", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("Levocetirizine", true), dataCell("R-enantiomer of cetirizine; more potent, less sedating", false), dataCell("Allergic rhinitis, urticaria", false), dataCell("Less sedating than cetirizine", false), dataCell("Preferred over cetirizine in pilots/operators of heavy machinery", false) ]}), new TableRow({ children: [ dataCell("Loratadine", true, ALT_ROW), dataCell("Non-sedating; minimal anticholinergic", false, ALT_ROW), dataCell("Allergic rhinitis, urticaria, eczema", false, ALT_ROW), dataCell("Headache; minimal sedation", false, ALT_ROW), dataCell("OTC in many countries; once daily", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Desloratadine", true), dataCell("Active metabolite of loratadine; more potent", false), dataCell("Allergic rhinitis, urticaria, skin allergies", false), dataCell("Minimal; headache", false), dataCell("Once daily; more potent than loratadine", false) ]}), new TableRow({ children: [ dataCell("Fexofenadine", true, ALT_ROW), dataCell("Active metabolite of terfenadine; NO cardiac toxicity; truly non-sedating", false, ALT_ROW), dataCell("Allergic rhinitis, urticaria; preferred in pilots, athletes", false, ALT_ROW), dataCell("No cardiac toxicity; no sedation; headache", false, ALT_ROW), dataCell("Safest 2nd gen; no QT prolongation; P-gp substrate (avoid grapefruit juice)", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("Azelastine", true), dataCell("Topical H1 blocker + anti-inflammatory", false), dataCell("Allergic rhinitis (nasal spray); allergic conjunctivitis (eye drops)", false), dataCell("Bitter taste (nasal spray)", false), dataCell("Available as nasal spray and eye drops", false) ]}), new TableRow({ children: [ dataCell("Rupatadine", true, ALT_ROW), dataCell("H1 + PAF (platelet-activating factor) antagonist", false, ALT_ROW), dataCell("Allergic rhinitis, urticaria", false, ALT_ROW), dataCell("Mild sedation", false, ALT_ROW), dataCell("Dual mechanism (H1 + PAF antagonism)", false, ALT_ROW) ]}), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // 7. MIGRAINE TABLE function migraineTable() { const rows = [ new TableRow({ children: [headerCell("TREATMENT OF MIGRAINE", 4)] }), // Pathophysiology new TableRow({ children: [headerCell("PATHOPHYSIOLOGY OF MIGRAINE (Brief)", 4, "2E75B6")] }), new TableRow({ children: [ dataCell("Step 1: Trigger (stress, food, hormones, etc.) activates cortical spreading depression", false, ALT_ROW), dataCell("Step 2: Abnormal dilation of cranial blood vessels", false, ALT_ROW), dataCell("Step 3: Release of inflammatory neuropeptides (CGRP, substance P) around trigeminal nerve endings", false, ALT_ROW), dataCell("Step 4: Vasodilation + neurogenic inflammation → throbbing headache, photophobia, nausea", false, ALT_ROW) ]}), // Acute treatment new TableRow({ children: [headerCell("DRUGS FOR ACUTE MIGRAINE ATTACK", 4, "2E75B6")] }), new TableRow({ children: [subHeaderCell("Drug / Class"), subHeaderCell("MOA"), subHeaderCell("Notes"), subHeaderCell("Contraindications")] }), new TableRow({ children: [ dataCell("TRIPTANS (5-HT1B/1D agonists)\nSumatriptan (DOC), Rizatriptan, Zolmitriptan, Naratriptan, Frovatriptan, Eletriptan, Almotriptan", true, YELLOW_BG), dataCell("1. Constrict dilated cranial blood vessels\n2. ↓Release of inflammatory neuropeptides\n3. Inhibit trigeminal neurovascular transmission", false, YELLOW_BG), dataCell("• Drugs of choice (DOC) for moderate-severe acute migraine\n• Sumatriptan: fastest SC/nasal; oral t½ = 2 hr\n• Naratriptan/Frovatriptan: longer t½, less headache recurrence\n• Do NOT give within 24 hr of ergot derivatives\n• Not for hemiplegic or basilar migraine", false, YELLOW_BG), dataCell("IHD, hypertension (uncontrolled), peripheral vascular disease, pregnancy, history of stroke, within 24 hrs of ergot use", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("ERGOTAMINE\n(Cafergot = Ergotamine + Caffeine)", true), dataCell("Partial agonist at 5-HT1B/1D + α agonist → cranial vasoconstriction", false), dataCell("Moderate migraine; caffeine enhances GI absorption and adds analgesic effect; given early in attack", false), dataCell("Pregnancy, PVD, IHD, hepatic/renal disease; do NOT combine with triptans (24 hrs washout)", false) ]}), new TableRow({ children: [ dataCell("NSAIDs\n(Ibuprofen, Naproxen, Aspirin, Diclofenac)", true, ALT_ROW), dataCell("COX inhibition → ↓prostaglandins → ↓inflammation and sensitization", false, ALT_ROW), dataCell("Mild-moderate migraine; first-line for simple migraine; aspirin + metoclopramide = effective combination", false, ALT_ROW), dataCell("Peptic ulcer, renal impairment, bleeding disorders; avoid aspirin in children", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("PARACETAMOL (Acetaminophen)", true), dataCell("Central COX inhibition (?) + TRP channel modulation", false), dataCell("Mild migraine; safe option; often combined with codeine or caffeine", false), dataCell("Safe in pregnancy; avoid overdose (hepatotoxicity)", false) ]}), new TableRow({ children: [ dataCell("ANTIEMETICS\n(Metoclopramide, Prochlorperazine, Domperidone)", true, ALT_ROW), dataCell("D2 antagonists → ↓nausea/vomiting; also enhance GI absorption of analgesics (metoclopramide)", false, ALT_ROW), dataCell("Combined with analgesics; metoclopramide IV is very effective; also treats gastric stasis of migraine", false, ALT_ROW), dataCell("Extrapyramidal effects (metoclopramide, especially in young females); avoid in tardive dyskinesia", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("OPIOIDS\n(e.g., Tramadol)", true), dataCell("µ-opioid receptor agonist", false), dataCell("Only when triptans and NSAIDs fail; avoid routine use", false), dataCell("Dependence potential; rebound headache with chronic use; last resort only", false) ]}), // Prophylaxis new TableRow({ children: [headerCell("PROPHYLAXIS OF MIGRAINE — Mnemonic: ABCD", 4, "C00000")] }), new TableRow({ children: [subHeaderCell("Drug Class (ABCD)"), subHeaderCell("Drugs"), subHeaderCell("MOA"), subHeaderCell("Notes")] }), new TableRow({ children: [ dataCell("A — Antidepressants (TCAs)", true, YELLOW_BG), dataCell("Amitriptyline (most evidence)", false, YELLOW_BG), dataCell("Central serotonin and NA reuptake inhibition; lowers pain threshold", false, YELLOW_BG), dataCell("Useful especially when migraine + depression/insomnia coexist; take at night", false, YELLOW_BG) ]}), new TableRow({ children: [ dataCell("B — Beta-Blockers", true), dataCell("Propranolol (DOC for prophylaxis), Metoprolol, Timolol, Atenolol, Nadolol", false), dataCell("Reduce vasoreactivity; ↓β-adrenergic tone; ↓cortical spreading depression", false), dataCell("Propranolol most effective; CI in asthma, bradycardia, diabetes; used when migraine + hypertension", false) ]}), new TableRow({ children: [ dataCell("C — Ca2+ Channel Blockers (CCBs)", true, ALT_ROW), dataCell("Flunarizine (DOC), Verapamil, Nifedipine", false, ALT_ROW), dataCell("Block Ca2+ channels → prevent vasoconstriction/spreading depression", false, ALT_ROW), dataCell("Flunarizine: 10 mg/day; also useful in basilar migraine; AE: weight gain, depression", false, ALT_ROW) ]}), new TableRow({ children: [ dataCell("D — Drugs (Anticonvulsants + others)", true), dataCell("Valproate (Sodium valproate), Topiramate, Gabapentin", false), dataCell("Valproate: GABA-ergic effect; Topiramate: Na+ channel blockade + GABA enhancement + AMPA inhibition", false), dataCell("Valproate and Topiramate FDA-approved for migraine prophylaxis; CI: valproate in pregnancy (teratogenic)", false) ]}), new TableRow({ children: [ dataCell("Other prophylactic agents", true, ALT_ROW), dataCell("Methysergide (5-HT2A/C antagonist), Clonidine (α2 agonist), Pizotifen (5-HT2/H1 blocker), CGRP antibodies (Erenumab, Fremanezumab)", false, ALT_ROW), dataCell("Methysergide: retroperitoneal fibrosis on long-term use (drug holiday required)\nCGRP monoclonal antibodies: newest preventive treatment (SC monthly)", false, ALT_ROW), dataCell("Prophylaxis indicated when ≥2–3 attacks/month or significant functional impairment; treatment given for 3–6 months", false, ALT_ROW) ]}), ]; return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows }); } // ============================================= // DOCUMENT ASSEMBLY // ============================================= const doc = new Document({ creator: "Orris AI", title: "ANS and Autacoids — Exam Notes (Shanbhag Pharmacology)", description: "Comprehensive exam-oriented table notes based on Shanbhag Pharmacology", sections: [{ children: [ // TITLE new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 200, after: 400 }, children: [ new TextRun({ text: "ANS & AUTACOIDS", bold: true, size: 52, color: "1B3A6B" }), new TextRun({ break: 1, text: "Exam-Oriented Table Notes", bold: true, size: 30, color: "2E75B6" }), new TextRun({ break: 1, text: "Based on Shanbhag Pharmacology (4th Edition)", italics: true, size: 22, color: "595959" }), ] }), // ====== SECTION 1: CHOLINERGIC ====== sectionHeading("SECTION 1: CHOLINERGIC & ANTICHOLINERGIC DRUGS"), subHeading("1A. Cholinergic Drugs (Cholinomimetics / Parasympathomimetics)"), note("Muscarinic receptors: M1 (CNS/gastric), M2 (heart), M3 (smooth muscle/glands/eye)"), note("Nicotinic receptors: NN (ganglia + adrenal medulla), NM (neuromuscular junction)"), note("SLUDGE mnemonic for cholinergic excess: Salivation, Lacrimation, Urination, Defaecation, GI distress, Emesis"), spacer(), cholinergicTable(), spacer(), subHeading("1B. Anticholinergic Drugs (Antimuscarinics)"), note("Atropine poisoning mnemonic: HOT as a hare, DRY as a bone, RED as a beet, BLIND as a bat, MAD as a hatter"), note("Atropine is NOT cycloplegic when applied topically via eye drops in patients with normal IOP — it blocks ALL muscarinic subtypes"), note("Atropine vs Phenylephrine for mydriasis: Atropine = passive mydriasis + cycloplegia; Phenylephrine = active mydriasis (NO cycloplegia)"), spacer(), anticholinergicTable(), spacer(), new Paragraph({ children: [new PageBreak()] }), // ====== SECTION 2: ADRENERGIC ====== sectionHeading("SECTION 2: ADRENERGIC & ANTI-ADRENERGIC DRUGS"), subHeading("2A. Adrenergic Agonists"), note("Catecholamines (Adrenaline, NA, Dopamine, Dobutamine, Isoprenaline): Rapid onset; IV/injection route; NOT orally active; rapidly metabolized by MAO + COMT"), note("Non-catecholamines (Ephedrine, Amphetamine, Salbutamol): Oral bioavailability; longer duration; not metabolized by MAO/COMT"), note("VMA (Vanillylmandelic Acid): main metabolite of catecholamines in urine; normal = 4–8 mg/24 hrs; elevated in pheochromocytoma"), spacer(), adrenergicTable(), spacer(), subHeading("2B. Anti-Adrenergic Drugs (Adrenoceptor Blockers)"), note("Phentolamine TEST: Inject phentolamine IV → if systolic BP drops >35 mm Hg (diastolic >25 mm Hg) = positive for pheochromocytoma"), note("β-blockers in CHF: Carvedilol, Bisoprolol, Metoprolol (extended release) — started at LOW doses; they reduce mortality in stable CHF"), note("Propranolol is the ONLY β-blocker used for migraine prophylaxis and essential tremor"), spacer(), antiAdrenergicTable(), spacer(), new Paragraph({ children: [new PageBreak()] }), // ====== SECTION 3: SEROTONIN ====== sectionHeading("SECTION 3: AUTACOIDS — SEROTONIN & DRUGS ACTING ON SEROTONERGIC SYSTEM"), subHeading("5-Hydroxytryptamine (5-HT / Serotonin): Receptors, Agonists and Antagonists"), note("5-HT is synthesized from tryptophan (amino acid); stored mainly in enterochromaffin cells of gut (90%), platelets, and brain"), note("5-HT3 is the ONLY ionotropic (ligand-gated ion channel) serotonin receptor; all others are G-protein coupled"), note("Serotonin Syndrome: excess 5-HT (e.g., SSRIs + MAOIs) → agitation, tremor, clonus, hyperthermia; treat with cyproheptadine + supportive care"), spacer(), serotoninTable(), spacer(), new Paragraph({ children: [new PageBreak()] }), // ====== SECTION 4: HISTAMINE & MIGRAINE ====== sectionHeading("SECTION 4: AUTACOIDS — HISTAMINE, ANTIHISTAMINES & TREATMENT OF MIGRAINE"), subHeading("4A. Histamine Receptors and Effects"), note("Histamine synthesis: decarboxylation of histidine; stored in mast cells and basophils in storage granules"), note("Histamine liberators: morphine, d-tubocurarine, radiocontrast media, bee/wasp venom, strawberries"), note("Betahistine: histamine analogue (H1 agonist + weak H3 antagonist); used for vertigo in Meniere's disease"), spacer(), histamineTable(), spacer(), subHeading("4B. H1-Antihistamines: 1st vs 2nd Generation"), note("MOA of all H1-blockers: COMPETITIVE antagonism at H1 receptors"), note("H1-blockers do NOT affect gastric acid secretion (that is H2); they do NOT block H2 receptors"), note("Cardiotoxicity: Terfenadine and Astemizole (1st gen withdrawn) caused QT prolongation/Torsades; replaced by fexofenadine and cetirizine"), spacer(), antihistamineTable(), spacer(), subHeading("4C. Treatment of Migraine"), note("Migraine phases: Prodrome → Aura (in 15–20%) → Headache (4–72 hrs; unilateral, throbbing, with N&V, photo/phonophobia) → Resolution"), note("Triptans are DOC for moderate-to-severe migraine; NSAIDs + antiemetics for mild-moderate attacks"), note("Prophylaxis mnemonic: ABCD — A=Amitriptyline, B=Beta-blockers (propranolol), C=Calcium channel blockers (flunarizine), D=Drugs (valproate, topiramate)"), note("Never combine triptans and ergots within 24 hours — risk of severe vasospasm"), spacer(), migraineTable(), spacer(), // Footer note new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 400 }, children: [ new TextRun({ text: "Notes compiled from Shanbhag Pharmacology (4th Edition) by Tara V Shanbhag & Smita Shenoy", italics: true, size: 16, color: "595959" }) ] }) ] }] }); Packer.toBuffer(doc).then(buffer => { fs.writeFileSync('/home/daytona/workspace/ans-notes/ANS_Autacoids_Exam_Notes.docx', buffer); console.log('Document created successfully!'); }).catch(err => { console.error('Error:', err); process.exit(1); }); JSEOF echo "Script written"

Running Command

cd /home/daytona/workspace/ans-notes && npm install docx 2>&1 | tail -5 && node generate_notes.js

Running Command

ls /home/daytona/workspace/ans-notes/node_modules/docx 2>/dev/null && echo "docx installed" || echo "not installed"

Running Command

cd /home/daytona/workspace/ans-notes && timeout 90 node generate_notes.js 2>&1

The document is created. Let me verify and deliver it:
Running Command

ls -lh /home/daytona/workspace/ans-notes/ANS_Autacoids_Exam_Notes.docx && python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/ans-notes/ANS_Autacoids_Exam_Notes.docx 2>/dev/null || echo "Validation not available, file created"

Model call limits exceeded: run limit (20/20)

Provide me the document you have made on the asked chapters

Here is your document, ready to download:

ANS Autacoids Exam Notes

Word Document · DOCX


Here is a summary of what is covered inside, all in table format:

What's Inside the Document

Section 1 — Cholinergic & Anticholinergic Drugs

  • Cholinergic drugs table: Direct-acting (ACh, Bethanechol, Carbachol, Pilocarpine, Muscarine) and Indirect-acting (Physostigmine, Neostigmine, Pyridostigmine, Edrophonium, Organophosphates, Donepezil/Rivastigmine) with MOA, uses, and adverse effects
  • Atropine actions table: Organ-wise effects (heart, eye, glands, GIT, bladder, bronchi, CNS)
  • Atropine substitutes table: Scopolamine, Tropicamide, Homatropine, Ipratropium, Pirenzepine, Oxybutynin, Benztropine — with selectivity and uses
  • Key mnemonics: SLUDGE for cholinergic toxicity; HOT-DRY-RED-BLIND-MAD for atropine poisoning

Section 2 — Adrenergic & Anti-Adrenergic Drugs

  • Adrenergic agonists: Catecholamines (Adrenaline, NA, Dopamine, Dobutamine, Isoprenaline) with dose-dependent receptor actions
  • Selective β2 agonists: SABAs (Salbutamol, Terbutaline) and LABAs (Salmeterol, Formoterol)
  • Alpha agonists: Phenylephrine, Clonidine, Methyldopa
  • Alpha blockers: Phentolamine, Phenoxybenzamine, Prazosin, Tamsulosin — with phaeochromocytoma management
  • Beta blockers: Full table with Propranolol (prototype), cardioselective agents, Carvedilol, Labetalol, Esmolol — uses, AEs, and contraindications table

Section 3 — Autacoids: Serotonin

  • 5-HT receptor subtypes table: 5-HT1A/1B/1D/2A/3/4 — location, effect, and drug targets
  • 5-HT agonists: Triptans (Sumatriptan as DOC), Buspirone, SSRIs
  • 5-HT antagonists: Ondansetron/Granisetron (CINV), Cyproheptadine (dual H1+5HT2A), Ketanserin, Methysergide
  • Ergot alkaloids table: Ergotamine, Ergometrine, Bromocriptine

Section 4 — Histamine, Antihistamines & Migraine

  • Histamine receptor table: H1/H2/H3/H4 — location, effects, pharmacological significance
  • 1st vs 2nd generation antihistamine comparison table
  • Individual drug tables: Diphenhydramine, Promethazine, Chlorpheniramine, Cyclizine, Cinnarizine, Cyproheptadine (1st gen) and Cetirizine, Levocetirizine, Loratadine, Fexofenadine, Azelastine, Rupatadine (2nd gen)
  • Migraine acute treatment table: Triptans (DOC), Ergotamine, NSAIDs, Antiemetics, Opioids
  • Migraine prophylaxis table with mnemonic ABCD: Amitriptyline, Beta-blockers (Propranolol), Calcium channel blockers (Flunarizine), Drugs (Valproate, Topiramate) + newer CGRP antibodies
This is a shared conversation. Sign in to Orris to start your own chat.