Antibiotics table format which includes adr, Drug interactions, Drug food interaction, frequency, dose (high and low significant)

Reading File
Asking for Preferences
Which specific antibiotic classes would you like included? Please list them (e.g., Penicillins, Macrolides, Fluoroquinolones, etc.).

5 antibiotic

Which 5 antibiotics would you like in the table? Please name them (e.g., Amoxicillin, Ciprofloxacin, Azithromycin, Metronidazole, Doxycycline).

50 not 5

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

mkdir -p /tmp/workspace/antibiotics-table && ls /tmp/workspace/antibiotics-table/

Writing File

~/antibiotics-table/build_table.py

import openpyxl
from openpyxl.styles import (
    Font, PatternFill, Alignment, Border, Side
)
from openpyxl.utils import get_column_letter

wb = openpyxl.Workbook()
ws = wb.active
ws.title = "Antibiotics Reference"

# ── Data ──────────────────────────────────────────────────────────────────────
# Columns: No | Drug | Class | Indication | Low Dose | High Dose | Frequency |
#          ADR | Drug-Drug Interactions | Drug-Food Interactions

antibiotics = [
    # ── PENICILLINS ──────────────────────────────────────────────────────────
    (1,  "Penicillin G", "Penicillin (Natural)",
     "Streptococcal infections, syphilis, meningitis, endocarditis",
     "1–2 MU IV q4–6h", "4 MU IV q4h (severe infections)",
     "q4–6h IV/IM",
     "Hypersensitivity (anaphylaxis, rash), seizures (high dose), hypokalemia, diarrhea",
     "Probenecid (↑ penicillin levels); Methotrexate (↑ MTX toxicity); Warfarin (↑ INR); Aminoglycosides (inactivation if mixed in IV line)",
     "Food reduces oral absorption (give on empty stomach); Dairy does not affect IV form"),

    (2,  "Penicillin V", "Penicillin (Natural)",
     "Streptococcal pharyngitis, mild skin infections",
     "250 mg PO q6–8h", "500 mg PO q6h",
     "q6–8h PO",
     "Hypersensitivity, nausea, diarrhea, oral candidiasis",
     "Warfarin (↑ INR); Oral contraceptives (↓ efficacy); Methotrexate (↑ toxicity)",
     "Take on empty stomach (food ↓ absorption by ~30%)"),

    (3,  "Amoxicillin", "Aminopenicillin",
     "Otitis media, sinusitis, pharyngitis, H. pylori (triple therapy), UTI",
     "250–500 mg PO q8h", "875 mg PO q12h or 3 g PO q8h (high-dose)",
     "q8h or q12h PO",
     "Rash (esp. in EBV), diarrhea, hypersensitivity, C. diff colitis, vaginitis",
     "Allopurinol (↑ rash risk); Warfarin (↑ INR); Methotrexate (↑ toxicity); Oral contraceptives (↓ efficacy)",
     "Can be taken with or without food; avoid alcohol"),

    (4,  "Amoxicillin-Clavulanate", "Aminopenicillin + β-lactamase inhibitor",
     "Otitis media, sinusitis, ABECB, bite wounds, intra-abdominal infections",
     "500/125 mg PO q8h", "875/125 mg PO q12h",
     "q8–12h PO",
     "Diarrhea (common due to clavulanate), hepatotoxicity (cholestatic), hypersensitivity, C. diff",
     "Warfarin (↑ INR); Allopurinol (↑ rash); Methotrexate (↑ toxicity)",
     "Take with food to ↓ GI upset; avoid alcohol"),

    (5,  "Ampicillin", "Aminopenicillin",
     "Listeria meningitis, enterococcal infections, UTI, typhoid",
     "250–500 mg PO q6h / 1–2 g IV q6h", "2 g IV q4h (meningitis)",
     "q4–6h IV; q6h PO",
     "Rash (esp. EBV mononucleosis), diarrhea, hypersensitivity, pseudomembranous colitis",
     "Allopurinol (↑ rash); Warfarin (↑ INR); Oral contraceptives (↓ efficacy)",
     "Oral: take on empty stomach; IV not affected by food"),

    (6,  "Nafcillin", "Antistaphylococcal Penicillin",
     "MSSA bacteremia, endocarditis, osteomyelitis, skin/soft tissue infections",
     "1 g IV q6h", "2 g IV q4h (severe MSSA)",
     "q4–6h IV",
     "Phlebitis (IV), neutropenia (prolonged use), hepatotoxicity, hypersensitivity",
     "Warfarin (↓ INR – nafcillin is a CYP inducer); Cyclosporine (↓ levels)",
     "IV only; no food interactions; monitor LFTs"),

    (7,  "Piperacillin-Tazobactam", "Antipseudomonal Penicillin + inhibitor",
     "Hospital-acquired pneumonia, intra-abdominal infections, febrile neutropenia, Pseudomonas",
     "2.25 g IV q6h", "4.5 g IV q6h (extended infusion 3–4 h)",
     "q6–8h IV",
     "Diarrhea, hypersensitivity, hypokalemia, hepatotoxicity, thrombocytopenia, seizures (high dose/renal failure)",
     "Vancomycin (↑ nephrotoxicity); Methotrexate (↑ toxicity); Warfarin (↑ INR); Aminoglycosides (do not mix in same IV line)",
     "IV only; no direct food interactions"),

    # ── CEPHALOSPORINS ───────────────────────────────────────────────────────
    (8,  "Cephalexin (1st gen)", "Cephalosporin – 1st Generation",
     "Skin/soft tissue, UTI, streptococcal pharyngitis",
     "250 mg PO q6h", "1 g PO q6h",
     "q6h PO",
     "Diarrhea, hypersensitivity (~1–2% cross with penicillin), nausea, vaginitis",
     "Warfarin (↑ INR); Probenecid (↑ cephalexin levels); Aminoglycosides (↑ nephrotoxicity)",
     "Take with or without food; avoid alcohol"),

    (9,  "Cefazolin (1st gen)", "Cephalosporin – 1st Generation",
     "Surgical prophylaxis, MSSA infections, skin/soft tissue, UTI",
     "1 g IV/IM q8h", "2 g IV q8h (severe infections)",
     "q8h IV/IM",
     "Phlebitis, hypersensitivity, diarrhea, Coombs positive hemolytic anemia (rare)",
     "Warfarin (↑ INR); Probenecid (↑ levels); Aminoglycosides (↑ nephrotoxicity)",
     "IV/IM only; no food interactions"),

    (10, "Cefuroxime (2nd gen)", "Cephalosporin – 2nd Generation",
     "Otitis media, sinusitis, pharyngitis, community-acquired pneumonia, Lyme disease",
     "250 mg PO q12h / 750 mg IV q8h", "500 mg PO q12h / 1.5 g IV q8h",
     "q8–12h PO/IV",
     "Diarrhea, nausea, hypersensitivity, disulfiram-like reaction (with alcohol)",
     "Warfarin (↑ INR); Probenecid (↑ levels); Antacids/H2 blockers (↓ oral absorption)",
     "Oral: take with food to ↑ absorption; avoid alcohol"),

    (11, "Cefoxitin (2nd gen)", "Cephalosporin – 2nd Generation (Cephamycin)",
     "Intra-abdominal infections, pelvic inflammatory disease, surgical prophylaxis",
     "1 g IV q6–8h", "2 g IV q4–6h",
     "q4–8h IV",
     "Hypersensitivity, phlebitis, diarrhea, C. diff colitis",
     "Warfarin (↑ INR); Probenecid (↑ cefoxitin levels)",
     "IV/IM only; no food interactions"),

    (12, "Ceftriaxone (3rd gen)", "Cephalosporin – 3rd Generation",
     "Meningitis, gonorrhea, community-acquired pneumonia, Lyme disease, typhoid",
     "1 g IV/IM q24h", "2 g IV q12h (meningitis/severe)",
     "q12–24h IV/IM",
     "Biliary sludging/pseudolithiasis, diarrhea, hypersensitivity, Coombs positive, bleeding (vitamin K antagonism)",
     "Warfarin (↑ INR); Calcium-containing IV solutions (precipitation – avoid mixing); Probenecid (↑ levels)",
     "IV/IM only; avoid mixing with calcium-containing fluids; no direct food interaction"),

    (13, "Ceftazidime (3rd gen)", "Cephalosporin – 3rd Generation (anti-Pseudomonal)",
     "Pseudomonas aeruginosa infections, hospital-acquired pneumonia, febrile neutropenia",
     "1 g IV q8h", "2 g IV q8h",
     "q8h IV",
     "Hypersensitivity, phlebitis, diarrhea, C. diff, elevated LFTs",
     "Warfarin (↑ INR); Aminoglycosides (↑ nephrotoxicity if combined)",
     "IV only; no food interactions"),

    (14, "Cefdinir (3rd gen)", "Cephalosporin – 3rd Generation (oral)",
     "Otitis media, sinusitis, pharyngitis, skin/soft tissue infections",
     "300 mg PO q12h", "600 mg PO q24h",
     "q12–24h PO",
     "Diarrhea, nausea, rash, red/maroon stools (iron interaction), hypersensitivity",
     "Probenecid (↑ levels); Warfarin (↑ INR); Iron/antacids (↓ absorption)",
     "Food may increase absorption; iron supplements and antacids ↓ absorption (separate by 2 h)"),

    (15, "Cefepime (4th gen)", "Cephalosporin – 4th Generation",
     "Pseudomonas, febrile neutropenia, hospital-acquired pneumonia, meningitis",
     "1 g IV q12h", "2 g IV q8h",
     "q8–12h IV",
     "Neurotoxicity (encephalopathy, seizures esp. renal failure), hypersensitivity, phlebitis, diarrhea",
     "Warfarin (↑ INR); Aminoglycosides (↑ nephrotoxicity)",
     "IV only; no food interactions; dose adjust in renal failure"),

    (16, "Ceftaroline (5th gen)", "Cephalosporin – 5th Generation (anti-MRSA)",
     "MRSA skin/soft tissue infections, community-acquired pneumonia",
     "600 mg IV q12h", "600 mg IV q8h (MRSA bacteremia, off-label)",
     "q8–12h IV",
     "Hypersensitivity, diarrhea, phlebitis, Coombs positive hemolytic anemia",
     "Warfarin (↑ INR); Probenecid (↑ levels)",
     "IV only; no food interactions"),

    # ── CARBAPENEMS ──────────────────────────────────────────────────────────
    (17, "Meropenem", "Carbapenem",
     "Serious gram-negative infections, Pseudomonas, intra-abdominal, meningitis, febrile neutropenia",
     "500 mg IV q8h", "2 g IV q8h (meningitis/Pseudomonas)",
     "q8h IV",
     "Seizures (less than imipenem), hypersensitivity (~1% cross with penicillin), nausea, diarrhea, elevated LFTs",
     "Valproic acid (↓ valproate levels significantly – seizure risk); Probenecid (↑ meropenem levels); Warfarin (↑ INR)",
     "IV only; no food interactions; monitor valproate levels"),

    (18, "Imipenem-Cilastatin", "Carbapenem",
     "Polymicrobial infections, nosocomial pneumonia, intra-abdominal infections",
     "250–500 mg IV q6h", "1 g IV q6h",
     "q6h IV",
     "Seizures (highest among carbapenems), nausea/vomiting, hypersensitivity, C. diff, eosinophilia",
     "Valproic acid (↓ valproate levels – seizure risk); Ganciclovir (↑ seizure risk); Cyclosporine (↑ CNS toxicity)",
     "IV only; no food interactions; caution in seizure patients"),

    (19, "Ertapenem", "Carbapenem (no Pseudomonal coverage)",
     "Community-acquired intra-abdominal infections, diabetic foot, UTI",
     "1 g IV/IM q24h", "1 g IV/IM q24h (max dose)",
     "q24h IV/IM",
     "Diarrhea, nausea, headache, phlebitis, seizures (rare), hypersensitivity",
     "Valproic acid (↓ valproate levels); Probenecid (↑ levels)",
     "IM: mix with 1% lidocaine; no food interactions"),

    # ── MACROLIDES ───────────────────────────────────────────────────────────
    (20, "Azithromycin", "Macrolide",
     "Community-acquired pneumonia, atypical pneumonia, STIs (chlamydia), H. pylori, MAC prophylaxis",
     "250 mg PO q24h (5-day Z-pack)", "500 mg PO/IV q24h",
     "q24h PO/IV",
     "Nausea, diarrhea, QT prolongation (dose-dependent), hepatotoxicity, ototoxicity (high dose), cardiac arrhythmias",
     "QT-prolonging drugs (↑ arrhythmia risk); Warfarin (↑ INR); Digoxin (↑ digoxin levels); Antacids (↓ absorption slightly); Statins (↑ myopathy risk)",
     "Take on empty stomach for better absorption; avoid grapefruit juice; avoid alcohol"),

    (21, "Clarithromycin", "Macrolide",
     "Community-acquired pneumonia, H. pylori (triple therapy), MAC, atypical infections, skin infections",
     "250 mg PO q12h", "500 mg PO q12h or 1 g ER q24h",
     "q12h PO (q24h ER)",
     "Bitter/metallic taste, nausea, diarrhea, QT prolongation, hepatotoxicity, C. diff",
     "Strong CYP3A4 inhibitor: ↑ levels of statins (↑ myopathy), warfarin (↑ INR), digoxin, cyclosporine, carbamazepine, colchicine (fatal toxicity); QT-prolonging drugs (↑ risk)",
     "Take with or without food (ER: take with food); avoid grapefruit juice"),

    (22, "Erythromycin", "Macrolide",
     "Atypical pneumonia, chlamydia, pertussis, campylobacter, gastroparesis (pro-motility)",
     "250–500 mg PO q6h", "1 g IV q6h (severe)",
     "q6h PO/IV",
     "Severe GI upset (nausea, cramps, diarrhea), QT prolongation, hepatotoxicity (cholestatic), thrombophlebitis (IV), ototoxicity (high dose)",
     "Strong CYP3A4 inhibitor: ↑ warfarin, digoxin, cyclosporine, statins, theophylline; QT prolongers (↑ arrhythmia); Antacids (↓ absorption)",
     "Take with food to ↓ GI upset; avoid grapefruit juice"),

    # ── FLUOROQUINOLONES ──────────────────────────────────────────────────────
    (23, "Ciprofloxacin", "Fluoroquinolone (2nd gen)",
     "UTI, prostatitis, gastroenteritis, anthrax, Pseudomonas, gonorrhea",
     "250–500 mg PO q12h / 200–400 mg IV q12h", "750 mg PO q12h / 400 mg IV q8h",
     "q8–12h PO/IV",
     "Nausea, tendinopathy/tendon rupture (esp. Achilles), QT prolongation, phototoxicity, CNS effects (confusion, seizures), C. diff, peripheral neuropathy, dysglycemia",
     "Warfarin (↑ INR); NSAIDs (↑ CNS side effects/seizures); Theophylline (↑ levels); Antacids/iron (↓ absorption); QT prolongers; Cyclosporine (↑ nephrotoxicity)",
     "Avoid dairy, calcium-fortified foods, antacids, and iron within 2h; avoid caffeine (↑ CNS effects); avoid excessive sun exposure"),

    (24, "Levofloxacin", "Fluoroquinolone (3rd gen, Respiratory)",
     "Community-acquired pneumonia, sinusitis, UTI, prostatitis, skin infections",
     "250–500 mg PO/IV q24h", "750 mg PO/IV q24h",
     "q24h PO/IV",
     "Tendon rupture, QT prolongation, CNS effects, phototoxicity, hypoglycemia (especially with antidiabetics), peripheral neuropathy, C. diff",
     "Warfarin (↑ INR); NSAIDs (↑ seizure risk); Antidiabetics (dysglycemia); Antacids/iron/zinc (↓ absorption); QT prolongers",
     "Avoid dairy, antacids, and iron within 2h; stay hydrated; avoid excessive sunlight"),

    (25, "Moxifloxacin", "Fluoroquinolone (4th gen, Respiratory)",
     "Community-acquired pneumonia, skin/soft tissue, intra-abdominal infections, TB (second-line)",
     "400 mg PO/IV q24h", "400 mg PO/IV q24h (max dose)",
     "q24h PO/IV",
     "QT prolongation (most potent among FQs), tendon rupture, nausea, diarrhea, CNS effects, phototoxicity",
     "Warfarin (↑ INR); QT prolongers (↑ arrhythmia); Antacids/iron/zinc (↓ absorption)",
     "Avoid antacids, iron, and zinc within 4h; avoid excessive sun; not for UTI (poor urinary concentrations)"),

    # ── TETRACYCLINES ─────────────────────────────────────────────────────────
    (26, "Doxycycline", "Tetracycline (2nd gen)",
     "Atypical pneumonia, Lyme disease, RMSF, chlamydia, malaria prophylaxis, acne, anthrax",
     "100 mg PO/IV q12h", "200 mg PO loading then 100 mg q12h",
     "q12h PO/IV",
     "Photosensitivity (very common), esophageal ulceration, nausea, dental staining (children <8), pseudotumor cerebri, hepatotoxicity (high dose)",
     "Antacids/calcium/iron (↓ absorption); Warfarin (↑ INR); Isotretinoin (↑ pseudotumor cerebri); Oral contraceptives (↓ efficacy); Barbiturates/phenytoin (↓ doxycycline levels)",
     "Take with full glass of water; do NOT take with dairy, antacids, iron within 2h; avoid direct sunlight; do not take before lying down"),

    (27, "Tetracycline", "Tetracycline (1st gen)",
     "H. pylori (quad therapy), acne, rosacea, chlamydia, syphilis (penicillin-allergic)",
     "250 mg PO q6h", "500 mg PO q6h",
     "q6h PO",
     "GI upset, photosensitivity, dental staining (<8 years), pseudotumor cerebri, hepatotoxicity, nephrotoxicity (outdated formulations)",
     "Antacids/dairy/iron (↓ absorption significantly); Warfarin (↑ INR); Oral contraceptives (↓ efficacy); Isotretinoin (↑ ICP)",
     "Take on empty stomach; avoid dairy, antacids, iron (binds tetracycline); avoid direct sunlight"),

    (28, "Minocycline", "Tetracycline (2nd gen)",
     "Acne (first-line), MRSA mild infections, atypical pneumonia, nocardiosis",
     "100 mg PO q12h", "200 mg PO loading then 100 mg q12h",
     "q12h PO",
     "Vestibular toxicity (dizziness, vertigo, ataxia), photosensitivity, skin/mucous membrane pigmentation, lupus-like syndrome, hepatotoxicity",
     "Antacids/iron (↓ absorption); Warfarin (↑ INR); Isotretinoin (↑ pseudotumor); Oral contraceptives (↓ efficacy)",
     "Can take with food; avoid iron/antacids within 2h; avoid sunlight"),

    (29, "Tigecycline", "Glycylcycline (Tetracycline derivative)",
     "MRSA/VRE skin infections, complicated intra-abdominal infections (reserve agent)",
     "100 mg IV loading then 50 mg q12h", "100 mg IV loading then 50 mg q12h (standard dosing; higher doses studied)",
     "q12h IV",
     "Nausea/vomiting (very common, up to 35%), pancreatitis, increased mortality (bacteremia/VAP), hepatotoxicity, photosensitivity",
     "Warfarin (↑ INR); Oral contraceptives (↓ efficacy)",
     "IV only; no food interactions"),

    # ── AMINOGLYCOSIDES ───────────────────────────────────────────────────────
    (30, "Gentamicin", "Aminoglycoside",
     "Gram-negative bacteremia/sepsis, endocarditis synergy (with penicillin), UTI (pyelonephritis)",
     "1.5–2 mg/kg IV/IM q8h (traditional) or 5–7 mg/kg q24h (extended)", "7 mg/kg IV q24h (extended interval)",
     "q8h or q24h IV/IM",
     "Nephrotoxicity (dose-dependent, reversible), ototoxicity (cochlear and vestibular, often irreversible), neuromuscular blockade",
     "Vancomycin (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity); Cisplatin (↑ nephrotoxicity/ototoxicity); Neuromuscular blockers (↑ blockade); NSAIDs (↑ nephrotoxicity)",
     "IV/IM only; no food interactions; monitor serum levels (troughs and peaks); adequate hydration"),

    (31, "Tobramycin", "Aminoglycoside",
     "Pseudomonas infections, CF (inhaled), gram-negative bacteremia",
     "1.5–2 mg/kg IV q8h", "7 mg/kg IV q24h (extended interval)",
     "q8h or q24h IV/IM",
     "Nephrotoxicity, ototoxicity (cochlear > vestibular), neuromuscular blockade",
     "Vancomycin (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity); Cisplatin; Neuromuscular blockers; Penicillins (inactivation if mixed in IV line)",
     "IV/IM or inhaled (CF); inhaled form: administer after bronchodilator; no food interactions"),

    (32, "Amikacin", "Aminoglycoside",
     "Resistant gram-negative infections, MDR-TB (second-line), Pseudomonas, Acinetobacter",
     "7.5 mg/kg IV q12h", "15–20 mg/kg IV q24h (extended interval)",
     "q12h or q24h IV",
     "Nephrotoxicity, ototoxicity (cochlear), neuromuscular blockade (rare)",
     "Loop diuretics (↑ ototoxicity); Vancomycin (↑ nephrotoxicity); Cisplatin (↑ nephrotoxicity); Neuromuscular blockers",
     "IV only; no food interactions; TDM required"),

    # ── GLYCOPEPTIDES ─────────────────────────────────────────────────────────
    (33, "Vancomycin", "Glycopeptide",
     "MRSA infections, C. diff colitis (oral), endocarditis, meningitis (add to cephalosporins)",
     "15–20 mg/kg IV q8–12h or AUC-guided dosing", "AUC/MIC target 400–600 (current guidelines)",
     "q6–12h IV (oral for C. diff)",
     "Red man syndrome (rate-related, not allergy), nephrotoxicity (esp. with aminoglycosides), ototoxicity, thrombophlebitis, neutropenia (prolonged use)",
     "Aminoglycosides (↑ nephrotoxicity); Piperacillin-tazobactam (↑ nephrotoxicity debate); Loop diuretics (↑ ototoxicity); Neuromuscular blockers (↑ blockade)",
     "IV: infuse over ≥60 min; oral: not absorbed systemically (local C. diff action); no food-drug interaction"),

    (34, "Teicoplanin", "Glycopeptide",
     "MRSA skin/soft tissue, bone/joint infections, endocarditis (similar to vancomycin)",
     "6 mg/kg IV/IM q24h (after loading)", "12 mg/kg IV q12h × 3 doses (loading), then 6–12 mg/kg q24h",
     "q24h IV/IM (after loading)",
     "Nephrotoxicity (less than vancomycin), ototoxicity, red man syndrome (rare), thrombocytopenia, hypersensitivity",
     "Aminoglycosides (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity)",
     "IV/IM; TDM recommended; no food interactions"),

    # ── OXAZOLIDINONES ────────────────────────────────────────────────────────
    (35, "Linezolid", "Oxazolidinone",
     "MRSA/VRE infections, nosocomial pneumonia, skin/soft tissue, drug-resistant TB (second-line)",
     "400 mg PO/IV q12h (uncomplicated SSTI)", "600 mg PO/IV q12h",
     "q12h PO/IV",
     "Myelosuppression (thrombocytopenia, anemia), serotonin syndrome (with serotonergic drugs), peripheral neuropathy, optic neuropathy (prolonged use), lactic acidosis, C. diff",
     "MAOIs/SSRIs/SNRIs (↑ serotonin syndrome – serious); Sympathomimetics (↑ hypertensive crisis); Dextromethorphan (serotonin syndrome); Warfarin (↑ INR)",
     "Avoid foods high in tyramine (aged cheeses, cured meats, fermented foods, red wine) – linezolid is a weak MAOI; take with or without food"),

    # ── LIPOPEPTIDES ──────────────────────────────────────────────────────────
    (36, "Daptomycin", "Lipopeptide",
     "MRSA bacteremia/endocarditis, VRE, skin/soft tissue infections (gram-positive)",
     "4 mg/kg IV q24h (SSTI)", "6–8 mg/kg IV q24h (bacteremia/endocarditis)",
     "q24h IV",
     "CPK elevation/rhabdomyolysis (monitor CPK weekly), eosinophilic pneumonia (rare but serious), neuropathy, C. diff",
     "Statins (↑ CPK/rhabdomyolysis risk – hold statins if possible); HMG-CoA reductase inhibitors; Warfarin (monitor INR)",
     "IV only; NOT effective for pneumonia (inactivated by pulmonary surfactant); no food interactions"),

    # ── SULFONAMIDES ──────────────────────────────────────────────────────────
    (37, "Trimethoprim-Sulfamethoxazole (TMP-SMX)", "Sulfonamide + Diaminopyrimidine",
     "UTI, PCP prophylaxis/treatment, MRSA SSTI, toxoplasmosis, traveler's diarrhea, Nocardia",
     "1 DS tablet (160/800 mg) PO q12h (UTI/SSTI)", "15–20 mg/kg/day IV in 3–4 divided doses (PCP treatment based on TMP component)",
     "q12h PO; q6–8h IV (severe PCP)",
     "Photosensitivity, Stevens-Johnson syndrome/TEN (rare but serious), hyperkalemia, hyponatremia, nephrotoxicity (tubular secretion block of creatinine), nausea, myelosuppression, hypersensitivity (higher in HIV)",
     "Warfarin (↑ INR – strong interaction); Methotrexate (↑ myelosuppression); ACE inhibitors/potassium-sparing diuretics (↑ hyperkalemia); Phenytoin (↑ phenytoin levels); Dapsone (↑ methemoglobinemia); Cyclosporine (↓ levels)",
     "Take with full glass of water; maintain adequate hydration; take with food to ↓ GI upset; avoid sunlight"),

    # ── NITROIMIDAZOLES ───────────────────────────────────────────────────────
    (38, "Metronidazole", "Nitroimidazole",
     "Anaerobic infections, C. diff colitis, bacterial vaginosis, H. pylori, Trichomonas, Giardia, amoeba",
     "250–500 mg PO q8h", "500 mg PO/IV q8h or 750 mg PO q8h (amoeba)",
     "q6–8h PO/IV",
     "Metallic taste (very common), nausea, peripheral neuropathy (prolonged use), CNS toxicity (seizures, encephalopathy – high dose/accumulation), disulfiram-like reaction (with alcohol), C. diff (paradoxically)",
     "Alcohol (disulfiram-like reaction – severe nausea/vomiting); Warfarin (↑ INR significantly); Lithium (↑ lithium toxicity); Phenytoin (↑ phenytoin levels); Disulfiram (psychosis); Cyclosporine (↑ levels)",
     "AVOID ALCOHOL during treatment and 48h after; take with food to ↓ GI upset; avoid alcohol-containing products (mouthwash, cough syrup)"),

    (39, "Tinidazole", "Nitroimidazole (2nd gen)",
     "Giardia, Trichomonas, bacterial vaginosis, amoeba (better tolerated than metronidazole)",
     "1 g PO q24h (Giardia 3 days)", "2 g PO single dose (Trichomonas/BV)",
     "q24h or single dose PO",
     "Metallic taste, nausea (less than metronidazole), disulfiram-like reaction (alcohol), peripheral neuropathy",
     "Alcohol (disulfiram-like reaction); Warfarin (↑ INR); Phenytoin (↑ levels); Lithium (↑ toxicity)",
     "AVOID ALCOHOL during and 72h after; take with food"),

    # ── LINCOSAMIDES ──────────────────────────────────────────────────────────
    (40, "Clindamycin", "Lincosamide",
     "Anaerobic infections, MRSA SSTI (oral), aspiration pneumonia, malaria (with quinine), Toxoplasma, dental prophylaxis",
     "150–300 mg PO q6h / 600 mg IV q8h", "450 mg PO q6h / 900 mg IV q8h",
     "q6–8h PO/IV",
     "C. diff colitis (highest risk among antibiotics), diarrhea, nausea, metallic taste, hepatotoxicity, rash",
     "Neuromuscular blockers (↑ blockade); Warfarin (↑ INR); Erythromycin (antagonism – avoid combining macrolides)",
     "Take with full glass of water; can take with food to ↓ GI upset; no specific food-drug interaction"),

    # ── CHLORAMPHENICOL ───────────────────────────────────────────────────────
    (41, "Chloramphenicol", "Phenicol",
     "Meningitis (penicillin-allergic), typhoid, rickettsial disease, anaerobic infections (resource-limited settings)",
     "12.5 mg/kg PO/IV q6h", "25 mg/kg IV q6h (meningitis)",
     "q6h PO/IV",
     "Gray baby syndrome (neonates), aplastic anemia (idiosyncratic, irreversible), bone marrow suppression (reversible, dose-dependent), optic neuritis",
     "Warfarin (↑ INR – inhibits CYP2C9); Phenytoin (↑ levels); Rifampin (↓ chloramphenicol levels); Phenobarbital (↓ chloramphenicol levels); Cimetidine (↑ chloramphenicol levels)",
     "Can take with food; avoid in neonates; TDM recommended"),

    # ── POLYMYXINS ────────────────────────────────────────────────────────────
    (42, "Colistin (Polymyxin E)", "Polymyxin",
     "MDR gram-negative infections (Pseudomonas, Acinetobacter, Klebsiella) – last resort",
     "2.5 mg/kg/day CBA IV in 2 divided doses", "5 mg/kg/day CBA IV in 2 divided doses",
     "q12h IV",
     "Nephrotoxicity (dose-limiting, up to 50%), neurotoxicity (paresthesias, ataxia), bronchospasm (inhaled), respiratory failure (IM)",
     "Aminoglycosides (↑ nephrotoxicity); Vancomycin (↑ nephrotoxicity); Neuromuscular blockers (↑ blockade); Loop diuretics (↑ nephrotoxicity)",
     "IV only; adequate hydration essential; monitor renal function closely"),

    # ── RIFAMYCINS ────────────────────────────────────────────────────────────
    (43, "Rifampin", "Rifamycin",
     "TB (first-line in combination), leprosy, N. meningitidis prophylaxis, H. influenzae prophylaxis, MRSA (combination)",
     "10 mg/kg PO/IV q24h (TB) or 600 mg q24h (adult)", "600 mg PO/IV q24h",
     "q24h PO/IV (q12h for some indications)",
     "Orange discoloration of body fluids (urine, tears, sweat – harmless), hepatotoxicity, flu-like syndrome (intermittent dosing), thrombocytopenia, hypersensitivity, GI upset",
     "Potent CYP inducer (3A4, 2C9, 2C19): ↓ levels of warfarin, oral contraceptives, HIV antiretrovirals, cyclosporine, methadone, corticosteroids, azole antifungals, opioids, calcium channel blockers",
     "Take on empty stomach; if GI intolerance, take with light meal; avoid alcohol; warn about orange discoloration of contact lenses (staining)"),

    # ── NITROFURANS ───────────────────────────────────────────────────────────
    (44, "Nitrofurantoin", "Nitrofuran",
     "Lower UTI (uncomplicated cystitis), UTI prophylaxis (recurrent) – NOT for pyelonephritis",
     "50–100 mg PO q6h (macrocrystals) or 100 mg ER q12h", "100 mg PO q6h or 100 mg ER q12h",
     "q6h (macrocrystals) or q12h (ER) PO",
     "Pulmonary reactions (acute: pneumonitis; chronic: pulmonary fibrosis), peripheral neuropathy (prolonged use/renal failure), hemolytic anemia (G6PD deficiency), nausea/vomiting, hepatotoxicity",
     "Antacids containing magnesium trisilicate (↓ absorption); Quinolones (antagonism – avoid combining); Probenecid (↑ serum levels/toxicity)",
     "MUST take with food to ↑ absorption and ↓ GI side effects; avoid in renal failure (CrCl <30); causes harmless dark yellow/brown urine"),

    # ── FOSFOMYCIN ────────────────────────────────────────────────────────────
    (45, "Fosfomycin", "Phosphonic Acid Antibiotic",
     "Uncomplicated UTI (single-dose), ESBL-producing E. coli UTI",
     "3 g PO single dose (uncomplicated UTI)", "3 g PO q48–72h × 3 doses (complicated UTI/prostatitis, off-label)",
     "Single dose or q48–72h PO",
     "Diarrhea, nausea, headache, vaginitis, generally well-tolerated",
     "Metoclopramide (↓ fosfomycin absorption – avoid); Cisplatin (↑ nephrotoxicity, IV fosfomycin)",
     "Dissolve sachet in water; take with or without food; single dose – compliance excellent"),

    # ── LINEZOLID / QUINUPRISTIN ──────────────────────────────────────────────
    (46, "Quinupristin-Dalfopristin", "Streptogramin",
     "VRE faecium infections, MRSA, skin/soft tissue infections (gram-positive) – reserve agent",
     "7.5 mg/kg IV q12h", "7.5 mg/kg IV q8h (severe infections)",
     "q8–12h IV",
     "Myalgia/arthralgia (very common, >50%), phlebitis/venous irritation (requires central line), hyperbilirubinemia, nausea, diarrhea",
     "CYP3A4 inhibitor: ↑ cyclosporine, tacrolimus, warfarin, calcium channel blockers, midazolam, statins",
     "IV (central line preferred due to phlebitis); no food interactions"),

    # ── MONOBACTAM ────────────────────────────────────────────────────────────
    (47, "Aztreonam", "Monobactam",
     "Gram-negative aerobic infections in penicillin/cephalosporin-allergic patients, Pseudomonas, UTI",
     "1 g IV/IM q8–12h", "2 g IV q6–8h (Pseudomonas/life-threatening)",
     "q6–12h IV/IM",
     "Phlebitis, nausea, diarrhea, rash (less cross-reactivity with penicillin), elevated LFTs, C. diff",
     "Warfarin (↑ INR); Probenecid (↑ aztreonam levels)",
     "IV/IM only; no food interactions; safe alternative in penicillin allergy (minimal cross-reactivity)"),

    # ── ANTI-TB ───────────────────────────────────────────────────────────────
    (48, "Isoniazid (INH)", "Anti-TB (First-line)",
     "Active TB (combination), latent TB prophylaxis",
     "5 mg/kg PO q24h (active TB, max 300 mg)", "10 mg/kg PO q24h (max 300 mg)",
     "q24h PO",
     "Hepatotoxicity (most significant – monitor LFTs), peripheral neuropathy (pyridoxine-preventable), pellagra-like syndrome, CNS effects (seizures, psychosis), optic neuritis, lupus-like syndrome",
     "Phenytoin (↑ phenytoin toxicity – INH inhibits CYP2C9); Carbamazepine (↑ levels); Rifampin (↑ hepatotoxicity synergy); Alcohol (↑ hepatotoxicity); Warfarin (↑ INR); Disulfiram (↑ CNS toxicity)",
     "Take on empty stomach (food ↓ absorption); avoid alcohol; supplement pyridoxine (B6) 25–50 mg/day to prevent neuropathy; avoid tyramine-rich foods (weak MAOI activity)"),

    (49, "Pyrazinamide (PZA)", "Anti-TB (First-line)",
     "Active TB (first 2 months of RIPE therapy)",
     "25 mg/kg PO q24h (max 2 g)", "30–40 mg/kg PO q24h (high-dose regimens)",
     "q24h PO",
     "Hepatotoxicity (most concerning), hyperuricemia/gout (blocks urate excretion), arthralgia, nausea, photosensitivity, sideroblastic anemia (rare)",
     "Probenecid (↓ uricosuric effect); Allopurinol (↑ urate); Rifampin (↑ hepatotoxicity risk); Alcohol (↑ hepatotoxicity)",
     "Take with food to ↓ GI upset; avoid alcohol; monitor uric acid; avoid sunlight"),

    (50, "Ethambutol (EMB)", "Anti-TB (First-line)",
     "Active TB (as part of RIPE therapy)",
     "15 mg/kg PO q24h", "25 mg/kg PO q24h (initial 2 months)",
     "q24h PO",
     "Optic neuritis (dose-dependent – ↓ visual acuity, red-green color blindness; reversible if caught early), hyperuricemia, peripheral neuropathy",
     "Antacids containing aluminum (↓ absorption – separate by 4h); Neurotoxic drugs (↑ peripheral neuropathy)",
     "Take with food; avoid aluminum-containing antacids around dosing time; monthly visual acuity/color vision testing"),
]

# ── Styles ────────────────────────────────────────────────────────────────────
HEADER_FILL   = PatternFill("solid", fgColor="1F4E79")   # dark blue
ALT_FILL      = PatternFill("solid", fgColor="D6E4F7")   # light blue
WHITE_FILL    = PatternFill("solid", fgColor="FFFFFF")

CLASS_COLORS = {
    "Penicillin": PatternFill("solid", fgColor="FFF2CC"),      # yellow
    "Aminopenicillin": PatternFill("solid", fgColor="FFF2CC"),
    "Antistaphylococcal Penicillin": PatternFill("solid", fgColor="FFF2CC"),
    "Antipseudomonal Penicillin": PatternFill("solid", fgColor="FFF2CC"),
    "Cephalosporin": PatternFill("solid", fgColor="E2EFDA"),   # green
    "Carbapenem": PatternFill("solid", fgColor="FCE4D6"),      # orange
    "Macrolide": PatternFill("solid", fgColor="E8D5F5"),       # purple
    "Fluoroquinolone": PatternFill("solid", fgColor="D6F4F4"), # teal
    "Tetracycline": PatternFill("solid", fgColor="FDE9D9"),    # peach
    "Aminoglycoside": PatternFill("solid", fgColor="D9EAD3"),  # sage
    "Glycopeptide": PatternFill("solid", fgColor="CFE2F3"),    # sky blue
    "Oxazolidinone": PatternFill("solid", fgColor="F4CCCC"),   # rose
    "Lipopeptide": PatternFill("solid", fgColor="EA9999"),     # light red
    "Sulfonamide": PatternFill("solid", fgColor="F9CB9C"),     # light orange
    "Nitroimidazole": PatternFill("solid", fgColor="FFE599"),  # gold
    "Lincosamide": PatternFill("solid", fgColor="B6D7A8"),     # light green
    "Phenicol": PatternFill("solid", fgColor="C9DAF8"),        # cornflower
    "Polymyxin": PatternFill("solid", fgColor="FF9900"),       # amber
    "Rifamycin": PatternFill("solid", fgColor="F4CCCC"),
    "Nitrofuran": PatternFill("solid", fgColor="D9D2E9"),      # lavender
    "Phosphonic": PatternFill("solid", fgColor="D0E0E3"),
    "Streptogramin": PatternFill("solid", fgColor="EAD1DC"),   # pink
    "Monobactam": PatternFill("solid", fgColor="F0F0F0"),      # gray
    "Anti-TB": PatternFill("solid", fgColor="FFD966"),         # yellow-orange
}

thin = Side(border_style="thin", color="8EA9C1")
thick = Side(border_style="medium", color="1F4E79")

def cell_border(thin=True):
    s = Side(border_style="thin", color="8EA9C1")
    return Border(left=s, right=s, top=s, bottom=s)

def header_border():
    t = Side(border_style="medium", color="FFFFFF")
    return Border(left=t, right=t, top=t, bottom=t)

# ── Headers ───────────────────────────────────────────────────────────────────
headers = [
    "No.", "Drug Name", "Class", "Main Indications",
    "Low Dose", "High Dose", "Frequency",
    "Adverse Drug Reactions (ADR)",
    "Drug-Drug Interactions",
    "Drug-Food Interactions"
]

col_widths = [5, 24, 32, 40, 30, 38, 22, 55, 70, 55]

# Write header row
for col_idx, (header, width) in enumerate(zip(headers, col_widths), start=1):
    cell = ws.cell(row=1, column=col_idx, value=header)
    cell.font = Font(bold=True, color="FFFFFF", size=11)
    cell.fill = HEADER_FILL
    cell.alignment = Alignment(wrap_text=True, horizontal="center", vertical="center")
    cell.border = header_border()
    ws.column_dimensions[get_column_letter(col_idx)].width = width

ws.row_dimensions[1].height = 30

# ── Data rows ──────────────────────────────────────────────────────────────────
for row_idx, row_data in enumerate(antibiotics, start=2):
    drug_class = row_data[2]  # e.g. "Cephalosporin – 1st Generation"

    # Pick fill color by class keyword
    fill = WHITE_FILL
    for key, color_fill in CLASS_COLORS.items():
        if key.lower() in drug_class.lower():
            fill = color_fill
            break

    for col_idx, value in enumerate(row_data, start=1):
        cell = ws.cell(row=row_idx, column=col_idx, value=value)
        cell.fill = fill
        cell.alignment = Alignment(wrap_text=True, vertical="top")
        cell.border = cell_border()
        if col_idx == 1:
            cell.alignment = Alignment(horizontal="center", vertical="top")
            cell.font = Font(bold=True)
        elif col_idx == 2:
            cell.font = Font(bold=True, color="1F4E79")
        elif col_idx in (5, 6):  # dose columns
            cell.font = Font(color="7F0000")  # dark red for doses
    ws.row_dimensions[row_idx].height = 90

# ── Freeze top row ─────────────────────────────────────────────────────────────
ws.freeze_panes = "A2"

# ── Auto filter ────────────────────────────────────────────────────────────────
ws.auto_filter.ref = f"A1:{get_column_letter(len(headers))}1"

# ── Title row above header ─────────────────────────────────────────────────────
ws.insert_rows(1)
title_cell = ws.cell(row=1, column=1,
    value="ANTIBIOTICS REFERENCE TABLE  |  ADR • Drug Interactions • Food Interactions • Dosing")
title_cell.font = Font(bold=True, size=14, color="FFFFFF")
title_cell.fill = PatternFill("solid", fgColor="0D2137")
title_cell.alignment = Alignment(horizontal="center", vertical="center")
ws.merge_cells(start_row=1, start_column=1, end_row=1, end_column=len(headers))
ws.row_dimensions[1].height = 28

# ── Save ───────────────────────────────────────────────────────────────────────
output_path = "/tmp/workspace/antibiotics-table/Antibiotics_Reference_Table_50.xlsx"
wb.save(output_path)
print(f"Saved: {output_path}")
print(f"Total drugs: {len(antibiotics)}")
Running Command

cd /tmp/workspace/antibiotics-table && python build_table.py

Your 50-antibiotic reference table is ready for download:

Antibiotics Reference Table 50

Spreadsheet · XLSX


What's inside the table

10 columns per drug:
ColumnDetails
No.Serial number
Drug NameBold, color-coded by class
ClassAntibiotic class/generation
Main IndicationsKey clinical uses
Low DoseStandard/minimum therapeutic dose
High DoseMaximum/severe infection dose
FrequencyDosing interval (PO/IV/IM)
ADRAll major adverse drug reactions
Drug-Drug InteractionsClinically significant interactions with mechanisms
Drug-Food InteractionsFoods/beverages to avoid or take with

50 Antibiotics covered (by class)

ClassDrugs
Penicillins (Natural)Penicillin G, Penicillin V
AminopenicillinsAmoxicillin, Amoxicillin-Clavulanate, Ampicillin
Antistaphylococcal PenicillinNafcillin
Antipseudomonal PenicillinPiperacillin-Tazobactam
Cephalosporins (1st–5th gen)Cephalexin, Cefazolin, Cefuroxime, Cefoxitin, Ceftriaxone, Ceftazidime, Cefdinir, Cefepime, Ceftaroline
CarbapenemsMeropenem, Imipenem-Cilastatin, Ertapenem
MacrolidesAzithromycin, Clarithromycin, Erythromycin
FluoroquinolonesCiprofloxacin, Levofloxacin, Moxifloxacin
TetracyclinesDoxycycline, Tetracycline, Minocycline, Tigecycline
AminoglycosidesGentamicin, Tobramycin, Amikacin
GlycopeptidesVancomycin, Teicoplanin
OxazolidinoneLinezolid
LipopeptideDaptomycin
SulfonamideTMP-SMX
NitroimidazolesMetronidazole, Tinidazole
LincosamideClindamycin
PhenicolChloramphenicol
PolymyxinColistin
RifamycinRifampin
NitrofuranNitrofurantoin
Phosphonic acidFosfomycin
StreptograminQuinupristin-Dalfopristin
MonobactamAztreonam
Anti-TB (First-line)Isoniazid, Pyrazinamide, Ethambutol
Each row is color-coded by antibiotic class for quick visual navigation, with auto-filter enabled on all columns. Sources: Katzung's Basic & Clinical Pharmacology 16e and Goodman & Gilman's Pharmacological Basis of Therapeutics.

Excel file not visible can you change it

Reading File
Writing File

~/antibiotics-table/build_pdf.py

from reportlab.lib.pagesizes import A3, landscape
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Table, TableStyle, Paragraph,
    Spacer, PageBreak
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import KeepTogether

PAGE = landscape(A3)
MARGIN = 1.2 * cm

doc = SimpleDocTemplate(
    "/tmp/workspace/antibiotics-table/Antibiotics_Reference_Table_50.pdf",
    pagesize=PAGE,
    leftMargin=MARGIN, rightMargin=MARGIN,
    topMargin=MARGIN, bottomMargin=MARGIN,
    title="Antibiotics Reference Table – 50 Drugs",
    author="Orris Medical Reference"
)

styles = getSampleStyleSheet()

# Custom paragraph styles
title_style = ParagraphStyle(
    "Title", fontSize=16, fontName="Helvetica-Bold",
    textColor=colors.HexColor("#0D2137"), alignment=TA_CENTER,
    spaceAfter=8
)
sub_style = ParagraphStyle(
    "Sub", fontSize=9, fontName="Helvetica",
    textColor=colors.HexColor("#444444"), alignment=TA_CENTER,
    spaceAfter=12
)
hdr_style = ParagraphStyle(
    "Hdr", fontSize=7.5, fontName="Helvetica-Bold",
    textColor=colors.white, alignment=TA_CENTER, leading=10
)
cell_style = ParagraphStyle(
    "Cell", fontSize=6.8, fontName="Helvetica",
    textColor=colors.HexColor("#1a1a1a"), leading=9.5,
    alignment=TA_LEFT
)
drug_style = ParagraphStyle(
    "Drug", fontSize=7.2, fontName="Helvetica-Bold",
    textColor=colors.HexColor("#1F4E79"), leading=9.5,
    alignment=TA_LEFT
)
dose_style = ParagraphStyle(
    "Dose", fontSize=6.8, fontName="Helvetica",
    textColor=colors.HexColor("#7F0000"), leading=9.5,
    alignment=TA_LEFT
)
no_style = ParagraphStyle(
    "No", fontSize=7.5, fontName="Helvetica-Bold",
    textColor=colors.HexColor("#333333"), alignment=TA_CENTER
)

# Column widths (landscape A3 usable ~38.7 cm)
col_widths = [0.8*cm, 3.2*cm, 3.6*cm, 4.8*cm,
              3.5*cm, 4.2*cm, 2.4*cm,
              6.2*cm, 7.0*cm, 5.5*cm]

# Class color map
CLASS_COLORS = {
    "penicillin (natural)":          "#FFF9C4",
    "aminopenicillin":               "#FFF9C4",
    "antistaphylococcal penicillin": "#FFF9C4",
    "antipseudomonal penicillin":    "#FFF9C4",
    "cephalosporin":                 "#E8F5E9",
    "carbapenem":                    "#FBE9E7",
    "macrolide":                     "#EDE7F6",
    "fluoroquinolone":               "#E0F7FA",
    "tetracycline":                  "#FFF3E0",
    "glycylcycline":                 "#FFF3E0",
    "aminoglycoside":                "#F1F8E9",
    "glycopeptide":                  "#E3F2FD",
    "oxazolidinone":                 "#FCE4EC",
    "lipopeptide":                   "#FFEBEE",
    "sulfonamide":                   "#FFF8E1",
    "nitroimidazole":                "#FFFDE7",
    "lincosamide":                   "#F9FBE7",
    "phenicol":                      "#E8EAF6",
    "polymyxin":                     "#FFF9C4",
    "rifamycin":                     "#FCE4EC",
    "nitrofuran":                    "#EDE7F6",
    "phosphonic":                    "#E0F2F1",
    "streptogramin":                 "#FCE4EC",
    "monobactam":                    "#F5F5F5",
    "anti-tb":                       "#FFF8DC",
}

def get_row_color(drug_class: str):
    cl = drug_class.lower()
    for key, hex_col in CLASS_COLORS.items():
        if key in cl:
            return colors.HexColor(hex_col)
    return colors.white

antibiotics = [
    (1,  "Penicillin G", "Penicillin (Natural)",
     "Streptococcal infections, syphilis, meningitis, endocarditis",
     "1–2 MU IV q4–6h", "4 MU IV q4h (severe infections)",
     "q4–6h IV/IM",
     "Hypersensitivity (anaphylaxis, rash), seizures (high dose), hypokalemia, diarrhea",
     "Probenecid (↑ levels); Methotrexate (↑ toxicity); Warfarin (↑ INR); Aminoglycosides (inactivation if mixed in IV line)",
     "Food reduces oral absorption (give on empty stomach)"),

    (2,  "Penicillin V", "Penicillin (Natural)",
     "Streptococcal pharyngitis, mild skin infections",
     "250 mg PO q6–8h", "500 mg PO q6h",
     "q6–8h PO",
     "Hypersensitivity, nausea, diarrhea, oral candidiasis",
     "Warfarin (↑ INR); OCP (↓ efficacy); Methotrexate (↑ toxicity)",
     "Take on empty stomach (food ↓ absorption ~30%)"),

    (3,  "Amoxicillin", "Aminopenicillin",
     "Otitis media, sinusitis, pharyngitis, H. pylori (triple), UTI",
     "250–500 mg PO q8h", "875 mg PO q12h or 3 g q8h",
     "q8–12h PO",
     "Rash (esp. EBV), diarrhea, hypersensitivity, C. diff, vaginitis",
     "Allopurinol (↑ rash); Warfarin (↑ INR); Methotrexate (↑ toxicity); OCP (↓ efficacy)",
     "Can take with or without food; avoid alcohol"),

    (4,  "Amoxicillin-Clavulanate", "Aminopenicillin + β-lactamase inhibitor",
     "Otitis media, sinusitis, ABECB, bite wounds, intra-abdominal",
     "500/125 mg PO q8h", "875/125 mg PO q12h",
     "q8–12h PO",
     "Diarrhea (clavulanate), cholestatic hepatotoxicity, hypersensitivity, C. diff",
     "Warfarin (↑ INR); Allopurinol (↑ rash); Methotrexate (↑ toxicity)",
     "Take WITH food to ↓ GI upset; avoid alcohol"),

    (5,  "Ampicillin", "Aminopenicillin",
     "Listeria meningitis, enterococcal infections, UTI, typhoid",
     "250–500 mg PO q6h / 1–2 g IV q6h", "2 g IV q4h (meningitis)",
     "q4–6h IV; q6h PO",
     "Rash (esp. EBV mononucleosis), diarrhea, hypersensitivity, pseudomembranous colitis",
     "Allopurinol (↑ rash); Warfarin (↑ INR); OCP (↓ efficacy)",
     "Oral: empty stomach; IV not affected by food"),

    (6,  "Nafcillin", "Antistaphylococcal Penicillin",
     "MSSA bacteremia, endocarditis, osteomyelitis, skin/soft tissue",
     "1 g IV q6h", "2 g IV q4h (severe MSSA)",
     "q4–6h IV",
     "Phlebitis (IV), neutropenia, hepatotoxicity, hypersensitivity",
     "Warfarin (↓ INR – CYP inducer!); Cyclosporine (↓ levels)",
     "IV only; monitor LFTs; warfarin effect DECREASED"),

    (7,  "Piperacillin-Tazobactam", "Antipseudomonal Penicillin + inhibitor",
     "HAP, intra-abdominal, febrile neutropenia, Pseudomonas",
     "2.25 g IV q6h", "4.5 g IV q6h (extended infusion 3–4 h)",
     "q6–8h IV",
     "Diarrhea, hypersensitivity, hypokalemia, hepatotoxicity, thrombocytopenia, seizures (high dose/renal failure)",
     "Vancomycin (↑ nephrotoxicity); MTX (↑ toxicity); Warfarin (↑ INR); Aminoglycosides (do NOT mix in same IV line)",
     "IV only; no food interactions"),

    (8,  "Cephalexin", "Cephalosporin – 1st Generation",
     "Skin/soft tissue, UTI, streptococcal pharyngitis",
     "250 mg PO q6h", "1 g PO q6h",
     "q6h PO",
     "Diarrhea, hypersensitivity (~1–2% cross penicillin), nausea, vaginitis",
     "Warfarin (↑ INR); Probenecid (↑ levels); Aminoglycosides (↑ nephrotoxicity)",
     "Take with or without food; avoid alcohol"),

    (9,  "Cefazolin", "Cephalosporin – 1st Generation",
     "Surgical prophylaxis, MSSA, skin/soft tissue, UTI",
     "1 g IV/IM q8h", "2 g IV q8h (severe)",
     "q8h IV/IM",
     "Phlebitis, hypersensitivity, diarrhea, Coombs+ hemolytic anemia (rare)",
     "Warfarin (↑ INR); Probenecid (↑ levels); Aminoglycosides (↑ nephrotoxicity)",
     "IV/IM only; no food interactions"),

    (10, "Cefuroxime", "Cephalosporin – 2nd Generation",
     "Otitis media, sinusitis, CAP, Lyme disease",
     "250 mg PO q12h / 750 mg IV q8h", "500 mg PO q12h / 1.5 g IV q8h",
     "q8–12h PO/IV",
     "Diarrhea, nausea, hypersensitivity, disulfiram-like reaction (alcohol)",
     "Warfarin (↑ INR); Probenecid (↑ levels); Antacids/H2 blockers (↓ oral absorption)",
     "Oral: take WITH food to ↑ absorption; avoid alcohol"),

    (11, "Cefoxitin", "Cephalosporin – 2nd Generation (Cephamycin)",
     "Intra-abdominal, PID, surgical prophylaxis",
     "1 g IV q6–8h", "2 g IV q4–6h",
     "q4–8h IV",
     "Hypersensitivity, phlebitis, diarrhea, C. diff colitis",
     "Warfarin (↑ INR); Probenecid (↑ cefoxitin levels)",
     "IV/IM only; no food interactions"),

    (12, "Ceftriaxone", "Cephalosporin – 3rd Generation",
     "Meningitis, gonorrhea, CAP, Lyme disease, typhoid",
     "1 g IV/IM q24h", "2 g IV q12h (meningitis/severe)",
     "q12–24h IV/IM",
     "Biliary sludging/pseudolithiasis, diarrhea, hypersensitivity, Coombs+, bleeding (↓ vit K)",
     "Warfarin (↑ INR); Calcium IV solutions (PRECIPITATION – never mix); Probenecid (↑ levels)",
     "NEVER mix with calcium-containing IV fluids; no food interaction"),

    (13, "Ceftazidime", "Cephalosporin – 3rd Generation (anti-Pseudomonal)",
     "Pseudomonas, HAP, febrile neutropenia",
     "1 g IV q8h", "2 g IV q8h",
     "q8h IV",
     "Hypersensitivity, phlebitis, diarrhea, C. diff, elevated LFTs",
     "Warfarin (↑ INR); Aminoglycosides (↑ nephrotoxicity)",
     "IV only; no food interactions"),

    (14, "Cefdinir", "Cephalosporin – 3rd Generation (oral)",
     "Otitis media, sinusitis, pharyngitis, skin/soft tissue",
     "300 mg PO q12h", "600 mg PO q24h",
     "q12–24h PO",
     "Diarrhea, nausea, rash, red/maroon stools (iron interaction), hypersensitivity",
     "Probenecid (↑ levels); Warfarin (↑ INR); Iron/antacids (↓ absorption – separate by 2h)",
     "Food may ↑ absorption; iron/antacids ↓ absorption (separate by 2h)"),

    (15, "Cefepime", "Cephalosporin – 4th Generation",
     "Pseudomonas, febrile neutropenia, HAP, meningitis",
     "1 g IV q12h", "2 g IV q8h",
     "q8–12h IV",
     "Neurotoxicity/encephalopathy/seizures (esp. renal failure), hypersensitivity, phlebitis, diarrhea",
     "Warfarin (↑ INR); Aminoglycosides (↑ nephrotoxicity)",
     "IV only; dose adjust in renal failure; no food interaction"),

    (16, "Ceftaroline", "Cephalosporin – 5th Generation (anti-MRSA)",
     "MRSA skin/soft tissue, community-acquired pneumonia",
     "600 mg IV q12h", "600 mg IV q8h (MRSA bacteremia, off-label)",
     "q8–12h IV",
     "Hypersensitivity, diarrhea, phlebitis, Coombs+ hemolytic anemia",
     "Warfarin (↑ INR); Probenecid (↑ levels)",
     "IV only; no food interactions"),

    (17, "Meropenem", "Carbapenem",
     "Serious GNR infections, Pseudomonas, intra-abdominal, meningitis, febrile neutropenia",
     "500 mg IV q8h", "2 g IV q8h (meningitis/Pseudomonas)",
     "q8h IV",
     "Seizures (less than imipenem), hypersensitivity, nausea, diarrhea, elevated LFTs",
     "Valproic acid (↓ valproate levels → seizure risk!); Probenecid (↑ levels); Warfarin (↑ INR)",
     "IV only; monitor valproate levels closely"),

    (18, "Imipenem-Cilastatin", "Carbapenem",
     "Polymicrobial, nosocomial pneumonia, intra-abdominal infections",
     "250–500 mg IV q6h", "1 g IV q6h",
     "q6h IV",
     "Seizures (HIGHEST among carbapenems), nausea/vomiting, hypersensitivity, C. diff, eosinophilia",
     "Valproic acid (↓ levels → seizure risk); Ganciclovir (↑ seizure risk); Cyclosporine (↑ CNS toxicity)",
     "IV only; caution in seizure patients; no food interaction"),

    (19, "Ertapenem", "Carbapenem (no Pseudomonal coverage)",
     "Community-acquired intra-abdominal, diabetic foot, UTI",
     "1 g IV/IM q24h", "1 g IV/IM q24h (max dose)",
     "q24h IV/IM",
     "Diarrhea, nausea, headache, phlebitis, seizures (rare), hypersensitivity",
     "Valproic acid (↓ valproate levels); Probenecid (↑ levels)",
     "IM: dilute in 1% lidocaine; no food interactions"),

    (20, "Azithromycin", "Macrolide",
     "CAP, atypical pneumonia, STIs (chlamydia), H. pylori, MAC prophylaxis",
     "250 mg PO q24h (5-day Z-pack)", "500 mg PO/IV q24h",
     "q24h PO/IV",
     "Nausea, diarrhea, QT prolongation, hepatotoxicity, ototoxicity (high dose), cardiac arrhythmias",
     "QT-prolonging drugs (↑ arrhythmia); Warfarin (↑ INR); Digoxin (↑ levels); Antacids (↓ absorption); Statins (↑ myopathy)",
     "Take on empty stomach; avoid grapefruit juice; avoid alcohol"),

    (21, "Clarithromycin", "Macrolide",
     "CAP, H. pylori (triple therapy), MAC, atypical infections, skin infections",
     "250 mg PO q12h", "500 mg PO q12h or 1 g ER q24h",
     "q12h PO (ER q24h)",
     "Bitter/metallic taste, nausea, diarrhea, QT prolongation, hepatotoxicity, C. diff",
     "Strong CYP3A4 inhibitor: ↑ statins (myopathy), warfarin (↑ INR), digoxin, cyclosporine, carbamazepine, colchicine (FATAL toxicity); QT prolongers",
     "With or without food (ER: WITH food); avoid grapefruit juice"),

    (22, "Erythromycin", "Macrolide",
     "Atypical pneumonia, chlamydia, pertussis, gastroparesis (pro-motility)",
     "250–500 mg PO q6h", "1 g IV q6h (severe)",
     "q6h PO/IV",
     "Severe GI upset, QT prolongation, cholestatic hepatotoxicity, thrombophlebitis (IV), ototoxicity (high dose)",
     "Strong CYP3A4 inhibitor: ↑ warfarin, digoxin, cyclosporine, statins, theophylline; QT prolongers; Antacids (↓ absorption)",
     "Take WITH food to ↓ GI upset; avoid grapefruit juice"),

    (23, "Ciprofloxacin", "Fluoroquinolone – 2nd Generation",
     "UTI, prostatitis, gastroenteritis, anthrax, Pseudomonas, gonorrhea",
     "250–500 mg PO q12h / 200–400 mg IV q12h", "750 mg PO q12h / 400 mg IV q8h",
     "q8–12h PO/IV",
     "Nausea, tendinopathy/tendon rupture (esp. Achilles), QT prolongation, phototoxicity, CNS effects, C. diff, peripheral neuropathy, dysglycemia",
     "Warfarin (↑ INR); NSAIDs (↑ CNS/seizures); Theophylline (↑ levels); Antacids/iron (↓ absorption); QT prolongers; Cyclosporine (↑ nephrotoxicity)",
     "Avoid dairy, Ca-fortified foods, antacids, iron within 2h; avoid caffeine; avoid excessive sun"),

    (24, "Levofloxacin", "Fluoroquinolone – 3rd Generation (Respiratory)",
     "CAP, sinusitis, UTI, prostatitis, skin infections",
     "250–500 mg PO/IV q24h", "750 mg PO/IV q24h",
     "q24h PO/IV",
     "Tendon rupture, QT prolongation, CNS effects, phototoxicity, hypoglycemia, peripheral neuropathy, C. diff",
     "Warfarin (↑ INR); NSAIDs (↑ seizure risk); Antidiabetics (dysglycemia); Antacids/iron/zinc (↓ absorption); QT prolongers",
     "Avoid dairy, antacids, iron within 2h; stay hydrated; avoid excessive sun"),

    (25, "Moxifloxacin", "Fluoroquinolone – 4th Generation (Respiratory)",
     "CAP, skin/soft tissue, intra-abdominal, TB (second-line)",
     "400 mg PO/IV q24h", "400 mg PO/IV q24h (max)",
     "q24h PO/IV",
     "QT prolongation (MOST potent FQ), tendon rupture, nausea, diarrhea, CNS effects, phototoxicity",
     "Warfarin (↑ INR); QT prolongers (↑ arrhythmia); Antacids/iron/zinc (↓ absorption)",
     "Avoid antacids/iron/zinc within 4h; not for UTI (poor urinary levels); avoid excess sun"),

    (26, "Doxycycline", "Tetracycline – 2nd Generation",
     "Atypical pneumonia, Lyme disease, RMSF, chlamydia, malaria prophylaxis, acne, anthrax",
     "100 mg PO/IV q12h", "200 mg PO loading → 100 mg q12h",
     "q12h PO/IV",
     "Photosensitivity (very common), esophageal ulceration, nausea, dental staining (<8 yrs), pseudotumor cerebri, hepatotoxicity",
     "Antacids/Ca/iron (↓ absorption); Warfarin (↑ INR); Isotretinoin (↑ ICP); OCP (↓ efficacy); Barbiturates/phenytoin (↓ doxycycline levels)",
     "Take with full glass of water; NO dairy/antacids/iron within 2h; avoid sunlight; do NOT lie down after taking"),

    (27, "Tetracycline", "Tetracycline – 1st Generation",
     "H. pylori (quad therapy), acne, rosacea, chlamydia",
     "250 mg PO q6h", "500 mg PO q6h",
     "q6h PO",
     "GI upset, photosensitivity, dental staining (<8 yrs), pseudotumor cerebri, hepatotoxicity, nephrotoxicity",
     "Antacids/dairy/iron (↓ absorption significantly); Warfarin (↑ INR); OCP (↓ efficacy); Isotretinoin (↑ ICP)",
     "Take on EMPTY stomach; avoid dairy/antacids/iron; avoid direct sunlight"),

    (28, "Minocycline", "Tetracycline – 2nd Generation",
     "Acne (first-line), MRSA mild infections, atypical pneumonia, nocardiosis",
     "100 mg PO q12h", "200 mg PO loading → 100 mg q12h",
     "q12h PO",
     "Vestibular toxicity (dizziness, vertigo, ataxia), photosensitivity, skin/mucous membrane pigmentation, lupus-like syndrome, hepatotoxicity",
     "Antacids/iron (↓ absorption); Warfarin (↑ INR); Isotretinoin (↑ ICP); OCP (↓ efficacy)",
     "Can take WITH food; avoid iron/antacids within 2h; avoid sunlight"),

    (29, "Tigecycline", "Glycylcycline (Tetracycline derivative)",
     "MRSA/VRE skin infections, complicated intra-abdominal infections (reserve agent)",
     "100 mg IV loading → 50 mg q12h", "100 mg IV loading → 50 mg q12h (standard; higher doses studied)",
     "q12h IV",
     "Nausea/vomiting (up to 35%!), pancreatitis, ↑ mortality (bacteremia/VAP), hepatotoxicity, photosensitivity",
     "Warfarin (↑ INR); OCP (↓ efficacy)",
     "IV only; no food interactions; NOT for bacteremia (↑ mortality)"),

    (30, "Gentamicin", "Aminoglycoside",
     "Gram-negative bacteremia/sepsis, endocarditis synergy, pyelonephritis",
     "1.5–2 mg/kg IV/IM q8h (traditional) or 5–7 mg/kg q24h", "7 mg/kg IV q24h (extended interval)",
     "q8h or q24h IV/IM",
     "Nephrotoxicity (dose-dependent, reversible), ototoxicity (cochlear + vestibular, often irreversible), neuromuscular blockade",
     "Vancomycin (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity); Cisplatin (↑ nephrotoxicity/ototoxicity); NMBs (↑ blockade)",
     "IV/IM only; TDM required (peaks & troughs); adequate hydration"),

    (31, "Tobramycin", "Aminoglycoside",
     "Pseudomonas infections, CF (inhaled), gram-negative bacteremia",
     "1.5–2 mg/kg IV q8h", "7 mg/kg IV q24h (extended interval)",
     "q8h or q24h IV/IM",
     "Nephrotoxicity, ototoxicity (cochlear > vestibular), neuromuscular blockade",
     "Vancomycin (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity); Cisplatin; NMBs; Penicillins (inactivation if mixed in IV line)",
     "IV/IM or inhaled (CF); inhaled: give AFTER bronchodilator; no food interaction"),

    (32, "Amikacin", "Aminoglycoside",
     "Resistant GNR, MDR-TB (second-line), Pseudomonas, Acinetobacter",
     "7.5 mg/kg IV q12h", "15–20 mg/kg IV q24h (extended interval)",
     "q12h or q24h IV",
     "Nephrotoxicity, ototoxicity (cochlear), neuromuscular blockade (rare)",
     "Loop diuretics (↑ ototoxicity); Vancomycin (↑ nephrotoxicity); Cisplatin; NMBs",
     "IV only; TDM required; no food interaction"),

    (33, "Vancomycin", "Glycopeptide",
     "MRSA infections, C. diff colitis (oral), endocarditis, meningitis",
     "15–20 mg/kg IV q8–12h (AUC-guided)", "AUC/MIC target 400–600 mg·h/L",
     "q6–12h IV (oral for C. diff)",
     "Red man syndrome (rate-related infusion reaction), nephrotoxicity, ototoxicity, thrombophlebitis, neutropenia (prolonged use)",
     "Aminoglycosides (↑ nephrotoxicity); Pip-Tazo (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity); NMBs (↑ blockade)",
     "IV: infuse over ≥60 min (slow to prevent Red Man Syndrome); oral form acts locally (C. diff only)"),

    (34, "Teicoplanin", "Glycopeptide",
     "MRSA skin/soft tissue, bone/joint, endocarditis",
     "6 mg/kg IV/IM q24h (after loading)", "12 mg/kg IV q12h × 3 doses loading → 6–12 mg/kg q24h",
     "q24h IV/IM (after loading)",
     "Nephrotoxicity (less than vancomycin), ototoxicity, red man syndrome (rare), thrombocytopenia, hypersensitivity",
     "Aminoglycosides (↑ nephrotoxicity); Loop diuretics (↑ ototoxicity)",
     "IV/IM; TDM recommended; no food interactions"),

    (35, "Linezolid", "Oxazolidinone",
     "MRSA/VRE infections, nosocomial pneumonia, skin/soft tissue, DR-TB (second-line)",
     "400 mg PO/IV q12h (uncomplicated SSTI)", "600 mg PO/IV q12h",
     "q12h PO/IV",
     "Myelosuppression (thrombocytopenia, anemia), serotonin syndrome, peripheral neuropathy, optic neuropathy (prolonged), lactic acidosis, C. diff",
     "MAOIs/SSRIs/SNRIs (↑ SEROTONIN SYNDROME – serious!); Sympathomimetics (↑ hypertensive crisis); Dextromethorphan; Warfarin (↑ INR)",
     "AVOID tyramine-rich foods (aged cheese, cured meats, red wine) – weak MAOI; take with or without food"),

    (36, "Daptomycin", "Lipopeptide",
     "MRSA bacteremia/endocarditis, VRE, skin/soft tissue (gram-positive)",
     "4 mg/kg IV q24h (SSTI)", "6–8 mg/kg IV q24h (bacteremia/endocarditis)",
     "q24h IV",
     "CPK elevation/rhabdomyolysis (monitor CPK weekly!), eosinophilic pneumonia (rare but serious), neuropathy, C. diff",
     "Statins (↑ CPK/rhabdomyolysis – hold statins if possible); Warfarin (monitor INR)",
     "IV only; NOT for pneumonia (inactivated by pulmonary surfactant!); no food interaction"),

    (37, "Trimethoprim-Sulfamethoxazole (TMP-SMX)", "Sulfonamide + Diaminopyrimidine",
     "UTI, PCP prophylaxis/treatment, MRSA SSTI, toxoplasmosis, Nocardia",
     "1 DS tablet (160/800 mg) PO q12h", "15–20 mg/kg/day IV in 3–4 doses (PCP; based on TMP component)",
     "q12h PO; q6–8h IV (severe PCP)",
     "Photosensitivity, SJS/TEN (rare but serious!), hyperkalemia, hyponatremia, nephrotoxicity, nausea, myelosuppression, hypersensitivity (↑ in HIV)",
     "Warfarin (↑ INR – STRONG); MTX (↑ myelosuppression); ACEi/K-sparing diuretics (↑ hyperkalemia); Phenytoin (↑ levels); Dapsone (↑ methemoglobinemia)",
     "Take with full glass of water; maintain hydration; take WITH food to ↓ GI upset; avoid sunlight"),

    (38, "Metronidazole", "Nitroimidazole",
     "Anaerobic infections, C. diff colitis, BV, H. pylori, Trichomonas, Giardia, amoeba",
     "250–500 mg PO q8h", "500 mg PO/IV q8h or 750 mg q8h (amoeba)",
     "q6–8h PO/IV",
     "Metallic taste (very common), nausea, peripheral neuropathy (prolonged), CNS toxicity (high dose), disulfiram-like reaction (alcohol)",
     "ALCOHOL (disulfiram-like reaction – SEVERE nausea/vomiting!); Warfarin (↑ INR significantly); Lithium (↑ toxicity); Phenytoin (↑ levels); Disulfiram (psychosis)",
     "AVOID ALCOHOL during & 48h after; take WITH food to ↓ GI upset; avoid alcohol-containing products (mouthwash, cough syrup)"),

    (39, "Tinidazole", "Nitroimidazole – 2nd Generation",
     "Giardia, Trichomonas, BV, amoeba (better tolerated than metronidazole)",
     "1 g PO q24h (Giardia × 3 days)", "2 g PO single dose (Trichomonas/BV)",
     "q24h or single dose PO",
     "Metallic taste, nausea (less than metronidazole), disulfiram-like reaction, peripheral neuropathy",
     "ALCOHOL (disulfiram-like reaction); Warfarin (↑ INR); Phenytoin (↑ levels); Lithium (↑ toxicity)",
     "AVOID ALCOHOL during & 72h after; take WITH food"),

    (40, "Clindamycin", "Lincosamide",
     "Anaerobic infections, MRSA SSTI (oral), aspiration pneumonia, dental prophylaxis",
     "150–300 mg PO q6h / 600 mg IV q8h", "450 mg PO q6h / 900 mg IV q8h",
     "q6–8h PO/IV",
     "C. diff colitis (HIGHEST risk among antibiotics!), diarrhea, nausea, metallic taste, hepatotoxicity, rash",
     "NMBs (↑ blockade); Warfarin (↑ INR); Erythromycin (antagonism – avoid combining)",
     "Take with full glass of water; can take WITH food to ↓ GI upset"),

    (41, "Chloramphenicol", "Phenicol",
     "Meningitis (penicillin-allergic), typhoid, rickettsial disease (resource-limited settings)",
     "12.5 mg/kg PO/IV q6h", "25 mg/kg IV q6h (meningitis)",
     "q6h PO/IV",
     "Gray baby syndrome (neonates), aplastic anemia (idiosyncratic – irreversible!), bone marrow suppression (reversible dose-dependent), optic neuritis",
     "Warfarin (↑ INR – CYP2C9 inhibition); Phenytoin (↑ levels); Rifampin (↓ chloramphenicol levels); Phenobarbital (↓ levels)",
     "Can take with food; CONTRAINDICATED in neonates; TDM recommended"),

    (42, "Colistin (Polymyxin E)", "Polymyxin",
     "MDR gram-negative infections (Pseudomonas, Acinetobacter, Klebsiella) – LAST RESORT",
     "2.5 mg/kg/day CBA IV ÷ 2 doses", "5 mg/kg/day CBA IV ÷ 2 doses",
     "q12h IV",
     "Nephrotoxicity (dose-limiting, up to 50%!), neurotoxicity (paresthesias, ataxia), bronchospasm (inhaled), respiratory failure (IM)",
     "Aminoglycosides (↑ nephrotoxicity); Vancomycin (↑ nephrotoxicity); NMBs (↑ blockade); Loop diuretics",
     "IV only; adequate hydration essential; monitor renal function closely; TDM in complex cases"),

    (43, "Rifampin", "Rifamycin",
     "TB (first-line combination), leprosy, N. meningitidis prophylaxis, MRSA (combination)",
     "10 mg/kg PO/IV q24h (TB) / 600 mg q24h", "600 mg PO/IV q24h",
     "q24h PO/IV",
     "Orange discoloration of body fluids (harmless!), hepatotoxicity, flu-like syndrome, thrombocytopenia, GI upset",
     "POTENT CYP inducer (3A4, 2C9, 2C19): ↓ warfarin, OCPs, HIV ARVs, cyclosporine, methadone, corticosteroids, azoles, opioids, calcium channel blockers",
     "Take on EMPTY stomach; food ↓ absorption (if GI intolerance: light meal); avoid alcohol; WARN: orange contact lens staining"),

    (44, "Nitrofurantoin", "Nitrofuran",
     "Lower UTI (uncomplicated cystitis), UTI prophylaxis – NOT for pyelonephritis",
     "50–100 mg PO q6h (macrocrystals) or 100 mg ER q12h", "100 mg PO q6h or 100 mg ER q12h",
     "q6h (macrocrystals) or q12h ER PO",
     "Pulmonary reactions (acute pneumonitis; chronic fibrosis), peripheral neuropathy (renal failure/prolonged), hemolytic anemia (G6PD deficiency!), nausea/vomiting, hepatotoxicity",
     "Mg trisilicate antacids (↓ absorption); Quinolones (antagonism – AVOID combining); Probenecid (↑ serum levels/toxicity)",
     "MUST take WITH food to ↑ absorption & ↓ GI effects; AVOID in renal failure (CrCl <30); causes dark yellow/brown urine (harmless)"),

    (45, "Fosfomycin", "Phosphonic Acid Antibiotic",
     "Uncomplicated UTI (single-dose), ESBL E. coli UTI",
     "3 g PO single dose (uncomplicated UTI)", "3 g PO q48–72h × 3 doses (complicated UTI, off-label)",
     "Single dose or q48–72h PO",
     "Diarrhea, nausea, headache, vaginitis; generally very well-tolerated",
     "Metoclopramide (↓ fosfomycin absorption – AVOID); Cisplatin (↑ nephrotoxicity, IV fosfomycin)",
     "Dissolve sachet in water; take with or without food; single dose ensures excellent compliance"),

    (46, "Quinupristin-Dalfopristin", "Streptogramin",
     "VRE faecium, MRSA, gram-positive skin/soft tissue – reserve agent",
     "7.5 mg/kg IV q12h", "7.5 mg/kg IV q8h (severe)",
     "q8–12h IV",
     "Myalgia/arthralgia (VERY COMMON >50%!), phlebitis/venous irritation (requires central line), hyperbilirubinemia, nausea, diarrhea",
     "CYP3A4 inhibitor: ↑ cyclosporine, tacrolimus, warfarin, CCBs, midazolam, statins",
     "IV via central line preferred (phlebitis risk); no food interactions"),

    (47, "Aztreonam", "Monobactam",
     "Gram-negative aerobic infections in β-lactam-allergic patients, Pseudomonas, UTI",
     "1 g IV/IM q8–12h", "2 g IV q6–8h (Pseudomonas/life-threatening)",
     "q6–12h IV/IM",
     "Phlebitis, nausea, diarrhea, rash (minimal cross-reactivity with penicillin), elevated LFTs, C. diff",
     "Warfarin (↑ INR); Probenecid (↑ levels)",
     "IV/IM only; SAFE alternative in penicillin allergy; no food interactions"),

    (48, "Isoniazid (INH)", "Anti-TB – First-line",
     "Active TB (combination), latent TB prophylaxis",
     "5 mg/kg PO q24h (active TB, max 300 mg)", "10 mg/kg PO q24h (max 300 mg)",
     "q24h PO",
     "Hepatotoxicity (most significant!), peripheral neuropathy (pyridoxine-preventable), pellagra-like syndrome, CNS effects, optic neuritis, lupus-like syndrome",
     "Phenytoin (↑ phenytoin toxicity – CYP2C9 inhibition); Carbamazepine (↑ levels); Rifampin (↑ hepatotoxicity); Alcohol (↑ hepatotoxicity); Warfarin (↑ INR); Disulfiram (↑ CNS toxicity)",
     "Take on EMPTY stomach; avoid ALCOHOL; supplement pyridoxine B6 25–50 mg/day (neuropathy prevention); avoid tyramine-rich foods (weak MAOI)"),

    (49, "Pyrazinamide (PZA)", "Anti-TB – First-line",
     "Active TB (first 2 months of RIPE therapy)",
     "25 mg/kg PO q24h (max 2 g)", "30–40 mg/kg PO q24h (high-dose regimens)",
     "q24h PO",
     "Hepatotoxicity (most concerning!), hyperuricemia/gout (blocks urate excretion), arthralgia, nausea, photosensitivity",
     "Probenecid (↓ uricosuric effect); Allopurinol (↑ urate); Rifampin (↑ hepatotoxicity risk); Alcohol (↑ hepatotoxicity)",
     "Take WITH food to ↓ GI upset; avoid ALCOHOL; monitor uric acid; avoid sunlight"),

    (50, "Ethambutol (EMB)", "Anti-TB – First-line",
     "Active TB (as part of RIPE therapy)",
     "15 mg/kg PO q24h", "25 mg/kg PO q24h (initial 2 months)",
     "q24h PO",
     "Optic neuritis (dose-dependent – ↓ visual acuity, red-green color blindness; reversible if caught early!), hyperuricemia, peripheral neuropathy",
     "Al-containing antacids (↓ absorption – separate by 4h); Neurotoxic drugs (↑ peripheral neuropathy)",
     "Take with food; AVOID Al-containing antacids around dosing; monthly visual acuity/color vision testing mandatory"),
]

# ── Class color bands (for row background) ────────────────────────────────────
def get_row_color(drug_class: str):
    cl = drug_class.lower()
    for key, hex_col in CLASS_COLORS.items():
        if key in cl:
            return colors.HexColor(hex_col)
    return colors.white

# ── Build table data ──────────────────────────────────────────────────────────
DARK_BLUE  = colors.HexColor("#1F4E79")
MID_BLUE   = colors.HexColor("#2E75B6")
HEADER_BG  = colors.HexColor("#1F4E79")
ALT_ROW    = colors.HexColor("#F0F6FF")

header_cells = [
    Paragraph(h, hdr_style) for h in [
        "No.", "Drug Name", "Class", "Main Indications",
        "Low Dose", "High Dose", "Frequency",
        "ADR", "Drug-Drug Interactions", "Drug-Food Interactions"
    ]
]

table_data = [header_cells]

for row in antibiotics:
    no, drug, cls, ind, low, high, freq, adr, ddi, dfi = row
    table_data.append([
        Paragraph(str(no), no_style),
        Paragraph(drug, drug_style),
        Paragraph(cls, cell_style),
        Paragraph(ind, cell_style),
        Paragraph(low, dose_style),
        Paragraph(high, dose_style),
        Paragraph(freq, cell_style),
        Paragraph(adr, cell_style),
        Paragraph(ddi, cell_style),
        Paragraph(dfi, cell_style),
    ])

# ── Build table style ─────────────────────────────────────────────────────────
style_cmds = [
    ("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
    ("TEXTCOLOR",  (0, 0), (-1, 0), colors.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), "TOP"),
    ("ROWBACKGROUNDS", (0, 1), (-1, -1), [colors.white, ALT_ROW]),
    ("GRID",       (0, 0), (-1, -1), 0.35, colors.HexColor("#AAAAAA")),
    ("LINEBELOW",  (0, 0), (-1, 0), 1.5, colors.white),
    ("LEFTPADDING",  (0, 0), (-1, -1), 4),
    ("RIGHTPADDING", (0, 0), (-1, -1), 4),
    ("TOPPADDING",   (0, 0), (-1, -1), 4),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 4),
    ("ROWBACKGROUNDS", (0, 0), (-1, 0), [HEADER_BG]),
]

# Per-row class color
for i, row in enumerate(antibiotics, start=1):
    bg = get_row_color(row[2])
    style_cmds.append(("BACKGROUND", (0, i), (-1, i), bg))

tbl = Table(table_data, colWidths=col_widths, repeatRows=1)
tbl.setStyle(TableStyle(style_cmds))

# ── Build document ────────────────────────────────────────────────────────────
title_para   = Paragraph("ANTIBIOTICS REFERENCE TABLE – 50 Drugs", title_style)
subtitle_para = Paragraph(
    "ADR  •  Drug-Drug Interactions  •  Drug-Food Interactions  •  Low &amp; High Dose  •  Frequency  |  "
    "Sources: Katzung's Basic &amp; Clinical Pharmacology 16e, Goodman &amp; Gilman's Pharmacological Basis of Therapeutics",
    sub_style
)

story = [title_para, subtitle_para, tbl]

doc.build(story)
print("PDF saved:", doc.filename)
Running Command

cd /tmp/workspace/antibiotics-table && python build_pdf.py 2>&1

Here you go — both formats are ready:
PDF (viewable directly):

Antibiotics Reference Table 50

PDF Document · PDF

Excel (editable/sortable):

Antibiotics Reference Table 50

Spreadsheet · XLSX

The PDF is in landscape A3 format with:
  • Color-coded rows by antibiotic class
  • All 10 columns: No. | Drug | Class | Indications | Low Dose | High Dose | Frequency | ADR | Drug-Drug Interactions | Drug-Food Interactions
  • 50 drugs across all major antibiotic classes
  • Repeating header row on every page
  • Source citation at the top (Katzung 16e + Goodman & Gilman)
This is a shared conversation. Sign in to Orris to start your own chat.