~/drug-cheatsheet/interactions.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.title = "Drug Interactions Quick Reference";
// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
// Severity colours
contraindicated: "8B0000", // deep red
ciLight: "FDECEA",
serious: "C0392B", // red
serLight: "FDECEA",
major: "D35400", // dark orange
majLight: "FEF0E6",
moderate: "B7770D", // amber
modLight: "FEF9E7",
monitor: "1A6B3C", // green
monLight: "EAF6EE",
// UI
navy: "0D1B2A",
teal: "1B5E8C",
slate: "374151",
slateL: "6B7280",
offWhite:"F4F6F9",
white: "FFFFFF",
rowAlt: "F0F4FA",
hdrBg: "1B3A5C",
hdrText: "FFFFFF",
subHdr: "2563EB",
};
// Severity config
const SEV = {
X: { label: "CONTRAINDICATED", bg: "8B0000", light: "FDECEA", text: "FFFFFF" },
S: { label: "SERIOUS", bg: "C0392B", light: "FDECEA", text: "FFFFFF" },
M: { label: "MAJOR", bg: "D35400", light: "FEF0E6", text: "FFFFFF" },
W: { label: "MODERATE", bg: "B7770D", light: "FEF9E7", text: "FFFFFF" },
O: { label: "MONITOR", bg: "1A6B3C", light: "EAF6EE", text: "FFFFFF" },
};
// ─── HELPERS ──────────────────────────────────────────────────────────────────
function bg(slide, x, y, w, h, color, rounded = false) {
slide.addShape(rounded ? pres.ShapeType.roundRect : pres.ShapeType.rect, {
x, y, w, h,
fill: { color },
line: { color, width: 0 },
...(rounded ? { rectRadius: 0.05 } : {}),
});
}
function txt(slide, text, x, y, w, h, opts = {}) {
const { color = C.slate, sz = 7.5, bold = false, italic = false, align = "left", valign = "middle", margin = 3, wrap = true } = opts;
slide.addText(text, { x, y, w, h, fontSize: sz, fontFace: "Calibri", color, bold, italic, align, valign, margin, wrap });
}
function titleBar(slide, title, sub, color) {
bg(slide, 0, 0, 13.3, 0.52, color);
txt(slide, title, 0.18, 0, 9.5, 0.52, { color: C.white, sz: 15, bold: true, valign: "middle" });
txt(slide, sub, 9.8, 0, 3.3, 0.52, { color: "C5D8F0", sz: 9, align: "right", valign: "middle" });
}
function severityBadge(slide, sev, x, y) {
const cfg = SEV[sev];
bg(slide, x, y + 0.01, 1.05, 0.2, cfg.bg, true);
txt(slide, cfg.label, x, y + 0.01, 1.05, 0.2, { color: cfg.text, sz: 5.8, bold: true, align: "center", margin: 1 });
}
// Column layout: Drug A | Drug B | Severity badge | Mechanism | Effect | Management
// Widths: 1.5 1.4 1.1 2.3 2.3 2.45 = 11.05 + 0.15 margins = ~13.2"
const SX = 0.12; // start x
const CW = [1.5, 1.4, 1.1, 2.35, 2.35, 2.45];
function cx(col) {
let x = SX;
for (let i = 0; i < col; i++) x += CW[i];
return x;
}
const HDR_COLS = ["Drug A", "Drug B", "Severity", "Mechanism", "Clinical Effect", "Management"];
function tableHeader(slide, y) {
HDR_COLS.forEach((label, i) => {
bg(slide, cx(i), y, CW[i], 0.22, C.hdrBg);
txt(slide, label, cx(i), y, CW[i], 0.22, { color: C.hdrText, sz: 7.2, bold: true, align: "center", margin: 1 });
});
}
function interactionRow(slide, data, y, rowIdx) {
// data = [drugA, drugB, severity, mechanism, effect, management]
const [drugA, drugB, sev, mech, effect, mgmt] = data;
const rowBg = rowIdx % 2 === 0 ? C.white : C.rowAlt;
const cfg = SEV[sev];
const RH = 0.25;
// Background
CW.forEach((w, i) => {
const cellBg = i === 2 ? cfg.light : rowBg;
bg(slide, cx(i), y, w, RH, cellBg);
// border line
slide.addShape(pres.ShapeType.line, { x: cx(i), y: y + RH, w: w, h: 0, line: { color: "D1D5DB", width: 0.5 } });
});
// Drug A
txt(slide, drugA, cx(0), y, CW[0], RH, { sz: 7.8, bold: true, color: C.navy, margin: 3 });
// Drug B
txt(slide, drugB, cx(1), y, CW[1], RH, { sz: 7.8, bold: true, color: C.teal, margin: 3 });
// Severity badge
severityBadge(slide, sev, cx(2) + 0.03, y + 0.025);
// Mechanism
txt(slide, mech, cx(3), y, CW[3], RH, { sz: 7, italic: true, color: C.slateL, margin: 3 });
// Effect
txt(slide, effect, cx(4), y, CW[4], RH, { sz: 7.3, color: C.slate, margin: 3 });
// Management
txt(slide, mgmt, cx(5), y, CW[5], RH, { sz: 7.3, bold: false, color: "1A3A1A", margin: 3 });
}
function sectionDivider(slide, label, y, color) {
bg(slide, SX, y, 13.06, 0.21, color);
txt(slide, label, SX + 0.1, y, 12.8, 0.21, { color: C.white, sz: 8, bold: true, valign: "middle", charSpacing: 1 });
}
function footer(slide) {
txt(slide, "For educational use only. Severity ratings based on pharmacological principles and clinical guidelines. Always verify with current BNF/local formulary.", 0.12, 7.33, 13, 0.16, { sz: 6.2, italic: true, color: C.slateL });
}
function legendBar(slide, y) {
const items = [
["X", "CONTRAINDICATED"],
["S", "SERIOUS"],
["M", "MAJOR"],
["W", "MODERATE"],
["O", "MONITOR"],
];
txt(slide, "SEVERITY KEY:", 0.12, y, 1.2, 0.22, { sz: 7, bold: true, color: C.slate });
items.forEach(([key, label], i) => {
const cfg = SEV[key];
const x = 1.3 + i * 2.35;
bg(slide, x, y + 0.02, 1.1, 0.19, cfg.bg, true);
txt(slide, cfg.label, x, y + 0.02, 1.1, 0.19, { color: cfg.text, sz: 6.5, bold: true, align: "center", margin: 1 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — COVER
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.navy);
bg(s, 0, 0, 13.3, 0.07, "2563EB");
bg(s, 0, 7.43, 13.3, 0.07, "2563EB");
// Decorative diagonal accent band
s.addShape(pres.ShapeType.rect, { x: 8.8, y: 0, w: 4.5, h: 7.5, fill: { color: "0F2744" }, line: { color: "0F2744", width: 0 } });
txt(s, "DRUG INTERACTIONS", 0.8, 1.3, 8, 1.0, { color: "60A5FA", sz: 38, bold: true, align: "left" });
txt(s, "Quick Reference", 0.8, 2.28, 8, 0.75, { color: C.white, sz: 44, bold: true, align: "left" });
txt(s, "FOR CLINICAL MEDICAL STUDENTS", 0.8, 3.1, 8, 0.4, { color: "93C5FD", sz: 13, bold: true, align: "left", charSpacing: 3 });
// Severity legend on cover
const sevItems = [
["CONTRAINDICATED", "8B0000"],
["SERIOUS", "C0392B"],
["MAJOR", "D35400"],
["MODERATE", "B7770D"],
["MONITOR", "1A6B3C"],
];
txt(s, "SEVERITY SCALE", 0.8, 3.8, 8, 0.28, { color: "93C5FD", sz: 9, bold: true, charSpacing: 2 });
sevItems.forEach(([label, color], i) => {
bg(s, 0.8 + i * 1.5, 4.08, 1.38, 0.28, color, true);
txt(s, label, 0.8 + i * 1.5, 4.08, 1.38, 0.28, { color: C.white, sz: 6.5, bold: true, align: "center", margin: 1 });
});
// Slide list
const slides = [
["2", "CYP450 Drug Interactions", "2563EB"],
["3", "Cardiovascular Drug Interactions", "1A5276"],
["4", "Antibiotics + Drug Interactions", "145A32"],
["5", "CNS + Psychiatric Drug Interactions","4A235B"],
["6", "Endocrine + Renal Interactions", "6E2F0A"],
["7", "High-Risk Pairs at a Glance", "78281F"],
];
slides.forEach(([num, label, color], i) => {
const x = 9.1;
const y = 0.9 + i * 0.88;
bg(s, x, y, 3.9, 0.68, color, true);
txt(s, num, x + 0.08, y, 0.4, 0.68, { color: "93C5FD", sz: 18, bold: true, align: "center" });
txt(s, label, x + 0.52, y, 3.25, 0.68, { color: C.white, sz: 9, bold: false, valign: "middle", wrap: true });
});
txt(s, "For educational use only. Always verify with current BNF / local formulary.", 0.8, 6.8, 12, 0.4, { color: "4B5563", italic: true, sz: 8 });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — CYP450 INTERACTIONS (Statins, Macrolides, Azoles, Warfarin)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.offWhite);
titleBar(s, "CYP450-MEDIATED DRUG INTERACTIONS", "Slide 2 of 7", "1A3A5C");
legendBar(s, 0.56);
sectionDivider(s, "STATINS — CYP3A4 Inhibitors increase statin levels → Myopathy / Rhabdomyolysis risk", 0.82, "8B3A00");
tableHeader(s, 1.03);
[
["Simvastatin / Lovastatin", "Clarithromycin / Erythromycin (Macrolides)", "X", "Macrolides inhibit CYP3A4 → simvastatin/lovastatin AUC ↑ 5–12×", "Severe myopathy, rhabdomyolysis, AKI (myoglobinuria)", "CONTRAINDICATED. Use azithromycin (does not inhibit CYP3A4) or switch to pravastatin/rosuvastatin (not CYP3A4)"],
["Simvastatin / Lovastatin", "Fluconazole / Itraconazole / Ketoconazole (Azoles)", "X", "Azole antifungals = potent CYP3A4 inhibitors; statin levels increase 10-20×", "Rhabdomyolysis, acute renal failure", "CONTRAINDICATED. Use fluconazole if needed → switch to pravastatin or rosuvastatin"],
["Simvastatin / Lovastatin", "Diltiazem / Verapamil (non-DHP CCBs)", "M", "Non-DHP CCBs inhibit CYP3A4 → moderate statin level rise", "Myopathy risk (less severe than macrolides)", "Limit simvastatin ≤10 mg/day with diltiazem or verapamil. Consider atorvastatin as safer alternative"],
["Simvastatin / Lovastatin", "Amiodarone", "M", "Amiodarone inhibits CYP3A4 and CYP2C9 → statin AUC ↑", "Myopathy; more pronounced with simvastatin 80 mg", "Limit simvastatin ≤20 mg/day with amiodarone. Atorvastatin/rosuvastatin preferred"],
["Atorvastatin", "Clarithromycin / Erythromycin", "S", "CYP3A4 inhibition raises atorvastatin levels (less than simvastatin)", "Myopathy risk (lower than simvastatin)", "Avoid or use lowest dose atorvastatin. Switch to azithromycin or pravastatin/rosuvastatin"],
["Any statin", "Gemfibrozil (Fibrate)", "S", "Gemfibrozil inhibits OATP1B1 transporter + glucuronidation → all statins ↑", "Rhabdomyolysis; CETP trial data confirms risk", "Avoid gemfibrozil + statin combination. Use fenofibrate (safer fibrate) if needed"],
["Rosuvastatin / Pravastatin", "Cyclosporin", "S", "Cyclosporin inhibits OATP1B1 and MRP2 transporters → statin AUC ↑ 5–7×", "Rhabdomyolysis in transplant patients", "If unavoidable: limit rosuvastatin ≤5 mg/day, pravastatin ≤20 mg/day. Monitor CK"],
].forEach((row, i) => interactionRow(s, row, 1.25 + i * 0.25, i));
sectionDivider(s, "WARFARIN — Multiple CYP450 Interactions (CYP2C9 substrate — narrow therapeutic index)", 3.01, "5B2C6F");
tableHeader(s, 3.22);
[
["Warfarin", "Fluconazole / Miconazole", "X", "Azoles inhibit CYP2C9 → warfarin (S-enantiomer) metabolism ↓ → INR ↑↑↑", "Major bleeding (GI, intracranial)", "CONTRAINDICATED concurrent use. If azole essential: stop warfarin, bridge with LMWH. Topical miconazole can also interact"],
["Warfarin", "Amiodarone", "X", "Amiodarone + active metabolite inhibit CYP2C9 and CYP3A4 (effect persists months after stopping)", "INR doubles within 1–2 weeks; major bleeding", "Reduce warfarin dose by ~30–50% when starting amiodarone. Monitor INR every 3 days until stable. Consider DOAC instead"],
["Warfarin", "Clarithromycin / Erythromycin", "S", "CYP3A4 and CYP2C9 inhibition + ↓ gut flora (vitamin K production)", "INR ↑ → bleeding risk", "Monitor INR closely (within 3–5 days of starting). Consider dose reduction. Azithromycin safer"],
["Warfarin", "Metronidazole / Ciprofloxacin", "S", "Metronidazole: CYP2C9 inhibition. Ciprofloxacin: unknown mechanism + gut flora ↓", "INR ↑ → bleeding", "Reduce warfarin dose ~25% when prescribing. Check INR at 3–5 days"],
["Warfarin", "Rifampicin", "S", "Rifampicin = potent CYP450 inducer → warfarin metabolism ↑↑", "INR ↓ → subtherapeutic anticoagulation → thrombosis", "INR can fall to <1.5 within days. Massive dose increase needed. Consider LMWH/DOAC instead"],
["Warfarin", "NSAIDs (Ibuprofen, Naproxen)", "S", "Pharmacodynamic: NSAIDs inhibit platelets + GI mucosal damage; some inhibit CYP2C9", "Bleeding risk ↑↑ (GI haemorrhage especially)", "Avoid NSAIDs in anticoagulated patients. Use paracetamol for analgesia. If unavoidable: add PPI"],
["Warfarin", "Phenytoin / Carbamazepine / Phenobarbitone", "M", "Anticonvulsants induce CYP2C9/CYP3A4 → warfarin metabolism ↑", "INR ↓ → subtherapeutic → thrombosis", "Monitor INR frequently when starting/stopping AEDs. May need significantly higher warfarin doses"],
].forEach((row, i) => interactionRow(s, row, 3.44 + i * 0.25, i));
sectionDivider(s, "ORAL CONTRACEPTIVE PILL (OCP) — Enzyme Induction reduces contraceptive efficacy", 5.19, "145A6E");
tableHeader(s, 5.40);
[
["Combined OCP / Progestogen-only pill", "Rifampicin / Rifabutin", "X", "Rifampicin potently induces CYP3A4 → contraceptive steroid levels ↓↓", "Contraceptive failure → unplanned pregnancy", "OCP unreliable even with added barrier methods during rifampicin. Use LARC (IUD/IUS/DMPA injection). Continue precautions 28 days after stopping rifampicin"],
["Combined OCP", "Enzyme-inducing AEDs (phenytoin, carbamazepine, phenobarb, topiramate ≥200 mg)", "S", "CYP3A4 induction ↓ ethinylestradiol and levonorgestrel levels", "Contraceptive failure", "FSRH guidance: avoid OCP or use ≥50 mcg ethinylestradiol (specialist) + barrier. IUD/IUS preferred"],
["OCP", "Broad-spectrum antibiotics (amoxicillin, doxycycline)", "O", "Theory: gut flora disruption ↓ enterohepatic recycling of oestrogen — clinical evidence weak/disputed", "Theoretical contraceptive failure risk (small)", "FSRH 2019: no additional contraception needed for non-enzyme-inducing antibiotics. Counsel patients of theoretical risk"],
].forEach((row, i) => interactionRow(s, row, 5.62 + i * 0.25, i));
footer(s);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — CARDIOVASCULAR INTERACTIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.offWhite);
titleBar(s, "CARDIOVASCULAR DRUG INTERACTIONS", "Slide 3 of 7", "1A3A5C");
legendBar(s, 0.56);
sectionDivider(s, "ACE INHIBITORS / ARBs — Hyperkalaemia, Hypotension, Renal Failure", 0.82, "154360");
tableHeader(s, 1.03);
[
["ACE inhibitor / ARB", "NSAIDs (Ibuprofen, Diclofenac, Naproxen)", "S", "NSAIDs ↓ renal prostaglandins → reduced GFR, ↓ RAS counterregulation; both drugs reduce renal perfusion", "AKI (the 'triple whammy' with diuretics), ↑ K+, ↑ BP (blunted antihypertensive effect)", "Avoid regular NSAIDs in patients on ACEi/ARB, especially the elderly or if on diuretics. Use paracetamol. If essential: monitor U&E/creatinine at 1 week. STOP in acute illness/dehydration"],
["ACE inhibitor / ARB", "Potassium-sparing diuretics (Spironolactone, Eplerenone, Amiloride)", "M", "Additive retention of K+ (both drugs reduce aldosterone-driven K+ excretion)", "Hyperkalaemia → cardiac arrhythmias, cardiac arrest", "Combination used intentionally in HFrEF (evidence-based) — requires baseline K+ <5.0 mmol/L and regular monitoring. STOP if K+ >5.5. Avoid in CKD stage 4+"],
["ACE inhibitor / ARB", "Trimethoprim / Cotrimoxazole", "M", "Trimethoprim blocks renal K+ secretion (similar to amiloride) → additive hyperkalaemia", "Hyperkalaemia (especially in elderly or CKD)", "Monitor U&E/K+ within 1 week of starting. Reduce dose of trimethoprim if needed. Nitrofurantoin safer alternative for UTI"],
["ACE inhibitor", "ARB (Dual RAS Blockade)", "S", "Additive RAAS inhibition → ↓↓ aldosterone, ↑↑ K+, GFR reduction", "Hyperkalaemia, AKI — ONTARGET trial showed harm with dual blockade", "AVOID routine dual ACEi+ARB. Exception: specialist-supervised resistant proteinuric nephropathy. Monitor U&E closely"],
["ACE inhibitor / ARB", "Lithium", "M", "ACEi/ARBs ↓ renal lithium excretion via ↓ angiotensin II → GFR effects", "Lithium toxicity (narrow therapeutic index)", "Monitor lithium levels 1 week after starting ACEi/ARB. Dose adjustment likely needed. Symptoms: tremor, confusion, polyuria"],
].forEach((row, i) => interactionRow(s, row, 1.25 + i * 0.25, i));
sectionDivider(s, "BETA-BLOCKERS — Bradycardia, Hypoglycaemia masking, Bronchospasm", 2.52, "1A5276");
tableHeader(s, 2.73);
[
["Beta-blocker (any)", "Verapamil / Diltiazem (non-DHP CCBs)", "X", "Additive depression of SA and AV node → severe bradycardia, heart block, asystole", "Complete heart block, cardiogenic shock", "CONTRAINDICATED combination (IV verapamil + beta-blocker especially dangerous). Use amlodipine if CCB needed alongside beta-blocker"],
["Beta-blocker (any)", "Digoxin", "M", "Additive suppression of AV conduction", "Severe bradycardia, complete heart block", "Use cautiously if combined for AF rate control. Monitor resting HR (target 60–80). ECG monitoring"],
["Beta-blocker (any)", "Insulin / Sulfonylurea", "W", "Beta-blockers mask adrenergic hypoglycaemia symptoms (palpitations, tremor) — diaphoresis still present", "Unrecognised hypoglycaemia → prolonged episode", "Counsel diabetic patients. Cardioselective beta-blockers (bisoprolol, atenolol) slightly safer. Use with caution in insulin-dependent DM"],
["Beta-blocker (any)", "Adrenaline / Epinephrine", "M", "Non-selective beta-blockers block beta-2 → unopposed alpha → severe hypertension, bradycardia (reflex)", "Hypertensive crisis, bradycardia (especially propranolol)", "Use cardioselective beta-blockers where possible. Anaphylaxis management: give adrenaline IM but may need higher doses + atropine for refractory bradycardia"],
["Propranolol / Non-selective BB", "Salbutamol / Salmeterol", "M", "Beta-blocker antagonises beta-2 bronchodilation", "Severe bronchospasm, attenuated bronchodilator response in asthma/COPD", "Avoid non-selective beta-blockers in asthma. Use cardioselective (bisoprolol, atenolol) if beta-blocker essential. Monitor peak flow"],
].forEach((row, i) => interactionRow(s, row, 2.95 + i * 0.25, i));
sectionDivider(s, "DIGOXIN — Narrow Therapeutic Index (target 1.0–2.0 nmol/L)", 4.22, "4A235B");
tableHeader(s, 4.43);
[
["Digoxin", "Amiodarone", "S", "Amiodarone inhibits P-glycoprotein + CYP2C9/3A4 → digoxin levels ↑↑", "Digoxin toxicity: bradycardia, AV block, nausea, visual changes (yellow-green halos)", "Reduce digoxin dose by 50% when starting amiodarone. Monitor levels and ECG. Titrate to effect"],
["Digoxin", "Diltiazem / Verapamil", "S", "Inhibit P-glycoprotein → ↓ renal/biliary digoxin excretion → digoxin ↑ ~70%", "Digoxin toxicity, bradycardia, heart block", "Reduce digoxin dose by 30–50%. Monitor levels. Avoid verapamil + digoxin if possible"],
["Digoxin", "Loop / Thiazide diuretics", "M", "Diuretics → hypokalaemia → ↑ digoxin binding to Na+/K+-ATPase → enhanced toxicity", "Arrhythmias and toxicity even at 'normal' digoxin levels", "Monitor K+ (target >4.0 mmol/L in patients on digoxin). Replace K+ aggressively. Monitor ECG"],
["Digoxin", "Clarithromycin / Erythromycin", "M", "Macrolides eliminate gut bacteria (Eubacterium lentum) that inactivate digoxin + P-gp inhibition", "Digoxin toxicity (nausea, bradycardia, visual symptoms)", "Monitor digoxin level and ECG within 48–72h of starting macrolide. Use azithromycin if possible"],
["Digoxin", "Spironolactone", "W", "Spironolactone interferes with some digoxin assay methods (falsely elevated levels)", "Potential over-treatment based on falsely elevated digoxin assay", "Be aware of assay interference. Use clinical symptoms + ECG to guide dosing alongside levels"],
].forEach((row, i) => interactionRow(s, row, 4.65 + i * 0.25, i));
sectionDivider(s, "QT-PROLONGING DRUGS — Additive risk of Torsades de Pointes (TdP)", 5.91, "78281F");
tableHeader(s, 6.12);
[
["Amiodarone", "Any QT-prolonging drug (ondansetron, clarithromycin, haloperidol, fluconazole, citalopram, methadone)", "X", "Additive QT prolongation → triggered arrhythmia mechanism (early afterdepolarisations)", "Torsades de Pointes → VF → sudden cardiac death", "Check CredibleMeds/AzCERT database for all QT-risk drugs. Avoid combinations. Monitor ECG + electrolytes (K+, Mg2+). Correct electrolytes before starting QT drugs"],
["Sotalol", "Clarithromycin / Azithromycin / Ciprofloxacin", "S", "Class III anti-arrhythmic with inherent QT prolongation + antibiotic-mediated QT prolongation", "TdP, VF", "Avoid. If antibiotic needed: choose agent with lowest QT risk (e.g., amoxicillin). ECG mandatory if combination unavoidable"],
["Methadone", "Fluconazole + SSRIs/TCAs", "S", "Multiple mechanisms: CYP3A4 inhibition ↑ methadone + additive QT", "TdP (methadone has high intrinsic QT risk)", "Baseline ECG before starting methadone. Avoid QT-prolonging drugs. ECG if QTc >450 ms (men) or >470 ms (women)"],
].forEach((row, i) => interactionRow(s, row, 6.34 + i * 0.25, i));
footer(s);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — ANTIBIOTICS + DRUG INTERACTIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.offWhite);
titleBar(s, "ANTIBIOTICS — DRUG INTERACTIONS", "Slide 4 of 7", "145A32");
legendBar(s, 0.56);
sectionDivider(s, "MACROLIDES (Clarithromycin / Erythromycin) — Potent CYP3A4 Inhibitors", 0.82, "145A32");
tableHeader(s, 1.03);
[
["Clarithromycin / Erythromycin", "Simvastatin / Lovastatin", "X", "CYP3A4 inhibition → statin AUC ↑ 5–12×", "Rhabdomyolysis, AKI", "CONTRAINDICATED. Use azithromycin or switch to pravastatin/rosuvastatin. See slide 2"],
["Clarithromycin / Erythromycin", "Warfarin", "S", "CYP2C9 + CYP3A4 inhibition; gut flora ↓ vitamin K production", "INR ↑↑ → major bleeding", "Monitor INR within 3–5 days. Anticipate dose reduction ~20–30%"],
["Clarithromycin / Erythromycin", "Colchicine", "X", "CYP3A4 inhibition + P-gp inhibition → colchicine AUC ↑ 3×", "Colchicine toxicity: diarrhoea, myopathy, multi-organ failure, death", "CONTRAINDICATED (especially in renal impairment). Use azithromycin. If unavoidable: max colchicine 0.5 mg total dose"],
["Clarithromycin / Erythromycin", "Carbamazepine", "S", "CYP3A4 inhibition → carbamazepine level ↑↑", "Carbamazepine toxicity: diplopia, ataxia, drowsiness, seizures", "Monitor carbamazepine levels. Use azithromycin or doxycycline. Anticipate 50% level rise"],
["Clarithromycin", "Digoxin", "M", "P-gp inhibition + gut bacteria elimination → digoxin ↑", "Digoxin toxicity (nausea, bradycardia, vision)", "See digoxin section. Use azithromycin if possible. Monitor digoxin level"],
["Clarithromycin / Erythromycin", "QT-prolonging drugs (antipsychotics, methadone, sotalol)", "S", "Additive QT prolongation (macrolides themselves prolong QTc)", "Torsades de Pointes → VF", "Check QTc before prescribing. Avoid combination. Azithromycin also has QT risk (less CYP interaction but QT-prolonging)"],
].forEach((row, i) => interactionRow(s, row, 1.25 + i * 0.25, i));
sectionDivider(s, "FLUOROQUINOLONES (Ciprofloxacin / Levofloxacin) — QT Risk + Metal chelation + CYP1A2", 2.77, "1A5276");
tableHeader(s, 2.98);
[
["Ciprofloxacin / Levofloxacin", "QT-prolonging drugs (amiodarone, haloperidol, ondansetron)", "S", "Fluoroquinolones prolong QTc independently; additive with other QT drugs", "TdP, VF", "ECG before prescribing. Avoid combining. Levofloxacin has higher QT risk than ciprofloxacin"],
["Ciprofloxacin", "Theophylline / Aminophylline", "M", "Ciprofloxacin inhibits CYP1A2 → theophylline AUC ↑ 50–100%", "Theophylline toxicity: tachycardia, seizures, nausea", "Reduce theophylline dose by 30–50% or avoid. Monitor theophylline levels. Use amoxicillin if possible"],
["Ciprofloxacin", "Warfarin", "S", "CYP1A2 inhibition → minor effect + mechanism unclear; clinically significant", "INR ↑ → bleeding", "Monitor INR within 3–5 days. Consider trimethoprim or amoxicillin as safer alternatives"],
["Ciprofloxacin / Any fluoroquinolone", "Oral iron / Antacids / Calcium supplements", "W", "Metal cations chelate fluoroquinolone in gut → ↓ absorption by up to 75%", "Antibiotic treatment failure", "Take fluoroquinolone 2 hours before or 4 hours after iron/antacids/calcium supplements"],
["Ciprofloxacin", "NSAIDs", "W", "Fluoroquinolones lower seizure threshold; NSAIDs inhibit GABA-A → additive CNS excitability", "Seizures (especially in elderly or with pre-existing seizure risk)", "Use paracetamol for analgesia where possible. Caution in epilepsy"],
].forEach((row, i) => interactionRow(s, row, 3.20 + i * 0.25, i));
sectionDivider(s, "METRONIDAZOLE — Disulfiram Reactions + CYP Inhibition", 4.44, "145A32");
tableHeader(s, 4.65);
[
["Metronidazole", "Alcohol", "X", "Metronidazole inhibits acetaldehyde dehydrogenase → aldehyde accumulates (disulfiram-like reaction)", "Severe flushing, nausea, vomiting, tachycardia, hypotension (can be dangerous)", "CONTRAINDICATED. Avoid alcohol during and 48 hours after metronidazole. Warn patient explicitly. Tinidazole: same interaction"],
["Metronidazole", "Warfarin", "S", "CYP2C9 inhibition → warfarin (S-enantiomer) metabolism ↓", "INR ↑↑ → bleeding. Can double INR within days", "Reduce warfarin dose ~25–30%. Monitor INR at 3–5 days. Consider azithromycin or cephalosporins if alternatives for infection"],
["Metronidazole", "Lithium", "W", "Reduced renal lithium excretion (mechanism not fully elucidated)", "Lithium toxicity: tremor, ataxia, confusion, seizures", "Monitor lithium levels. Ensure good hydration. Check level at 5–7 days"],
["Metronidazole", "5-Fluorouracil (5-FU)", "M", "Metronidazole inhibits CYP2C9 → 5-FU clearance ↓", "5-FU toxicity: mucositis, myelosuppression, diarrhoea", "Avoid combination in oncology patients. Specialist review required"],
].forEach((row, i) => interactionRow(s, row, 4.87 + i * 0.25, i));
sectionDivider(s, "RIFAMPICIN — Potent Enzyme INDUCER (opposite effect: ↓ drug levels)", 5.88, "78281F");
tableHeader(s, 6.09);
[
["Rifampicin", "Warfarin / DOACs (apixaban, rivaroxaban, edoxaban)", "X", "Rifampicin induces CYP3A4, CYP2C9, P-gp → anticoagulant levels ↓↓ dramatically", "Subtherapeutic anticoagulation → DVT, PE, stroke", "AVOID if possible. If essential for TB: use LMWH/UFH (not affected by CYP induction). DOAC levels decrease ≥50%"],
["Rifampicin", "Combined OCP / Progestogen pill", "X", "CYP3A4 induction → steroid contraceptive levels ↓↓↓", "Contraceptive failure → unplanned pregnancy", "Use IUD/IUS or DMPA injection. Continue barrier contraception for 28 days after stopping rifampicin"],
["Rifampicin", "HIV antiretrovirals (protease inhibitors, some NNRTIs)", "X", "Profound CYP3A4 induction → ART levels ↓↓ → virological failure", "HIV treatment failure, resistance emergence", "Replace rifampicin with rifabutin (weaker inducer) in HIV/TB co-infection. Specialist ID guidance essential"],
["Rifampicin", "Corticosteroids (prednisolone, dexamethasone)", "M", "CYP3A4 induction → steroid clearance ↑ → ↓ efficacy", "Loss of steroid effect (important in Addison's, transplant, IBD)", "Double or triple steroid dose during rifampicin. Monitor for adrenal crisis if steroid-dependent"],
].forEach((row, i) => interactionRow(s, row, 6.31 + i * 0.25, i));
footer(s);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — CNS + PSYCHIATRIC INTERACTIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.offWhite);
titleBar(s, "CNS + PSYCHIATRIC DRUG INTERACTIONS", "Slide 5 of 7", "3B0F5E");
legendBar(s, 0.56);
sectionDivider(s, "SEROTONIN SYNDROME — Life-threatening if missed", 0.82, "6E2C00");
tableHeader(s, 1.03);
[
["SSRIs / SNRIs (any)", "MAOIs (phenelzine, tranylcypromine, selegiline, linezolid, methylene blue)", "X", "MAOI prevents serotonin breakdown; SSRI/SNRI ↑ serotonin release → ↑↑↑ serotonin", "Serotonin syndrome: agitation, clonus, hyperreflexia, diaphoresis, hyperthermia → DEATH", "CONTRAINDICATED. Washout 14 days after stopping MAOI before starting SSRI. 5 weeks after fluoxetine (long t½). Linezolid is a reversible MAOI — avoid SSRIs"],
["SSRIs / SNRIs", "Tramadol", "S", "Tramadol inhibits serotonin reuptake + is weak opioid → serotonergic excess", "Serotonin syndrome (even at normal doses), seizures", "Avoid combination. Use alternative analgesia (paracetamol, codeine, morphine). If unavoidable: lowest tramadol dose, warn about symptoms"],
["SSRIs", "Triptans (sumatriptan, rizatriptan)", "W", "Both serotonergic → theoretical additive effect; regulatory warning issued 2006 (FDA/MHRA)", "Serotonin syndrome — evidence weak but real case reports exist", "FDA/MHRA advisory: monitor for serotonin syndrome symptoms. Clinical benefits usually outweigh risks (migraine in depression). Document discussion"],
["SSRIs / SNRIs", "Lithium", "W", "Additive serotonergic effects + lithium lowers seizure threshold", "Serotonin-like symptoms, neurotoxicity (even at therapeutic lithium levels)", "Monitor lithium levels. Reduce lithium dose. Educate patient. This combination is sometimes intentional (augmentation) — needs specialist oversight"],
["SSRIs (fluoxetine, fluvoxamine, paroxetine)", "Tamoxifen", "S", "Fluoxetine/paroxetine inhibit CYP2D6 → ↓ conversion of tamoxifen to active metabolite (endoxifen)", "Reduced tamoxifen efficacy → increased breast cancer recurrence", "Avoid fluoxetine, fluvoxamine, paroxetine in patients on tamoxifen. Use sertraline, citalopram, escitalopram, or venlafaxine (minimal CYP2D6 inhibition)"],
].forEach((row, i) => interactionRow(s, row, 1.25 + i * 0.25, i));
sectionDivider(s, "ANTIEPILEPTICS — CYP450 Inducers (carbamazepine, phenytoin, phenobarbitone, primidone)", 2.52, "4A235B");
tableHeader(s, 2.73);
[
["Carbamazepine / Phenytoin / Phenobarb", "OCP / HRT (oestrogens)", "X", "CYP3A4 induction → sex steroid levels ↓", "Contraceptive failure / loss of menopausal symptom control", "Do not use OCP in enzyme-inducing AED patients. Use IUD/IUS/DMPA + barrier. Increase HRT dose under specialist guidance"],
["Carbamazepine / Phenytoin", "Warfarin / DOACs", "S", "CYP2C9/3A4 induction → anticoagulant levels ↓", "Subtherapeutic anticoagulation → thrombosis", "Monitor INR frequently. Higher warfarin doses required. DOACs unreliable — prefer LMWH or warfarin with careful INR monitoring"],
["Carbamazepine", "Carbamazepine + Erythromycin / Clarithromycin", "S", "Macrolides inhibit CYP3A4 → carbamazepine ↑↑ (autoinduction also makes levels unpredictable)", "Carbamazepine toxicity: diplopia, nausea, ataxia, seizures (paradoxically)", "Use azithromycin or doxycycline. Check carbamazepine level if macrolide unavoidable"],
["Sodium Valproate", "Lamotrigine", "M", "Valproate inhibits glucuronidation (UGT enzymes) → lamotrigine half-life doubles", "Lamotrigine toxicity: rash, diplopia, dizziness, Stevens-Johnson syndrome", "Halve lamotrigine dose when starting valproate. Titrate very slowly. Standard lamotrigine dose causes toxicity when combined with valproate"],
["Phenytoin", "Multiple drugs (warfarin, ciclosporin, doxycycline, methotrexate, many more)", "M", "CYP2C9/CYP3A4 induction + phenytoin itself is a substrate → highly variable + multiple interactions", "Variable: loss of efficacy of co-administered drugs", "Phenytoin is a 'problem drug'. Check all co-medications in BNF. Therapeutic drug monitoring essential (narrow TI, non-linear kinetics)"],
].forEach((row, i) => interactionRow(s, row, 2.95 + i * 0.25, i));
sectionDivider(s, "LITHIUM — Narrow Therapeutic Index (0.6–1.0 mmol/L), Multiple Renal Interactions", 4.22, "154360");
tableHeader(s, 4.43);
[
["Lithium", "NSAIDs (Ibuprofen, Diclofenac, Naproxen)", "S", "NSAIDs ↓ renal prostaglandins → ↓ GFR → ↓ lithium excretion → lithium ↑", "Lithium toxicity: coarse tremor, vomiting, confusion, seizures, coma, renal failure", "AVOID NSAIDs in lithium patients. Use paracetamol. If inadvertent NSAID use: check lithium level immediately. Educate patients"],
["Lithium", "ACE inhibitors / ARBs", "M", "↓ renal perfusion → ↓ lithium clearance", "Lithium toxicity (can occur within days of starting ACEi/ARB)", "Monitor lithium level 1 week after starting. Reduce lithium dose. Common combination in bipolar + hypertension — needs monitoring"],
["Lithium", "Thiazide diuretics (Bendroflumethiazide, Indapamide)", "M", "Thiazides → sodium depletion → compensatory ↑ renal Na+ (and Li+) reabsorption", "Lithium toxicity (even standard doses)", "Avoid thiazides. Use loop diuretics (furosemide) if diuretic needed — safer with lithium. Monitor levels frequently"],
["Lithium", "SSRIs + Serotonergic drugs", "W", "Additive serotonergic effects", "Serotonin-like toxicity, neurotoxicity", "Monitor for serotonin-like features. Check lithium levels. Reduce doses if symptoms arise"],
].forEach((row, i) => interactionRow(s, row, 4.65 + i * 0.25, i));
sectionDivider(s, "ANTIPSYCHOTICS — QT Prolongation, Sedation, Extrapyramidal", 5.68, "4A235B");
tableHeader(s, 5.89);
[
["Haloperidol / Quetiapine / Clozapine", "Any QT-prolonging drug (clarithromycin, ondansetron, methadone, amiodarone, fluconazole)", "S", "Additive blockade of hERG cardiac K+ channels → QT ↑↑", "Torsades de Pointes → VF, sudden death", "Check CredibleMeds database for all QT drugs. Mandatory ECG before prescribing. Correct K+/Mg2+. Avoid combining high-risk QT agents"],
["Clozapine", "Ciprofloxacin / Fluvoxamine", "S", "CYP1A2 inhibition → clozapine AUC ↑ 2–3×", "Clozapine toxicity: seizures, hypotension, agranulocytosis risk ↑, sedation", "Avoid ciprofloxacin + clozapine. Use trimethoprim or amoxicillin for UTI. Monitor clozapine level + FBC"],
["Antipsychotics (any)", "Metoclopramide / Domperidone", "M", "Additive dopamine D2 blockade in nigrostriatal pathway", "Extrapyramidal side-effects: acute dystonia, akathisia, parkinsonism, risk of tardive dyskinesia", "Avoid combination especially long-term. Use ondansetron or cyclizine for nausea in antipsychotic-treated patients"],
["Clozapine", "Smoking cessation (stopping smoking)", "M", "Smoking induces CYP1A2 → clozapine metabolised faster; stopping → CYP1A2 activity ↓ → clozapine ↑", "Clozapine toxicity when patient stops smoking (e.g., hospital admission, NRT)", "Reduce clozapine dose by ~25% when stopping smoking. Monitor levels. Restart dose increase if smoking resumes"],
].forEach((row, i) => interactionRow(s, row, 6.11 + i * 0.25, i));
footer(s);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — ENDOCRINE + RENAL INTERACTIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.offWhite);
titleBar(s, "ENDOCRINE + RENAL DRUG INTERACTIONS", "Slide 6 of 7", "6E2F0A");
legendBar(s, 0.56);
sectionDivider(s, "DIABETES DRUGS — Hypoglycaemia, Lactic Acidosis, Interaction with Common Co-medications", 0.82, "6E2F0A");
tableHeader(s, 1.03);
[
["Metformin", "IV Contrast media (iodinated)", "S", "Contrast → transient renal impairment → metformin accumulates → lactic acidosis (rare but serious)", "Metformin-associated lactic acidosis (MALA) — high mortality", "HOLD metformin on day of contrast procedure + 48 hours after. Restart only if eGFR stable at 48h check. MHRA guidance 2020"],
["Metformin", "Alcohol (chronic excess)", "M", "Alcohol → hepatic impairment + ↑ lactate production → additive lactic acidosis risk", "Lactic acidosis", "Counsel patients to avoid binge/heavy drinking. Moderate intake generally acceptable. Monitor LFTs"],
["Sulfonylureas (Gliclazide, Glibenclamide)", "Fluconazole", "S", "Fluconazole inhibits CYP2C9 → sulfonylurea AUC ↑ significantly", "Severe hypoglycaemia (can last hours due to long t½ of drug)", "Reduce sulfonylurea dose. Monitor glucose frequently. Consider hospital admission for severe hypo. Use topical antifungal if possible"],
["Sulfonylureas", "Beta-blockers", "W", "Beta-blockers mask adrenergic hypoglycaemia warning symptoms (palpitations, tremor); diaphoresis preserved", "Unrecognised hypoglycaemia → severe prolonged episode", "Counsel patient — rely on sweating symptom. Cardioselective BB slightly safer. More frequent glucose monitoring"],
["Insulin", "Corticosteroids (prednisolone, dexamethasone)", "W", "Steroids → insulin resistance + stimulate hepatic gluconeogenesis → hyperglycaemia, especially post-prandial", "Loss of glycaemic control; steroid-induced hyperglycaemia", "Increase insulin dose (often need +20–50% or more). Monitor 4-times daily glucose. Use variable rate IV insulin if nil by mouth. STOP extra insulin when steroids stop"],
["SGLT2 inhibitors (empagliflozin, dapagliflozin)", "Loop diuretics (furosemide)", "W", "Both cause natriuresis/osmotic diuresis → additive volume depletion", "Dehydration, AKI, hypotension (especially in elderly)", "Monitor renal function and BP. Educate patient on sick-day rules: STOP SGLT2i if acutely unwell/dehydrated. Hold before surgery"],
["SGLT2 inhibitors", "Insulin / Sulfonylurea", "W", "SGLT2i may lower glucose further when combined with insulin/SU", "Hypoglycaemia (more common when combined)", "Reduce insulin or SU dose by ~20% when initiating SGLT2i. Monitor glucose. Risk of euglycaemic DKA with insulin + SGLT2i combination"],
].forEach((row, i) => interactionRow(s, row, 1.25 + i * 0.25, i));
sectionDivider(s, "IMMUNOSUPPRESSANTS (Ciclosporin / Tacrolimus) — Narrow TI, Multiple Interactions", 3.02, "154360");
tableHeader(s, 3.23);
[
["Ciclosporin / Tacrolimus", "Clarithromycin / Erythromycin / Azole antifungals", "X", "CYP3A4 inhibition → immunosuppressant AUC ↑ 2–5×", "Severe nephrotoxicity, neurotoxicity, transplant rejection if stopped abruptly", "CONTRAINDICATED. If antifungal needed: use liposomal amphotericin or specialist azole dosing with daily drug level monitoring"],
["Ciclosporin / Tacrolimus", "Rifampicin", "X", "CYP3A4 induction → immunosuppressant levels ↓↓ up to 70%", "Acute transplant rejection, graft loss", "AVOID. If TB treatment essential: replace rifampicin with rifabutin (weaker inducer). Multiple daily drug level checks needed"],
["Ciclosporin", "NSAIDs", "S", "Additive nephrotoxicity (both reduce renal prostaglandins/GFR)", "AKI in transplant patients", "AVOID NSAIDs in ciclosporin-treated patients. Use paracetamol. Monitor eGFR closely if unavoidable"],
["Ciclosporin", "Statins (see slide 2)", "S", "OATP1B1/MRP2 inhibition → statin AUC ↑↑", "Rhabdomyolysis", "Limit rosuvastatin ≤5 mg/day, pravastatin ≤20 mg/day. Avoid simvastatin/lovastatin. Monitor CK"],
["Tacrolimus", "Potassium-sparing agents (ACEi, ARB, spironolactone)", "M", "Tacrolimus → hyperkalaemia (direct tubular effect) + additive with K+-retaining agents", "Severe hyperkalaemia → arrhythmia", "Monitor K+ weekly initially. Target K+ <5.0. Avoid ACEi/ARB/spironolactone combination unless essential + closely monitored"],
].forEach((row, i) => interactionRow(s, row, 3.45 + i * 0.25, i));
sectionDivider(s, "DIURETICS — Electrolyte Disturbances + Interactions", 4.72, "1A5276");
tableHeader(s, 4.93);
[
["Furosemide / Thiazides (loop + thiazide diuretics)", "Gentamicin / Vancomycin (aminoglycosides)", "S", "Loop diuretics enhance aminoglycoside-induced cochlear endolymph damage + share nephrotoxicity", "Ototoxicity (sensorineural hearing loss — IRREVERSIBLE) + AKI", "Avoid concurrent use where possible. If essential: ensure normovolaemia, monitor U&E daily, audiological assessment, target lowest effective aminoglycoside dose"],
["Loop / Thiazide diuretics", "Digoxin", "M", "Diuretic-induced hypokalaemia + hypomagnesaemia → ↑ digoxin binding at Na+/K+-ATPase", "Digoxin toxicity at therapeutic levels", "Maintain K+ >4.0 mmol/L. Replace Mg2+ if deficient. Monitor digoxin level and ECG"],
["Loop / Thiazide diuretics", "Lithium", "M", "Sodium depletion → compensatory proximal tubular Li+ reabsorption ↑", "Lithium toxicity", "Avoid thiazides with lithium. Furosemide safer if diuretic needed (loop diuretics act on distal tubule). Monitor Li+ levels weekly initially"],
["Furosemide", "NSAIDs", "M", "NSAIDs ↓ renal prostaglandins → blunt diuretic-induced GFR protection + ↓ natriuresis", "Reduced diuretic efficacy ('diuretic resistance'), AKI risk (triple whammy with ACEi)", "Avoid regular NSAIDs. Paracetamol for analgesia. Weigh patient daily; warn to avoid NSAID OTC purchases"],
].forEach((row, i) => interactionRow(s, row, 5.15 + i * 0.25, i));
sectionDivider(s, "CORTICOSTEROIDS — Multiple Important Interactions", 6.16, "6E2F0A");
tableHeader(s, 6.37);
[
["Prednisolone / Dexamethasone", "NSAIDs (Ibuprofen, Naproxen, Diclofenac)", "S", "Additive gastropathy: both damage gastric mucosa via prostaglandin suppression and direct mucosal damage", "GI bleeding, perforation, peptic ulceration", "AVOID combination. If both needed: add PPI (lansoprazole/omeprazole). Use paracetamol for analgesia. Higher-dose steroids especially risky"],
["Prednisolone / Dexamethasone", "Rifampicin", "M", "CYP3A4 induction → steroid clearance ↑ → ↓ efficacy", "Adrenal crisis if steroid-dependent, loss of treatment effect in IBD/RA etc.", "Double or triple steroid dose. Critical in Addison's or transplant. Monitor for loss of control of underlying disease"],
["Prednisolone", "Live vaccines (MMR, varicella, BCG, yellow fever)", "X", "Immunosuppression → normal vaccine virus replication → disseminated infection", "Systemic live vaccine infection — potentially fatal", "CONTRAINDICATED in patients on prednisolone ≥40 mg/day or >1 mg/kg for >1 week. Inactivated/killed vaccines safe"],
].forEach((row, i) => interactionRow(s, row, 6.59 + i * 0.25, i));
footer(s);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — HIGH-RISK PAIRS AT A GLANCE (Summary matrix)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
bg(s, 0, 0, 13.3, 7.5, C.offWhite);
titleBar(s, "HIGH-RISK DRUG PAIRS — AT A GLANCE SUMMARY", "Slide 7 of 7", "78281F");
// 2-column layout of quick reference cards
// Each card: coloured left strip, drug pair, consequence, action
const CARDS = [
// [sev, drugA, drugB, consequence, action]
["X", "Simvastatin / Lovastatin", "Clarithromycin / Erythromycin", "Rhabdomyolysis", "Use azithromycin OR switch to pravastatin/rosuvastatin"],
["X", "SSRIs / SNRIs", "MAOIs (inc. Linezolid)", "Serotonin Syndrome → DEATH", "14-day washout. Linezolid is a reversible MAOI"],
["X", "Warfarin", "Fluconazole", "INR ↑↑↑ → major bleeding", "Avoid. If essential: LMWH bridge. Topical miconazole can also interact"],
["X", "Warfarin", "Amiodarone", "INR doubles; persists months", "Reduce warfarin 30–50%, daily INR monitoring. Consider DOAC"],
["X", "Verapamil / Diltiazem", "Beta-blockers", "Complete heart block, asystole", "CONTRAINDICATED (especially IV verapamil). Use amlodipine if CCB needed"],
["X", "Rifampicin", "DOACs (apixaban, rivaroxaban)", "DOAC levels ↓↓ → thrombosis", "Use LMWH/warfarin instead. Rifabutin if TB Rx needed in HIV"],
["X", "Colchicine", "Clarithromycin (renal impairment)", "Multi-organ failure, death", "Use azithromycin. Max colchicine 0.5 mg if macrolide unavoidable"],
["X", "Metronidazole", "Alcohol", "Disulfiram reaction (severe)", "No alcohol during and 48h after. Warn patient explicitly"],
["X", "Ciclosporin / Tacrolimus", "Rifampicin", "Transplant rejection", "Avoid. Use rifabutin + intensive drug level monitoring"],
["X", "OCP", "Rifampicin / Enzyme-inducing AEDs", "Contraceptive failure", "Use LARC (IUD/IUS). Continue barrier 28 days after stopping rifampicin"],
["S", "ACE inhibitor / ARB", "NSAIDs + Diuretic (Triple Whammy)", "Acute kidney injury", "Avoid NSAIDs. Sick-day rules: STOP all 3 if unwell/dehydrated"],
["S", "Amiodarone", "Any QT-prolonging drug", "Torsades de Pointes → VF", "Check CredibleMeds. ECG + electrolytes before any QT drug"],
["S", "Digoxin", "Amiodarone / Verapamil / Diltiazem", "Digoxin toxicity", "Reduce digoxin by 30–50%. Monitor levels + ECG"],
["S", "Lithium", "NSAIDs", "Lithium toxicity", "AVOID NSAIDs. Use paracetamol. Check level immediately if inadvertent use"],
["S", "Metformin", "IV contrast", "Lactic acidosis (MALA)", "Hold metformin day of procedure + 48h. Restart only if eGFR stable"],
["S", "SSRIs (fluoxetine/parox)", "Tamoxifen", "Reduced tamoxifen efficacy → cancer recurrence", "Use sertraline/citalopram/escitalopram instead. Avoid CYP2D6-inhibiting SSRIs"],
["M", "Beta-blocker", "Insulin / Sulfonylurea", "Masked hypoglycaemia", "Counsel patient. Cardioselective BB safer. Rely on sweating symptom"],
["M", "Valproate", "Lamotrigine", "Lamotrigine toxicity (SJS risk)", "Halve lamotrigine starting dose. Titrate very slowly"],
["M", "Corticosteroids", "NSAIDs", "GI bleeding / perforation", "PPI cover mandatory. Use paracetamol for analgesia where possible"],
["M", "Ciprofloxacin", "Theophylline", "Theophylline toxicity", "Reduce theophylline dose 30–50% or use amoxicillin instead"],
["M", "Clozapine", "Stopping smoking", "Clozapine toxicity", "Reduce clozapine ~25% on admission. Monitor levels. Reincrease if smoking resumes"],
["W", "SGLT2 inhibitor", "Acute illness / surgery", "Euglycaemic DKA", "SICK DAY RULES: STOP SGLT2i if acutely unwell, fasting, or before surgery"],
["W", "Antipsychotics", "Metoclopramide / Domperidone", "Extrapyramidal SE ↑↑", "Use ondansetron or cyclizine for nausea in antipsychotic-treated patients"],
["W", "Fluoroquinolone", "Oral iron / antacids", "↓ antibiotic absorption (75%)", "Take fluoroquinolone 2h before or 4h after iron/antacids"],
];
// Two columns of cards, 12 cards per column
const cardH = 0.3;
const cardGap = 0.02;
const col1X = 0.12, col2X = 6.76;
const startY = 0.58;
const half = Math.ceil(CARDS.length / 2);
// Legend
const legItems = [["X","8B0000"],["S","C0392B"],["M","D35400"],["W","B7770D"],["O","1A6B3C"]];
const legLabels = ["CONTRAINDICATED","SERIOUS","MAJOR","MODERATE","MONITOR"];
txt(s, "KEY:", 0.12, 0.56, 0.5, 0.2, { sz: 7, bold: true, color: C.slate });
legItems.forEach(([k, color], i) => {
bg(s, 0.6 + i * 2.4, 0.56, 1.3, 0.2, color, true);
txt(s, legLabels[i], 0.6 + i * 2.4, 0.56, 1.3, 0.2, { color: C.white, sz: 6.3, bold: true, align: "center", margin: 1 });
});
// Column headers
bg(s, col1X, 0.80, 6.5, 0.22, C.hdrBg);
txt(s, "Drug A + Drug B → Consequence → Action", col1X + 0.15, 0.80, 6.3, 0.22, { color: C.white, sz: 7.5, bold: true, valign: "middle" });
bg(s, col2X, 0.80, 6.5, 0.22, C.hdrBg);
txt(s, "Drug A + Drug B → Consequence → Action", col2X + 0.15, 0.80, 6.3, 0.22, { color: C.white, sz: 7.5, bold: true, valign: "middle" });
CARDS.forEach((card, i) => {
const [sev, a, b, consequence, action] = card;
const cfg = SEV[sev];
const col = i < half ? 0 : 1;
const rowIdx = i < half ? i : i - half;
const x = col === 0 ? col1X : col2X;
const y = startY + 0.44 + rowIdx * (cardH + cardGap);
const rowBg = rowIdx % 2 === 0 ? C.white : C.rowAlt;
// Row background
bg(s, x, y, 6.5, cardH, rowBg);
// Left severity stripe
bg(s, x, y, 0.14, cardH, cfg.bg);
// Drug pair
txt(s, `${a} + ${b}`, x + 0.17, y, 2.3, cardH, { sz: 7.2, bold: true, color: C.navy, margin: 2 });
// Arrow separator
txt(s, "→", x + 2.48, y, 0.2, cardH, { sz: 8, bold: true, color: cfg.bg, align: "center", margin: 0 });
// Consequence
txt(s, consequence, x + 2.68, y, 1.7, cardH, { sz: 7, color: cfg.bg, bold: true, margin: 2 });
// Arrow 2
txt(s, "→", x + 4.39, y, 0.18, cardH, { sz: 8, bold: true, color: C.slateL, align: "center", margin: 0 });
// Action
txt(s, action, x + 4.57, y, 1.9, cardH, { sz: 6.8, color: C.slate, italic: false, margin: 2 });
// Bottom border
slide_line(s, x, y + cardH, x + 6.5, y + cardH, "E5E7EB");
});
footer(s);
}
function slide_line(slide, x1, y1, x2, y2, color) {
slide.addShape(pres.ShapeType.line, { x: x1, y: y1, w: x2 - x1, h: 0, line: { color, width: 0.5 } });
}
// ──────────────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/drug-cheatsheet/Drug_Interactions_QuickRef.pptx" })
.then(() => console.log("DONE: Drug_Interactions_QuickRef.pptx created"))
.catch(e => { console.error("ERROR:", e.message); process.exit(1); });