All about Loop diuretics in pointer form for my pharma exam
| Drug | Chemical Class |
|---|---|
| Furosemide | Sulfonamide |
| Bumetanide | Sulfonamide |
| Torsemide | Sulfonylurea |
| Ethacrynic acid | Phenoxyacetic acid derivative (NOT a sulfonamide) |
| Parameter | Furosemide | Bumetanide | Torsemide | Ethacrynic acid |
|---|---|---|---|---|
| Oral bioavailability | ~60% (variable) | ~80% | ~80% (rapid, near 100%) | ~100% |
| t1/2 | ~1.5 hr | ~0.8 hr | ~3.5 hr | ~1 hr |
| Duration of action | 2-3 hr | Similar to torsemide | 4-6 hr | - |
| Elimination | ~65% renal, ~35% metabolism | ~62% renal, ~38% hepatic | ~20% renal, ~80% hepatic | ~67% renal, ~33% metabolism |
| Equivalent dose | 20 mg | 0.5 mg | 10 mg | ~50 mg |
| Drug | Interaction |
|---|---|
| NSAIDs | Reduce diuretic effect (block PG synthesis + compete for tubular secretion) |
| Probenecid | Reduces tubular secretion of loop diuretics → reduced effect |
| Aminoglycosides | Additive ototoxicity |
| Digoxin/cardiac glycosides | Hypokalemia from loop diuretics increases digoxin toxicity |
| Corticosteroids | Additive hypokalemia |
| Antidiabetics | Loop diuretics may impair glucose tolerance |
| Other diuretics (K+-sparing) | Combined to offset hypokalemia |
| Feature | Loop Diuretics | Thiazide Diuretics |
|---|---|---|
| Site | TAL of loop of Henle | Distal convoluted tubule |
| Transporter blocked | NKCC2 | NCC (Na+/Cl- cotransporter) |
| Potency | High (up to 25% Na+ excreted) | Moderate |
| Effective in GFR <30 | Yes | No (except metolazone) |
| Calcium excretion | Increased (hypercalciuric) | Decreased (hypocalciuric) |
| Use in hypercalcemia | Yes | No |
| Hypertension (1st line) | No (unless GFR <30 or resistant) | Yes |
Is there any trick related to pharmacokinetics which will apply on every drug ...
"It takes exactly 5 half-lives to reach steady state AND to fully eliminate a drug."
| Half-lives elapsed | % Steady State reached | % Drug eliminated |
|---|---|---|
| 1 | 50% | 50% |
| 2 | 75% | 75% |
| 3 | 87.5% | 87.5% |
| 4 | 93.75% | ~94% |
| 5 | ~97% (≈ 100%) | ~97% (≈ 100%) |
"Renally eliminated drugs need dose reduction in renal failure. Hepatically eliminated drugs need dose reduction in liver failure."
"Vd tells you WHERE the drug goes, not how much blood contains it."
| Vd | Where drug distributes | Examples |
|---|---|---|
| Small (< 1 L/kg) | Stays in plasma/ECF | Warfarin, heparin, aminoglycosides |
| Medium (1-20 L/kg) | Distributes to tissues | Most drugs |
| Large (> 20 L/kg) | Concentrates in deep tissues/fat | Chloroquine, amiodarone, digoxin |
"Only FREE (unbound) drug is pharmacologically active, metabolized, and excreted."
"Drugs with high first-pass effect have low oral bioavailability and need higher oral doses vs IV doses."
"Most drugs follow first-order kinetics (constant %). A few saturate enzymes and switch to zero-order (constant amount) - those are the dangerous ones."
| First-Order | Zero-Order | |
|---|---|---|
| Elimination | Constant % per unit time | Constant amount per unit time |
| t1/2 | Fixed | No fixed t1/2 |
| Drugs | Almost all drugs | PHenytoin, Ethanol, Aspirin (high dose) |
| Risk | Predictable | Small dose increase → huge toxicity |
"Clearance = Vd × Ke = Vd × 0.693 / t1/2"
Maintenance dose rate = Target Css × Clearance / Bioavailability (F)
"Inducers increase metabolism → decrease drug levels. Inhibitors decrease metabolism → increase drug levels."
| Inducers (RASCAL-GP) | Inhibitors (SICKFACES.COM) |
|---|---|
| Rifampicin | Sodium valproate |
| Alcohol (chronic) | Isoniazid |
| St John's Wort | Cimetidine |
| Carbamazepine | Ketoconazole/fluconazole |
| Anti-epileptics (phenytoin, phenobarb) | Fluoxetine/fluvoxamine |
| Griseofulvin | Amiodarone |
| Phenytoin | Ciprofloxacin / clarithromycin |
| Erythromycin | |
| Sulfonamides | |
| Omeprazole | |
| Metronidazole |
Create a pharmacokinetics quick reference PDF for exams
mkdir -p /home/daytona/workspace/pk-reference && ls /home/daytona/workspace/
~/pk-reference/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
OUTPUT = "/home/daytona/workspace/pk-reference/PK_Quick_Reference.pdf"
# ── Colour palette ──────────────────────────────────────────────────
DARK_BLUE = colors.HexColor("#1A3A5C")
MED_BLUE = colors.HexColor("#2563A8")
LIGHT_BLUE = colors.HexColor("#D6E4F7")
ACCENT = colors.HexColor("#E8530A") # orange accent
ACCENT2 = colors.HexColor("#16A34A") # green
YELLOW_BG = colors.HexColor("#FFFBEB")
GREY_BG = colors.HexColor("#F3F4F6")
WHITE = colors.white
BLACK = colors.HexColor("#111827")
MUTED = colors.HexColor("#6B7280")
RED = colors.HexColor("#DC2626")
# ── Doc setup ───────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT, pagesize=A4,
leftMargin=15*mm, rightMargin=15*mm,
topMargin=14*mm, bottomMargin=14*mm,
title="Pharmacokinetics Quick Reference",
author="Orris AI"
)
W = A4[0] - 30*mm # usable width
# ── Styles ──────────────────────────────────────────────────────────
base = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
sTitle = S("sTitle", fontSize=22, textColor=WHITE, alignment=TA_CENTER,
fontName="Helvetica-Bold", spaceAfter=2)
sSubtitle = S("sSubtitle", fontSize=10, textColor=colors.HexColor("#BFD7F5"),
alignment=TA_CENTER, fontName="Helvetica", spaceAfter=0)
sSectionHead = S("sSectionHead", fontSize=12, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_LEFT,
leftIndent=4, spaceBefore=6, spaceAfter=2)
sBullet = S("sBullet", fontSize=8.5, textColor=BLACK, fontName="Helvetica",
leftIndent=10, firstLineIndent=-10, spaceAfter=2.5, leading=12)
sBulletBold = S("sBulletBold", fontSize=8.5, textColor=DARK_BLUE,
fontName="Helvetica-Bold", leftIndent=10, firstLineIndent=-10,
spaceAfter=2.5, leading=12)
sSub = S("sSub", fontSize=7.8, textColor=MUTED, fontName="Helvetica",
leftIndent=20, firstLineIndent=-10, spaceAfter=1.5, leading=11)
sNote = S("sNote", fontSize=7.5, textColor=colors.HexColor("#92400E"),
fontName="Helvetica-Oblique", leftIndent=6, spaceAfter=3, leading=10)
sFormula = S("sFormula", fontSize=8.5, textColor=DARK_BLUE,
fontName="Helvetica-Bold", alignment=TA_CENTER,
spaceBefore=3, spaceAfter=3, leading=13,
backColor=LIGHT_BLUE, borderPad=4)
sTH = S("sTH", fontSize=8, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=10)
sTD = S("sTD", fontSize=7.8, textColor=BLACK, fontName="Helvetica",
alignment=TA_CENTER, leading=10)
sTDL = S("sTDL", fontSize=7.8, textColor=BLACK, fontName="Helvetica",
alignment=TA_LEFT, leading=10)
sMnemonic = S("sMnemonic", fontSize=8.5, textColor=colors.HexColor("#7C3AED"),
fontName="Helvetica-Bold", alignment=TA_CENTER,
spaceBefore=2, spaceAfter=2, leading=12)
sCaption = S("sCaption", fontSize=7.2, textColor=MUTED, fontName="Helvetica-Oblique",
alignment=TA_CENTER, spaceAfter=4)
# ── Helper builders ─────────────────────────────────────────────────
def section_header(text, color=DARK_BLUE):
bg = Table([[Paragraph(text, sSectionHead)]], colWidths=[W])
bg.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING",(0,0), (-1,-1), 8),
("ROUNDEDCORNERS", [4, 4, 4, 4]),
]))
return bg
def bullet(text, bold=False):
style = sBulletBold if bold else sBullet
return Paragraph(f"• {text}", style)
def sub_bullet(text):
return Paragraph(f" ◦ {text}", sSub)
def note(text):
bg = Table([[Paragraph(f"💡 {text}", sNote)]], colWidths=[W])
bg.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), YELLOW_BG),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 8),
("BOX", (0,0), (-1,-1), 0.5, colors.HexColor("#F59E0B")),
]))
return bg
def formula_box(text):
bg = Table([[Paragraph(text, sFormula)]], colWidths=[W])
bg.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_BLUE),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
("BOX", (0,0), (-1,-1), 1, MED_BLUE),
]))
return bg
def mnemonic_box(text):
bg = Table([[Paragraph(text, sMnemonic)]], colWidths=[W])
bg.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#EDE9FE")),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
("BOX", (0,0), (-1,-1), 1, colors.HexColor("#7C3AED")),
]))
return bg
def make_table(headers, rows, col_widths, header_color=DARK_BLUE, stripe=True):
data = [[Paragraph(h, sTH) for h in headers]]
for i, row in enumerate(rows):
data.append([Paragraph(str(c), sTDL if j == 0 else sTD)
for j, c in enumerate(row)])
t = Table(data, colWidths=col_widths, repeatRows=1)
style = [
("BACKGROUND", (0,0), (-1,0), header_color),
("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, GREY_BG] if stripe else [WHITE]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#CBD5E1")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]
t.setStyle(TableStyle(style))
return t
def sp(h=4):
return Spacer(1, h)
def hr():
return HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#CBD5E1"),
spaceAfter=3, spaceBefore=3)
# ── Cover banner ────────────────────────────────────────────────────
def cover_banner():
banner_data = [[
Paragraph("PHARMACOKINETICS", sTitle),
Paragraph("Quick Reference for Exams", sSubtitle),
]]
# stacked in one cell
inner = Table([
[Paragraph("PHARMACOKINETICS", sTitle)],
[Paragraph("Quick Reference for Exams", sSubtitle)],
[Paragraph("8 Universal Tricks · Formulas · Tables · Mnemonics", sSubtitle)],
], colWidths=[W])
inner.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 12),
("BOTTOMPADDING",(0,0),(-1,-1), 12),
("LEFTPADDING", (0,0), (-1,-1), 0),
]))
return inner
# ════════════════════════════════════════════════════════════════════
# BUILD STORY
# ════════════════════════════════════════════════════════════════════
story = []
story.append(cover_banner())
story.append(sp(8))
# ─────────────────────────────────────────────────────────────────
# TRICK 1: 5 Half-Life Rule
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 1 — The 5 Half-Life Rule (Steady State & Elimination)", MED_BLUE))
story.append(sp(4))
story.append(formula_box("Time to Steady State = Time to Full Elimination = 5 × t½"))
story.append(sp(4))
t1_headers = ["Half-lives", "% Steady State Reached", "% Drug Eliminated", "Remaining (%)"]
t1_rows = [
["1", "50%", "50%", "50%"],
["2", "75%", "75%", "25%"],
["3", "87.5%", "87.5%", "12.5%"],
["4", "93.75%", "93.75%", "6.25%"],
["5 ✓", "~97% ≈ 100%", "~97% ≈ 100%", "<3%"],
]
story.append(make_table(t1_headers, t1_rows, [W*0.2, W*0.28, W*0.28, W*0.24]))
story.append(sp(4))
story.append(bullet("Drug with t½ = 6 hrs → steady state in 30 hrs; eliminated in 30 hrs"))
story.append(bullet("Drug with t½ = 2 days → fully washed out in 10 days (critical before drug switches)"))
story.append(bullet("Loading dose bypasses the 5 half-life wait — instantly achieves target concentration"))
story.append(bullet("Doubling the dose doubles the steady-state level but does NOT change the time to reach it"))
story.append(sp(3))
story.append(note("Warfarin t½ ≈ 40 hrs → full elimination ~8 days. MAO inhibitors t½ ≈ 2 wks → washout before switching!"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 2: Hepatic vs Renal Elimination
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 2 — Hepatic vs. Renal Elimination = Dose Adjustment Rule", MED_BLUE))
story.append(sp(4))
t2_headers = ["Elimination Route", "Adjust Dose In", "Safe In", "Classic Examples"]
t2_rows = [
["Mainly RENAL\n(excreted unchanged in urine)", "Renal failure (↓ GFR)", "Liver disease",
"Aminoglycosides, Digoxin,\nLithium, Metformin, Atenolol"],
["Mainly HEPATIC\n(metabolized by liver)", "Liver failure (cirrhosis)", "Renal disease",
"Warfarin, Statins, most BZDs,\nTorsemide, Lidocaine"],
["BOTH (50/50)", "Both organ failures", "Neither fully",
"Bumetanide, Morphine"],
]
story.append(make_table(t2_headers, t2_rows, [W*0.22, W*0.22, W*0.18, W*0.38]))
story.append(sp(4))
story.append(bullet("Loop diuretics: Furosemide ~65% renal · Torsemide ~80% hepatic · Bumetanide ~50/50", bold=True))
story.append(bullet("Metformin → renally eliminated → CONTRAINDICATED in renal failure (lactic acidosis risk)"))
story.append(bullet("NSAIDs + loop diuretics → compete for proximal tubule secretion → blunted diuretic response"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 3: Volume of Distribution
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 3 — Volume of Distribution (Vd)", MED_BLUE))
story.append(sp(4))
story.append(formula_box("Loading Dose = Vd × Target Plasma Concentration / Bioavailability (F)"))
story.append(sp(4))
t3_headers = ["Vd", "Distribution", "Property", "Examples"]
t3_rows = [
["Small\n< 1 L/kg", "Plasma / ECF only", "Water-soluble,\nhigh protein binding", "Heparin, Aminoglycosides,\nWarfarin (in plasma)"],
["Medium\n1–20 L/kg", "Tissues + plasma", "Moderate lipophilicity", "Most drugs"],
["Large\n> 20 L/kg", "Deep tissue / fat", "Lipid-soluble,\nhigh tissue binding", "Chloroquine, Amiodarone,\nDigoxin, TCAs"],
]
story.append(make_table(t3_headers, t3_rows, [W*0.16, W*0.22, W*0.24, W*0.38]))
story.append(sp(4))
story.append(bullet("Large Vd → longer t½ → NOT dialyzable (drug is hiding in tissues, not in blood)", bold=True))
story.append(bullet("Small Vd → drug stays in plasma → dialyzable (e.g. lithium, aminoglycosides)"))
story.append(bullet("Obesity increases Vd for lipophilic drugs → may need weight-based dose adjustment"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 4: Protein Binding
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 4 — Protein Binding: Only FREE Drug is Active", MED_BLUE))
story.append(sp(4))
story.append(bullet("Only UNBOUND (free) drug is: pharmacologically active · metabolized · excreted · crosses membranes", bold=True))
story.append(bullet("High protein binding → long duration (drug 'stored' in plasma, released slowly)"))
story.append(bullet("Two highly protein-bound drugs → displacement interaction → free drug ↑ → toxicity"))
story.append(sub_bullet("Classic: Warfarin + Aspirin → warfarin displaced → hemorrhage risk"))
story.append(sub_bullet("Classic: Sulfonamides + Bilirubin (neonates) → kernicterus"))
story.append(bullet("Hypoalbuminemia (cirrhosis, nephrotic syndrome, malnutrition) → less binding → more free drug → toxicity at 'normal' doses"))
story.append(sp(3))
t4_headers = ["State", "Albumin", "Free Drug", "Risk"]
t4_rows = [
["Normal", "Normal", "Normal", "—"],
["Cirrhosis / Nephrotic / Malnutrition", "↓ Low", "↑ High", "Toxicity at standard doses"],
["Renal failure", "↓ (uremia alters binding)", "↑ High", "Toxicity — especially phenytoin"],
]
story.append(make_table(t4_headers, t4_rows, [W*0.32, W*0.18, W*0.18, W*0.32]))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 5: First-Pass Effect
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 5 — First-Pass Effect & Oral Bioavailability", MED_BLUE))
story.append(sp(4))
story.append(formula_box("Bioavailability (F) = AUC oral / AUC IV × 100%"))
story.append(sp(4))
story.append(bullet("First-pass = drug absorbed from gut → portal vein → LIVER → metabolized before reaching systemic circulation", bold=True))
story.append(bullet("High first-pass effect → LOW oral bioavailability → need HIGHER oral dose vs IV dose"))
story.append(sp(3))
t5_headers = ["Route", "First-Pass?", "Onset", "Examples"]
t5_rows = [
["Oral (PO)", "Yes (high if extensive)", "Slowest", "Most drugs — large oral dose needed"],
["Sublingual (SL)", "NO — absorbed into systemic veins", "Fast", "Nitroglycerin, Buprenorphine"],
["Transdermal", "NO", "Slow but sustained", "Fentanyl patch, Nicotine patch"],
["Intravenous (IV)", "NO — 100% bioavailability", "Immediate", "All drugs given IV"],
["Inhalation", "NO (minimal)", "Very fast", "Salbutamol, Anaesthetic gases"],
["Rectal (PR)", "Partial (~50% bypassed)", "Moderate", "Diazepam, Paracetamol PR"],
]
story.append(make_table(t5_headers, t5_rows, [W*0.2, W*0.28, W*0.18, W*0.34]))
story.append(sp(4))
story.append(bullet("High first-pass drugs (low bioavailability): Morphine, Lidocaine, Propranolol, Nitroglycerin, GTN, Testosterone, Progesterone"))
story.append(note("Why nitroglycerin is given sublingual / transdermal and NOT as oral tablets → bypasses liver first-pass!"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 6: Zero vs First Order Kinetics
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 6 — Zero-Order vs. First-Order Kinetics", MED_BLUE))
story.append(sp(4))
t6_headers = ["Feature", "First-Order Kinetics", "Zero-Order Kinetics"]
t6_rows = [
["Elimination rate", "Constant FRACTION (%) per unit time", "Constant AMOUNT per unit time"],
["Half-life", "Fixed t½", "No fixed t½ — varies with dose"],
["Graph (plasma vs time)", "Exponential decay", "Linear decay"],
["Enzyme saturation", "Not saturated", "Enzymes SATURATED"],
["Predictability", "Predictable — safe", "UNPREDICTABLE — DANGEROUS"],
["Applies to", "Almost ALL drugs", "Phenytoin, Ethanol, Aspirin (toxic doses)"],
]
story.append(make_table(t6_headers, t6_rows, [W*0.26, W*0.37, W*0.37]))
story.append(sp(4))
story.append(mnemonic_box('Mnemonic: "PEA goes Zero-Order" → Phenytoin · Ethanol · Aspirin (at high/toxic doses)'))
story.append(sp(4))
story.append(bullet("Phenytoin: at therapeutic levels → first order. At HIGH levels → enzymes saturate → zero order", bold=True))
story.append(bullet("Small dose increase in zero-order drug → MASSIVE plasma level spike → toxicity"))
story.append(bullet("Ethanol: ~10 mL pure ethanol eliminated per hour regardless of how much was consumed"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 7: Clearance & Key Formulas
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 7 — Clearance & Master Formulas", MED_BLUE))
story.append(sp(4))
formulas = [
"Clearance (CL) = Vd × Ke = Vd × 0.693 / t½",
"Maintenance Dose Rate = Target Css × CL / F",
"Loading Dose = Vd × Target Css / F",
"t½ = 0.693 × Vd / CL",
]
for f in formulas:
story.append(formula_box(f))
story.append(sp(2))
story.append(sp(2))
story.append(bullet("Increased CL (enzyme inducers) → lower drug levels → need HIGHER dose", bold=True))
story.append(bullet("Decreased CL (enzyme inhibitors, renal/liver failure) → higher drug levels → REDUCE dose"))
story.append(bullet("Css (steady-state concentration) doubles if maintenance dose doubles — proportional in first-order drugs"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# TRICK 8: CYP450 Inducers vs Inhibitors
# ─────────────────────────────────────────────────────────────────
story.append(section_header("TRICK 8 — CYP450 Inducers vs. Inhibitors (Drug Interaction Master Table)", MED_BLUE))
story.append(sp(4))
t8_headers = ["Type", "Effect on Metabolism", "Effect on Drug Level", "Mnemonic"]
t8_rows = [
["INDUCERS", "↑ Enzyme activity", "↓ Drug levels (sub-therapeutic)", "RASCAL-GP"],
["INHIBITORS", "↓ Enzyme activity", "↑ Drug levels (toxicity)", "SICKFACES.COM"],
]
story.append(make_table(t8_headers, t8_rows, [W*0.18, W*0.26, W*0.30, W*0.26], header_color=DARK_BLUE))
story.append(sp(5))
# Two-column table for inducers vs inhibitors
col_ind = W * 0.48
col_inh = W * 0.48
col_gap = W * 0.04
ind_inh_data = [
[Paragraph("INDUCERS — RASCAL-GP", ParagraphStyle("ind_h", fontSize=8.5, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_CENTER)),
Paragraph("INHIBITORS — SICKFACES.COM", ParagraphStyle("inh_h", fontSize=8.5, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_CENTER))],
[Paragraph(
"<b>R</b>ifampicin<br/>"
"<b>A</b>lcohol (chronic)<br/>"
"<b>S</b>t John's Wort<br/>"
"<b>C</b>arbamazepine<br/>"
"<b>A</b>nti-epileptics (phenytoin, phenobarbitone)<br/>"
"<b>L</b>––<br/>"
"<b>G</b>riseofulvin<br/>"
"<b>P</b>henytoin",
ParagraphStyle("ind_body", fontSize=8, textColor=BLACK, fontName="Helvetica",
leading=13, leftIndent=5)),
Paragraph(
"<b>S</b>odium valproate<br/>"
"<b>I</b>soniazid<br/>"
"<b>C</b>imetidine<br/>"
"<b>K</b>etoconazole / Fluconazole<br/>"
"<b>F</b>luoxetine / Fluvoxamine<br/>"
"<b>A</b>miodarone<br/>"
"<b>C</b>iprofloxacin / Clarithromycin<br/>"
"<b>E</b>rythromycin<br/>"
"<b>S</b>ulfonamides<br/>"
"<b>.</b>–– <b>C</b>hloramphenicol<br/>"
"<b>O</b>meprazole<br/>"
"<b>M</b>etronidazole",
ParagraphStyle("inh_body", fontSize=8, textColor=BLACK, fontName="Helvetica",
leading=13, leftIndent=5))],
]
ind_inh_tbl = Table(ind_inh_data, colWidths=[col_ind, col_inh])
ind_inh_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,0), colors.HexColor("#059669")),
("BACKGROUND", (1,0), (1,0), RED),
("BACKGROUND", (0,1), (0,1), colors.HexColor("#ECFDF5")),
("BACKGROUND", (1,1), (1,1), colors.HexColor("#FEF2F2")),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#CBD5E1")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
]))
story.append(ind_inh_tbl)
story.append(sp(4))
story.append(note("Remember: Inducers ↑ metabolism → need MORE drug. Inhibitors ↓ metabolism → need LESS drug. Grapefruit juice = CYP3A4 inhibitor!"))
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# BONUS: Universal PK Quick-Check Strategy
# ─────────────────────────────────────────────────────────────────
story.append(section_header("BONUS — Universal PK Question Strategy (Exam Checklist)", ACCENT))
story.append(sp(4))
checklist = [
("1. Renal failure?", "Which drugs accumulate? → Renally eliminated drugs (aminoglycosides, digoxin, lithium, metformin) → reduce dose or avoid"),
("2. Liver failure?", "Which drugs accumulate? → Hepatically metabolized drugs (warfarin, statins, benzodiazepines, torsemide) → reduce dose"),
("3. Low albumin?", "Hypoalbuminemia (cirrhosis, nephrotic) → more free drug → toxicity at standard doses → reduce dose"),
("4. Two drugs together?", "Check protein displacement + CYP interaction → which drug level rises/falls?"),
("5. How long to washout?", "= 5 × t½ of that drug before switching (critical for MAOIs, warfarin, amiodarone)"),
("6. Narrow TI drug?", "Digoxin · Warfarin · Lithium · Phenytoin · Aminoglycosides · Theophylline → any of the above = DANGER"),
("7. Zero-order drug?", "PEA (Phenytoin, Ethanol, Aspirin high dose) → small dose increase = disproportionate toxicity"),
("8. Route of administration?", "IV = 100% bioavailability. Oral with high first-pass → need higher oral dose. SL/Transdermal bypasses first-pass."),
]
check_data = [[Paragraph(f"<b>{q}</b>", sTDL), Paragraph(a, sTDL)] for q, a in checklist]
check_tbl = Table(check_data, colWidths=[W*0.26, W*0.74])
check_tbl.setStyle(TableStyle([
("ROWBACKGROUNDS", (0,0), (-1,-1), [colors.HexColor("#FFF7ED"), WHITE]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#CBD5E1")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "TOP"),
("LINEAFTER", (0,0), (0,-1), 1.5, ACCENT),
]))
story.append(check_tbl)
story.append(sp(6))
# ─────────────────────────────────────────────────────────────────
# BONUS 2: High-Yield Drug PK Summary Table
# ─────────────────────────────────────────────────────────────────
story.append(section_header("HIGH-YIELD DRUG PK SUMMARY", DARK_BLUE))
story.append(sp(4))
hyd_headers = ["Drug", "t½", "Vd", "Protein Bind.", "Elim. Route", "Key PK Point"]
hyd_rows = [
["Digoxin", "40 hrs", "Large (7 L/kg)", "25%", "Renal", "↓ dose in renal failure; hypokalemia ↑ toxicity"],
["Warfarin", "40 hrs", "Small (0.14 L/kg)", "99%", "Hepatic (CYP2C9)", "Protein displacement; CYP interactions crucial"],
["Lithium", "24 hrs", "Small (0.7 L/kg)", "0%", "Renal (100%)", "Contraindicated in renal failure; dialyzable"],
["Phenytoin", "Variable", "Medium (0.6 L/kg)", "90%", "Hepatic", "Zero-order at HIGH doses; narrow TI"],
["Furosemide", "1.5 hrs", "Small (0.11 L/kg)", "95%+", "65% Renal", "Must reach tubule lumen to act; NSAIDs blunt effect"],
["Torsemide", "3.5 hrs", "Small", "~99%", "80% Hepatic", "Most reliable absorption; preferred in heart failure"],
["Amiodarone", "40–55 days", "Very large (60 L/kg)", "96%", "Hepatic", "Longest washout (months); CYP3A4 inhibitor"],
["Aminoglycosides", "2–3 hrs", "Small (0.25 L/kg)", "<10%", "Renal (100%)", "Dialyzable; ototoxic; nephrotoxic; once-daily dosing"],
["Metformin", "6 hrs", "Large (63–276 L/kg)", "0%", "Renal (100%)", "Contraindicated in renal failure (lactic acidosis)"],
["Theophylline", "8–9 hrs", "Medium (0.45 L/kg)", "60%", "Hepatic", "Narrow TI; CYP1A2 metabolism; zero-order at high doses"],
]
story.append(make_table(hyd_headers, hyd_rows,
[W*0.14, W*0.09, W*0.13, W*0.11, W*0.15, W*0.38]))
story.append(sp(5))
# ─────────────────────────────────────────────────────────────────
# Footer banner
# ─────────────────────────────────────────────────────────────────
footer = Table([[
Paragraph("Pharmacokinetics Quick Reference | Generated by Orris AI | For Educational Use Only",
ParagraphStyle("footer", fontSize=7, textColor=WHITE,
fontName="Helvetica", alignment=TA_CENTER))
]], colWidths=[W])
footer.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
]))
story.append(footer)
# ── Build ────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/pk-reference && python generate_pdf.py
ls -lh /home/daytona/workspace/pk-reference/PK_Quick_Reference.pdf
PK Quick Reference
PDF Document · PDF
| Section | Content |
|---|---|
| Trick 1 | 5 Half-Life Rule table - steady state & elimination |
| Trick 2 | Hepatic vs Renal elimination with drug examples table |
| Trick 3 | Volume of Distribution (Vd) - small/medium/large with examples |
| Trick 4 | Protein binding - displacement interactions, hypoalbuminemia risks |
| Trick 5 | First-pass effect by every route of administration (table) |
| Trick 6 | Zero vs First-order kinetics + "PEA" mnemonic highlighted |
| Trick 7 | All 4 master formulas (CL, Loading dose, Maintenance dose, t½) |
| Trick 8 | CYP450 Inducers (RASCAL-GP) vs Inhibitors (SICKFACES.COM) - colour-coded |
| Bonus Checklist | 8-step universal PK question strategy for exam scenarios |
| Drug PK Table | 10 high-yield drugs - t½, Vd, protein binding, elimination, key point |