Commonly used anesthetic drugs with DOSE(10 DRUGS)

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
I now have sufficient data from Miller's Anesthesia and Morgan & Mikhail's Clinical Anesthesiology to compile a comprehensive answer. Let me put together the full reference table.

10 Commonly Used Anesthetic Drugs with Doses

Below is a summary of 10 key anesthetic drugs drawn from Miller's Anesthesia (10th ed.) and Morgan & Mikhail's Clinical Anesthesiology (7th ed.), organized by drug class.

I. Intravenous Induction Agents

1. Propofol

  • Class: Alkylphenol IV hypnotic
  • Mechanism: GABA-A receptor potentiation
  • Induction: 1-2.5 mg/kg IV (healthy adult); reduce to 1-1.75 mg/kg in elderly (>60 years)
  • Maintenance: 100-200 mcg/kg/min IV infusion
  • Pediatric induction: 2-3 mg/kg IV (ED95)
  • Notes: Dose must be reduced in elderly/sick patients (ASA III-IV). Causes apnea on induction. Rapid recovery makes it ideal for TIVA and day surgery.
  • Miller's Anesthesia, p. 2484-2485

2. Thiopental (Sodium Thiopentone)

  • Class: Oxybarbiturate
  • Mechanism: GABA-A receptor potentiation; NMDA antagonism
  • Induction: 3-5 mg/kg IV (standard adult); usual dose 3-4 mg/kg
  • ED50: 2.2-2.7 mg/kg
  • Onset: 15-30 seconds
  • Notes: Dose halved in elderly, hypovolemia, or cardiac patients. Context-sensitive half-time increases significantly with repeated dosing. No analgesic properties.
  • Miller's Anesthesia, p. 2497-2511

3. Ketamine

  • Class: Phencyclidine derivative; dissociative anesthetic
  • Mechanism: NMDA receptor antagonist
  • Induction (IV): 1-2 mg/kg IV (general); up to 4.5 mg/kg IV in neonates/cardiovascular instability
  • Induction (IM): 6.5-13 mg/kg IM
  • Analgesic/sub-dissociative: 0.1-0.5 mg/kg IV
  • Maintenance infusion: 0.01-0.05 mg/kg/min IV
  • Notes: Produces "dissociative anesthesia" - eyes remain open with nystagmus. Preserves airway reflexes and cardiovascular tone. Associated with emergence delirium at higher doses.
  • Miller's Anesthesia; Katzung's Pharmacology 16th ed.

4. Etomidate

  • Class: Imidazole-derived hypnotic
  • Mechanism: GABA-A receptor potentiation
  • Induction: 0.2-0.3 mg/kg IV
  • Notes: Cardiovascular stability makes it preferred in hemodynamically unstable patients. Causes adrenocortical suppression (inhibits 11-beta hydroxylase) - avoid prolonged infusions. Pain on injection; myoclonus common.
  • Morgan & Mikhail's Clinical Anesthesiology 7th ed.

5. Midazolam

  • Class: Benzodiazepine
  • Mechanism: GABA-A receptor potentiation (at benzodiazepine binding site)
  • Premedication: 0.02-0.05 mg/kg IV (1-5 mg IV in adults)
  • Sedation: 0.5-2 mg IV titrated
  • Induction (adjunct/co-induction): 0.1-0.2 mg/kg IV (reduces propofol requirement by ~30%)
  • Notes: Produces anxiolysis, amnesia, and sedation. Not analgesic. Reversal agent: Flumazenil.
  • Miller's Anesthesia (co-induction data)

II. Opioid Analgesics

6. Fentanyl

  • Class: Synthetic opioid (phenylpiperidine)
  • Mechanism: Mu-opioid receptor agonist
  • Intraoperative analgesia: 1-2 mcg/kg IV bolus
  • Balanced anesthesia supplement: 2-20 mcg/kg IV
  • High-dose cardiac anesthesia: 50-100 mcg/kg IV
  • Maintenance infusion: 0.5-5 mcg/kg/hr
  • Notes: 100x more potent than morphine. Causes chest wall rigidity at large bolus doses. Minimal histamine release.
  • Morgan & Mikhail's Clinical Anesthesiology 7th ed., Table 10-3

7. Morphine

  • Class: Natural opioid alkaloid
  • Mechanism: Mu-opioid receptor agonist
  • Premedication: 0.05-0.1 mg/kg IM/IV
  • Intraoperative: 0.1-1 mg/kg IV (titrated)
  • Postoperative analgesia: 0.05-0.1 mg/kg IV q3-4h PRN
  • Notes: Histamine release with rapid IV bolus; avoid in asthma. Active metabolite (morphine-6-glucuronide) accumulates in renal failure.
  • Morgan & Mikhail's Clinical Anesthesiology 7th ed., Table 10-3

8. Remifentanil

  • Class: Ultra-short-acting opioid (esterase-metabolized)
  • Mechanism: Mu-opioid receptor agonist
  • Induction adjunct (loading): 0.5-1 mcg/kg IV over 30-60 seconds
  • Maintenance infusion: 0.05-2 mcg/kg/min
  • Postoperative analgesia: 0.025-0.2 mcg/kg/min (lower range)
  • Notes: Metabolized by non-specific plasma and tissue esterases; context-insensitive half-life ~3-5 min. Requires analgesia plan at emergence as effect disappears instantly.
  • Morgan & Mikhail's Clinical Anesthesiology 7th ed., Table 10-3

III. Neuromuscular Blocking Agents

9. Succinylcholine (Suxamethonium)

  • Class: Depolarizing neuromuscular blocker
  • Mechanism: Persistent nicotinic ACh receptor activation
  • Intubation dose: 1-1.5 mg/kg IV
  • Pediatric dose: 2 mg/kg IV
  • IM (when no IV access): 4 mg/kg (max 150 mg)
  • Onset: 45-60 seconds; Duration: 10-12 min (ultra-short)
  • Notes: Drug of choice for rapid-sequence intubation (RSI) and management of laryngospasm. Contraindicated in hyperkalemic states, burns (>24 hrs), crush injuries, malignant hyperthermia susceptibility.
  • Morgan & Mikhail's Clinical Anesthesiology 7th ed.

10. Rocuronium

  • Class: Non-depolarizing neuromuscular blocker (aminosteroid)
  • Mechanism: Competitive nicotinic ACh receptor antagonism
  • Standard intubation: 0.6 mg/kg IV (onset 60-90 sec)
  • RSI dose: 0.9-1.2 mg/kg IV (onset approaches succinylcholine at ~60 sec)
  • Maintenance: 0.1-0.2 mg/kg IV bolus PRN
  • Notes: Reversal with sugammadex (2-16 mg/kg depending on depth of block). At 1.2 mg/kg, recovery faster with sugammadex than spontaneous recovery from succinylcholine. No histamine release; no cardiac muscarinic effects.
  • Miller's Anesthesia 10th ed.; Morgan & Mikhail 7th ed.

Quick Reference Summary Table

#DrugClassRouteInduction DoseKey Note
1PropofolIV hypnoticIV1-2.5 mg/kgReduce in elderly
2ThiopentalBarbiturateIV3-5 mg/kgOnset 15-30 sec
3KetamineDissociativeIV/IM1-2 mg/kg IV; 6.5-13 mg/kg IMPreserves airway
4EtomidateImidazoleIV0.2-0.3 mg/kgBest CV stability
5MidazolamBenzodiazepineIV0.02-0.1 mg/kgAmnesic/co-induction
6FentanylOpioidIV1-2 mcg/kg (analgesia)100x morphine potency
7MorphineOpioidIV/IM0.05-0.1 mg/kgHistamine risk
8RemifentanilUltra-short opioidIV infusion0.5-1 mcg/kg loadContext-insensitive
9SuccinylcholineDepolarizing NMBIV1-1.5 mg/kgRSI drug of choice
10RocuroniumNon-depolarizing NMBIV0.6-1.2 mg/kgReversible with sugammadex
Sources: Miller's Anesthesia, 10th Edition | Morgan & Mikhail's Clinical Anesthesiology, 7th Edition | Barash's Clinical Anesthesia, 9th Edition
Clinical note: All induction doses should be titrated based on patient age, weight, ASA status, premedication, and hemodynamic state. Elderly and hemodynamically compromised patients require significant dose reductions (often 50%).

Create a quick reference PDF card with this dosing table for the OR

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"

Writing File

~/anesthesia-card/generate_card.py

#!/usr/bin/env python3
"""
Anesthesia Quick Reference Card - PDF Generator
Uses reportlab for a clean, OR-ready card layout (A4 landscape)
"""

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

OUTPUT_PATH = "/home/daytona/workspace/anesthesia-card/Anesthesia_Drug_Reference_Card.pdf"
os.makedirs(os.path.dirname(OUTPUT_PATH), exist_ok=True)

# ── Colour palette ────────────────────────────────────────────────────────────
NAVY       = colors.HexColor("#0A2342")
TEAL       = colors.HexColor("#0D7377")
LIGHT_TEAL = colors.HexColor("#E8F7F7")
AMBER      = colors.HexColor("#F0A500")
RED_WARN   = colors.HexColor("#C0392B")
BLUE_MILD  = colors.HexColor("#D6EAF8")
GREEN_MLD  = colors.HexColor("#D5F5E3")
PURPLE_MLD = colors.HexColor("#E8DAEF")
WHITE      = colors.white
LIGHT_GRAY = colors.HexColor("#F4F6F6")
MID_GRAY   = colors.HexColor("#BDC3C7")
DARK_GRAY  = colors.HexColor("#2C3E50")

PAGE_W, PAGE_H = landscape(A4)  # 297 x 210 mm

doc = SimpleDocTemplate(
    OUTPUT_PATH,
    pagesize=landscape(A4),
    leftMargin=10*mm, rightMargin=10*mm,
    topMargin=8*mm, bottomMargin=8*mm,
)

# ── Styles ────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

title_style = ParagraphStyle(
    "CardTitle",
    fontName="Helvetica-Bold",
    fontSize=16,
    textColor=WHITE,
    alignment=TA_CENTER,
    spaceAfter=0,
)
subtitle_style = ParagraphStyle(
    "CardSubtitle",
    fontName="Helvetica",
    fontSize=8,
    textColor=colors.HexColor("#AED6F1"),
    alignment=TA_CENTER,
    spaceAfter=0,
)
section_style = ParagraphStyle(
    "Section",
    fontName="Helvetica-Bold",
    fontSize=8,
    textColor=WHITE,
    alignment=TA_CENTER,
)
cell_style = ParagraphStyle(
    "Cell",
    fontName="Helvetica",
    fontSize=7.2,
    textColor=DARK_GRAY,
    leading=9,
)
cell_bold = ParagraphStyle(
    "CellBold",
    fontName="Helvetica-Bold",
    fontSize=7.5,
    textColor=DARK_GRAY,
    leading=10,
)
warn_style = ParagraphStyle(
    "Warn",
    fontName="Helvetica-Oblique",
    fontSize=6.5,
    textColor=RED_WARN,
    leading=8,
)
note_style = ParagraphStyle(
    "Note",
    fontName="Helvetica",
    fontSize=6.2,
    textColor=colors.HexColor("#555555"),
    leading=8,
    alignment=TA_CENTER,
)

def P(text, style=cell_style):
    return Paragraph(text, style)

def header_block():
    """Blue banner header"""
    header_data = [[
        P("<b>🔵  ANESTHESIA QUICK REFERENCE CARD  🔵</b>", title_style),
    ]]
    t = Table(header_data, colWidths=[PAGE_W - 20*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND",  (0,0), (-1,-1), NAVY),
        ("TOPPADDING",  (0,0), (-1,-1), 6),
        ("BOTTOMPADDING",(0,0),(-1,-1), 4),
        ("LEFTPADDING", (0,0), (-1,-1), 8),
        ("RIGHTPADDING",(0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return t

def sub_banner(text, bg=TEAL):
    row = [[P(f"<b>{text}</b>", section_style)]]
    t = Table(row, colWidths=[PAGE_W - 20*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,-1), bg),
        ("TOPPADDING",    (0,0),(-1,-1), 3),
        ("BOTTOMPADDING", (0,0),(-1,-1), 3),
        ("LEFTPADDING",   (0,0),(-1,-1), 6),
    ]))
    return t

# ── Main drug table ───────────────────────────────────────────────────────────

COL_DRUG    = 28*mm
COL_CLASS   = 32*mm
COL_ROUTE   = 14*mm
COL_IND     = 38*mm
COL_MAINT   = 42*mm
COL_ONSET   = 18*mm
COL_NOTES   = 72*mm   # fill remaining

TOTAL = COL_DRUG + COL_CLASS + COL_ROUTE + COL_IND + COL_MAINT + COL_ONSET + COL_NOTES
# should ≈ 244mm; PAGE_W - margins = 297-20 = 277mm; we can expand notes

COL_NOTES_ADJ = (PAGE_W - 20*mm) - (COL_DRUG + COL_CLASS + COL_ROUTE + COL_IND + COL_MAINT + COL_ONSET)

header_row = [
    P("<b>Drug</b>", cell_bold),
    P("<b>Class</b>", cell_bold),
    P("<b>Route</b>", cell_bold),
    P("<b>Induction / Bolus Dose</b>", cell_bold),
    P("<b>Maintenance Dose</b>", cell_bold),
    P("<b>Onset</b>", cell_bold),
    P("<b>Key Notes / Warnings</b>", cell_bold),
]

# Row data: [drug, class, route, induction_dose, maintenance, onset, notes]
# Colours: None=white, 'blue', 'green', 'purple', 'amber'

rows_data = [
    # ── IV INDUCTION AGENTS ──────────────────────────────────
    {
        "group_header": "IV INDUCTION AGENTS",
        "bg_header": TEAL,
    },
    {
        "drug": "Propofol",
        "class_": "Alkylphenol\nIV Hypnotic",
        "route": "IV",
        "induction": "1–2.5 mg/kg IV\nElderly: 1–1.75 mg/kg\nPeds (ED95): 2–3 mg/kg",
        "maint": "100–200 mcg/kg/min\ninfusion (TIVA)",
        "onset": "30–60 sec",
        "notes": "↓ dose in elderly/ASA III-IV. Causes apnoea on induction. Pain on injection. Anti-emetic at sub-hypnotic doses. Co-induction with midazolam reduces requirement by ~30%.",
        "row_bg": LIGHT_GRAY,
        "warn": "",
    },
    {
        "drug": "Thiopental\n(Thiopentone)",
        "class_": "Oxybarbiturate",
        "route": "IV",
        "induction": "3–5 mg/kg IV\n(ED50: 2.2–2.7 mg/kg)\nElderly: halve dose",
        "maint": "50–100 mcg/kg/min\n(not preferred)",
        "onset": "15–30 sec",
        "notes": "NO analgesic effect. Accumulates with repeat dosing. Preferred for ECT (with methohexital). Avoid in porphyria. ↓ ICP — use in neurosurgery.",
        "row_bg": WHITE,
        "warn": "⚠ Contraindicated in porphyria",
    },
    {
        "drug": "Ketamine",
        "class_": "Dissociative\nAnesthetic\n(NMDA Antag.)",
        "route": "IV / IM",
        "induction": "IV: 1–2 mg/kg\nIM: 6.5–13 mg/kg\nNeonates/CVS: 4–7 mg/kg IV",
        "maint": "0.01–0.05 mg/kg/min\nSub-dissoc: 0.1–0.5 mg/kg",
        "onset": "IV: 30–60 sec\nIM: 3–5 min",
        "notes": "Preserves airway reflexes & BP. Bronchodilator — ideal in asthma/haemodynamic instability. Causes emergence delirium (pre-treat with midazolam). ↑ secretions — give glycopyrrolate.",
        "row_bg": LIGHT_GRAY,
        "warn": "",
    },
    {
        "drug": "Etomidate",
        "class_": "Imidazole\nIV Hypnotic",
        "route": "IV",
        "induction": "0.2–0.3 mg/kg IV",
        "maint": "Not recommended\nfor infusion",
        "onset": "30–60 sec",
        "notes": "Best cardiovascular stability of all IV induction agents. Inhibits 11-β-hydroxylase → adrenocortical suppression. Causes myoclonus & pain on injection. Avoid prolonged infusion.",
        "row_bg": WHITE,
        "warn": "⚠ Single bolus only — adrenal suppression risk with infusion",
    },
    # ── BENZODIAZEPINES ──────────────────────────────────────
    {
        "group_header": "BENZODIAZEPINE",
        "bg_header": colors.HexColor("#1A5276"),
    },
    {
        "drug": "Midazolam",
        "class_": "Benzodiazepine\n(GABA-A agonist)",
        "route": "IV / IM\n/ PO",
        "induction": "Co-induction: 0.05–0.1 mg/kg IV\nPremed: 0.02–0.05 mg/kg IV\nSedation: 0.5–2 mg titrated",
        "maint": "0.02–0.1 mg/kg/hr\ninfusion (ICU)",
        "onset": "IV: 1–2 min\nIM: 5–10 min",
        "notes": "Anxiolytic, amnesic, anticonvulsant. NO analgesia. Reduces propofol induction dose by ~30%. Reversal: Flumazenil 0.2 mg IV (repeat q1 min, max 1 mg).",
        "row_bg": BLUE_MILD,
        "warn": "",
    },
    # ── OPIOIDS ──────────────────────────────────────────────
    {
        "group_header": "OPIOID ANALGESICS",
        "bg_header": colors.HexColor("#1E8449"),
    },
    {
        "drug": "Fentanyl",
        "class_": "Synthetic\nOpioid\n(μ-agonist)",
        "route": "IV",
        "induction": "Analgesia: 1–2 mcg/kg IV\nBalanced anaes: 2–20 mcg/kg\nCardiac: 50–100 mcg/kg",
        "maint": "0.5–5 mcg/kg/hr\ninfusion",
        "onset": "1–2 min",
        "notes": "100× more potent than morphine. Minimal histamine. Chest wall rigidity at large rapid bolus. Duration 30–60 min. Transdermal patch available for chronic pain.",
        "row_bg": GREEN_MLD,
        "warn": "",
    },
    {
        "drug": "Morphine",
        "class_": "Natural\nOpioid Alkaloid\n(μ-agonist)",
        "route": "IV / IM\n/ SC",
        "induction": "0.05–0.1 mg/kg IV\nPostop pain: 2–5 mg IV\nq3–4h PRN",
        "maint": "0.01–0.04 mg/kg/hr\ninfusion",
        "onset": "IV: 5–10 min\nIM: 15–30 min",
        "notes": "Histamine release — give slowly. Active metabolite (M6G) accumulates in renal failure. ↑ nausea. Reversal: Naloxone 0.04–0.4 mg IV titrated.",
        "row_bg": LIGHT_GRAY,
        "warn": "⚠ Reduce dose in renal failure (M6G accumulation)",
    },
    {
        "drug": "Remifentanil",
        "class_": "Ultra-short\nOpioid\n(esterase metab.)",
        "route": "IV infusion\nonly",
        "induction": "Loading: 0.5–1 mcg/kg\nover 30–60 sec",
        "maint": "0.05–2 mcg/kg/min\ninfusion",
        "onset": "< 1 min",
        "notes": "Context-insensitive t½ ~3–5 min. Metabolised by plasma esterases — safe in renal/hepatic failure. Plan multimodal analgesia BEFORE stopping — NO residual effect at extubation.",
        "row_bg": GREEN_MLD,
        "warn": "⚠ Plan post-op analgesia before emergence — effect disappears instantly",
    },
    # ── NMBAs ─────────────────────────────────────────────────
    {
        "group_header": "NEUROMUSCULAR BLOCKING AGENTS (NMBAs)",
        "bg_header": colors.HexColor("#6C3483"),
    },
    {
        "drug": "Succinylcholine\n(Suxamethonium)",
        "class_": "Depolarizing\nNMBA",
        "route": "IV / IM",
        "induction": "RSI: 1–1.5 mg/kg IV\nPeds: 2 mg/kg IV\nIM (no IV): 4 mg/kg (max 150 mg)",
        "maint": "NOT used for\nmaintenance",
        "onset": "45–60 sec",
        "notes": "Drug of choice for RSI & laryngospasm. Duration ~10–12 min. ↑ K⁺ risk in burns >24h, crush injury, denervation, myopathies. Triggers malignant hyperthermia in susceptible pts.",
        "row_bg": PURPLE_MLD,
        "warn": "⚠ Contraindicated: hyperkalaemia, burns >24h, MH susceptibility, myopathies",
    },
    {
        "drug": "Rocuronium",
        "class_": "Non-depolarizing\nNMBA\n(Aminosteroid)",
        "route": "IV",
        "induction": "Standard intubation: 0.6 mg/kg\nRSI dose: 0.9–1.2 mg/kg\n(onset ≈ suxamethonium)",
        "maint": "0.1–0.2 mg/kg IV\nbolus PRN",
        "onset": "0.6 mg/kg: ~90 sec\n1.2 mg/kg: ~60 sec",
        "notes": "No histamine release. No cardiac muscarinic effects. Fully reversible with Sugammadex: moderate block 2 mg/kg, deep block 4 mg/kg, immediate reversal 16 mg/kg IV.",
        "row_bg": LIGHT_GRAY,
        "warn": "",
    },
]

# ── Build table rows ──────────────────────────────────────────────────────────

col_widths = [COL_DRUG, COL_CLASS, COL_ROUTE, COL_IND, COL_MAINT, COL_ONSET, COL_NOTES_ADJ]

table_rows = [header_row]
table_style_cmds = [
    # Header row
    ("BACKGROUND",    (0, 0), (-1, 0), NAVY),
    ("TEXTCOLOR",     (0, 0), (-1, 0), WHITE),
    ("FONTNAME",      (0, 0), (-1, 0), "Helvetica-Bold"),
    ("FONTSIZE",      (0, 0), (-1, 0), 8),
    ("ALIGN",         (0, 0), (-1, 0), "CENTER"),
    ("VALIGN",        (0, 0), (-1,-1), "MIDDLE"),
    ("ROWBACKGROUND", (0, 0), (-1, 0), NAVY),
    ("GRID",          (0, 0), (-1,-1), 0.4, MID_GRAY),
    ("TOPPADDING",    (0, 0), (-1,-1), 3),
    ("BOTTOMPADDING", (0, 0), (-1,-1), 3),
    ("LEFTPADDING",   (0, 0), (-1,-1), 4),
    ("RIGHTPADDING",  (0, 0), (-1,-1), 4),
]

row_idx = 1  # 0 = header

for item in rows_data:
    if "group_header" in item:
        # Section separator row (spans all columns)
        table_rows.append([
            P(f"<b>  ▶  {item['group_header']}</b>", section_style),
            "", "", "", "", "", ""
        ])
        table_style_cmds += [
            ("SPAN",       (0, row_idx), (-1, row_idx)),
            ("BACKGROUND", (0, row_idx), (-1, row_idx), item["bg_header"]),
            ("TOPPADDING", (0, row_idx), (-1, row_idx), 4),
            ("BOTTOMPADDING", (0, row_idx), (-1, row_idx), 4),
        ]
        row_idx += 1
        continue

    warn_text = item.get("warn", "")
    notes_content = item["notes"]
    if warn_text:
        notes_para = [P(notes_content, cell_style), P(warn_text, warn_style)]
    else:
        notes_para = P(notes_content, cell_style)

    row = [
        P(f"<b>{item['drug']}</b>", cell_bold),
        P(item["class_"], cell_style),
        P(item["route"], cell_style),
        P(item["induction"], cell_style),
        P(item["maint"], cell_style),
        P(item["onset"], cell_style),
        notes_para if isinstance(notes_para, Paragraph) else notes_para,
    ]
    table_rows.append(row)
    bg = item.get("row_bg", WHITE)
    table_style_cmds.append(("BACKGROUND", (0, row_idx), (-1, row_idx), bg))
    row_idx += 1

# Fix notes column: if it's a list, use a nested table
# Actually reportlab supports lists of flowables in a cell via KeepInFrame — 
# instead we just make the warns inline
# Re-build rows with combined notes text
table_rows2 = [header_row]
row_idx = 1
for item in rows_data:
    if "group_header" in item:
        table_rows2.append(table_rows[row_idx])
        row_idx += 1
        continue
    warn_text = item.get("warn", "")
    if warn_text:
        combined = f"{item['notes']}<br/><font color='#C0392B' size='6.5'><i>{warn_text}</i></font>"
    else:
        combined = item["notes"]
    row = [
        P(f"<b>{item['drug']}</b>", cell_bold),
        P(item["class_"].replace("\n", "<br/>"), cell_style),
        P(item["route"].replace("\n", "<br/>"), cell_style),
        P(item["induction"].replace("\n", "<br/>"), cell_style),
        P(item["maint"].replace("\n", "<br/>"), cell_style),
        P(item["onset"].replace("\n", "<br/>"), cell_style),
        P(combined, cell_style),
    ]
    table_rows2.append(row)
    row_idx += 1

drug_table = Table(table_rows2, colWidths=col_widths, repeatRows=1)
drug_table.setStyle(TableStyle(table_style_cmds))

# ── Footer note ───────────────────────────────────────────────────────────────
footer_text = (
    "<b>Sources:</b> Miller's Anesthesia 10e | Morgan & Mikhail's Clinical Anesthesiology 7e | Barash's Clinical Anesthesia 9e  ·  "
    "<b>Doses are for healthy adults unless stated.</b>  Always titrate to effect. Reduce dose in elderly, ASA III-IV, and haemodynamically compromised patients.  ·  "
    "For emergency reversal: Sugammadex (rocuronium/vecuronium) | Flumazenil (benzodiazepines) | Naloxone (opioids)."
)

# ── Assemble ──────────────────────────────────────────────────────────────────
elements = [
    header_block(),
    Spacer(1, 2*mm),
    drug_table,
    Spacer(1, 2*mm),
    HRFlowable(width="100%", thickness=0.5, color=TEAL),
    Spacer(1, 1*mm),
    Paragraph(footer_text, note_style),
]

doc.build(elements)
print(f"PDF saved to: {OUTPUT_PATH}")
Running Command

cd /home/daytona/workspace/anesthesia-card && python generate_card.py 2>&1

Running Command

ls -lh /home/daytona/workspace/anesthesia-card/

Your OR quick reference card is ready. Here's what's included:

Anesthesia Drug Reference Card

PDF Document · PDF


What's on the card (A4 landscape, print-ready):
The PDF is organized into 4 color-coded drug sections across a single landscape page:
SectionColorDrugs Covered
IV Induction AgentsTeal headerPropofol, Thiopental, Ketamine, Etomidate
BenzodiazepineDark blueMidazolam
Opioid AnalgesicsGreenFentanyl, Morphine, Remifentanil
NMBAsPurpleSuccinylcholine, Rocuronium
Each drug row includes:
  • Drug name + drug class
  • Route of administration
  • Induction / bolus dose (with pediatric & elderly adjustments where applicable)
  • Maintenance dose / infusion rates
  • Onset of action
  • Key clinical notes + red-text contraindication warnings
Footer: Emergency reversal agents (Sugammadex, Flumazenil, Naloxone) and source references (Miller's 10e, Morgan & Mikhail 7e, Barash 9e).
This is a shared conversation. Sign in to Orris to start your own chat.