*Assignment for 17-07-26* *Sedative Hypnotics & Antiepileptic Drugs* 1.Classify antiepileptic drugs and explain the mechanism of action, therapeutic uses, and adverse effects of Phenytoin. 2.Write a short note on newer antiepileptic agents. 3.Classify sedative-hypnotics. Discuss the mechanism of action, pharmacological actions, adverse effects, clinical uses, contraindications, and indications of Diazepam. 4.Write a short note on non-benzodiazepine hypnotics 5.Management of barbiturate poisoning. *Assignment for 21-07-26* *General Anaesthetics* 1.Classify general anaesthetics and add a note on the pharmacology of Halothane. 2.Adverse effects of general anaesthesia during and after anaesthesia. 3.Short note on pre-anaesthetic medication. 4.What are intravenous anaesthetics? Add a note on the pharmacology of Propofol Give answers to this assignment according to kdt 8th edition and each page should contain 3 pages maximum

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

mkdir -p /tmp/workspace/pharmacology-assignment && ls /tmp/workspace/

Writing File

~/pharmacology-assignment/generate_assignment.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.style import WD_STYLE_TYPE
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy

doc = Document()

# ── PAGE SETUP: A4, narrow margins ─────────────────────────────────────────
section = doc.sections[0]
section.page_height = Cm(29.7)
section.page_width  = Cm(21.0)
section.top_margin    = Cm(2.0)
section.bottom_margin = Cm(2.0)
section.left_margin   = Cm(2.5)
section.right_margin  = Cm(2.5)

# ── STYLES ──────────────────────────────────────────────────────────────────
normal_style = doc.styles['Normal']
normal_style.font.name = 'Times New Roman'
normal_style.font.size = Pt(11)

def add_heading(doc, text, level=1, color=None):
    p = doc.add_heading(text, level=level)
    run = p.runs[0] if p.runs else p.add_run(text)
    run.font.name = 'Times New Roman'
    if level == 1:
        run.font.size = Pt(14)
        run.font.bold = True
        if color:
            run.font.color.rgb = RGBColor(*color)
    elif level == 2:
        run.font.size = Pt(12)
        run.font.bold = True
    elif level == 3:
        run.font.size = Pt(11)
        run.font.bold = True
        run.font.italic = True
    return p

def add_para(doc, text, bold=False, italic=False, indent=False, spacing_after=4):
    p = doc.add_paragraph()
    if indent:
        p.paragraph_format.left_indent = Inches(0.3)
    p.paragraph_format.space_after = Pt(spacing_after)
    p.paragraph_format.space_before = Pt(0)
    run = p.add_run(text)
    run.font.name = 'Times New Roman'
    run.font.size = Pt(11)
    run.bold = bold
    run.italic = italic
    return p

def add_bullet(doc, text, bold_prefix=None):
    p = doc.add_paragraph(style='List Bullet')
    p.paragraph_format.left_indent = Inches(0.3)
    p.paragraph_format.space_after = Pt(2)
    if bold_prefix:
        r1 = p.add_run(bold_prefix)
        r1.bold = True
        r1.font.name = 'Times New Roman'
        r1.font.size = Pt(11)
        r2 = p.add_run(text)
        r2.font.name = 'Times New Roman'
        r2.font.size = Pt(11)
    else:
        run = p.add_run(text)
        run.font.name = 'Times New Roman'
        run.font.size = Pt(11)
    return p

def add_sub_bullet(doc, text, bold_prefix=None):
    p = doc.add_paragraph(style='List Bullet 2')
    p.paragraph_format.left_indent = Inches(0.6)
    p.paragraph_format.space_after = Pt(2)
    if bold_prefix:
        r1 = p.add_run(bold_prefix)
        r1.bold = True
        r1.font.name = 'Times New Roman'
        r1.font.size = Pt(11)
        r2 = p.add_run(text)
        r2.font.name = 'Times New Roman'
        r2.font.size = Pt(11)
    else:
        run = p.add_run(text)
        run.font.name = 'Times New Roman'
        run.font.size = Pt(11)
    return p

def section_break(doc):
    doc.add_paragraph().paragraph_format.space_after = Pt(4)

def page_break(doc):
    doc.add_page_break()

# ═══════════════════════════════════════════════════════════════════════════
#  COVER / HEADER
# ═══════════════════════════════════════════════════════════════════════════
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = p.add_run("PHARMACOLOGY ASSIGNMENT")
run.bold = True
run.font.size = Pt(16)
run.font.name = 'Times New Roman'
run.font.color.rgb = RGBColor(0x1F, 0x49, 0x7D)

p2 = doc.add_paragraph()
p2.alignment = WD_ALIGN_PARAGRAPH.CENTER
run2 = p2.add_run("Based on KDT 8th Edition")
run2.bold = True
run2.font.size = Pt(12)
run2.font.name = 'Times New Roman'

doc.add_paragraph()

# ═══════════════════════════════════════════════════════════════════════════
#  ASSIGNMENT 1: 17-07-26
# ═══════════════════════════════════════════════════════════════════════════
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = p.add_run("ASSIGNMENT - 17/07/2026")
run.bold = True
run.font.size = Pt(13)
run.font.name = 'Times New Roman'
run.font.color.rgb = RGBColor(0x1F, 0x49, 0x7D)

p2 = doc.add_paragraph()
p2.alignment = WD_ALIGN_PARAGRAPH.CENTER
run2 = p2.add_run("Sedative Hypnotics & Antiepileptic Drugs")
run2.bold = True
run2.italic = True
run2.font.size = Pt(12)
run2.font.name = 'Times New Roman'

doc.add_paragraph()

# ───────────────────────────────────────────────────────────────────────────
# Q1: Classify antiepileptic drugs + Phenytoin
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q1. Classify Antiepileptic Drugs and Explain the Mechanism of Action, Therapeutic Uses, and Adverse Effects of Phenytoin", level=1, color=(0x1F,0x49,0x7D))

add_heading(doc, "Classification of Antiepileptic Drugs (AEDs)", level=2)
add_para(doc, "Based on KDT 8th Edition, AEDs are classified as follows:")

add_para(doc, "I. TRADITIONAL (OLDER) AEDs", bold=True)
add_para(doc, "A. Drugs effective in Partial seizures and Generalized tonic-clonic seizures (GTCS):", bold=True, indent=True)
add_bullet(doc, "Phenytoin (Diphenylhydantoin)")
add_bullet(doc, "Carbamazepine")
add_bullet(doc, "Phenobarbitone (Phenobarbital)")
add_bullet(doc, "Primidone")
add_bullet(doc, "Valproic acid (Sodium valproate)")

add_para(doc, "B. Drugs effective mainly in Absence seizures:", bold=True, indent=True)
add_bullet(doc, "Ethosuximide")
add_bullet(doc, "Clonazepam")
add_bullet(doc, "Trimethadione (obsolete)")

add_para(doc, "C. Drugs used in Status Epilepticus:", bold=True, indent=True)
add_bullet(doc, "Diazepam / Lorazepam (first-line)")
add_bullet(doc, "Phenytoin / Fosphenytoin")
add_bullet(doc, "Phenobarbitone")
add_bullet(doc, "General anaesthesia (thiopentone, propofol)")

add_para(doc, "II. NEWER AEDs", bold=True)
add_bullet(doc, "Lamotrigine")
add_bullet(doc, "Gabapentin")
add_bullet(doc, "Topiramate")
add_bullet(doc, "Levetiracetam")
add_bullet(doc, "Oxcarbazepine")
add_bullet(doc, "Vigabatrin")
add_bullet(doc, "Tiagabine")
add_bullet(doc, "Felbamate")
add_bullet(doc, "Zonisamide")
add_bullet(doc, "Pregabalin")
add_bullet(doc, "Lacosamide")

section_break(doc)
add_heading(doc, "PHENYTOIN (Diphenylhydantoin)", level=2)

add_heading(doc, "Mechanism of Action", level=3)
add_para(doc, "Phenytoin acts primarily by blocking voltage-gated sodium (Na+) channels in a use-dependent manner:")
add_bullet(doc, "It selectively binds to the inactivated state of fast Na+ channels, prolonging their inactivation.")
add_bullet(doc, "This reduces the sustained high-frequency repetitive firing of neurons responsible for seizure propagation, without significantly affecting normal neuronal activity.")
add_bullet(doc, "At higher concentrations, it also inhibits Ca2+ influx at synaptic terminals and reduces Ca2+-dependent release of neurotransmitters.")
add_bullet(doc, "It stabilizes the neuronal membrane by reducing post-tetanic potentiation in synapses.")
add_para(doc, "Result: Phenytoin limits the spread of seizure discharge without suppressing the seizure focus itself.")

add_heading(doc, "Therapeutic Uses", level=3)
add_bullet(doc, "Epilepsy: Drug of choice (or first-line) for:", bold_prefix="1. ")
add_sub_bullet(doc, "Generalized tonic-clonic (grand mal) seizures")
add_sub_bullet(doc, "Partial (focal) seizures - both simple and complex")
add_sub_bullet(doc, "Psychomotor (temporal lobe) seizures")
add_bullet(doc, "Status Epilepticus: IV phenytoin/fosphenytoin after benzodiazepine failure.", bold_prefix="2. ")
add_bullet(doc, "Cardiac Arrhythmias: Especially digitalis-induced arrhythmias and ventricular tachycardia (due to membrane stabilizing action); now largely replaced by other antiarrhythmics.", bold_prefix="3. ")
add_bullet(doc, "Trigeminal Neuralgia: Second-line (carbamazepine preferred).", bold_prefix="4. ")
add_bullet(doc, "NOT effective for: Absence (petit mal) and myoclonic seizures - may worsen them.", bold_prefix="Note: ")

add_heading(doc, "Adverse Effects", level=3)

add_para(doc, "A. Dose-related (concentration-dependent):", bold=True)
add_bullet(doc, "Nystagmus (earliest sign, at plasma levels >20 mcg/mL)")
add_bullet(doc, "Diplopia and blurred vision")
add_bullet(doc, "Ataxia and incoordination")
add_bullet(doc, "Mental confusion, cognitive impairment")
add_bullet(doc, "Sedation (at toxic levels)")
add_bullet(doc, "Respiratory depression (IV toxicity)")

add_para(doc, "B. Idiosyncratic / Chronic Effects:", bold=True)
add_bullet(doc, "Gingival hyperplasia (20-30% patients; due to altered collagen metabolism - most characteristic ADR)")
add_bullet(doc, "Hirsutism and coarsening of facial features")
add_bullet(doc, "Megaloblastic anaemia (due to folate deficiency - impairs folate absorption and metabolism)")
add_bullet(doc, "Osteomalacia / Rickets (induces CYP450 enzymes, accelerating Vitamin D metabolism)")
add_bullet(doc, "Peripheral neuropathy (with prolonged use)")
add_bullet(doc, "Fetal hydantoin syndrome: Cleft palate, digit hypoplasia, growth retardation (teratogenic, Category D)")
add_bullet(doc, "Lupus-like syndrome")
add_bullet(doc, "Lymphadenopathy, pseudolymphoma")

add_para(doc, "C. Drug interactions:", bold=True)
add_bullet(doc, "Strong CYP450 enzyme inducer - reduces plasma levels of: warfarin, oral contraceptives, corticosteroids, other AEDs")
add_bullet(doc, "Saturated metabolism (zero-order kinetics at therapeutic levels) - small dose increases cause disproportionate rise in plasma levels (dangerous)")
add_bullet(doc, "Highly protein bound (90%) - displacement interactions with warfarin, valproate")

add_para(doc, "D. IV phenytoin toxicity:", bold=True)
add_bullet(doc, "Cardiovascular collapse, hypotension, bradycardia, arrhythmias (due to propylene glycol vehicle)")
add_bullet(doc, "Purple glove syndrome (local toxicity at injection site)")
add_para(doc, "Note: Fosphenytoin (water-soluble prodrug) is preferred for IV use to avoid these cardiovascular side effects.", italic=True)

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q2: Newer Antiepileptic Agents
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q2. Short Note on Newer Antiepileptic Agents", level=1, color=(0x1F,0x49,0x7D))
add_para(doc, "The newer (second-generation) AEDs were developed from the 1990s onwards to overcome the limitations of older AEDs (adverse effects, enzyme induction, drug interactions, teratogenicity).")

add_heading(doc, "1. Lamotrigine", level=3)
add_bullet(doc, "MOA: Blocks voltage-gated Na+ channels (similar to phenytoin); also inhibits glutamate release.")
add_bullet(doc, "Uses: Broad spectrum - partial seizures, GTCS, absence seizures, Lennox-Gastaut syndrome, bipolar disorder.")
add_bullet(doc, "ADRs: Skin rash (2-3%, including Steven-Johnson syndrome - serious), dizziness, diplopia, headache.")
add_bullet(doc, "Note: Dose must be titrated slowly to reduce rash risk. Valproate doubles its half-life.")

add_heading(doc, "2. Gabapentin", level=3)
add_bullet(doc, "MOA: Binds to alpha-2-delta subunit of voltage-gated Ca2+ channels, reducing glutamate release. Does NOT act on GABA receptors despite name.")
add_bullet(doc, "Uses: Partial seizures (add-on), neuropathic pain (postherpetic neuralgia, diabetic neuropathy), fibromyalgia, restless leg syndrome.")
add_bullet(doc, "ADRs: Somnolence, dizziness, ataxia, weight gain. No drug interactions (not metabolized by liver).")

add_heading(doc, "3. Topiramate", level=3)
add_bullet(doc, "MOA: Multiple - blocks Na+ channels, enhances GABA-A activity, blocks AMPA/kainate glutamate receptors, inhibits carbonic anhydrase.")
add_bullet(doc, "Uses: Partial and GTCS, Lennox-Gastaut, migraine prophylaxis, obesity.")
add_bullet(doc, "ADRs: Cognitive impairment ('Dope-a-max'), word-finding difficulty, weight loss, kidney stones, metabolic acidosis, glaucoma.")

add_heading(doc, "4. Levetiracetam", level=3)
add_bullet(doc, "MOA: Unique - binds to synaptic vesicle protein SV2A, modulating neurotransmitter release. Also inhibits N-type Ca2+ channels.")
add_bullet(doc, "Uses: Partial seizures, juvenile myoclonic epilepsy, GTCS. Often preferred as add-on therapy.")
add_bullet(doc, "ADRs: Behavioral disturbances (irritability, aggression, depression), somnolence, dizziness.")
add_bullet(doc, "Advantage: Minimal drug interactions, no hepatic enzyme induction.")

add_heading(doc, "5. Oxcarbazepine", level=3)
add_bullet(doc, "MOA: Blocks Na+ channels (similar to carbamazepine) - its active metabolite monohydroxyderivative (MHD) is responsible.")
add_bullet(doc, "Uses: Partial seizures, GTCS, trigeminal neuralgia.")
add_bullet(doc, "Advantage over carbamazepine: Less enzyme induction, fewer drug interactions, no life-threatening blood dyscrasias.")
add_bullet(doc, "ADRs: Hyponatremia (more common than with carbamazepine), dizziness, diplopia.")

add_heading(doc, "6. Vigabatrin", level=3)
add_bullet(doc, "MOA: Irreversible inhibitor of GABA-transaminase (enzyme that degrades GABA), thereby increasing brain GABA levels.")
add_bullet(doc, "Uses: Partial seizures (refractory), infantile spasms (West syndrome - drug of choice).")
add_bullet(doc, "ADRs: Irreversible concentric visual field defects (most important - requires regular ophthalmological monitoring), weight gain.")

add_heading(doc, "7. Pregabalin", level=3)
add_bullet(doc, "MOA: Like gabapentin - binds alpha-2-delta subunit of Ca2+ channels.")
add_bullet(doc, "Uses: Partial seizures (add-on), neuropathic pain, generalized anxiety disorder, fibromyalgia.")
add_bullet(doc, "ADRs: Dizziness, somnolence, weight gain, peripheral edema.")

add_heading(doc, "8. Lacosamide", level=3)
add_bullet(doc, "MOA: Enhances slow inactivation of Na+ channels (unlike phenytoin which enhances fast inactivation).")
add_bullet(doc, "Uses: Partial onset seizures.")
add_bullet(doc, "ADRs: Dizziness, diplopia, nausea; PR interval prolongation (caution in cardiac disease).")

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q3: Sedative-Hypnotics Classification + Diazepam
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q3. Classify Sedative-Hypnotics and Discuss Diazepam", level=1, color=(0x1F,0x49,0x7D))

add_heading(doc, "Classification of Sedative-Hypnotics (KDT 8th Ed.)", level=2)

add_para(doc, "I. BENZODIAZEPINES (BZDs)", bold=True)
add_para(doc, "A. Long-acting (t1/2 > 24 hrs):", bold=True, indent=True)
add_bullet(doc, "Diazepam, Chlordiazepoxide, Flurazepam, Clonazepam, Clorazepate")
add_para(doc, "B. Intermediate-acting (t1/2 6-24 hrs):", bold=True, indent=True)
add_bullet(doc, "Lorazepam, Alprazolam, Temazepam, Nitrazepam, Oxazepam")
add_para(doc, "C. Short-acting (t1/2 < 6 hrs):", bold=True, indent=True)
add_bullet(doc, "Triazolam, Midazolam")

add_para(doc, "II. BARBITURATES", bold=True)
add_para(doc, "A. Long-acting:", bold=True, indent=True)
add_bullet(doc, "Phenobarbitone, Mephobarbitone")
add_para(doc, "B. Short-acting:", bold=True, indent=True)
add_bullet(doc, "Pentobarbitone, Secobarbitone")
add_para(doc, "C. Ultra-short acting (IV anaesthetics):", bold=True, indent=True)
add_bullet(doc, "Thiopentone sodium, Methohexitone")

add_para(doc, "III. NON-BENZODIAZEPINE HYPNOTICS (Z-drugs and others)", bold=True)
add_bullet(doc, "Zolpidem, Zaleplon, Zopiclone, Eszopiclone")

add_para(doc, "IV. MISCELLANEOUS", bold=True)
add_bullet(doc, "Chloral hydrate")
add_bullet(doc, "Melatonin receptor agonist: Ramelteon")
add_bullet(doc, "Orexin receptor antagonist: Suvorexant")
add_bullet(doc, "Antihistamines: Promethazine, Diphenhydramine")
add_bullet(doc, "Buspirone (anxiolytic, not hypnotic)")

section_break(doc)
add_heading(doc, "DIAZEPAM", level=2)

add_heading(doc, "Mechanism of Action", level=3)
add_para(doc, "Diazepam acts by enhancing the inhibitory effects of GABA (gamma-aminobutyric acid):")
add_bullet(doc, "Binds to the benzodiazepine (BZD) receptor site on the GABA-A receptor complex (a ligand-gated Cl- channel).")
add_bullet(doc, "This allosteric binding increases the frequency of Cl- channel opening in response to GABA.")
add_bullet(doc, "The resulting increased Cl- conductance hyperpolarizes the neuron, making it less excitable.")
add_para(doc, "Important distinction: BZDs increase the FREQUENCY of Cl- channel opening (barbiturates increase the DURATION of channel opening).")

add_heading(doc, "Pharmacological Actions", level=3)
add_bullet(doc, "Anxiolytic action: Reduces anxiety, fear, and tension without causing significant sedation at low doses (mediated by limbic system GABA-A receptors).")
add_bullet(doc, "Sedation and hypnosis: At higher doses, causes sedation progressing to sleep. Decreases sleep latency, increases total sleep time; reduces REM sleep and slow-wave (stage 3 & 4) sleep.")
add_bullet(doc, "Anticonvulsant action: Suppresses seizure spread (not focus); effective in all types of epilepsy, especially status epilepticus.")
add_bullet(doc, "Muscle relaxant: Central action - inhibits polysynaptic reflexes at spinal cord and supraspinal level; reduces muscle tone.")
add_bullet(doc, "Anterograde amnesia: Impairs formation of new memories (useful in procedural sedation).")
add_bullet(doc, "Cardiovascular: Minimal at therapeutic doses; slight reduction in BP and heart rate with IV use.")
add_bullet(doc, "Respiratory: Slight depression at therapeutic doses; significant depression at high doses or with other CNS depressants.")

add_heading(doc, "Pharmacokinetics", level=3)
add_bullet(doc, "Absorption: Well absorbed orally; IM absorption is slow and erratic (not preferred IM)")
add_bullet(doc, "Protein binding: ~98%")
add_bullet(doc, "Distribution: High lipid solubility - rapid CNS entry; distributes to adipose tissue")
add_bullet(doc, "Metabolism: Hepatic CYP2C19/CYP3A4 - produces active metabolite N-desmethyldiazepam (nordazepam) and oxazepam")
add_bullet(doc, "Elimination: Long t1/2 (20-70 hrs); active metabolite t1/2 up to 200 hrs")
add_bullet(doc, "Routes: Oral, IV, IM (poor), rectal (useful in children)")

add_heading(doc, "Adverse Effects", level=3)
add_bullet(doc, "CNS: Sedation, drowsiness, impaired psychomotor performance, ataxia, cognitive impairment")
add_bullet(doc, "Tolerance and dependence: Physical dependence with prolonged use; withdrawal syndrome (anxiety, insomnia, tremors, seizures)")
add_bullet(doc, "Anterograde amnesia")
add_bullet(doc, "Paradoxical reactions: Excitement, aggression, hostility (especially in children and elderly)")
add_bullet(doc, "Respiratory depression: Especially with IV use or in combination with opioids/alcohol")
add_bullet(doc, "IV phlebitis and thrombosis (due to poor water solubility)")
add_bullet(doc, "Teratogenicity: Associated with cleft palate; avoid in pregnancy (Category D)")
add_bullet(doc, "Neonatal effects: Respiratory depression, hypotonia ('floppy infant syndrome')")
add_bullet(doc, "Rebound insomnia and anxiety on withdrawal")

add_heading(doc, "Clinical Uses (Indications)", level=3)
add_bullet(doc, "Anxiety disorders: Generalized anxiety disorder, situational anxiety (short-term use only)", bold_prefix="1. ")
add_bullet(doc, "Insomnia: Short-term management (now largely replaced by Z-drugs)", bold_prefix="2. ")
add_bullet(doc, "Status epilepticus: IV diazepam (drug of choice initially); rectal diazepam in children", bold_prefix="3. ")
add_bullet(doc, "Epilepsy: Febrile convulsions (rectal), myoclonic and absence seizures (clonazepam preferred)", bold_prefix="4. ")
add_bullet(doc, "Muscle relaxant: Muscle spasm (tetanus, stiff-man syndrome, cerebral palsy, backache)", bold_prefix="5. ")
add_bullet(doc, "Alcohol withdrawal: Prevention/treatment of delirium tremens and withdrawal seizures", bold_prefix="6. ")
add_bullet(doc, "Pre-anaesthetic medication: Allays anxiety, provides sedation, anterograde amnesia", bold_prefix="7. ")
add_bullet(doc, "Procedural sedation: Endoscopy, cardioversion, minor surgical procedures", bold_prefix="8. ")
add_bullet(doc, "Panic disorder and phobias (short-term adjunct)", bold_prefix="9. ")

add_heading(doc, "Contraindications", level=3)
add_bullet(doc, "Myasthenia gravis (worsens neuromuscular blockade)")
add_bullet(doc, "Acute angle-closure glaucoma")
add_bullet(doc, "Severe respiratory insufficiency (COPD, sleep apnea)")
add_bullet(doc, "Severe hepatic failure")
add_bullet(doc, "First trimester of pregnancy and breastfeeding")
add_bullet(doc, "Hypersensitivity to benzodiazepines")
add_bullet(doc, "Sleep apnea syndrome")

add_heading(doc, "Antidote", level=3)
add_para(doc, "Flumazenil - competitive BZD receptor antagonist; reverses sedation, respiratory depression.")
add_para(doc, "Caution: Short duration of action (t1/2 ~1 hr) - resedation may occur; may precipitate seizures in BZD-dependent patients.", italic=True)

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q4: Non-benzodiazepine Hypnotics
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q4. Short Note on Non-Benzodiazepine Hypnotics", level=1, color=(0x1F,0x49,0x7D))
add_para(doc, "Non-benzodiazepine hypnotics (Z-drugs and others) were developed as alternatives to BZDs for insomnia, aiming for improved safety profiles. They are now first-line pharmacological treatment for insomnia.")

add_heading(doc, "Z-Drugs (BZD Receptor Agonists - Selective)", level=2)

add_heading(doc, "1. Zolpidem", level=3)
add_bullet(doc, "MOA: Binds selectively to BZD-1 (omega-1) subtype of GABA-A receptors (containing alpha-1 subunit). This selectivity confers hypnotic effects with minimal anxiolytic/muscle relaxant/anticonvulsant effects.")
add_bullet(doc, "Pharmacokinetics: t1/2 ~2-3 hrs; rapid onset; hepatic metabolism; available as immediate and extended-release formulations.")
add_bullet(doc, "Uses: Short-term treatment of insomnia (sleep-onset and sleep-maintenance).")
add_bullet(doc, "ADRs: Somnolence, dizziness, headache; complex sleep-related behaviors (sleepwalking, sleep-driving, sleep-eating - important); anterograde amnesia.")
add_bullet(doc, "Advantages: Less rebound insomnia; less tolerance; minimal effect on sleep architecture (preserves REM sleep better than BZDs).")

add_heading(doc, "2. Zaleplon", level=3)
add_bullet(doc, "MOA: Like zolpidem - selective BZD-1 receptor agonist.")
add_bullet(doc, "Pharmacokinetics: Ultrashort t1/2 (~1 hr) - shortest acting Z-drug.")
add_bullet(doc, "Uses: Sleep onset insomnia only; can be taken in the middle of the night if >=4 hrs remain before waking.")
add_bullet(doc, "ADRs: Amnesia, dizziness; least residual sedation due to short t1/2.")

add_heading(doc, "3. Zopiclone / Eszopiclone", level=3)
add_bullet(doc, "MOA: Cyclopyrrolone derivative; binds to BZD site on GABA-A receptor (less selective than zolpidem).")
add_bullet(doc, "Pharmacokinetics: t1/2 ~5-6 hrs (zopiclone); eszopiclone is the active S-enantiomer with t1/2 ~6 hrs.")
add_bullet(doc, "Uses: Sleep onset and sleep maintenance insomnia.")
add_bullet(doc, "ADRs: Bitter/metallic taste (characteristic), dry mouth, dizziness. Eszopiclone approved for longer-term use.")

add_heading(doc, "Other Non-Benzodiazepine Hypnotics", level=2)

add_heading(doc, "4. Ramelteon", level=3)
add_bullet(doc, "MOA: Selective melatonin receptor (MT1 and MT2) agonist. Reduces sleep latency by acting on the suprachiasmatic nucleus (circadian clock).")
add_bullet(doc, "Uses: Insomnia with difficulty in sleep onset; circadian rhythm disorders.")
add_bullet(doc, "ADRs: Dizziness, somnolence, fatigue; may raise prolactin levels.")
add_bullet(doc, "Advantage: No dependence, no abuse potential, no controlled substance - safe in elderly.")

add_heading(doc, "5. Suvorexant", level=3)
add_bullet(doc, "MOA: Dual orexin receptor antagonist (DORA) - blocks OX1R and OX2R receptors, reducing wake-promoting orexin (hypocretin) signaling.")
add_bullet(doc, "Uses: Insomnia (difficulty with sleep onset and maintenance).")
add_bullet(doc, "ADRs: Somnolence, next-day drowsiness, sleep paralysis, hypnagogic hallucinations.")

add_heading(doc, "6. Chloral Hydrate", level=3)
add_bullet(doc, "Oldest sedative-hypnotic; active metabolite is trichloroethanol.")
add_bullet(doc, "Largely obsolete; used for pediatric procedural sedation.")
add_bullet(doc, "Narrow therapeutic index; unpleasant taste; GI irritation.")

add_para(doc, "Comparison with BZDs: Non-BZD hypnotics cause less dependence, less tolerance, less rebound insomnia, and better preserve sleep architecture compared to BZDs.", italic=True)

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q5: Barbiturate Poisoning
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q5. Management of Barbiturate Poisoning", level=1, color=(0x1F,0x49,0x7D))
add_para(doc, "Barbiturate poisoning (overdose) is a medical emergency. Acute poisoning is most commonly due to deliberate overdose.")

add_heading(doc, "Clinical Features", level=2)
add_para(doc, "Graded CNS depression:", bold=True)
add_bullet(doc, "Stage 1 (Mild): Sedation, slurred speech, ataxia, confusion")
add_bullet(doc, "Stage 2 (Moderate): Deep sleep, areflexia, depressed response to pain")
add_bullet(doc, "Stage 3 (Severe): Coma, loss of deep tendon reflexes, miosis, hypothermia")
add_bullet(doc, "Stage 4 (Life-threatening): Respiratory depression, respiratory failure, cardiovascular collapse, death")
add_para(doc, "Other features: Hypotension, bradycardia, pulmonary edema, hypothermia, bullous skin lesions ('barb blisters'), oliguria.")

add_heading(doc, "Management", level=2)

add_heading(doc, "I. Supportive/Resuscitative Measures (Most Important)", level=3)
add_bullet(doc, "ABC (Airway, Breathing, Circulation) - first priority")
add_bullet(doc, "Maintain airway: Endotracheal intubation and mechanical ventilation for respiratory depression/failure")
add_bullet(doc, "Oxygen supplementation")
add_bullet(doc, "IV fluids (Normal saline/Ringer's lactate) to treat hypotension and maintain urine output")
add_bullet(doc, "Vasopressors (Dopamine/Noradrenaline) if hypotension unresponsive to fluids")
add_bullet(doc, "Temperature control: Manage hypothermia with warming blankets")
add_bullet(doc, "Monitoring: Vital signs, O2 saturation, ECG, urine output")

add_heading(doc, "II. Prevention of Further Absorption", level=3)
add_bullet(doc, "Gastric lavage: Effective only if patient presents within 1-2 hours of ingestion (with airway protected)")
add_bullet(doc, "Activated charcoal (50g orally): Adsorbs remaining drug; multiple-dose activated charcoal (MDAC) enhances elimination of long-acting barbiturates (phenobarbitone) by interrupting enterohepatic circulation")
add_bullet(doc, "Do NOT induce emesis (risk of aspiration in obtunded patient)")

add_heading(doc, "III. Enhancing Elimination", level=3)
add_bullet(doc, "Forced alkaline diuresis:", bold_prefix="A. ")
add_sub_bullet(doc, "IV sodium bicarbonate (makes urine alkaline, pH > 7.5)")
add_sub_bullet(doc, "Ionizes weak acids (phenobarbitone pKa 7.2) in alkaline urine, trapping them and preventing tubular reabsorption")
add_sub_bullet(doc, "Increase urine output with IV fluids + furosemide")
add_sub_bullet(doc, "Effective for LONG-ACTING barbiturates (phenobarbitone, barbitone)")
add_sub_bullet(doc, "NOT useful for short-acting (thiopentone, pentobarbitone) - these are highly protein-bound and lipid-soluble")
add_bullet(doc, "Haemodialysis / Haemoperfusion:", bold_prefix="B. ")
add_sub_bullet(doc, "Haemodialysis: Removes phenobarbitone effectively (water-soluble, low protein binding)")
add_sub_bullet(doc, "Haemoperfusion (charcoal/resin): More effective for short-acting barbiturates (higher lipid solubility)")
add_sub_bullet(doc, "Reserved for severe, refractory cases")

add_heading(doc, "IV. Specific Antidote", level=3)
add_para(doc, "There is NO specific antidote for barbiturate poisoning.")
add_para(doc, "Analeptics (CNS stimulants like bemegride) were used historically but are now CONTRAINDICATED - they precipitate convulsions without improving respiratory function.", italic=True)

add_heading(doc, "Key Points", level=3)
add_bullet(doc, "Short-acting barbiturates (thiopentone) cause deeper coma but recover faster (redistribution)")
add_bullet(doc, "Long-acting barbiturates (phenobarbitone) cause prolonged coma - alkaline diuresis is helpful")
add_bullet(doc, "Prognosis depends on: amount ingested, duration before treatment, presence of other CNS depressants")
add_bullet(doc, "Mortality was ~5% with older treatment; with modern ICU care, <1%")

page_break(doc)

# ═══════════════════════════════════════════════════════════════════════════
#  ASSIGNMENT 2: 21-07-26 - General Anaesthetics
# ═══════════════════════════════════════════════════════════════════════════
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = p.add_run("ASSIGNMENT - 21/07/2026")
run.bold = True
run.font.size = Pt(13)
run.font.name = 'Times New Roman'
run.font.color.rgb = RGBColor(0x1F, 0x49, 0x7D)

p2 = doc.add_paragraph()
p2.alignment = WD_ALIGN_PARAGRAPH.CENTER
run2 = p2.add_run("General Anaesthetics")
run2.bold = True
run2.italic = True
run2.font.size = Pt(12)
run2.font.name = 'Times New Roman'

doc.add_paragraph()

# ───────────────────────────────────────────────────────────────────────────
# Q1: Classify General Anaesthetics + Halothane
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q1. Classify General Anaesthetics and Add a Note on the Pharmacology of Halothane", level=1, color=(0x1F,0x49,0x7D))

add_heading(doc, "Classification of General Anaesthetics (KDT 8th Ed.)", level=2)

add_para(doc, "I. INHALATIONAL ANAESTHETICS", bold=True)
add_para(doc, "A. Volatile liquids (given as vapour):", bold=True, indent=True)
add_bullet(doc, "Halothane (prototype)")
add_bullet(doc, "Isoflurane")
add_bullet(doc, "Enflurane")
add_bullet(doc, "Desflurane")
add_bullet(doc, "Sevoflurane (most commonly used currently)")
add_para(doc, "B. Gases:", bold=True, indent=True)
add_bullet(doc, "Nitrous oxide (N2O) - most widely used; not a complete anaesthetic alone")
add_bullet(doc, "Cyclopropane (obsolete)")
add_bullet(doc, "Ether (diethyl ether) (largely obsolete)")

add_para(doc, "II. INTRAVENOUS ANAESTHETICS", bold=True)
add_para(doc, "A. Ultra-short acting barbiturates:", bold=True, indent=True)
add_bullet(doc, "Thiopentone sodium (thiobarbiturate) - prototype IV anaesthetic")
add_bullet(doc, "Methohexitone")
add_para(doc, "B. Non-barbiturate IV anaesthetics:", bold=True, indent=True)
add_bullet(doc, "Propofol (most widely used currently)")
add_bullet(doc, "Etomidate")
add_bullet(doc, "Ketamine (dissociative anaesthetic)")
add_bullet(doc, "Fentanyl, Alfentanil, Remifentanil (opioid anaesthetic adjuncts)")
add_bullet(doc, "Midazolam (BZD used for IV sedation/induction)")

section_break(doc)
add_heading(doc, "HALOTHANE (Prototype Volatile Anaesthetic)", level=2)

add_heading(doc, "Physical & Chemical Properties", level=3)
add_bullet(doc, "Halogenated alkane (fluorinated, chlorinated, brominated)")
add_bullet(doc, "Pleasant, sweet odour; non-irritating to airways")
add_bullet(doc, "Non-flammable and non-explosive")
add_bullet(doc, "MAC (Minimum Alveolar Concentration) = 0.75% (potent anaesthetic)")
add_bullet(doc, "Boiling point 50.2 degC; requires calibrated vaporizer (Fluotec)")
add_bullet(doc, "Blood:gas partition coefficient = 2.4 (intermediate solubility; slower induction than newer agents)")

add_heading(doc, "Mechanism of Action", level=3)
add_para(doc, "The exact mechanism remains unclear but multiple mechanisms are proposed:")
add_bullet(doc, "Enhances inhibitory GABA-A receptor activity (increases Cl- conductance)")
add_bullet(doc, "Inhibits excitatory NMDA (glutamate) receptors")
add_bullet(doc, "Acts on Na+, K+, Ca2+ channels - general membrane stabilization")
add_bullet(doc, "Meyer-Overton correlation: Potency correlates with lipid solubility, suggesting interaction with lipid bilayer of neuronal membranes")
add_bullet(doc, "Specific protein hypothesis: May interact with hydrophobic binding sites on membrane proteins")

add_heading(doc, "Pharmacological Actions", level=3)
add_para(doc, "Stages of anaesthesia (Guedel's stages 1-4):", bold=True)
add_bullet(doc, "Stage 1 (Analgesia): Conscious but pain reduced")
add_bullet(doc, "Stage 2 (Excitement/Delirium): Irregular breathing, vomiting risk - must pass quickly")
add_bullet(doc, "Stage 3 (Surgical anaesthesia): 4 planes - operative surgery is performed in planes 1-3")
add_bullet(doc, "Stage 4 (Medullary depression): Respiratory and cardiovascular collapse - avoid")

add_para(doc, "System-wise effects:", bold=True)
add_bullet(doc, "CNS: Dose-dependent CNS depression; decreases cerebral metabolic rate; increases ICP (cerebral vasodilation) - caution in raised ICP; reduces MAC requirement with adjuvants")
add_bullet(doc, "Cardiovascular: Decreases myocardial contractility (negative inotrope); causes vasodilation and hypotension; sensitizes myocardium to catecholamines (risk of arrhythmias with adrenaline - 'halothane-adrenaline arrhythmias'); reduces heart rate")
add_bullet(doc, "Respiratory: Respiratory depression (dose-dependent); bronchodilator (useful in asthmatics); reduces tidal volume more than rate")
add_bullet(doc, "Skeletal muscle: Good muscle relaxation; potentiates non-depolarizing NMBAs; triggers malignant hyperthermia (with succinylcholine)")
add_bullet(doc, "Uterus: Relaxes uterine smooth muscle (useful in uterine manipulation; risk of postpartum haemorrhage)")
add_bullet(doc, "Liver: Reduces hepatic blood flow; metabolized 20-25% in liver (more than other halogenated agents)")
add_bullet(doc, "Kidney: Reduces renal blood flow and GFR (transient)")

add_heading(doc, "Pharmacokinetics", level=3)
add_bullet(doc, "Absorbed: Via lungs; rapid alveolar uptake")
add_bullet(doc, "Distribution: Highly lipid-soluble; distributes widely")
add_bullet(doc, "Metabolism: 20-25% metabolized in liver by CYP2E1 - produces trifluoroacetic acid (TFA), chloride, bromide ions (responsible for hepatotoxicity)")
add_bullet(doc, "Elimination: 75-80% excreted unchanged via lungs; small amount via urine")

add_heading(doc, "Adverse Effects", level=3)
add_bullet(doc, "Halothane hepatitis (most serious ADR):", bold_prefix="1. ")
add_sub_bullet(doc, "Type 1 (mild): Transient elevation of liver enzymes in ~20% patients (due to reduced hepatic blood flow)")
add_sub_bullet(doc, "Type 2 (massive hepatic necrosis): Rare (1:35,000 - 1:50,000); immune-mediated; TFA from metabolism acts as hapten; characterized by fever, jaundice, eosinophilia 2-5 days after exposure; high mortality (~50%)")
add_sub_bullet(doc, "Risk increased with: Repeated exposures (< 3 months), obesity, middle age, female sex, genetic predisposition")
add_bullet(doc, "Malignant Hyperthermia: Rare but fatal; triggered by halothane + succinylcholine; uncontrolled skeletal muscle Ca2+ release; treat with dantrolene (drug of choice)", bold_prefix="2. ")
add_bullet(doc, "Cardiac arrhythmias: Sensitization of myocardium to catecholamines; avoid adrenaline use with halothane", bold_prefix="3. ")
add_bullet(doc, "Hypotension: Due to negative inotropy + vasodilation", bold_prefix="4. ")
add_bullet(doc, "Shivering: Post-operative (common)", bold_prefix="5. ")
add_bullet(doc, "Increased ICP: Contraindicated in neurosurgery", bold_prefix="6. ")
add_bullet(doc, "Uterine relaxation: Postpartum haemorrhage", bold_prefix="7. ")
add_bullet(doc, "Environmental pollution: Ozone depletion", bold_prefix="8. ")

add_heading(doc, "Contraindications", level=3)
add_bullet(doc, "Previous halothane hepatitis or unexplained jaundice after halothane")
add_bullet(doc, "Repeated halothane anaesthesia within 3 months")
add_bullet(doc, "Family history of malignant hyperthermia")
add_bullet(doc, "Raised intracranial pressure (cerebral tumours, head injury)")
add_bullet(doc, "Pheochromocytoma (catecholamine excess + sensitization = arrhythmias)")

add_para(doc, "Current Status: Largely replaced by sevoflurane and desflurane in developed countries due to hepatotoxicity and cardiac sensitization. Still used in some developing countries due to low cost.", italic=True)

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q2: Adverse Effects of GA
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q2. Adverse Effects of General Anaesthesia During and After Anaesthesia", level=1, color=(0x1F,0x49,0x7D))

add_heading(doc, "I. Adverse Effects DURING Anaesthesia (Intraoperative)", level=2)

add_heading(doc, "A. Cardiovascular Complications", level=3)
add_bullet(doc, "Hypotension: Most common; due to myocardial depression, vasodilation, hypovolemia")
add_bullet(doc, "Cardiac arrhythmias: Halothane + catecholamines; hypoxia; hypercapnia; light anaesthesia during intubation")
add_bullet(doc, "Myocardial ischemia/infarction: In patients with coronary artery disease")
add_bullet(doc, "Cardiac arrest: Due to excessive depth of anaesthesia, hypoxia, or drug overdose")

add_heading(doc, "B. Respiratory Complications", level=3)
add_bullet(doc, "Respiratory depression: Dose-dependent suppression of respiratory centre")
add_bullet(doc, "Airway obstruction: Laryngospasm (most common airway complication during induction)")
add_bullet(doc, "Bronchospasm: Especially with irritant inhalational agents in asthmatics")
add_bullet(doc, "Aspiration of gastric contents (Mendelson's syndrome): Acid pneumonitis; highest risk during induction/intubation in non-fasted patients")
add_bullet(doc, "Hypoxia: From inadequate O2 delivery, diffusion hypoxia (N2O wash-out)")

add_heading(doc, "C. CNS Complications", level=3)
add_bullet(doc, "Awareness under anaesthesia: Patient conscious during surgery; causes psychological trauma")
add_bullet(doc, "Increased ICP: Especially volatile anaesthetics (halothane > isoflurane > sevoflurane)")
add_bullet(doc, "Seizures: Enflurane (epileptogenic at high concentrations)")

add_heading(doc, "D. Other Intraoperative Complications", level=3)
add_bullet(doc, "Malignant hyperthermia: Triggered by volatile agents + succinylcholine; hyperthermia, rigidity, metabolic acidosis; treat with IV dantrolene (2.5 mg/kg)")
add_bullet(doc, "Anaphylaxis/allergy: To IV anaesthetics (thiopentone, neuromuscular blockers), antibiotics, latex")
add_bullet(doc, "Temperature dysregulation: Hypothermia (most common) - especially in prolonged procedures")

add_heading(doc, "II. Adverse Effects AFTER Anaesthesia (Postoperative)", level=2)

add_heading(doc, "A. Respiratory Complications (Most Common Cause of Postop Mortality)", level=3)
add_bullet(doc, "Respiratory depression: Residual effects of anaesthetic agents, opioids; managed with O2, reversal agents")
add_bullet(doc, "Postoperative atelectasis and pneumonia: Due to impaired cough reflex, mucus clearance")
add_bullet(doc, "Pulmonary embolism: Due to DVT, especially after prolonged surgery")

add_heading(doc, "B. Nausea and Vomiting (PONV)", level=3)
add_bullet(doc, "Postoperative nausea and vomiting: 20-30% of patients; increased with opioids, N2O, volatile agents, emetogenic procedures")
add_bullet(doc, "Treatment: Ondansetron (5-HT3 antagonist) - first-line; metoclopramide, dexamethasone, scopolamine patch")

add_heading(doc, "C. Pain", level=3)
add_bullet(doc, "Postoperative pain: Inadequate analgesia leads to delayed mobilization, respiratory complications")
add_bullet(doc, "Managed with: NSAIDs, opioids, regional nerve blocks, multimodal analgesia")

add_heading(doc, "D. Neurological Complications", level=3)
add_bullet(doc, "Postoperative cognitive dysfunction (POCD): Especially in elderly; memory impairment, confusion; may persist weeks to months")
add_bullet(doc, "Emergence delirium/agitation: Especially with ketamine (hallucinations); children after sevoflurane")
add_bullet(doc, "Peripheral nerve injury: Due to positioning (ulnar, brachial plexus, sciatic nerve compression)")

add_heading(doc, "E. Hepatic and Renal Complications", level=3)
add_bullet(doc, "Halothane hepatitis: Delayed (2-5 days postop); jaundice, fever, elevated enzymes")
add_bullet(doc, "Renal impairment: Reduced GFR; fluoride nephrotoxicity (enflurane, methoxyflurane - obsolete)")
add_bullet(doc, "Compound A (sevoflurane + soda lime): Renal tubular toxicity at very high exposures")

add_heading(doc, "F. Other Postoperative Complications", level=3)
add_bullet(doc, "Shivering: Very common (due to hypothermia, volatile agents); treat with meperidine (pethidine)")
add_bullet(doc, "Residual neuromuscular blockade: Weakness, respiratory compromise; reverse with neostigmine + atropine (or sugammadex for rocuronium)")
add_bullet(doc, "Urinary retention: Especially with spinal anaesthesia; opioids")
add_bullet(doc, "Sore throat: From endotracheal tube")
add_bullet(doc, "Corneal abrasion: From inadequate eye protection")

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q3: Pre-anaesthetic Medication
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q3. Short Note on Pre-Anaesthetic Medication (Premedication)", level=1, color=(0x1F,0x49,0x7D))
add_para(doc, "Pre-anaesthetic medication (premedication) refers to drugs given before induction of anaesthesia to achieve specific objectives that facilitate safe and smooth anaesthesia.")

add_heading(doc, "Objectives of Premedication", level=2)
add_bullet(doc, "Allaying anxiety and apprehension")
add_bullet(doc, "Providing sedation and amnesia (anterograde)")
add_bullet(doc, "Reducing secretions (drying effect - antisialagogue)")
add_bullet(doc, "Preventing vagal reflexes (bradycardia, cardiac arrest during intubation)")
add_bullet(doc, "Reducing anaesthetic requirement (opioid analgesics reduce MAC)")
add_bullet(doc, "Reducing acidity and volume of gastric secretions (reducing aspiration risk)")
add_bullet(doc, "Antiemetic prophylaxis")
add_bullet(doc, "Facilitating smooth induction")

add_heading(doc, "Drugs Used in Premedication", level=2)

add_heading(doc, "1. Benzodiazepines (Most widely used)", level=3)
add_bullet(doc, "Diazepam: 5-10 mg oral night before and 1-2 hrs preoperatively; reduces anxiety, sedation, anterograde amnesia")
add_bullet(doc, "Midazolam: 0.05-0.1 mg/kg IV/IM; most popular; faster onset, shorter duration, better anterograde amnesia")
add_bullet(doc, "Lorazepam: Longer duration; useful when prolonged anxiolysis needed")
add_para(doc, "Advantage: Cardiovascular stability, good amnesia, anticonvulsant.", italic=True)

add_heading(doc, "2. Opioid Analgesics", level=3)
add_bullet(doc, "Morphine: 0.1-0.15 mg/kg IM; provides analgesia, sedation; reduces inhalational anaesthetic requirement (MAC reduction)")
add_bullet(doc, "Pethidine (Meperidine): Less emetic than morphine; also causes sedation")
add_bullet(doc, "Fentanyl: Rapid onset; used for IV premedication")
add_para(doc, "Disadvantage: Nausea, vomiting, respiratory depression, pruritus.", italic=True)

add_heading(doc, "3. Anticholinergics (Antisialagogues and Vagolytic agents)", level=3)
add_bullet(doc, "Atropine: 0.6 mg IM/IV; dries secretions, prevents bradycardia during intubation and surgical stimuli; causes tachycardia, dry mouth, mydriasis")
add_bullet(doc, "Hyoscine (Scopolamine): 0.3-0.6 mg IM; superior antisialagogue; more effective sedation and amnesia; antiemetic; may cause post-op confusion in elderly - AVOID in elderly")
add_bullet(doc, "Glycopyrrolate: 0.2 mg IM/IV; does not cross BBB (no CNS effects); preferred in elderly; potent antisialagogue")

add_heading(doc, "4. H2 Blockers / Proton Pump Inhibitors", level=3)
add_bullet(doc, "Ranitidine (150 mg oral, night before), Omeprazole/Pantoprazole: Reduces gastric acidity (pH > 2.5) and volume - minimizes aspiration pneumonitis risk")
add_bullet(doc, "Sodium citrate (30 mL oral): Immediate-acting antacid; given just before emergency surgery")

add_heading(doc, "5. Antiemetics", level=3)
add_bullet(doc, "Ondansetron (4-8 mg IV/oral): 5-HT3 antagonist; reduces PONV")
add_bullet(doc, "Metoclopramide: Prokinetic + antiemetic; enhances gastric emptying")
add_bullet(doc, "Dexamethasone (8 mg IV): Reduces PONV and inflammation")

add_heading(doc, "6. Other Drugs", level=3)
add_bullet(doc, "Clonidine: Alpha-2 agonist; reduces anxiety, reduces intraoperative opioid requirements, reduces blood pressure, analgesia")
add_bullet(doc, "Dexmedetomidine: Highly selective alpha-2 agonist; sedation without respiratory depression")
add_bullet(doc, "Promethazine: Antihistamine; provides sedation + antiemetic effects")

add_heading(doc, "Route and Timing", level=3)
add_bullet(doc, "Oral premedication: Usually given 1-2 hours before surgery")
add_bullet(doc, "IM premedication: 45-60 minutes before surgery")
add_bullet(doc, "IV premedication: Given in anaesthetic room, 5-15 minutes before induction")

add_para(doc, "Note: Routine use of atropine is declining; midazolam has largely replaced diazepam and morphine as preferred premedicant due to short duration and better amnesia.", italic=True)

page_break(doc)

# ───────────────────────────────────────────────────────────────────────────
# Q4: IV Anaesthetics + Propofol
# ───────────────────────────────────────────────────────────────────────────
add_heading(doc, "Q4. What Are Intravenous Anaesthetics? Pharmacology of Propofol", level=1, color=(0x1F,0x49,0x7D))

add_heading(doc, "Intravenous (IV) Anaesthetics", level=2)
add_para(doc, "IV anaesthetics are drugs administered intravenously that rapidly produce loss of consciousness (anaesthetic induction) without the need for inhalation. They are used for:")
add_bullet(doc, "Induction of general anaesthesia (before maintenance with inhalational agents)")
add_bullet(doc, "Total intravenous anaesthesia (TIVA) - propofol-based")
add_bullet(doc, "Short surgical procedures not requiring skeletal muscle relaxation")
add_bullet(doc, "Procedural sedation and sedation in ICU")
add_bullet(doc, "Supplement to regional anaesthesia")

add_para(doc, "Classification of IV Anaesthetics:", bold=True)
add_bullet(doc, "Barbiturates: Thiopentone sodium (prototype), Methohexitone")
add_bullet(doc, "Non-barbiturates:")
add_sub_bullet(doc, "Propofol (2,6-diisopropylphenol)")
add_sub_bullet(doc, "Etomidate (imidazole derivative)")
add_sub_bullet(doc, "Ketamine (phencyclidine derivative - dissociative anaesthetic)")
add_sub_bullet(doc, "Midazolam (BZD - used for sedation and induction)")

section_break(doc)
add_heading(doc, "PROPOFOL (2,6-diisopropylphenol)", level=2)

add_heading(doc, "Physical Properties", level=3)
add_bullet(doc, "Formulated as 1% or 2% white oil-in-water emulsion (soybean oil, egg lecithin, glycerol)")
add_bullet(doc, "Insoluble in water; milky white appearance ('milk of anaesthesia')")
add_bullet(doc, "Commercially available as Diprivan (originator brand)")
add_bullet(doc, "Must be used within 6 hours of opening (supports bacterial growth - strict asepsis required)")

add_heading(doc, "Mechanism of Action", level=3)
add_bullet(doc, "Primary mechanism: Potentiates GABA-A receptor activity - increases duration of Cl- channel opening (like barbiturates)")
add_bullet(doc, "Also inhibits NMDA glutamate receptors")
add_bullet(doc, "Inhibits endocannabinoid reuptake (antiemetic component)")
add_bullet(doc, "At subanesthetic doses: Sedation and anxiolysis via GABA-A potentiation")

add_heading(doc, "Pharmacokinetics", level=3)
add_bullet(doc, "Route: IV only (intra-arterial causes gangrene; not IM)")
add_bullet(doc, "Onset: Rapid - loss of consciousness in 30-60 seconds (one arm-brain circulation time)")
add_bullet(doc, "Duration: Short - 5-10 minutes after single bolus dose (due to rapid redistribution)")
add_bullet(doc, "Distribution: Highly lipophilic; rapidly distributed to brain and other tissues; Vd = 60-700 L/kg; crosses placenta")
add_bullet(doc, "Protein binding: 97-99%")
add_bullet(doc, "Metabolism: Rapid hepatic conjugation + extrahepatic metabolism (lungs, kidneys); metabolites inactive; does NOT accumulate with infusions (context-sensitive half-time is short)")
add_bullet(doc, "Elimination: t1/2 alpha = 2-4 min (redistribution); terminal t1/2 = 1-3 days; metabolites excreted in urine")

add_heading(doc, "Pharmacological Actions", level=3)
add_bullet(doc, "CNS: Rapid unconsciousness; dose-dependent CNS depression; antiemetic at subanesthetic doses (unique advantage); reduces ICP and CMRO2 (cerebral metabolic rate); reduces intraocular pressure; no analgesia")
add_bullet(doc, "Cardiovascular: Significant decrease in BP (vasodilation + mild negative inotropy); reflex tachycardia blunted; more hypotension than thiopentone - require careful dosing in elderly/hypovolemic patients")
add_bullet(doc, "Respiratory: Dose-dependent respiratory depression; apnoea on induction (brief); suppresses laryngeal reflexes (allows LMA insertion without NMBAs)")
add_bullet(doc, "Other: Antiemetic; antioxidant properties; antipruritics (useful for opioid-induced pruritus); bronchodilation (mild)")

add_heading(doc, "Clinical Uses", level=3)
add_bullet(doc, "Induction of GA: 1.5-2.5 mg/kg IV (elderly: 1-1.5 mg/kg); titrate slowly", bold_prefix="1. ")
add_bullet(doc, "Maintenance of anaesthesia (TIVA): 4-12 mg/kg/hr by infusion; preferred for day-care surgery", bold_prefix="2. ")
add_bullet(doc, "ICU sedation: 0.3-4 mg/kg/hr infusion for mechanically ventilated patients", bold_prefix="3. ")
add_bullet(doc, "Procedural sedation: Endoscopy, colonoscopy, cardioversion", bold_prefix="4. ")
add_bullet(doc, "Day-care surgery: Drug of choice due to rapid, clear-headed recovery and antiemetic effect", bold_prefix="5. ")
add_bullet(doc, "Antiemetic: 10-20 mg IV for PONV rescue", bold_prefix="6. ")

add_heading(doc, "Adverse Effects", level=3)
add_bullet(doc, "Pain on injection (most common; 40-70%): Burning sensation at injection site; reduce by prior IV lignocaine (1-2 mL of 1%) or using antecubital vein")
add_bullet(doc, "Hypotension and apnoea on induction (clinically significant)")
add_bullet(doc, "Propofol infusion syndrome (PRIS): Rare but fatal; occurs with high-dose, prolonged infusions (>48 hrs, >4 mg/kg/hr); features: severe metabolic acidosis, rhabdomyolysis, cardiac failure, renal failure, lipaemia")
add_bullet(doc, "Involuntary muscle movements and excitatory phenomena during induction")
add_bullet(doc, "Anaphylaxis: Rare; caution in egg/soy allergy")
add_bullet(doc, "Hallucinations, erotic dreams (occasionally)")
add_bullet(doc, "Propofol not suitable for prolonged use in children (risk of PRIS) - FDA warning")

add_heading(doc, "Contraindications", level=3)
add_bullet(doc, "Known hypersensitivity to propofol, soya, or egg (relative - older formulations)")
add_bullet(doc, "Severe cardiovascular compromise/shock (causes marked hypotension)")
add_bullet(doc, "Children < 3 years (for ICU sedation) - PRIS risk")
add_bullet(doc, "Fat embolism syndrome (lipid emulsion vehicle)")

add_heading(doc, "Advantages over Thiopentone", level=3)
add_bullet(doc, "Rapid and complete recovery (clear-headed)")
add_bullet(doc, "Antiemetic properties - less PONV")
add_bullet(doc, "Short context-sensitive half-time - suitable for infusion/TIVA")
add_bullet(doc, "Reduces ICP")
add_bullet(doc, "Suitable for day-care and ambulatory surgery")

# Save
output_path = "/tmp/workspace/pharmacology-assignment/Pharmacology_Assignment_KDT8.docx"
doc.save(output_path)
print(f"Document saved to: {output_path}")
print("Done!")
Running Command

cd /tmp/workspace/pharmacology-assignment && python3 generate_assignment.py

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/pharmacology-assignment/Pharmacology_Assignment_KDT8.docx') count = 0 for p in doc.paragraphs: if p.text.strip(): count += 1 print(f'Total non-empty paragraphs: {count}') # Check page breaks breaks = 0 for p in doc.paragraphs: for run in p.runs: if '<w:lastRenderedPageBreak' in run._r.xml or 'pageBreak' in run._r.xml: breaks += 1 print(f'Approximate page breaks in runs: {breaks}') import os size = os.path.getsize('/tmp/workspace/pharmacology-assignment/Pharmacology_Assignment_KDT8.docx') print(f'File size: {size} bytes ({size/1024:.1f} KB)') "

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/pharmacology-assignment/Pharmacology_Assignment_KDT8.docx') # Print first 30 headings/bold paras to verify structure shown = 0 for p in doc.paragraphs: if p.style.name.startswith('Heading') and p.text.strip(): print(f'[{p.style.name}] {p.text[:80]}') shown += 1 if shown >= 40: break "

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/pharmacology-assignment/Pharmacology_Assignment_KDT8.docx') shown = 0 found_second = False for p in doc.paragraphs: if '21/07/2026' in p.text or 'General Anaesthetics' in p.text: found_second = True if found_second and p.style.name.startswith('Heading') and p.text.strip(): print(f'[{p.style.name}] {p.text[:90]}') shown += 1 if shown >= 30: break "

Your assignment document is ready for download:

Pharmacology Assignment KDT8

Word Document · DOCX


Here is a full summary of what is covered in each question, based on KDT 8th Edition content:

ASSIGNMENT 1 - 17/07/2026: Sedative Hypnotics & Antiepileptic Drugs

Q1. Classify AEDs + Phenytoin
  • Classification into Traditional AEDs (phenytoin, carbamazepine, phenobarbitone, valproate, ethosuximide) and Newer AEDs (lamotrigine, gabapentin, levetiracetam, topiramate, etc.)
  • Phenytoin MOA: Use-dependent Na+ channel blockade (prolongs inactivated state) - stops high-frequency repetitive neuronal firing
  • Therapeutic uses: GTCS, partial seizures, status epilepticus, digitalis arrhythmias, trigeminal neuralgia (2nd line)
  • ADRs: Nystagmus (earliest), ataxia, gingival hyperplasia (most characteristic - 20-30%), megaloblastic anaemia (folate deficiency), osteomalacia, hirsutism, fetal hydantoin syndrome, zero-order kinetics hazard, purple glove syndrome (IV)
Q2. Newer AEDs
  • 8 newer agents covered: Lamotrigine (Na+ block + anti-glutamate), Gabapentin (alpha-2-delta Ca2+ subunit), Topiramate (multiple MOA - "Dope-a-max"), Levetiracetam (SV2A binding - unique MOA), Oxcarbazepine (MHD active metabolite), Vigabatrin (GABA-transaminase inhibitor - visual field defects), Pregabalin, Lacosamide
Q3. Classify Sedative-Hypnotics + Diazepam
  • Classification: BZDs (long/intermediate/short-acting), Barbiturates, Z-drugs, Miscellaneous
  • Diazepam: GABA-A receptor BZD site agonist - increases Cl- channel opening FREQUENCY
  • Full coverage: MOA, pharmacological actions (anxiolytic, hypnotic, anticonvulsant, muscle relaxant, amnesic), pharmacokinetics, ADRs, all clinical uses/indications, contraindications, antidote (flumazenil)
Q4. Non-Benzodiazepine Hypnotics
  • Z-drugs: Zolpidem (selective BZD-1/omega-1 agonist, complex sleep behaviors), Zaleplon (ultrashort t1/2), Zopiclone/Eszopiclone (bitter taste)
  • Others: Ramelteon (MT1/MT2 melatonin agonist - no abuse potential), Suvorexant (dual orexin receptor antagonist), Chloral hydrate
Q5. Barbiturate Poisoning Management
  • Stages of CNS depression (1-4)
  • Treatment: (I) Supportive - ABC, intubation, IV fluids, vasopressors (II) Prevent absorption - gastric lavage, activated charcoal (MDAC for phenobarbitone) (III) Enhance elimination - forced alkaline diuresis (phenobarbitone), haemodialysis/haemoperfusion (IV) No specific antidote; analeptics are CONTRAINDICATED

ASSIGNMENT 2 - 21/07/2026: General Anaesthetics

Q1. Classify GA + Halothane
  • Classification: Inhalational (volatile liquids: halothane, isoflurane, sevoflurane, desflurane; gases: N2O) and IV anaesthetics (barbiturate and non-barbiturate)
  • Halothane: Prototype volatile anaesthetic; MAC 0.75%; blood:gas 2.4; 20-25% hepatic metabolism
  • MOA: GABA-A enhancement, NMDA inhibition, lipid membrane/protein interaction
  • ADRs: Halothane hepatitis (Type 1 transient, Type 2 immune-mediated massive necrosis 1:35,000), malignant hyperthermia, catecholamine sensitization, raised ICP, uterine relaxation
  • Contraindications: Prior halothane hepatitis, repeat use <3 months, MH history, raised ICP
Q2. Adverse Effects of GA
  • Intraoperative: Hypotension, arrhythmias, laryngospasm, bronchospasm, aspiration (Mendelson's syndrome), awareness under anaesthesia, malignant hyperthermia
  • Postoperative: PONV (20-30%), respiratory depression/atelectasis, POCD (elderly), residual NMB, shivering (treat with pethidine), halothane hepatitis (2-5 days post-op), propofol infusion syndrome
Q3. Pre-Anaesthetic Medication
  • Objectives: Anxiolysis, sedation, amnesia, antisialagogue, vagolytic, reduce gastric acid, antiemesis
  • Drugs: Benzodiazepines (midazolam - most popular), Opioids (morphine, pethidine), Anticholinergics (atropine, hyoscine, glycopyrrolate), H2 blockers/PPIs (ranitidine, omeprazole), Antiemetics (ondansetron, dexamethasone), Clonidine/dexmedetomidine
Q4. IV Anaesthetics + Propofol
  • Propofol ("milk of anaesthesia"): 2,6-diisopropylphenol in lipid emulsion
  • MOA: GABA-A potentiation (increases Cl- channel DURATION), NMDA inhibition
  • Unique advantages: Antiemetic, rapid clear-headed recovery, short context-sensitive half-time - ideal for day-care/TIVA/ICU
  • Key ADR: Pain on injection (40-70%; prevent with lignocaine pretreatment); Propofol infusion syndrome (PRIS) - fatal with high-dose prolonged infusion
  • DOC for day-care surgery; better PONV profile than thiopentone
This is a shared conversation. Sign in to Orris to start your own chat.