Antirheumatiod and antigout drugs KDT gist pdf
mkdir -p /home/daytona/workspace/pharma-gist && ls /home/daytona/workspace/
~/pharma-gist/make_gist.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import ListFlowable, ListItem
OUTPUT = "/home/daytona/workspace/pharma-gist/Antirheumatoid_Antigout_KDT_Gist.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=18*mm, rightMargin=18*mm,
topMargin=18*mm, bottomMargin=18*mm
)
W, H = A4
# ── colour palette ──────────────────────────────────────────────────────────
C_HEADER = colors.HexColor("#1A3A5C") # dark navy
C_SEC1 = colors.HexColor("#1565C0") # section 1 banner (blue)
C_SEC2 = colors.HexColor("#1B5E20") # section 2 banner (green)
C_SEC3 = colors.HexColor("#4A148C") # section 3 banner (purple)
C_DRUG = colors.HexColor("#0277BD") # drug-name strip
C_DRUG2 = colors.HexColor("#2E7D32") # drug-name strip (gout)
C_DRUG3 = colors.HexColor("#6A1B9A") # drug-name strip (other)
C_WARN = colors.HexColor("#B71C1C") # red warning
C_LIGHT = colors.HexColor("#E3F2FD") # light blue fill
C_LIGHT2 = colors.HexColor("#E8F5E9") # light green fill
C_LIGHT3 = colors.HexColor("#F3E5F5") # light purple fill
C_YELLOW = colors.HexColor("#FFFDE7") # mnemonic box
C_ORANGE = colors.HexColor("#FFF3E0") # highlight box
C_GRAY = colors.HexColor("#F5F5F5")
C_TBL_HDR = colors.HexColor("#0D47A1")
C_TBL_ALT = colors.HexColor("#E8EAF6")
WHITE = colors.white
BLACK = colors.black
# ── styles ──────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
TITLE = S("TITLE", fontSize=20, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_CENTER, spaceAfter=2, leading=24)
SUBTITLE = S("SUBTITLE", fontSize=11, fontName="Helvetica",
textColor=colors.HexColor("#CFE2FF"), alignment=TA_CENTER,
spaceAfter=6, leading=14)
SEC_H = S("SEC_H", fontSize=13, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_LEFT, leading=16)
DRUG_H = S("DRUG_H", fontSize=11, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_LEFT, leading=14)
BODY = S("BODY", fontSize=9, fontName="Helvetica",
textColor=BLACK, leading=12, spaceAfter=3, alignment=TA_JUSTIFY)
BULLET = S("BULLET", fontSize=9, fontName="Helvetica",
textColor=BLACK, leading=12, leftIndent=12, firstLineIndent=0,
spaceAfter=2)
BOLD_B = S("BOLD_B", fontSize=9, fontName="Helvetica-Bold",
textColor=BLACK, leading=12, leftIndent=12, spaceAfter=2)
NOTE = S("NOTE", fontSize=8, fontName="Helvetica-Oblique",
textColor=colors.HexColor("#5D4037"), leading=11, spaceAfter=3,
leftIndent=10)
WARN = S("WARN", fontSize=9, fontName="Helvetica-Bold",
textColor=C_WARN, leading=12, leftIndent=12, spaceAfter=2)
MNEMO = S("MNEMO", fontSize=9, fontName="Helvetica-Bold",
textColor=colors.HexColor("#E65100"), leading=12,
alignment=TA_CENTER, spaceAfter=2)
CAP = S("CAP", fontSize=8, fontName="Helvetica",
textColor=colors.HexColor("#424242"), leading=10,
alignment=TA_CENTER, spaceAfter=4)
FOOTER = S("FOOTER", fontSize=7, fontName="Helvetica",
textColor=colors.HexColor("#9E9E9E"), alignment=TA_CENTER)
# ── helpers ─────────────────────────────────────────────────────────────────
def section_banner(text, bg=C_SEC1, pad=5):
t = Table([[Paragraph(text, SEC_H)]], colWidths=[W - 36*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("TOPPADDING", (0,0), (-1,-1), pad),
("BOTTOMPADDING", (0,0), (-1,-1), pad),
("ROUNDEDCORNERS", [4,4,4,4]),
]))
return t
def drug_banner(text, bg=C_DRUG):
t = Table([[Paragraph(text, DRUG_H)]], colWidths=[W - 36*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), 6),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
]))
return t
def box(content_rows, bg=C_LIGHT, left_pad=8):
cells = [[Paragraph(r, BODY)] for r in content_rows]
t = Table(cells, colWidths=[W - 36*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), left_pad),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
("BOX", (0,0), (-1,-1), 0.5, colors.HexColor("#BBDEFB")),
]))
return t
def mnemonic_box(title, content):
t = Table([[Paragraph(f"<b>⭐ {title}</b><br/>{content}", MNEMO)]],
colWidths=[W - 36*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), C_YELLOW),
("BOX", (0,0), (-1,-1), 1.0, colors.HexColor("#F9A825")),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
return t
def warn_box(text):
t = Table([[Paragraph(f"⚠ {text}", WARN)]], colWidths=[W - 36*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#FFEBEE")),
("BOX", (0,0), (-1,-1), 0.5, C_WARN),
("LEFTPADDING", (0,0), (-1,-1), 8),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
]))
return t
def two_col_table(data, hdrs, bg_hdr=C_TBL_HDR):
col_w = (W - 36*mm) / len(hdrs)
header_row = [Paragraph(f"<b><font color='white'>{h}</font></b>", BODY) for h in hdrs]
rows = [header_row]
for i, row in enumerate(data):
rows.append([Paragraph(str(c), BODY) for c in row])
t = Table(rows, colWidths=[col_w]*len(hdrs))
ts = [
("BACKGROUND", (0,0), (-1,0), bg_hdr),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#CFD8DC")),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, C_TBL_ALT]),
]
t.setStyle(TableStyle(ts))
return t
def sp(n=4): return Spacer(1, n*mm)
# ════════════════════════════════════════════════════════════════════════════
# BUILD DOCUMENT
# ════════════════════════════════════════════════════════════════════════════
story = []
# ── COVER ───────────────────────────────────────────────────────────────────
cover = Table(
[[Paragraph("ANTIRHEUMATOID & ANTIGOUT DRUGS", TITLE)],
[Paragraph("KDT (Tripathi) Quick Revision Gist · Pharmacology", SUBTITLE)],
[Paragraph("DMARDs • Biologics • JAK Inhibitors • NSAIDs • Colchicine • Urate-Lowering Therapy", SUBTITLE)]],
colWidths=[W - 36*mm]
)
cover.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), C_HEADER),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("ROUNDEDCORNERS", [6,6,6,6]),
]))
story += [cover, sp(4)]
# ── OVERVIEW TABLE ───────────────────────────────────────────────────────────
story.append(section_banner("📋 OVERVIEW: Drug Categories at a Glance", bg=C_HEADER))
story.append(sp(2))
overview_data = [
["ANTIRHEUMATOID DRUGS", "ANTIGOUT DRUGS"],
["Traditional DMARDs:\nMethotrexate, Hydroxychloroquine,\nLeflunomide, Sulfasalazine",
"Acute Gout:\nColchicine, NSAIDs, Corticosteroids"],
["Biologic DMARDs (bDMARDs):\nTNF-α inhibitors, IL-6 inhibitors,\nIL-1 inhibitors, T-cell costim. blockers,\nAnti-CD20",
"Chronic / ULT:\nAllopurinol, Febuxostat\n(Xanthine oxidase inhibitors)"],
["Targeted Synthetic DMARDs (tsDMARDs):\nJAK inhibitors — Tofacitinib,\nBaricitinib, Upadacitinib",
"Uricosurics:\nProbenecid, Sulfinpyrazone,\nBenzbromarone"],
["NSAIDs + Glucocorticoids\n(adjunct anti-inflammatory)",
"Uricase:\nPegloticase, Rasburicase"],
]
ov_t = Table(overview_data, colWidths=[(W-36*mm)/2]*2)
ov_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_TBL_HDR),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#90A4AE")),
("ROWBACKGROUNDS", (0,1), (-1,-1), [C_LIGHT, C_LIGHT2]),
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 6),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story += [ov_t, sp(4)]
# ════════════════════════════════════════════════════════════════════════════
# SECTION 1: ANTIRHEUMATOID DRUGS
# ════════════════════════════════════════════════════════════════════════════
story.append(section_banner("SECTION 1: ANTIRHEUMATOID DRUGS (DMARDs)", bg=C_SEC1))
story.append(sp(2))
story.append(Paragraph(
"<b>DMARDs (Disease-Modifying Antirheumatic Drugs)</b> slow/halt disease progression in RA, reduce joint destruction, "
"and induce remission — unlike NSAIDs which only provide symptomatic relief. "
"Start as early as possible after RA diagnosis. <b>Methotrexate (MTX)</b> is the preferred first-line agent.",
BODY))
story.append(sp(3))
# ── 1A. TRADITIONAL DMARDs ───────────────────────────────────────────────────
story.append(drug_banner("A. TRADITIONAL DMARDs (csDMARDs)", bg=C_DRUG))
story.append(sp(2))
# METHOTREXATE
story.append(KeepTogether([
Paragraph("<b>1. METHOTREXATE (MTX)</b> — Anchor drug of RA", BOLD_B),
Paragraph("• <b>MOA:</b> Folic acid antagonist → inhibits dihydrofolate reductase → ↓ purine/pyrimidine synthesis → ↓ cytokine production (IL-1, IL-6, TNF-α) → immunosuppressive + anti-inflammatory", BULLET),
Paragraph("• <b>Additional MOA:</b> Promotes adenosine release → anti-inflammatory via A2A receptors", BULLET),
Paragraph("• <b>Dose (RA):</b> 7.5–25 mg <i>once weekly</i> (oral/SC/IM) — much lower than oncology doses", BULLET),
Paragraph("• <b>Onset:</b> 3–6 weeks; peak 3–6 months", BULLET),
Paragraph("• <b>Always combine with:</b> Folic acid 1 mg/day (reduces toxicity without reducing efficacy)", BULLET),
Paragraph("• <b>Monitoring:</b> LFT, CBC, renal function periodically", BULLET),
]))
story.append(warn_box("MTX Adverse Effects: Hepatotoxicity (↑LFTs, cirrhosis with long use), Myelosuppression (CBC ↓), Mucositis/stomatitis, Pulmonary toxicity (pneumonitis), Teratogenicity (Cat X — stop 3 months before conception in both sexes), Nausea/GI upset"))
story.append(Paragraph("• <b>CI:</b> Pregnancy, renal failure (CrCl <30), significant hepatic disease, active infection", BULLET))
story.append(sp(3))
# HYDROXYCHLOROQUINE
story.append(KeepTogether([
Paragraph("<b>2. HYDROXYCHLOROQUINE (HCQ)</b> — Antimalarial DMARD", BOLD_B),
Paragraph("• <b>MOA:</b> Accumulates in lysosomes → inhibits antigen presentation → ↓ T-cell activation and cytokine production; blocks TLR signalling", BULLET),
Paragraph("• <b>Dose:</b> 200–400 mg/day (max 5 mg/kg/day)", BULLET),
Paragraph("• <b>Onset:</b> 3–6 months (slowest onset among DMARDs)", BULLET),
Paragraph("• <b>Advantages:</b> Safe in pregnancy (Cat C), no need for intensive monitoring, lipid-lowering effect, anti-thrombotic, used in SLE", BULLET),
Paragraph("• <b>Uses:</b> Mild RA, SLE, anti-phospholipid syndrome, COVID-19 (investigated)", BULLET),
]))
story.append(warn_box("Unique toxicity: Retinopathy (irreversible bull's eye maculopathy) — baseline + annual ophthalmology exam mandatory. Also: Cardiomyopathy (rare), prolonged QTc."))
story.append(sp(3))
# LEFLUNOMIDE
story.append(KeepTogether([
Paragraph("<b>3. LEFLUNOMIDE</b> — Pyrimidine synthesis inhibitor", BOLD_B),
Paragraph("• <b>MOA:</b> Prodrug → active metabolite <i>teriflunomide</i> → inhibits dihydroorotate dehydrogenase (DHODH) → ↓ pyrimidine synthesis → anti-proliferative on T & B lymphocytes", BULLET),
Paragraph("• <b>Dose:</b> Loading 100 mg/day × 3 days → maintenance 10–20 mg/day", BULLET),
Paragraph("• <b>Onset:</b> 4–8 weeks", BULLET),
Paragraph("• <b>Pharmacokinetics:</b> Very long half-life (~2 weeks); enterohepatic recirculation — cholestyramine/activated charcoal washout needed if switching/pregnant", BULLET),
]))
story.append(warn_box("Adverse effects: Hepatotoxicity (monitor LFTs), Teratogenicity (Cat X — requires washout with cholestyramine before conception), Diarrhoea, Hypertension, Alopecia, Peripheral neuropathy, Myelosuppression"))
story.append(sp(3))
# SULFASALAZINE
story.append(KeepTogether([
Paragraph("<b>4. SULFASALAZINE</b> — Sulfonamide + Salicylate", BOLD_B),
Paragraph("• <b>MOA:</b> Cleaved by colonic bacteria → sulfapyridine + 5-aminosalicylic acid (5-ASA); inhibits folate metabolism, NF-κB; ↓ IL-1, TNF-α", BULLET),
Paragraph("• <b>Dose:</b> 500 mg/day → titrate to 2–3 g/day in divided doses", BULLET),
Paragraph("• <b>Onset:</b> 1–3 months", BULLET),
Paragraph("• <b>Safe in:</b> Pregnancy (Cat B), lactation (caution), pediatric RA", BULLET),
Paragraph("• <b>Uses:</b> RA, spondyloarthropathies (ankylosing spondylitis), IBD-related arthropathy", BULLET),
]))
story.append(warn_box("Adverse effects: GI intolerance (most common), Sulfonamide hypersensitivity, Oligospermia (reversible), Megaloblastic anaemia (↓folate), Haematological (agranulocytosis — rare), Orange discolouration of urine/tears. CI: Sulfa allergy, G6PD deficiency"))
story.append(sp(3))
story.append(mnemonic_box("Traditional DMARD Mnemonic", "M-H-L-S: <b>M</b>ethotrexate • <b>H</b>ydroxychloroquine • <b>L</b>eflunomide • <b>S</b>ulfasalazine"))
story.append(sp(4))
# ── 1B. BIOLOGIC DMARDs ─────────────────────────────────────────────────────
story.append(drug_banner("B. BIOLOGIC DMARDs (bDMARDs)", bg=C_DRUG))
story.append(sp(2))
# TNF inhibitors
story.append(Paragraph("<b>I. TNF-α INHIBITORS (Anti-TNF)</b>", BOLD_B))
story.append(Paragraph(
"TNF-α is a key pro-inflammatory cytokine in RA. These agents are used when traditional DMARDs (especially MTX) fail (inadequate response after 3–6 months).",
BODY))
tnf_data = [
["Drug", "Type", "Route", "Key Distinguishing Feature"],
["Etanercept", "Fusion protein (TNF receptor + IgG1 Fc)", "SC 2×/week or 1×/week", "Does NOT cause demyelination; less TB risk; used in JIA"],
["Infliximab", "Chimeric monoclonal Ab (mouse + human)", "IV infusion", "Used with MTX to reduce immunogenicity; IBD approved"],
["Adalimumab", "Fully human monoclonal Ab", "SC every 2 weeks", "Most widely used; IBD + psoriasis + AS also approved"],
["Certolizumab", "PEGylated Fab' fragment of humanised Ab", "SC", "No Fc region → minimal placental transfer → safer in pregnancy"],
["Golimumab", "Fully human monoclonal Ab", "SC monthly or IV", "Convenient once-monthly dosing"],
]
story.append(two_col_table(tnf_data[1:], tnf_data[0]))
story.append(sp(2))
story.append(warn_box("Class ADRs of Anti-TNF: ↑Risk of serious infections (TB reactivation — screen with TST/IGRA + CXR before use), Fungal infections; Demyelinating disorders (except etanercept relative); Worsening HF (avoid in severe HF); Lymphoma risk; Injection/infusion site reactions; Autoimmune hepatitis; Drug-induced lupus"))
story.append(sp(2))
story.append(Paragraph("• <b>Contraindications:</b> Active infection/sepsis, active TB, demyelinating disease (MS), severe HF (NYHA III/IV), pregnancy (relative — certolizumab preferred if needed)", BULLET))
story.append(sp(3))
# IL-6 inhibitors
story.append(Paragraph("<b>II. IL-6 INHIBITORS</b>", BOLD_B))
story.append(Paragraph("• <b>Tocilizumab (TCZ)</b> — Humanised anti-IL-6 receptor monoclonal Ab (IV or SC). Can be used as <i>monotherapy</i> (unlike most other biologics). Also approved for COVID-19 cytokine storm, giant cell arteritis, JIA.", BULLET))
story.append(Paragraph("• <b>Sarilumab</b> — Fully human anti-IL-6R Ab (SC every 2 weeks). Similar profile to TCZ.", BULLET))
story.append(warn_box("IL-6 inhibitor ADRs: ↑Infections; Hyperlipidaemia; ↑LFTs; Neutropaenia; GI perforations (caution with diverticulitis); Masks fever of infection (IL-6 drives acute phase response — CRP may not rise during infection)"))
story.append(sp(3))
# IL-1 inhibitor
story.append(Paragraph("<b>III. IL-1 INHIBITOR</b>", BOLD_B))
story.append(Paragraph("• <b>Anakinra</b> — Recombinant IL-1 receptor antagonist (IL-1Ra); daily SC injection. Less commonly used in RA but important in Still's disease, FMF, CAPS (periodic fever syndromes).", BULLET))
story.append(sp(3))
# T-cell costimulation
story.append(Paragraph("<b>IV. T-CELL COSTIMULATION BLOCKER</b>", BOLD_B))
story.append(Paragraph("• <b>Abatacept (CTLA-4-Ig)</b> — Fusion protein of CTLA-4 + IgG1 Fc → binds CD80/CD86 on APCs → blocks CD28–B7 costimulatory signal → ↓ T-cell activation", BULLET))
story.append(Paragraph("• IV monthly or SC weekly. Can be used as monotherapy or with MTX. <i>Not</i> combined with other biologics.", BULLET))
story.append(sp(3))
# Anti-CD20
story.append(Paragraph("<b>V. ANTI-CD20 (B-CELL DEPLETION)</b>", BOLD_B))
story.append(Paragraph("• <b>Rituximab</b> — Chimeric anti-CD20 monoclonal Ab → depletes B cells; given as IV infusions (2 doses × 2 weeks apart) every 6 months; pre-medicate with methylprednisolone + antihistamine + paracetamol to reduce infusion reactions", BULLET))
story.append(Paragraph("• <b>Uses:</b> RA refractory to anti-TNF, granulomatosis with polyangiitis (GPA/Wegener's), ANCA vasculitis, lymphoma, CLL, ITP", BULLET))
story.append(warn_box("Rituximab ADRs: Infusion reactions (most common — up to 77% first infusion); Progressive multifocal leukoencephalopathy (PML — JC virus reactivation); Hypogammaglobulinaemia; Hepatitis B reactivation (screen before use); Prolonged B-cell depletion"))
story.append(sp(3))
# ── 1C. JAK INHIBITORS ──────────────────────────────────────────────────────
story.append(drug_banner("C. TARGETED SYNTHETIC DMARDs — JAK INHIBITORS (tsDMARDs)", bg=C_DRUG3))
story.append(sp(2))
story.append(Paragraph(
"<b>MOA:</b> Janus kinase (JAK) inhibitors block intracellular JAK1/JAK2/JAK3/TYK2 signalling → prevent phosphorylation of STAT proteins → ↓ transcription of pro-inflammatory cytokines (IL-6, IL-12, IL-23, IFN-γ, GM-CSF). "
"Oral agents — advantage over injectable biologics.", BODY))
story.append(sp(2))
jak_data = [
["Drug", "JAK Selectivity", "Dose", "Extra Approvals"],
["Tofacitinib", "JAK1 + JAK3 (±JAK2)", "5 mg BD or 11 mg XR OD", "Psoriatic arthritis, UC, JIA"],
["Baricitinib", "JAK1 + JAK2", "2 mg or 4 mg OD", "COVID-19 (severe hospitalised), atopic dermatitis"],
["Upadacitinib", "JAK1 selective", "15 mg OD", "Atopic dermatitis, PsA, AS, JIA"],
["Ruxolitinib", "JAK1 + JAK2", "Variable", "Myelofibrosis, polycythaemia vera, GVHD"],
["Filgotinib", "JAK1 selective", "200 mg OD", "UC (not RA in all countries)"],
]
story.append(two_col_table(jak_data[1:], jak_data[0]))
story.append(sp(2))
story.append(warn_box("JAK Inhibitor ADRs: ↑Infections (herpes zoster reactivation most characteristic — aciclovir prophylaxis considered), TB reactivation, URTI; Hyperlipidaemia; ↑Creatinine; Anaemia; Thromboembolism (DVT/PE — boxed warning for tofacitinib/baricitinib); MACE risk; Possible ↑malignancy (lymphoma). FDA Black Box: serious infections, thrombosis, malignancy, MI/stroke, death."))
story.append(Paragraph("• <b>CI:</b> Active/serious infection, pregnancy (Cat not established — avoid), lymphocyte count <500/mm³, Hb <8 g/dL", BULLET))
story.append(sp(3))
# ── COMPARISON TABLE ─────────────────────────────────────────────────────────
story.append(drug_banner("D. DMARD COMPARISON: Onset, Monitoring, Safety", bg=colors.HexColor("#00695C")))
story.append(sp(2))
comp_data = [
["Drug", "Onset", "Monitoring", "Key Safety/CI"],
["Methotrexate", "3–6 wks", "LFT, CBC, Cr", "Hepatotox, Teratogen (Cat X), Pneumonitis"],
["HCQ", "3–6 mo", "Ophthalmology q1yr", "Retinopathy (bull's eye)"],
["Leflunomide", "4–8 wks", "LFT, BP, CBC", "Hepatotox, Teratogen (Cat X), washout needed"],
["Sulfasalazine", "1–3 mo", "CBC, LFT", "Sulfa allergy, G6PD, oligospermia"],
["Anti-TNF", "2–12 wks", "TB screen, CBC, LFT", "TB reactivation, demyelination, HF"],
["Tocilizumab", "2–4 wks", "Lipids, CBC, LFT", "GI perforation, masks infection fever"],
["Rituximab", "Weeks–months", "CBC, IgG levels, HBsAg", "Infusion rxn, PML, HBV reactivation"],
["Abatacept", "3–6 mo", "Signs of infection", "Not with other biologics/live vaccines"],
["JAK inhibitors", "1–2 wks", "Lipids, CBC, Cr", "Herpes zoster, VTE, MACE — Boxed warning"],
]
story.append(two_col_table(comp_data[1:], comp_data[0], bg_hdr=colors.HexColor("#00695C")))
story.append(sp(4))
# ── STEP-UP STRATEGY ─────────────────────────────────────────────────────────
story.append(mnemonic_box("RA Treatment Step-Up Strategy (ACR/EULAR)",
"STEP 1: MTX monotherapy (±HCQ/SSZ if mild) → STEP 2: Combination csDMARDs or add bDMARD/tsDMARD → STEP 3: Switch biologic class → TARGET: Low disease activity or remission (DAS28 <2.6)"))
story.append(sp(3))
# ════════════════════════════════════════════════════════════════════════════
# SECTION 2: NSAIDs (brief - as adjunct in RA/acute gout)
# ════════════════════════════════════════════════════════════════════════════
story.append(section_banner("SECTION 2: NSAIDs & CORTICOSTEROIDS (Adjunct)", bg=colors.HexColor("#E65100")))
story.append(sp(2))
story.append(Paragraph(
"NSAIDs and corticosteroids provide symptomatic relief in both RA (bridging therapy) and acute gout. "
"They do NOT modify disease course in RA.", BODY))
story.append(sp(2))
story.append(Paragraph("<b>NSAIDs MOA:</b> Inhibit COX-1 and/or COX-2 → ↓ prostaglandin synthesis → anti-inflammatory, analgesic, antipyretic", BULLET))
story.append(Paragraph("<b>Non-selective (COX-1+2):</b> Ibuprofen, Naproxen, Diclofenac, Indomethacin (most potent for gout), Piroxicam", BULLET))
story.append(Paragraph("<b>Selective COX-2 (Coxibs):</b> Celecoxib, Etoricoxib — ↓GI risk, ↑CV risk (except Naproxen)", BULLET))
story.append(Paragraph("<b>Corticosteroids:</b> Prednisone/prednisolone — used as bridge while DMARDs take effect; intra-articular injections for localised flares; ACTH injection for acute gout", BULLET))
story.append(warn_box("NSAIDs CI in gout/RA: GI ulcers, renal impairment, heart failure, aspirin-sensitive asthma, elderly (prefer coxibs). Avoid NSAIDs in gout with renal disease — prefer colchicine or corticosteroids."))
story.append(sp(4))
# ════════════════════════════════════════════════════════════════════════════
# SECTION 3: ANTIGOUT DRUGS
# ════════════════════════════════════════════════════════════════════════════
story.append(section_banner("SECTION 3: ANTIGOUT DRUGS", bg=C_SEC2))
story.append(sp(2))
story.append(Paragraph(
"Gout = hyperuricaemia → monosodium urate (MSU) crystal deposition in joints, soft tissues, kidneys. "
"Normal serum uric acid: <6.8 mg/dL (men), <6.0 mg/dL (women). "
"Management has two phases: <b>(1) Treat acute attack</b> and <b>(2) Lower uric acid (ULT)</b> to prevent recurrence.",
BODY))
story.append(sp(3))
# Pathophysiology box
story.append(box([
"<b>Uric Acid Metabolism:</b> Purines (dietary + endogenous) → Hypoxanthine → Xanthine (via xanthine oxidase) → Uric acid",
"80% uric acid excreted by kidneys; 20% via GI. Urate solubility limit ~6.8 mg/dL at body temperature.",
"<b>Triggers of acute gout:</b> Alcohol (especially beer/spirits), dehydration, high purine foods, diuretics (thiazides, loop), low-dose aspirin, rapid uric acid changes (starting/stopping ULT), trauma, surgery."
], bg=C_LIGHT2))
story.append(sp(3))
# COLCHICINE
story.append(drug_banner("1. COLCHICINE — First-line Acute Gout", bg=C_DRUG2))
story.append(sp(2))
story.append(Paragraph("• <b>MOA:</b> Binds tubulin → inhibits microtubule polymerisation → prevents neutrophil migration into joint → blocks NLRP3 inflammasome → ↓ IL-1β release → disrupts urate crystal phagocytosis", BULLET))
story.append(Paragraph("• <b>Dose (acute gout — low-dose preferred):</b> 1.2 mg stat, then 0.6 mg 1 hour later (total 1.8 mg first day); <i>then</i> 0.6 mg BD for prophylaxis", BULLET))
story.append(Paragraph("• <b>Old high-dose regimen:</b> Now abandoned — 0.5 mg hourly until relief/toxicity (GI); high-dose = more toxicity without better efficacy", BULLET))
story.append(Paragraph("• <b>Start within 24–36 hours</b> of acute attack for best effect; less effective if delayed >72 hours", BULLET))
story.append(Paragraph("• <b>Prophylaxis:</b> 0.5–0.6 mg OD/BD when initiating ULT (for 3–6 months) to prevent mobilisation flares", BULLET))
story.append(Paragraph("• <b>Other uses:</b> FMF (familial Mediterranean fever), pericarditis, Behçet's disease, pseudo-gout (CPPD)", BULLET))
story.append(warn_box("Colchicine ADRs: Diarrhoea, nausea, vomiting, abdominal cramps (GI — dose-limiting, more with high dose); Myopathy/rhabdomyolysis (especially with statins/cyclosporin); Peripheral neuropathy; Myelosuppression (rare); Azoospermia (reversible). Overdose: Multiorgan failure, marrow suppression, death."))
story.append(Paragraph("• <b>CI:</b> Renal failure (CrCl <10), hepatic failure, blood dyscrasias. Reduce dose if CrCl 10–50 mL/min.", BULLET))
story.append(Paragraph("• <b>Interactions:</b> CYP3A4 + P-gp substrate → ↑levels with clarithromycin, cyclosporin, verapamil, diltiazem, HIV protease inhibitors", BULLET))
story.append(sp(3))
# NSAIDs in gout
story.append(Paragraph("<b>NSAIDs IN ACUTE GOUT:</b> Indomethacin 50 mg TDS (drug of choice historically), Naproxen, Etoricoxib — all effective. Start immediately at full dose. Avoid in renal impairment.", BULLET))
story.append(Paragraph("<b>Corticosteroids in acute gout:</b> Oral prednisolone 30–40 mg/day × 3–5 days or IA injection — used when NSAIDs/colchicine contraindicated (renal disease, elderly)", BULLET))
story.append(Paragraph("<b>IL-1 inhibitors (Canakinumab, Anakinra):</b> For refractory/recurrent acute gout not responding to standard therapy", BULLET))
story.append(sp(3))
# XANTHINE OXIDASE INHIBITORS
story.append(drug_banner("2. XANTHINE OXIDASE INHIBITORS (XOI) — Urate-Lowering Therapy", bg=C_DRUG2))
story.append(sp(2))
story.append(Paragraph(
"First-line ULT. Indicated when: ≥2 attacks/year; tophi; gout + CKD; urate nephrolithiasis; radiographic damage. "
"<b>Start 2–4 weeks after acute attack resolves</b> (always with colchicine/NSAID prophylaxis to prevent flare).",
BODY))
story.append(sp(2))
# Allopurinol
story.append(Paragraph("<b>A. ALLOPURINOL</b> — Drug of Choice for Chronic Gout", BOLD_B))
story.append(Paragraph("• <b>MOA:</b> Structural analogue of hypoxanthine → competitive inhibitor of xanthine oxidase → ↓ conversion of hypoxanthine→xanthine→uric acid; active metabolite <i>oxypurinol</i> is also an XO inhibitor", BULLET))
story.append(Paragraph("• <b>Dose:</b> Start 100 mg/day → titrate up every 2–4 weeks to target SUA <6 mg/dL (max 800 mg/day). Reduce dose in renal impairment.", BULLET))
story.append(Paragraph("• <b>Renally excreted:</b> Dose adjustment essential in CKD (start 50 mg/day if CrCl <30)", BULLET))
story.append(Paragraph("• <b>Unique interaction:</b> 6-Mercaptopurine/Azathioprine — allopurinol inhibits their metabolism → ↑toxicity (reduce 6-MP/AZA dose by 75%)", BULLET))
story.append(Paragraph("• <b>HLA-B*5801 screening:</b> Recommended in high-risk populations (Han Chinese, Thai, Korean) before starting to ↓ risk of severe cutaneous reactions", BULLET))
story.append(warn_box("Allopurinol ADRs: GI upset; Rash (maculopapular — common, stop drug); Severe cutaneous reactions — Allopurinol Hypersensitivity Syndrome (AHS): Stevens-Johnson syndrome (SJS), Toxic Epidermal Necrolysis (TEN), DRESS syndrome — life-threatening; Hypersensitivity vasculitis; ↑ risk in renal impairment + diuretic use."))
story.append(sp(2))
# Febuxostat
story.append(Paragraph("<b>B. FEBUXOSTAT</b> — Non-Purine XO Inhibitor", BOLD_B))
story.append(Paragraph("• <b>MOA:</b> Non-purine selective xanthine oxidase inhibitor → blocks both oxidised and reduced forms of XO (more complete inhibition than allopurinol)", BULLET))
story.append(Paragraph("• <b>Dose:</b> 40–80 mg OD (can use in mild-moderate CKD without dose adjustment)", BULLET))
story.append(Paragraph("• <b>Advantages over allopurinol:</b> Can be used in mild-moderate renal impairment; no cross-reaction with allopurinol hypersensitivity (different structure); no HLA testing needed", BULLET))
story.append(Paragraph("• <b>Disadvantages:</b> More expensive; <b>Black Box Warning</b>: ↑CV mortality in patients with established CVD (CARES trial) — avoid in CVD; not to be used as first-line (only if allopurinol not tolerated/fails)", BULLET))
story.append(warn_box("Febuxostat ADRs: GI symptoms, LFT elevation, arthralgia; CV events (MACE) — caution in CVD patients. Same interaction with 6-MP/AZA as allopurinol."))
story.append(sp(3))
# URICOSURICS
story.append(drug_banner("3. URICOSURIC DRUGS — ↑ Renal Uric Acid Excretion", bg=C_DRUG2))
story.append(sp(2))
story.append(Paragraph(
"<b>MOA:</b> Block renal tubular reabsorption of uric acid (block URAT1/OAT transporters in PCT) → ↑ urinary uric acid excretion → ↓ serum uric acid. "
"Used in <i>under-excretors</i> of uric acid (90% of primary gout).",
BODY))
story.append(sp(2))
urico_data = [
["Drug", "Notes", "Dose"],
["Probenecid", "Prototype uricosuric; also blocks tubular secretion of penicillin/MTX (drug interaction); CI in nephrolithiasis, CKD, aspirin use (aspirin antagonises effect); adequate hydration essential to prevent urate stones", "500 mg BD → 1–2 g/day"],
["Sulfinpyrazone", "More potent uricosuric than probenecid; also has antiplatelet effect; GI side effects common", "200–400 mg/day"],
["Benzbromarone", "Potent URAT1 inhibitor; can be used in mild CKD; hepatotoxicity risk", "50–200 mg/day"],
["Lesinurad", "Selective URAT1/OAT4 inhibitor; used as adjunct to XOI; withdrawn in some markets due to renal ADRs", "200 mg OD with XOI"],
]
story.append(two_col_table(urico_data[1:], urico_data[0], bg_hdr=C_SEC2))
story.append(sp(2))
story.append(warn_box("Uricosurics CI: Nephrolithiasis (↑urinary urate → stone risk; always hydrate well + alkalinise urine with sodium bicarbonate/citrate); CKD (GFR <30); Overproducers of uric acid (24h urine uric acid >800 mg/day — use XOI instead); Salicylate use (antagonism)"))
story.append(sp(3))
# PEGLOTICASE/RASBURICASE
story.append(drug_banner("4. RECOMBINANT URICASES — Severe/Refractory Gout", bg=C_DRUG2))
story.append(sp(2))
story.append(Paragraph(
"Humans lack uricase (the enzyme that degrades uric acid to allantoin in other mammals). "
"Recombinant uricases rapidly lower serum uric acid and can dissolve tophi.",
BODY))
story.append(sp(2))
story.append(Paragraph("• <b>Pegloticase (Krystexxa):</b> PEGylated recombinant porcine uricase; IV infusion q2 weeks; rapidly dissolves tophi; used in refractory/severe tophaceous gout unresponsive to all other therapy; <b>Anaphylaxis risk (infusion reactions)</b> — pre-medicate with steroids + antihistamines; anti-drug antibodies can develop (check SUA before each infusion — if SUA rises, stop to avoid infusion reactions)", BULLET))
story.append(Paragraph("• <b>Rasburicase:</b> Non-PEGylated recombinant fungal uricase; IV; used for tumour lysis syndrome prevention/treatment (NOT chronic gout); CI in G6PD deficiency (generates H₂O₂ → haemolysis)", BULLET))
story.append(warn_box("Pegloticase: Anaphylaxis (most feared), Infusion reactions, MACE risk. Rasburicase: Haemolysis in G6PD deficiency (absolute CI). Both: Gout flare mobilisation on initiation."))
story.append(sp(3))
# GOUT OVERVIEW TABLE
story.append(drug_banner("ANTIGOUT DRUGS — Quick Summary Table", bg=colors.HexColor("#1B5E20")))
story.append(sp(2))
gout_summary = [
["Drug", "MOA", "Use", "Key Toxicity"],
["Colchicine", "↓Tubulin polymerisation → ↓neutrophil migration, ↓NLRP3/IL-1β", "Acute gout; FMF prophylaxis; pericarditis", "GI toxicity, myopathy; fatal in OD"],
["Indomethacin/NSAIDs", "COX inhibition → ↓PGs", "Acute gout", "GI ulcers, renal impairment"],
["Allopurinol", "XO inhibitor (hypoxanthine analogue) → ↓uric acid production", "Chronic gout (1st line ULT)", "SJS/TEN/DRESS (AHS), rash, GI"],
["Febuxostat", "Non-purine XO inhibitor → ↓uric acid production", "Gout if allopurinol intolerant", "CV events (MACE), GI, LFT↑"],
["Probenecid", "Blocks URAT1 → ↑uric acid excretion", "Gout (under-excretors)", "Urate stones, GI, rash"],
["Pegloticase", "Recombinant uricase → uric acid → allantoin", "Refractory tophaceous gout", "Anaphylaxis, infusion reactions"],
["Rasburicase", "Non-PEGylated uricase", "Tumour lysis syndrome", "Haemolysis (G6PD deficiency — CI)"],
["Canakinumab", "Anti-IL-1β monoclonal Ab", "Refractory acute gout", "Infections, expensive"],
]
story.append(two_col_table(gout_summary[1:], gout_summary[0], bg_hdr=colors.HexColor("#1B5E20")))
story.append(sp(3))
# GOUT ALGORITHM
story.append(mnemonic_box("Gout Management Algorithm",
"ACUTE ATTACK (first 24h): Colchicine (preferred) OR NSAID OR Corticosteroid<br/>"
"PROPHYLAXIS: Start colchicine 0.5 mg BD for 3–6 months when initiating ULT<br/>"
"ULT (after 2+ attacks or tophi/complications): Allopurinol (1st line) → Febuxostat (2nd line) → Add uricosuric if SUA target not met<br/>"
"TARGET SUA: <6 mg/dL (<5 mg/dL for tophaceous gout)<br/>"
"REFRACTORY: Pegloticase IV"))
story.append(sp(3))
# ════════════════════════════════════════════════════════════════════════════
# SECTION 4: DRUGS WITH DUAL RELEVANCE
# ════════════════════════════════════════════════════════════════════════════
story.append(section_banner("SECTION 4: IMPORTANT DRUG INTERACTIONS & SPECIAL POINTS", bg=C_SEC3))
story.append(sp(2))
special = [
["Clinical Scenario", "Drug of Choice / Note"],
["Gout + CKD", "Allopurinol (reduced dose) or Febuxostat; avoid uricosurics; colchicine (reduce dose); NSAIDs contraindicated"],
["Gout + organ transplant (on cyclosporin)", "Avoid colchicine (↑toxicity) + allopurinol with AZA; use corticosteroids for acute; febuxostat for ULT"],
["Gout + patient on azathioprine", "Allopurinol inhibits AZA metabolism → reduce AZA by 75% OR switch ULT to febuxostat/uricosuric"],
["Gout on low-dose aspirin", "Aspirin antagonises uricosurics; continue aspirin (CV benefit > gout risk); use XOI instead of probenecid"],
["Diuretic-induced hyperuricaemia", "Switch diuretic if possible; use losartan (uricosuric effect) + allopurinol"],
["Gout + pregnancy", "Colchicine relatively safe (Cat C); avoid NSAIDs in 3rd trimester; avoid ULT (Category C/D — generally hold)"],
["RA + HBV", "Screen and treat HBV before biologics/immunosuppressants; rituximab and anti-TNF need HBV prophylaxis"],
["RA in pregnancy", "Hydroxychloroquine (preferred), Sulfasalazine (safe), Low-dose prednisolone; avoid MTX + leflunomide"],
["MTX + NSAIDs", "NSAIDs ↑ MTX toxicity by ↓ renal excretion — caution; use paracetamol for pain relief in RA patients on MTX"],
]
story.append(two_col_table(special[1:], special[0], bg_hdr=C_SEC3))
story.append(sp(3))
# ════════════════════════════════════════════════════════════════════════════
# EXAM MUST-KNOWS
# ════════════════════════════════════════════════════════════════════════════
story.append(section_banner("SECTION 5: EXAM HIGH-YIELD POINTS ⭐", bg=colors.HexColor("#4E342E")))
story.append(sp(2))
exam_points = [
"Methotrexate — folic acid antagonist; once weekly; always add folic acid; hepatotoxic + teratogenic (Cat X)",
"Hydroxychloroquine — causes irreversible retinopathy (bull's eye maculopathy); annual eye exam; safe in pregnancy",
"Leflunomide — inhibits DHODH (pyrimidine synthesis); Cat X; cholestyramine washout to remove drug",
"Sulfasalazine — prodrug → 5-ASA + sulfapyridine; causes oligospermia (reversible); safe in pregnancy (Cat B)",
"Etanercept — ONLY TNF inhibitor that does NOT cause demyelination and has less TB risk; fusion protein (not an antibody)",
"Certolizumab — only TNF inhibitor safe in pregnancy (no Fc → minimal placental transfer)",
"Rituximab — anti-CD20 (B-cell depleter); premedicate to prevent infusion reactions; screen for HBV; PML risk",
"Tocilizumab — IL-6R blocker; can be used as monotherapy; masks infection (↓CRP falsely normal); used in COVID cytokine storm",
"Abatacept — blocks T-cell costimulation (CD28–B7 pathway via CTLA-4-Ig); never combine with other biologics",
"JAK inhibitors — ORAL agents; herpes zoster reactivation is characteristic; tofacitinib boxed warning for VTE, MACE",
"Colchicine — inhibits microtubule polymerisation + NLRP3 inflammasome; GI toxicity dose-limiting; interacts with CYP3A4 inhibitors",
"Allopurinol — XO inhibitor; drug interaction with 6-MP/AZA (↓ their dose by 75%); HLA-B*5801 screening in high-risk; causes SJS/TEN",
"Febuxostat — non-purine XO inhibitor; can use in mild-moderate CKD; ↑CV risk (CARES trial) — black box warning",
"Probenecid — uricosuric; blocks penicillin secretion (used to prolong penicillin action); CI in nephrolithiasis",
"Rasburicase — used for tumour lysis syndrome NOT chronic gout; CI in G6PD deficiency (haemolysis)",
"Pegloticase — rapid tophi dissolution; anaphylaxis risk; check SUA before each infusion",
"Low-dose aspirin antagonises uricosurics (but not XOIs); DO NOT stop aspirin in CV patients with gout",
"Gout + Azathioprine: allopurinol → reduce AZA dose 75% OR use febuxostat/uricosuric as ULT instead",
"Start ULT 2–4 weeks after acute attack resolves; always cover with colchicine prophylaxis for 3–6 months",
"Target SUA: <6 mg/dL (general gout); <5 mg/dL (tophaceous gout/severe)"
]
for pt in exam_points:
story.append(Paragraph(f"• {pt}", BULLET))
story.append(sp(3))
# ── MNEMONICS ────────────────────────────────────────────────────────────────
story.append(mnemonic_box(
"TNF Inhibitors Mnemonic — 'E-I-A-C-G'",
"<b>E</b>tanercept (fusion protein, SC) · <b>I</b>nfliximab (chimeric, IV) · <b>A</b>dalimumab (fully human, SC) · <b>C</b>ertolizumab (PEGylated Fab, pregnancy safe) · <b>G</b>olimumab (fully human, SC monthly)"))
story.append(sp(2))
story.append(mnemonic_box(
"Gout Mnemonic — 'When is ULT started?'",
"Start ULT when: 2+ attacks/year | Tophi | Renal stones | CKD | XRay damage<br/>Always cover with colchicine/NSAID prophylaxis first 3–6 months"))
story.append(sp(3))
# ── FOOTER ───────────────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#90A4AE")))
story.append(sp(1))
story.append(Paragraph(
"Sources: Lippincott Illustrated Reviews: Pharmacology | Katzung Basic & Clinical Pharmacology 16e | "
"Goodman & Gilman | ACR/EULAR RA & Gout Guidelines | Generated by Orris Medical AI",
FOOTER))
story.append(Paragraph(
"This gist is for educational/revision purposes only. Always verify drug dosages against current institutional guidelines.",
FOOTER))
# ── BUILD ────────────────────────────────────────────────────────────────────
doc.build(story)
print("PDF generated:", OUTPUT)
cd /home/daytona/workspace/pharma-gist && python make_gist.py 2>&1
ls -lh /home/daytona/workspace/pharma-gist/
Antirheumatoid Antigout KDT Gist
PDF Document · PDF