General practicals notes from basic presentation to treatments given

I need a bit more context before diving in. "General practicals" could mean several different things depending on your field and level of study.
Asking for Preferences

What subject or topic are these practical notes for? · What is your level of study?

The user selected "No preference" for subject - that's very broad. Let me ask one more focused question to narrow this down to something useful.
Asking for Preferences

Which body system or clinical area should these notes cover?

Got it - general medicine clinical practicals for a medical student. I'll now pull from the medical library and build structured notes covering the major conditions you'd encounter in general medicine clinicals, from history/presentation through to management.
Searching sources...
Reading File
Now let me run parallel searches across all the major general medicine topics at once:
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
FTS queries returning no results - likely need simpler single-term searches. Let me check what books are available and try simpler queries:
Finding Sources
Finding Sources
Good - Goldman-Cecil Medicine is the ideal general medicine textbook. Let me read key sections from it and other relevant books:
Finding Sources
Finding Sources
Now let me read the key sections in parallel - Chest Pain, Heart Failure, and Hypertension from Goldman-Cecil:
Reading File
Reading File
Reading File
Excellent - I have very rich content from Goldman-Cecil. Let me now read the HYPERTENSION chapter section and a few more key areas:
Reading File
Reading File
I now have sufficient content from Goldman-Cecil. I have strong knowledge of general medicine from training and the textbook sections. Let me now compile the comprehensive notes:Here are your comprehensive General Medicine Clinical Practicals notes:

General Medicine Clinical Practicals Notes

For Clinical Medical Students - Presentation to Treatment


PART 1: THE CLINICAL ENCOUNTER - FUNDAMENTALS

History Taking (SOCRATES + Systems)

Every clinical encounter begins with a structured history. Use this framework:
ComponentWhat to Ask
Presenting ComplaintChief complaint in patient's own words
History of Presenting IllnessSOCRATES: Site, Onset, Character, Radiation, Associations, Timing, Exacerbating/relieving factors, Severity
Past Medical HistoryPrevious illnesses, surgeries, hospitalizations
Drug HistoryCurrent medications, doses, allergies (reaction type!)
Family HistoryFirst-degree relatives; IHD, DM, HTN, malignancy
Social HistorySmoking (pack-years), alcohol (units/week), occupation, travel, living situation
Systems ReviewCardiac, respiratory, GI, renal, neuro, MSK, endocrine

General Examination - ABCDE Approach (Acutely Unwell)

  1. A - Airway (patency, stridor)
  2. B - Breathing (RR, SpO2, chest expansion, auscultation)
  3. C - Circulation (HR, BP, capillary refill, JVP, peripheral perfusion)
  4. D - Disability (GCS, pupils, glucose)
  5. E - Exposure (temperature, skin, rashes, swelling)

Bedside Observations to Document Always

  • Temperature, HR, BP (both arms if aortic suspected), RR, SpO2, urine output, BMI

PART 2: CARDIOVASCULAR SYSTEM

2.1 CHEST PAIN

Causes by Character

TypeCharacterKey Features
ACS (STEMI/NSTEMI)Crushing, heavy, centralRadiation to left arm/jaw, sweating, nausea
Stable AnginaExertional, tightRelieved by rest/GTN within 5 min
Aortic DissectionTearing, sudden onsetRadiation to back, BP difference between arms
PericarditisSharp, pleuriticRelieved by sitting forward
Pulmonary EmbolismPleuritic, suddenDyspnoea, haemoptysis, risk factors for DVT
GORD / OesophagealBurning, retrosternalWorse after meals, relieved by antacids
MusculoskeletalLocalized, reproduced on palpationNo radiation, positional

Investigations for Chest Pain

  • ECG (first-line, within minutes) - look for ST changes, T-wave inversion, new LBBB
  • Troponin I/T - at 0 h and 3 h (or 1 h with high-sensitivity assay)
  • CXR - widened mediastinum (dissection), pulmonary oedema, effusion
  • FBC, U&E, LFTs, lipids, glucose
  • Echocardiogram - wall motion abnormality
  • CT Pulmonary Angiogram (CTPA) - if PE suspected
  • CT Aortogram - if dissection suspected

ACS Management

STEMI (ST elevation or new LBBB):
  • Primary PCI within 90 min (preferred) - call cathlab immediately
  • If PCI not available within 120 min - Thrombolysis (alteplase/tenecteplase)
  • Dual antiplatelet: Aspirin 300 mg loading + Ticagrelor 180 mg (or Clopidogrel 300-600 mg)
  • Anticoagulation: Heparin (UFH or LMWH)
  • Morphine (cautiously, may mask pain but can suppress respiration)
  • Oxygen only if SpO2 <94%
NSTEMI / Unstable Angina:
  • Dual antiplatelet + anticoagulation (LMWH/fondaparinux)
  • Risk stratify with GRACE score
  • Early invasive strategy (coronary angiography) within 24-72 h for high-risk
Long-term post-ACS:
  • Aspirin lifelong + P2Y12 inhibitor for 12 months
  • Statin (high intensity - atorvastatin 80 mg)
  • Beta-blocker (for LV dysfunction or arrhythmia)
  • ACE inhibitor/ARB (for all, especially if LVEF reduced)
  • Cardiac rehabilitation

2.2 HEART FAILURE

Definition

Inability of the heart to provide sufficient cardiac output to meet the metabolic demands of the body at normal filling pressures.

Classification

  • HFrEF (Heart Failure with reduced EF, LVEF <40%) - systolic dysfunction
  • HFpEF (Heart Failure with preserved EF, LVEF ≥50%) - diastolic dysfunction
  • HFmrEF (mildly reduced EF, 40-49%)

Staging (ACC/AHA)

StageDescription
AAt risk (HTN, DM, obesity, family history) - no structural disease
BPre-HF - structural/functional disease, no symptoms
CStructural disease + prior or current HF symptoms
DAdvanced HF - refractory symptoms at rest

Presentation

Left heart failure (elevated pulmonary pressures):
  • Dyspnoea on exertion, orthopnoea (pillow count), paroxysmal nocturnal dyspnoea (PND)
  • Fatigue, reduced exercise tolerance
  • Signs: bibasal crackles, third heart sound (S3 gallop), tachycardia, displaced apex
Right heart failure (systemic venous congestion):
  • Peripheral pitting oedema (ankles, sacrum)
  • Raised JVP (measured at 45 degrees)
  • Hepatomegaly, ascites
  • Signs: pulsatile hepatomegaly (TR)
NYHA Functional Classification:
  • I: No symptoms with ordinary activity
  • II: Slight limitation with ordinary activity
  • III: Marked limitation; comfortable only at rest
  • IV: Symptoms at rest; unable to carry any activity

Investigations

  1. ECG - LVH, previous MI, arrhythmia (AF is most common)
  2. CXR - cardiomegaly (CTR >0.5), pulmonary oedema (ABCDE):
    • A - Alveolar oedema ("bat-wing")
    • B - Kerley B lines (interstitial oedema)
    • C - Cardiomegaly
    • D - Diversion of upper lobe vessels
    • E - Pleural Effusion
  3. BNP/NT-proBNP - diagnostic and prognostic (BNP >35 pg/mL / NT-proBNP >125 pg/mL suggests HF in ambulatory patients; >100 / >300 in acute setting)
  4. Echocardiogram - gold standard for assessing structure + function, LVEF
  5. Bloods: FBC (anaemia), U&E (renal function, electrolytes), LFTs (congestion), TFTs (thyroid as cause), glucose, lipids

Treatment of HFrEF (Evidence-Based "Four Pillars")

Drug ClassExampleEffect
ACE inhibitor or ARBRamipril, EnalaprilReduces preload/afterload, prevents remodelling
Beta-blockerCarvedilol, Bisoprolol, MetoprololReduces HR, prevents arrhythmia, improves EF
Mineralocorticoid Receptor Antagonist (MRA)Spironolactone, EplerenoneReduces fibrosis, diuresis
SGLT2 InhibitorDapagliflozin 10 mg, EmpagliflozinReduces HF hospitalizations and mortality
In selected patients: Sacubitril/Valsartan (ARNI) replaces ACE inhibitor/ARB - superior mortality benefit.
Symptom management:
  • Loop diuretics: Furosemide (decongestion, symptom relief - does NOT reduce mortality)
  • Fluid restriction (1.5-2 L/day) and daily weight monitoring
Device therapy:
  • ICD - if LVEF ≤35% after 3 months of optimal therapy (sudden death prevention)
  • CRT (cardiac resynchronization) - if LVEF ≤35% with LBBB and QRS >130 ms
Advanced HF (Stage D):
  • Left ventricular assist device (LVAD)
  • Heart transplantation

2.3 HYPERTENSION

Definition and Classification

CategorySystolic (mmHg)Diastolic (mmHg)
Normal<120<80
Elevated120-129<80
Stage 1130-13980-89
Stage 2≥140≥90
Hypertensive Crisis>180>120
(Note: Some guidelines use ≥140/90 as Stage 1; JNC8 / ACC/AHA 2017 differ slightly)

Causes

  • Primary (Essential) - 90-95%: Genetic + environmental (salt, obesity, inactivity, alcohol)
  • Secondary - 5-10%:
    • Renal: CKD, renovascular (renal artery stenosis)
    • Endocrine: Primary hyperaldosteronism (Conn's), phaeochromocytoma, Cushing's, hyperthyroidism
    • Others: OSA, coarctation of aorta, drugs (NSAIDs, OCP, steroids, cocaine)

Presentation

  • Usually asymptomatic (detected on screening)
  • Headache (occipital, morning) - unreliable symptom
  • Hypertensive emergencies: headache, visual changes, confusion, seizures

Investigations

  • Target organ damage assessment:
    • Heart: ECG (LVH), Echo
    • Eyes: Fundoscopy (AV nipping, silver wiring, papilloedema - Keith-Wagener grading)
    • Kidneys: U&E, urine ACR (albumin-to-creatinine ratio)
    • Brain: MRI if stroke/TIA history
  • Exclude secondary causes: Renal function, urine dipstick, TFTs, aldosterone:renin ratio, plasma metanephrines
  • Ambulatory BP monitoring (ABPM) - gold standard for diagnosis (≥135/85 mmHg average confirms hypertension)

Treatment

Lifestyle first (for all stages):
  • Salt restriction (<6 g/day), DASH diet
  • Weight loss, regular aerobic exercise
  • Alcohol reduction, smoking cessation
Pharmacological - NICE Step Approach (UK):
StepDrug(s)
Step 1 (Age <55, non-Black): ACE inhibitor or ARBRamipril 1.25-10 mg OD
Step 1 (Age ≥55 or Black ethnicity): Calcium channel blockerAmlodipine 5-10 mg OD
Step 2: ACE inhibitor/ARB + CCBAdd the other
Step 3: Triple therapyACE inhibitor/ARB + CCB + Thiazide-like diuretic (Indapamide or Chlorthalidone)
Step 4 (Resistant HTN): Add Spironolactone 25 mgIf K+ <4.5 mmol/L
Target BP:
  • General: <130/80 mmHg (or <140/90 mmHg in older adults/frail)
  • Diabetics: <130/80 mmHg
  • CKD with proteinuria: <130/80 mmHg
Hypertensive Emergency (BP >180/120 + end-organ damage):
  • IV labetalol or sodium nitroprusside (controlled reduction - lower MAP by 25% over first hour only!)
  • Never drop BP too rapidly (risk of watershed infarction)

PART 3: RESPIRATORY SYSTEM

3.1 DYSPNOEA (Shortness of Breath) - Differential Diagnosis

Acute onset: PE, pneumothorax, acute pulmonary oedema, asthma attack, anaphylaxis Gradual onset: COPD, ILD, pleural effusion, anaemia, heart failure, obesity
Investigations (standard):
  • SpO2, peak flow (PEFR), ABG
  • CXR, ECG
  • FBC (anaemia), BNP, D-dimer (if PE suspected)
  • Spirometry (planned - outpatient)

3.2 PNEUMONIA

Aetiology

  • Community-acquired (CAP): Streptococcus pneumoniae (most common), Haemophilus influenzae, Mycoplasma pneumoniae, Legionella pneumophila, viruses
  • Hospital-acquired (HAP - ≥48 h after admission): Gram-negatives (Pseudomonas, Klebsiella, E. coli), Staphylococcus aureus (including MRSA)
  • Aspiration pneumonia: Mixed oral flora + anaerobes

Presentation

  • Fever, cough (productive - rusty/purulent sputum), pleuritic chest pain, dyspnoea
  • Signs: Crackles, bronchial breathing, reduced breath sounds, dullness to percussion (consolidation/effusion)
  • Systemic: Confusion (elderly), rigors, tachycardia

Severity - CURB-65 Score

CriterionPoints
Confusion (new)1
Urea >7 mmol/L1
Respiratory rate ≥30/min1
BP <90 systolic or ≤60 diastolic1
Age ≥65 years1
  • 0-1: Low risk - oral antibiotics, possible community treatment
  • 2: Moderate risk - consider hospital admission
  • 3-5: High risk - hospital admission, consider ICU if ≥4

Investigations

  • CXR (consolidation, lobar or patchy)
  • FBC (raised WCC), CRP, procalcitonin
  • Blood cultures x2 (before antibiotics)
  • Sputum MCS
  • Urine antigen: Legionella and Pneumococcal antigens
  • ABG if SpO2 <92%

Treatment (BTS/NICE Guidelines)

SeverityAntibiotic
Mild CAP (CURB 0-1)Amoxicillin 500 mg TDS oral x 5 days
Moderate CAP (CURB 2)Amoxicillin 500 mg TDS + Clarithromycin 500 mg BD (add atypical cover)
Severe CAP (CURB 3-5)IV Co-amoxiclav 1.2 g TDS + Clarithromycin 500 mg BD; switch to oral when improving
Penicillin allergyDoxycycline 200 mg loading then 100 mg OD
HAPPiperacillin-tazobactam (Tazocin) ± aminoglycoside
Supportive care: O2 (target SpO2 94-98%, or 88-92% if COPD), IV fluids, antipyretics, analgesia (for pleuritic pain), VTE prophylaxis, physiotherapy

3.3 ASTHMA

Pathophysiology

Chronic airway inflammation + bronchospasm + mucus hypersecretion causing reversible airways obstruction. Key mediators: IgE, mast cells, eosinophils, IL-4, IL-5, IL-13.

Presentation

Classic triad: Episodic wheeze + dyspnoea + cough (often nocturnal/early morning)
  • Triggered by allergens, cold air, exercise, NSAIDs, beta-blockers, infection
  • Diurnal variation in symptoms (worse at night / on waking)

Assessment of Severity (Acute Asthma)

SeverityPEFRSpO2RRHROther
Moderate50-75% best/predicted≥92%<25/min<110Can complete sentences
Severe33-50%<92%≥25/min≥110Can't complete sentences
Life-threatening<33%<92%--Silent chest, cyanosis, exhaustion, hypotension, altered consciousness
Near-fatal----Raised PCO2 (exhaustion), mechanical ventilation needed

Investigations

  • PEFR (serial measurements), SpO2
  • ABG (life-threatening: hypoxia + normo/hypercapnia = exhaustion signal)
  • CXR (to exclude pneumothorax, pneumonia)
  • Spirometry: FEV1/FVC ratio <70%, reversibility with bronchodilator >12%

Acute Asthma Management (BTS/SIGN)

  1. Oxygen: High-flow to maintain SpO2 94-98%
  2. SABA: Salbutamol 2.5-5 mg nebulised (back-to-back initially in severe)
  3. Ipratropium bromide: 0.5 mg nebulised (add in moderate-severe)
  4. Systemic corticosteroids: Prednisolone 40-50 mg PO or Hydrocortisone 100 mg IV
  5. Magnesium sulphate IV: 2 g over 20 min (for life-threatening or unresponsive to above)
  6. IV Aminophylline / Heliox / IV salbutamol: In ITU setting / near-fatal
  7. Intubation and mechanical ventilation: Last resort

Chronic Asthma (BTS Step-wise Therapy)

StepTreatment
1SABA PRN (Salbutamol inhaler)
2Add regular low-dose ICS (Beclometasone 200-400 mcg/day)
3Add LABA (Salmeterol) - ALWAYS with ICS; consider LTRA (Montelukast)
4Increase ICS dose or add LTRA/Theophylline
5Refer specialist; consider anti-IgE (Omalizumab) or anti-IL5 (Mepolizumab) for severe eosinophilic asthma

3.4 COPD

Definition

Persistent airflow limitation (FEV1/FVC <70%) that is not fully reversible, associated with enhanced inflammatory response to noxious particles (primarily tobacco smoke).

Presentation

  • Chronic progressive dyspnoea, chronic cough, sputum production
  • History: Heavy smoker (>20 pack-years), age >40
  • Signs: Barrel chest, pursed-lip breathing, use of accessory muscles, hyperinflation, reduced cricosternal distance, wheeze, prolonged expiration
GOLD Classification by FEV1:
GradeFEV1Severity
GOLD 1≥80% predictedMild
GOLD 250-79%Moderate
GOLD 330-49%Severe
GOLD 4<30%Very Severe

Acute Exacerbation of COPD (AECOPD)

Causes: Infection (viral 50%, bacterial - H. influenzae, S. pneumoniae, M. catarrhalis), air pollution, PE
Management:
  1. Controlled O2: Target SpO2 88-92% (risk of hypercapnic respiratory failure - hypoxic drive)
  2. Nebulised SABA + SAMA: Salbutamol + Ipratropium
  3. Systemic steroids: Prednisolone 30-40 mg PO x 5 days
  4. Antibiotics (if purulent sputum / CXR consolidation): Amoxicillin / Doxycycline / Clarithromycin
  5. NIV (BiPAP): If pH <7.35 and PaCO2 >6 kPa (type 2 respiratory failure)
  6. ITU/intubation: If NIV fails or contraindicated

Chronic COPD Management

  • Smoking cessation (most important intervention - slows FEV1 decline)
  • Pulmonary rehabilitation
  • SABA PRN (Salbutamol) for all
  • LAMA (Tiotropium) - mainstay of maintenance; reduces exacerbations
  • LABA (Salmeterol, Formoterol) - added for ongoing breathlessness
  • ICS + LABA combination: If frequent exacerbations + eosinophilia
  • LTOT (Long-Term Oxygen Therapy): If PaO2 <7.3 kPa (55 mmHg) on two assessments - reduces mortality
  • Vaccinations: Influenza (annual), Pneumococcal

PART 4: GASTROINTESTINAL SYSTEM

4.1 ABDOMINAL PAIN

Differential by Location

RegionKey Diagnoses
EpigastricPUD, GORD, pancreatitis, MI (referred), AAA
RUQBiliary colic, cholecystitis, hepatitis, hepatomegaly
LUQSplenomegaly, splenic infarct, gastric pathology
RIF (Right Iliac Fossa)Appendicitis, ovarian cyst/torsion (F), ectopic pregnancy (F), Meckel's, Crohn's, mesenteric adenitis
LIF (Left Iliac Fossa)Diverticulitis, sigmoid pathology, ovarian (F)
Central/PeriumbilicalSmall bowel obstruction, early appendicitis, AAA, IBD
SuprapubicUTI, bladder, PID, ectopic, ovarian
GeneralisedPeritonitis, IBD, constipation, IBS, ischaemic colitis

Examination Findings

  • Guarding - voluntary/involuntary muscle rigidity
  • Rebound tenderness - pain worsens on rapid release (peritonism)
  • Murphy's sign - arrest of inspiration on palpation of RUQ (cholecystitis)
  • Rovsing's sign - RIF pain when LIF pressed (appendicitis)
  • Psoas sign - pain on hip extension (retrocaecal appendicitis)
  • Courvoisier's sign - palpable non-tender GB + jaundice = malignancy until proven otherwise

4.2 JAUNDICE

Classification

TypeMechanismExamples
Pre-hepatic (haemolytic)Excess unconjugated bilirubin productionHaemolysis (malaria, sickle cell, autoimmune), Gilbert's
Hepatic (hepatocellular)Liver cell damage - failure to conjugate/excreteViral hepatitis (A,B,C), alcoholic liver disease, autoimmune, drugs
Post-hepatic (obstructive/cholestatic)Biliary obstructionGallstones (choledocholithiasis), cholangiocarcinoma, pancreatic head tumour, PSC/PBC

Clinical Features

  • Jaundice (scleral icterus first detectable at bilirubin ~35 mmol/L)
  • Dark urine (conjugated bilirubin - cholestatic/hepatic)
  • Pale stools (obstructed bile flow)
  • Pruritus (bile salts deposited in skin - cholestatic)
  • Hepatocellular: Spider naevi, palmar erythema, gynaecomastia, leukonychia, asterixis (flapping tremor = hepatic encephalopathy)

Investigations

  • LFTs: ALT/AST elevated (hepatocellular pattern) vs ALP/GGT elevated (cholestatic pattern)
  • Bilirubin: Fractionated (conjugated vs unconjugated)
  • Coagulation (INR/PT) - marker of synthetic function (prolonged = poor prognosis)
  • Albumin - chronic liver disease
  • FBC (anaemia, thrombocytopenia in portal hypertension)
  • Hepatitis serology (HBsAg, anti-HCV, HAV IgM)
  • Autoantibodies (ANA, AMA for PBC, ASMA for autoimmune hepatitis)
  • Ultrasound abdomen (first-line imaging - biliary dilatation = obstruction)
  • MRCP or ERCP (if biliary obstruction)
  • Liver biopsy (histological diagnosis)

4.3 UPPER GI BLEED

Causes

  • Peptic ulcer disease (most common - 50-70%): Duodenal > Gastric ulcer
  • Oesophageal varices (portal hypertension)
  • Mallory-Weiss tear (retching → linear tear at GOJ)
  • Oesophagitis, gastritis, erosions
  • Malignancy (gastric cancer)

Presentation

  • Haematemesis (bright red = active bleeding; "coffee grounds" = older blood)
  • Melaena (black, tarry, offensive stools - blood from proximal GI tract)
  • Dizziness, syncope, tachycardia, hypotension (signs of haemorrhage)

Risk Stratification - Rockall Score / Glasgow-Blatchford Score

Glasgow-Blatchford (pre-endoscopy):
  • Urea, Hb, systolic BP, pulse, melaena, syncope, hepatic disease, cardiac failure
  • Score 0 = low risk (safe to discharge with outpatient endoscopy)
  • Score >6 = high risk, needs urgent intervention

Management

  1. Resuscitation first: IV access (2 large-bore cannulae), bloods (FBC, clotting, group & save/crossmatch), IV fluids, O2
  2. Transfusion: Packed RBCs if Hb <70 g/L (or <80 g/L with cardiovascular disease)
  3. Platelet/FFP if coagulopathy (INR >1.5, platelets <50)
  4. Terlipressin (if variceal bleed suspected - reduces portal pressure)
  5. PPI: High-dose IV Omeprazole infusion (80 mg bolus then 8 mg/h) - reduces re-bleeding
  6. Urgent endoscopy within 24 h (or within 12 h if haemodynamically unstable)
    • Injection therapy (adrenaline), thermal coagulation, clips, band ligation (varices)
  7. Antibiotics (IV Ceftriaxone) if cirrhosis with variceal bleed (reduces infection + improves survival)
  8. TIPS (Transjugular Intrahepatic Portosystemic Shunt) - for refractory variceal bleeding

PART 5: NEUROLOGY

5.1 HEADACHE

Red Flags ("SNOOP4")

  • Systemic disease / fever / HIV / cancer
  • Neurological symptoms (focal deficit, altered consciousness)
  • Onset sudden ("thunderclap" - worst headache of life = SAH until proven otherwise)
  • Older age (>50 - new headache = temporal arteritis, malignancy)
  • Progressive headache over weeks
  • Postural change in severity
  • Papilloedema (raised ICP)
  • Precipitated by Valsalva (cough, straining)

Differential Diagnosis

TypeCharacteristicsTreatment
Tension-typeBand-like, bilateral, pressure, no N&VParacetamol, NSAIDs, amitriptyline (prevention)
MigraineUnilateral, throbbing, N&V, photophobia, may have auraAcute: Triptan (sumatriptan) + NSAID; Prevention: Propranolol, topiramate, amitriptyline
Cluster headachePeriorbital, severe, unilateral, lacrimation, rhinorrhoea, 30-90 min attacksAcute: 100% O2 + subcutaneous sumatriptan; Prevention: Verapamil
SAHThunderclap, meningism, photophobia, reduced GCSCT head → LP (xanthochromia) → Neurosurgery urgently
MeningitisFever + headache + neck stiffness + photophobiaLP → IV antibiotics immediately
Temporal ArteritisAge >50, unilateral, jaw claudication, visual lossUrgent ESR/CRP + high-dose prednisolone immediately (do not wait for biopsy)

5.2 STROKE

Definition

Rapidly developing focal neurological deficit lasting >24 hours (or causing death), of presumed vascular origin.
  • Ischaemic stroke: 85% (thrombotic or embolic)
  • Haemorrhagic stroke: 15% (intracerebral or subarachnoid)
  • TIA: Same symptoms but fully resolving within 24 h (usually <1 h)

FAST Recognition

  • Face drooping
  • Arm weakness
  • Speech difficulty
  • Time to call emergency services

Common Stroke Syndromes

TerritoryFeatures
MCA (most common)Contralateral hemiplegia + hemisensory loss (arm > leg), dysphasia (dominant hemisphere), contralateral hemianopia
ACAContralateral leg > arm weakness, abulia
PCAContralateral homonymous hemianopia, memory issues
LacunarPure motor, pure sensory, or ataxic hemiparesis (small vessel disease)
Posterior circulation (PICA)Lateral medullary syndrome: ipsilateral face + contralateral limb sensory loss, vertigo, dysphagia, Horner's

Investigations (Emergency)

  • Non-contrast CT head (within minutes) - rules out haemorrhage before thrombolysis
  • CT angiography / MRI - to identify large vessel occlusion (for thrombectomy decision)
  • ECG (AF = cardioembolic source), echocardiogram
  • FBC, clotting, glucose (hypoglycaemia mimics stroke)
  • Carotid Doppler (for TIA/anterior circulation stroke)

Treatment - Ischaemic Stroke

Thrombolysis (IV Alteplase or Tenecteplase):
  • Indicated if <4.5 hours from symptom onset (no contraindications)
  • Contraindications: haemorrhage, anticoagulation, recent surgery, BP >185/110
Mechanical Thrombectomy:
  • For large vessel occlusion (MCA, basilar)
  • Up to 24 hours from onset in selected patients
  • Dramatically superior outcomes compared to thrombolysis alone
Supportive care:
  • Aspirin 300 mg (after haemorrhage excluded) - then dual antiplatelet for 2 weeks if non-cardioembolic
  • Blood pressure management (permissive hypertension in first 72 h unless >220/120)
  • Glucose control (target 4-11 mmol/L)
  • Avoid fever (paracetamol)
  • Swallow assessment before oral intake
  • DVT prophylaxis
Secondary Prevention:
  • Antiplatelet: Clopidogrel 75 mg OD (or aspirin + dipyridamole)
  • Anticoagulation (warfarin or DOAC) if AF-related stroke
  • Statin (atorvastatin 80 mg)
  • BP lowering (target <130/80)
  • Carotid endarterectomy if ipsilateral stenosis 50-99% + TIA/minor stroke within 2 weeks

5.3 SEIZURES AND EPILEPSY

Classification

  • Focal (Partial): Arise from one hemisphere; may be aware or impaired awareness
  • Generalized: Both hemispheres from onset (tonic-clonic, absence, myoclonic, atonic)
  • Status Epilepticus: Seizure lasting >5 minutes OR repeated seizures without recovery (emergency)

First Seizure Assessment

  • Distinguish epileptic seizure vs syncope vs non-epileptic attack (NEAD)
  • EEG, MRI brain, metabolic screen (glucose, Na+, Ca2+, Mg2+, LFTs, TFTs)
  • Post-ictal confusion (30-60 min) suggests epileptic seizure

Status Epilepticus Management (Time-critical)

  • 0-5 min: Protect airway, O2, IV access, glucose check, thiamine if suspected alcoholism
  • 5 min: IV/IM/Buccal Lorazepam 4 mg (or Midazolam 10 mg buccal)
  • 15 min (if no response): IV Levetiracetam 60 mg/kg (max 4.5 g) OR Valproate 40 mg/kg OR Phenytoin 20 mg/kg
  • 30-45 min (refractory): Anaesthesia - Propofol/Midazolam/Thiopental infusion + ITU + EEG monitoring

Chronic Epilepsy - First-Line Antiepileptics

Seizure TypeFirst ChoiceAlternatives
Generalised tonic-clonicSodium Valproate (M, non-childbearing) / Levetiracetam (F) / LamotrigineTopiramate
FocalLamotrigine or LevetiracetamCarbamazepine, Oxcarbazepine
AbsenceEthosuximideValproate, Lamotrigine
Juvenile MyoclonicValproate (M) / Levetiracetam (F)Lamotrigine, Topiramate
Sodium Valproate: AVOID in women of childbearing potential (major teratogen - fetal valproate syndrome)

PART 6: ENDOCRINE / METABOLIC

6.1 DIABETES MELLITUS

Classification

TypePathologyTypical Patient
Type 1Autoimmune destruction of beta cells, absolute insulin deficiencyYoung, lean, acute onset, ketosis-prone
Type 2Insulin resistance + progressive beta cell failureMiddle-aged/elderly, obese, insidious onset
MODYMonogenicYoung, often family history, often misdiagnosed
SecondaryPancreatitis, Cushing's, steroids, haemochromatosisVariable
GestationalGlucose intolerance in pregnancyPregnant women

Diagnostic Criteria (WHO)

  • Fasting glucose ≥7.0 mmol/L (on two occasions if asymptomatic)
  • Random glucose ≥11.1 mmol/L + symptoms
  • 2-hour OGTT glucose ≥11.1 mmol/L
  • HbA1c ≥48 mmol/mol (≥6.5%) - in non-anaemic patients
Pre-diabetes: HbA1c 42-47 mmol/mol (6.0-6.4%)

Monitoring

  • HbA1c - 3-6 monthly (target typically <53 mmol/mol for Type 2; individualised for Type 1)
  • Blood glucose self-monitoring (all Type 1; selective Type 2)
  • Urine ACR (yearly - nephropathy screening)
  • Creatinine/eGFR (yearly)
  • Foot examination (neuropathy + vascular assessment)
  • Annual retinal screening
  • Blood pressure, lipids

Type 2 Diabetes - Treatment Algorithm (NICE)

Step 1: Metformin (if eGFR ≥30) - first-line
  • If not tolerated: SGLT2 inhibitor or DPP-4 inhibitor or pioglitazone or sulfonylurea
Step 2 (HbA1c not at target): Add one of:
  • SGLT2 inhibitor (e.g., Empagliflozin, Dapagliflozin) - preferred if cardiovascular disease or heart failure or CKD
  • GLP-1 agonist (e.g., Semaglutide, Liraglutide) - preferred if BMI >35 or significant obesity
  • DPP-4 inhibitor (e.g., Sitagliptin) - weight-neutral
  • Sulfonylurea (e.g., Gliclazide) - risk of hypoglycaemia + weight gain
Step 3: Triple therapy or insulin
Insulin therapy: All Type 1 (from diagnosis); Type 2 if inadequate control
  • Basal-bolus regimen (long-acting once/twice daily + rapid-acting with meals)

Diabetic Ketoacidosis (DKA) - Emergency

Diagnostic triad: Glucose >11 mmol/L + Ketones >3 mmol/L (blood) + Acidosis (pH <7.3 or bicarb <15)
Management (Fixed Rate IV Insulin Infusion - FRIII protocol):
  1. IV fluids: 1L 0.9% NaCl rapidly (1st litre over 1 hour)
  2. IV insulin: 0.1 units/kg/h fixed rate (do NOT give bolus)
  3. Potassium replacement (DKA causes profound K+ depletion - essential before/with insulin)
  4. Hourly monitoring (glucose, ketones, pH, K+)
  5. Identify and treat precipitant (infection is most common)
  6. Resolution criteria: pH >7.3 + ketones <0.6 mmol/L + bicarbonate >15
Key cautions:
  • Do NOT stop long-acting insulin (continue throughout)
  • K+ must be >3.5 mmol/L before starting insulin
  • Once eating and drinking, convert to SC insulin (overlap 30-60 min before stopping IV)

6.2 THYROID DISORDERS

Hypothyroidism

Causes: Hashimoto's thyroiditis (most common in iodine-sufficient countries), iodine deficiency, post-thyroidectomy, medications (amiodarone, lithium)
Presentation: Fatigue, weight gain, cold intolerance, constipation, bradycardia, dry skin, hair thinning/loss, periorbital puffiness, slow-relaxing reflexes, menstrual irregularity, depression, macroglossia, goitre
Investigations: TSH elevated (primary), free T4 low; anti-TPO antibodies (Hashimoto's)
Treatment: Levothyroxine (T4 replacement)
  • Starting dose: 25-50 mcg/day (low dose in elderly/ischaemic heart disease)
  • Titrate every 6-8 weeks based on TSH
  • Target TSH: 0.5-2.5 mU/L (lower end in symptomatic patients)
  • Take on empty stomach (30-60 min before breakfast)

Hyperthyroidism

Causes: Graves' disease (most common - autoimmune, TSH-receptor antibodies), toxic multinodular goitre, toxic adenoma, thyroiditis, excessive thyroxine ingestion
Presentation: Weight loss despite increased appetite, heat intolerance, tremor, palpitations, tachycardia (AF), diarrhoea, lid lag, lid retraction, exophthalmos (Graves' only), goitre, anxiety/restlessness, sweating, oligomenorrhoea
Investigations: TSH suppressed, free T4/T3 elevated; TSH receptor antibodies (Graves'); isotope scan (for toxic nodule vs Graves')
Treatment:
  • Antithyroid drugs (ATDs): Carbimazole 20-40 mg/day (or Propylthiouracil in pregnancy 1st trimester) - 12-18 month course
  • Beta-blocker: Propranolol 40-80 mg TDS (symptom control - palpitations, tremor)
  • Radioiodine (I-131): Definitive for most adults (contraindicated in pregnancy)
  • Thyroidectomy: Goitre compression, failed ATDs, patient preference
Thyroid Storm (extreme emergency):
  • Multi-organ failure: hyperthermia, tachyarrhythmia, altered consciousness
  • ICU: IV propranolol + high-dose PTU + iodine (Lugol's) + hydrocortisone + cooling + treat precipitant

PART 7: COMMON INVESTIGATIONS SUMMARY

ECG Interpretation - Quick Reference

FindingDiagnoses to Consider
ST elevationSTEMI (in territory), pericarditis (saddle-shaped, all leads), LBBB (Sgarbossa criteria)
ST depressionNSTEMI/UA, LV strain (with LVH), posterior MI, digoxin effect
T-wave inversionIschaemia, RV strain (PE - V1-V4), HCM, Wellens' (LAD critical stenosis)
Absent P waves + irregularly irregularAtrial fibrillation
Delta waves + short PRWPW syndrome
Prolonged QTcDrug side-effect, electrolyte (hypokalaemia, hypoCa2+), congenital LQTS
Peaked P wavesRight atrial enlargement (P pulmonale - COPD)
Broad notched PLeft atrial enlargement (P mitrale)

Arterial Blood Gas (ABG) - Interpretation Steps

  1. pH normal (7.35-7.45)?
  2. PaCO2 normal (4.7-6.0 kPa)? If high = respiratory acidosis; If low = respiratory alkalosis
  3. HCO3 normal (22-26 mmol/L)? If low = metabolic acidosis; If high = metabolic alkalosis
  4. Is there compensation?
  5. PaO2 (normal >10 kPa on air) and A-a gradient?
PatternpHPaCO2HCO3Examples
Respiratory acidosis↑ (compensated)COPD, asthma, sedation, neuromuscular
Respiratory alkalosis↓ (compensated)Hyperventilation, PE, anxiety, altitude
Metabolic acidosis↓ (compensated)DKA, AKI, lactic acidosis, ingestion
Metabolic alkalosis↑ (compensated)Vomiting, diuretics, Conn's syndrome

PART 8: PRESCRIBING ESSENTIALS

Commonly Prescribed Drug Classes - Practical Points

DrugCommon IndicationKey Side EffectsMonitoring
MetforminType 2 DMGI upset, lactic acidosis (hold if eGFR <30, contrast, surgery)eGFR, B12
FurosemideHF, oedema, hypertensionHypovolaemia, hypokalaemia, hyponatraemia, goutU&E, BP
RamiprilHTN, HF, DM nephroprotectionDry cough (10%), hypotension, hyperkalaemia, AKI (hold if dehydrated)U&E, K+, creatinine
WarfarinAF, VTE, mechanical valvesBleeding; teratogenINR (target 2-3 for AF/VTE; 2.5-3.5 for metallic valves)
AtorvastatinDyslipidaemia, CVD preventionMyopathy, elevated LFTs (rare rhabdomyolysis)LFTs, CK if symptomatic
AmiodaroneAF, VTPulmonary toxicity, hypo/hyperthyroidism, hepatotoxicity, corneal deposits, photosensitivityTFTs, LFTs, CXR every 6-12 months
PrednisoloneAsthma, RA, vasculitis, IBDCushing's, osteoporosis, diabetes, hypertension, infection, adrenal suppressionBP, glucose, DEXA
Heparin (LMWH)DVT/PE treatment, ACSBleeding, HIT (heparin-induced thrombocytopaenia)Platelets (HIT monitoring), anti-Xa if indicated

PART 9: FLUID MANAGEMENT

Types of IV Fluids

FluidNa+ (mmol/L)IndicationsCautions
0.9% NaCl (normal saline)154Resuscitation, hyponatraemia correctionHyperchloraemic acidosis (large volumes)
Hartmann's (Ringer's lactate)131Resuscitation (preferred over NS), perioperativeContains lactate - caution in hepatic failure
5% Dextrose0Maintenance, hypernatraemia treatmentNOT for resuscitation (distributes to all compartments)
Dextrose-saline (4% + 0.18%)30MaintenanceAvoid hyponatraemia (low Na+)
Colloids (Albumin, Gelofusine)VariableSevere hypoalbuminaemia, specific indicationsExpensive, allergic reactions

Fluid Resuscitation Approach (NICE)

  • Resuscitation: 250-500 mL bolus of crystalloid (Hartmann's or 0.9% NaCl) over 15 min if shocked
  • Reassess after each bolus
  • Maintenance: ~25-30 mL/kg/day water + 1 mmol/kg/day Na+, K+, Cl-

Sources: Goldman-Cecil Medicine (26th Ed), Harrison's Principles of Internal Medicine, BTS/NICE/AHA/ACC Clinical Guidelines
---These notes cover the full scope of General Medicine clinical practicals. Here is a quick overview of what is included:

What These Notes Cover

9 major sections structured from presentation → investigations → management:
SectionTopics
Part 1History taking (SOCRATES), ABCDE examination, vital signs
Part 2 - CardiovascularChest pain (ACS, angina, dissection, PE), Heart Failure (HFrEF/HFpEF, 4-pillar therapy), Hypertension (staging, step-wise treatment)
Part 3 - RespiratoryDyspnoea differential, Pneumonia (CURB-65, antibiotics), Asthma (severity grading, BTS steps), COPD (GOLD, AECOPD, oxygen targets)
Part 4 - GIAbdominal pain (regional differentials, clinical signs), Jaundice (pre/hepatic/post-hepatic), Upper GI bleed (Glasgow-Blatchford, management)
Part 5 - NeurologyHeadache (red flags, migraine, SAH, meningitis), Stroke (FAST, syndromes, thrombolysis, thrombectomy), Seizures/Epilepsy (status epilepticus protocol)
Part 6 - EndocrineDiabetes (T1/T2, DKA protocol), Thyroid (hypo/hyperthyroidism, thyroid storm)
Part 7ECG interpretation quick reference, ABG analysis
Part 8Key drugs - indications, side effects, monitoring
Part 9IV fluid types, resuscitation approach
A few key clinical pearls to keep in mind:
  • In COPD, O2 target is 88-92% (not 94-98%) to avoid suppressing hypoxic drive
  • Sodium valproate is contraindicated in women of childbearing age
  • In hypertensive emergencies, do not drop BP >25% in the first hour (risk of infarction)
  • Do not stop long-acting insulin in DKA - continue subcutaneous background insulin throughout

Make a quick reference cheat sheet for common drug doses

Reading File
Reading File
Reading File
Good. I have enough to build a well-designed cheat sheet PPTX. Let me create it now - a dense, colour-coded quick reference with all the major drug classes, doses, and key notes.
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"

Running Command

mkdir -p /home/daytona/workspace/drug-cheatsheet

Writing File

~/drug-cheatsheet/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.title = "General Medicine Drug Doses - Quick Reference";

// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:    "0D1B2A",
  teal:    "1B6CA8",
  tealLt:  "2390D1",
  green:   "1A7A4A",
  greenLt: "22A35F",
  red:     "B32A2A",
  redLt:   "D63B3B",
  amber:   "B56A00",
  amberLt: "E08C1A",
  purple:  "5C2D91",
  purpleLt:"7B3FB8",
  slate:   "374151",
  slateL:  "6B7280",
  offWhite:"F5F7FA",
  white:   "FFFFFF",
  rowAlt:  "EEF3FA",
  rowBase: "FFFFFF",
  headerBg:"1B4F72",
};

// ─── HELPERS ──────────────────────────────────────────────────────────────────
function hdrRect(slide, x, y, w, h, color) {
  slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color }, line: { color, width: 0 } });
}
function cell(slide, text, x, y, w, h, opts = {}) {
  const {
    bg = C.white, color = C.slate, bold = false, sz = 7.5,
    align = "left", valign = "middle", border = true, italic = false
  } = opts;
  if (bg !== C.white || border) {
    slide.addShape(pres.ShapeType.rect, {
      x, y, w, h,
      fill: { color: bg },
      line: border ? { color: "D1D5DB", width: 0.5 } : { color: bg, width: 0 },
    });
  }
  slide.addText(text, {
    x, y, w, h,
    fontSize: sz, fontFace: "Calibri", color,
    bold, italic, align, valign,
    margin: 3, wrap: true,
  });
}

function sectionLabel(slide, text, x, y, w, color) {
  slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.26, fill: { color }, line: { color, width: 0 } });
  slide.addText(text, {
    x, y, w, h: 0.26,
    fontSize: 8.5, fontFace: "Calibri", color: C.white,
    bold: true, align: "center", valign: "middle", margin: 2,
  });
}

// Column widths for drug tables: Drug | Dose | Route/Freq | Indication | Notes
const CW = [1.75, 2.0, 1.15, 1.8, 1.8]; // total ~8.5"
function colX(startX, colIdx) {
  let x = startX;
  for (let i = 0; i < colIdx; i++) x += CW[i];
  return x;
}

function tableHeader(slide, startX, y, cols) {
  cols.forEach((label, i) => {
    const x = colX(startX, i);
    slide.addShape(pres.ShapeType.rect, { x, y, w: CW[i], h: 0.24, fill: { color: C.headerBg }, line: { color: C.headerBg, width: 0 } });
    slide.addText(label, { x, y, w: CW[i], h: 0.24, fontSize: 7, fontFace: "Calibri", color: C.white, bold: true, align: "center", valign: "middle", margin: 1 });
  });
}

function tableRow(slide, rowData, startX, y, rowIndex) {
  const bg = rowIndex % 2 === 0 ? C.white : C.rowAlt;
  rowData.forEach((text, i) => {
    const x = colX(startX, i);
    const isNote = i === 4;
    cell(slide, text, x, y, CW[i], 0.235, { bg, sz: isNote ? 6.8 : 7.5, italic: isNote, color: isNote ? C.slateL : C.slate });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 - COVER
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  // Full background
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.navy }, line: { color: C.navy, width: 0 } });
  // Accent bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.08, fill: { color: C.tealLt }, line: { color: C.tealLt, width: 0 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 7.42, w: 13.3, h: 0.08, fill: { color: C.tealLt }, line: { color: C.tealLt, width: 0 } });

  s.addText("General Medicine", { x: 1, y: 1.6, w: 11.3, h: 0.8, fontSize: 40, fontFace: "Calibri", color: C.tealLt, bold: true, align: "center" });
  s.addText("Common Drug Doses", { x: 1, y: 2.45, w: 11.3, h: 0.8, fontSize: 46, fontFace: "Calibri", color: C.white, bold: true, align: "center" });
  s.addText("QUICK REFERENCE CHEAT SHEET", { x: 1, y: 3.3, w: 11.3, h: 0.45, fontSize: 16, fontFace: "Calibri", color: C.tealLt, bold: true, align: "center", charSpacing: 4 });

  // Pill icons as coloured rectangles
  const tags = [
    ["CARDIOVASCULAR", C.teal],
    ["RESPIRATORY", C.green],
    ["NEUROLOGY", C.purple],
    ["ENDOCRINE", C.amber],
    ["ANTIBIOTICS", C.red],
    ["EMERGENCY", "8B0000"],
  ];
  const tagW = 1.7, tagGap = 0.12;
  const totalW = tags.length * tagW + (tags.length - 1) * tagGap;
  const startX = (13.3 - totalW) / 2;
  tags.forEach(([label, color], i) => {
    const x = startX + i * (tagW + tagGap);
    s.addShape(pres.ShapeType.roundRect, { x, y: 4.2, w: tagW, h: 0.32, fill: { color }, line: { color, width: 0 }, rectRadius: 0.06 });
    s.addText(label, { x, y: 4.2, w: tagW, h: 0.32, fontSize: 7.5, fontFace: "Calibri", color: C.white, bold: true, align: "center", valign: "middle" });
  });

  s.addText("For educational use only. Always verify doses with current formulary and patient-specific factors.", {
    x: 1, y: 6.8, w: 11.3, h: 0.4, fontSize: 8, fontFace: "Calibri", color: "6B7280", italic: true, align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 - CARDIOVASCULAR DRUGS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.offWhite }, line: { color: C.offWhite, width: 0 } });

  // Title bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.5, fill: { color: C.teal }, line: { color: C.teal, width: 0 } });
  s.addText("CARDIOVASCULAR DRUGS", { x: 0.2, y: 0, w: 10, h: 0.5, fontSize: 16, fontFace: "Calibri", color: C.white, bold: true, valign: "middle" });
  s.addText("Slide 2 of 6", { x: 10.3, y: 0, w: 2.8, h: 0.5, fontSize: 9, fontFace: "Calibri", color: "B3CFED", align: "right", valign: "middle" });

  // LEFT COLUMN - ACE Inhibitors / ARBs / ARNIs
  const LX = 0.15;
  const cols = ["Drug", "Standard Dose", "Route/Freq", "Indication", "Key Notes"];

  // Section: ACE Inhibitors
  sectionLabel(s, "ACE INHIBITORS / ARBs / ARNI", LX, 0.56, 8.55, C.teal);
  tableHeader(s, LX, 0.82, cols);
  [
    ["Ramipril", "2.5–10 mg", "PO OD", "HTN, HF, post-MI, DM nephroprotection", "⚠ Hold if K+>5.5 or AKI. Dry cough 10%"],
    ["Enalapril", "2.5–20 mg", "PO BD", "HTN, HFrEF", "Monitor U&E/K+ at 1-2 weeks"],
    ["Lisinopril", "5–40 mg", "PO OD", "HTN, HF, DM", "Avoid in pregnancy (all trimesters)"],
    ["Losartan", "25–100 mg", "PO OD", "HTN, HF (ACEi intolerant), DM nephropathy", "Less cough vs ACEi. Same K+/renal risks"],
    ["Sacubitril/Valsartan", "24/26–97/103 mg", "PO BD", "HFrEF (replace ACEi/ARB)", "Washout 36h from ACEi. Superior mortality benefit"],
  ].forEach((row, i) => tableRow(s, row, LX, 1.06 + i * 0.235, i));

  // Section: Beta-Blockers
  sectionLabel(s, "BETA-BLOCKERS", LX, 2.28, 8.55, C.tealLt);
  tableHeader(s, LX, 2.54, cols);
  [
    ["Bisoprolol", "1.25–10 mg", "PO OD", "HFrEF, HTN, AF rate control", "Titrate slowly in HF. Avoid in asthma/decompensated HF"],
    ["Carvedilol", "3.125–25 mg", "PO BD", "HFrEF, post-MI", "Non-selective; has alpha-blocking effect"],
    ["Metoprolol (succinate)", "12.5–200 mg", "PO OD", "HF, HTN, AF, angina", "Cardioselective. MERIT-HF trial"],
    ["Atenolol", "25–100 mg", "PO OD", "HTN, angina", "Avoid in HF/COPD. Less CNS penetration"],
    ["Propranolol", "10–80 mg", "PO BD–TDS", "Anxiety, thyrotoxicosis, migraine Px, essential tremor", "Non-selective. Crosses BBB. Masks hypoglycaemia"],
  ].forEach((row, i) => tableRow(s, row, LX, 2.78 + i * 0.235, i));

  // Section: Calcium Channel Blockers
  sectionLabel(s, "CALCIUM CHANNEL BLOCKERS", LX, 3.98, 8.55, "145A6E");
  tableHeader(s, LX, 4.24, cols);
  [
    ["Amlodipine", "5–10 mg", "PO OD", "HTN, stable angina", "Peripheral oedema common. Safe in HFpEF"],
    ["Diltiazem", "60–120 mg", "PO TDS (or SR BD)", "AF rate control, angina, HTN", "⚠ Avoid with beta-blocker (heart block)"],
    ["Verapamil", "40–120 mg", "PO TDS", "AF rate control, SVT, cluster headache Px", "⚠ Avoid with beta-blocker. Constipation"],
    ["Nifedipine LA", "30–60 mg", "PO OD", "HTN, Raynaud's, angina", "Do NOT use short-acting for HTN (reflex tachycardia)"],
  ].forEach((row, i) => tableRow(s, row, LX, 4.48 + i * 0.235, i));

  // Section: Diuretics  (right column area, placed below)
  sectionLabel(s, "DIURETICS", LX, 5.43, 8.55, C.slate);
  tableHeader(s, LX, 5.69, cols);
  [
    ["Furosemide", "20–80 mg (up to 500 mg IV in resistant)", "PO/IV OD–BD", "Acute pulmonary oedema, HF, oedema", "Monitor K+/Na+. Ototoxic at high IV doses"],
    ["Spironolactone", "12.5–50 mg", "PO OD", "HFrEF, hyperaldosteronism, ascites", "⚠ K+-sparing. Avoid if K+>5.0. Gynaecomastia"],
    ["Eplerenone", "25–50 mg", "PO OD", "Post-MI HF, HFrEF", "Fewer endocrine SE than spironolactone"],
    ["Indapamide", "1.5 mg SR or 2.5 mg", "PO OD", "HTN (thiazide-like)", "Less metabolic disturbance than HCTZ"],
  ].forEach((row, i) => tableRow(s, row, LX, 5.93 + i * 0.235, i));

  // Footer
  s.addText("⚠ Doses are for average adults with normal renal/hepatic function. Always adjust for patient factors.", {
    x: 0.15, y: 7.3, w: 13, h: 0.18, fontSize: 6.5, fontFace: "Calibri", color: C.redLt, italic: true
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 - CARDIOVASCULAR CONT. (Anticoagulants, Antiplatelets, Statins, Anti-arrhythmics)
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.offWhite }, line: { color: C.offWhite, width: 0 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.5, fill: { color: C.teal }, line: { color: C.teal, width: 0 } });
  s.addText("CARDIOVASCULAR DRUGS (cont.) — Antiplatelets, Anticoagulants, Statins, Anti-arrhythmics", { x: 0.2, y: 0, w: 12, h: 0.5, fontSize: 13, fontFace: "Calibri", color: C.white, bold: true, valign: "middle" });
  s.addText("Slide 3 of 6", { x: 10.3, y: 0, w: 2.8, h: 0.5, fontSize: 9, fontFace: "Calibri", color: "B3CFED", align: "right", valign: "middle" });

  const LX = 0.15;
  const cols = ["Drug", "Standard Dose", "Route/Freq", "Indication", "Key Notes"];

  sectionLabel(s, "ANTIPLATELETS", LX, 0.56, 8.55, C.red);
  tableHeader(s, LX, 0.82, cols);
  [
    ["Aspirin", "75 mg (maintenance) / 300 mg loading", "PO OD", "ACS secondary prevention, AF (rare now), stroke", "Loading 300 mg for ACS. GI protection with PPI"],
    ["Clopidogrel", "75 mg (maint) / 300–600 mg load", "PO OD", "ACS, post-PCI, stroke/TIA (non-cardioembolic)", "Prodrug – CYP2C19 metabolism. Avoid with PPIs if possible"],
    ["Ticagrelor", "90 mg BD (maint) / 180 mg load", "PO BD", "ACS (preferred over clopidogrel for ACS)", "Dyspnoea SE. Reversible binding (holds advantage over clopidogrel in surgery)"],
    ["Prasugrel", "5–10 mg OD (10 mg if >60 kg)", "PO OD", "ACS with PCI (especially STEMI)", "⚠ Contraindicated if prior TIA/stroke, age ≥75, weight <60 kg"],
    ["Dipyridamole MR", "200 mg BD", "PO BD", "Stroke/TIA prevention (with aspirin)", "Headache common at start. Avoid in unstable angina"],
  ].forEach((row, i) => tableRow(s, row, LX, 1.06 + i * 0.235, i));

  sectionLabel(s, "ANTICOAGULANTS", LX, 2.28, 8.55, "7B0D1E");
  tableHeader(s, LX, 2.54, cols);
  [
    ["Warfarin", "Dose variable (INR guided, start 5–10 mg)", "PO OD", "AF, mechanical valves, VTE treatment/Px", "Target INR 2–3 (AF/VTE); 2.5–3.5 (metallic valves). Many interactions"],
    ["Apixaban", "5 mg BD (2.5 mg BD if ≥2 of: age≥80, wt≤60kg, Cr≥133)", "PO BD", "AF, VTE Tx/Px", "Hold if eGFR <15. No routine monitoring. Less bleeding vs warfarin"],
    ["Rivaroxaban", "20 mg OD (with evening meal) for AF; 15 mg BD x21d then 20 mg for VTE", "PO OD/BD", "AF, DVT/PE treatment and prevention", "Renal dose adj if eGFR <50. Take with food"],
    ["Edoxaban", "60 mg OD (30 mg if eGFR 15-50 or wt≤60 kg)", "PO OD", "AF, VTE", "Reduce dose in renal impairment or low weight"],
    ["LMWH (Enoxaparin)", "Treatment: 1 mg/kg SC BD. Prophylaxis: 40 mg SC OD", "SC", "DVT/PE treatment, surgical prophylaxis, ACS bridging", "Reduce dose if eGFR <30. Monitor anti-Xa if obese/pregnant/renal"],
    ["UFH (Unfractionated)", "IV 5000 U bolus then 18 U/kg/h infusion (aPTT guided)", "IV infusion", "STEMI (PCI), PE with instability, reversal with protamine needed", "Reverse with protamine sulphate. Short half-life – useful peri-op"],
  ].forEach((row, i) => tableRow(s, row, LX, 2.78 + i * 0.235, i));

  sectionLabel(s, "STATINS", LX, 4.22, 8.55, C.purple);
  tableHeader(s, LX, 4.48, cols);
  [
    ["Atorvastatin", "10–80 mg", "PO nocte", "CVD primary/secondary prevention, HF, post-ACS (80 mg)", "High-intensity. Most commonly used. Take at night"],
    ["Rosuvastatin", "5–40 mg", "PO OD", "High CVD risk, familial hypercholesterolaemia", "High-intensity. Fewer myopathy interactions vs atorvastatin"],
    ["Simvastatin", "10–40 mg (max 80 mg – avoid due to myopathy risk)", "PO nocte", "CVD prevention", "⚠ Multiple drug interactions (diltiazem, amiodarone). Now rarely first-line"],
  ].forEach((row, i) => tableRow(s, row, LX, 4.72 + i * 0.235, i));

  sectionLabel(s, "ANTI-ARRHYTHMICS", LX, 5.42, 8.55, "4B2067");
  tableHeader(s, LX, 5.68, cols);
  [
    ["Amiodarone", "200 mg TDS x1 wk → 200 mg BD x1 wk → 200 mg OD. IV: 300 mg over 20–60 min", "PO/IV", "AF, VT, VF (cardiac arrest)", "⚠ Thyroid, pulmonary, hepatic toxicity. TFTs/LFTs/CXR every 6 months. Photosensitivity"],
    ["Digoxin", "62.5–250 mcg OD (loading: 250–500 mcg, then 125–250 mcg)", "PO OD", "AF rate control (especially HF), HF with AF", "Narrow TI. Toxic if K+ low. Level 1–2 nmol/L. Bradycardia, N&V, visual changes"],
    ["Flecainide", "50–150 mg BD", "PO BD", "AF rhythm control, SVT", "⚠ Avoid post-MI or structural heart disease (pro-arrhythmic). Pill-in-pocket for paroxysmal AF"],
    ["Adenosine", "6 mg IV rapid bolus → 12 mg → 12 mg (with flush)", "IV rapid bolus", "SVT (diagnostic + treatment)", "Very short half-life (<10 s). Chest tightness/bronchospasm. Contraindicated in asthma → use verapamil"],
  ].forEach((row, i) => tableRow(s, row, LX, 5.92 + i * 0.235, i));

  s.addText("⚠ Doses are for average adults with normal renal/hepatic function. Always adjust for patient factors.", {
    x: 0.15, y: 7.3, w: 13, h: 0.18, fontSize: 6.5, fontFace: "Calibri", color: C.redLt, italic: true
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 - RESPIRATORY + NEUROLOGY DRUGS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.offWhite }, line: { color: C.offWhite, width: 0 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.5, fill: { color: C.green }, line: { color: C.green, width: 0 } });
  s.addText("RESPIRATORY + NEUROLOGY DRUGS", { x: 0.2, y: 0, w: 10, h: 0.5, fontSize: 15, fontFace: "Calibri", color: C.white, bold: true, valign: "middle" });
  s.addText("Slide 4 of 6", { x: 10.3, y: 0, w: 2.8, h: 0.5, fontSize: 9, fontFace: "Calibri", color: "A3CFAA", align: "right", valign: "middle" });

  const LX = 0.15;
  const cols = ["Drug", "Standard Dose", "Route/Freq", "Indication", "Key Notes"];

  // RESPIRATORY
  sectionLabel(s, "BRONCHODILATORS — RESPIRATORY", LX, 0.56, 8.55, C.green);
  tableHeader(s, LX, 0.82, cols);
  [
    ["Salbutamol (SABA)", "100–200 mcg (2–4 puffs) PRN. Neb: 2.5–5 mg", "Inhaler/Neb", "Asthma/COPD relief, acute asthma", "⚠ Tachycardia, hypokalaemia (high doses/nebs). Continuous neb in severe asthma"],
    ["Ipratropium (SAMA)", "Neb: 250–500 mcg QDS. MDI: 20–40 mcg TDS–QDS", "Inhaler/Neb", "COPD, acute asthma adjunct", "Additive effect with salbutamol. Caution in glaucoma/urinary retention"],
    ["Salmeterol (LABA)", "50 mcg BD (in ICS/LABA combo)", "Inhaler BD", "Asthma step 3+ (with ICS), COPD maintenance", "⚠ Never use without ICS in asthma. Vilanterol, formoterol similar"],
    ["Tiotropium (LAMA)", "18 mcg OD (Handihaler) or 2.5 mcg (Respimat)", "Inhaler OD", "COPD maintenance (first-line)", "Reduces exacerbations. Dry mouth, urinary retention"],
    ["Beclometasone (ICS)", "100–400 mcg BD (low–high dose ranges vary by device)", "Inhaler BD", "Asthma step 2+ maintenance", "Rinse mouth after use (prevent oral candidiasis)"],
    ["Prednisolone", "30–50 mg OD x 5 days (acute); chronic varies", "PO OD", "Acute asthma, AECOPD, allergic reactions, IBD, RA, vasculitis", "Monitor glucose/BP. Adrenal suppression >3 weeks. Bone protection if long-term"],
    ["Magnesium Sulphate", "2 g in 100 mL 0.9% NaCl over 20 min IV (single dose)", "IV", "Severe/life-threatening acute asthma (refractory to nebulisers)", "Bronchodilator + anti-inflammatory. Monitor BP during infusion"],
    ["Montelukast (LTRA)", "10 mg OD", "PO nocte", "Asthma step 3 add-on, allergic rhinitis", "⚠ Neuropsychiatric SE reported (anxiety, suicidal ideation) – counsel patient"],
  ].forEach((row, i) => tableRow(s, row, LX, 1.06 + i * 0.235, i));

  // NEUROLOGY
  sectionLabel(s, "NEUROLOGY — SEIZURES / HEADACHE / STROKE", LX, 3.02, 8.55, C.purple);
  tableHeader(s, LX, 3.28, cols);
  [
    ["Lorazepam", "4 mg IV/IM or buccal (max 2 doses)", "IV/IM/buccal", "Status epilepticus (1st line)", "Give slowly IV. Respiratory depression risk. Have resuscitation ready"],
    ["Midazolam", "10 mg buccal/IM (IM in community, buccal in hospital)", "Buccal/IM", "SE 1st line (if no IV access)", "Buccal preferred in paediatrics/community"],
    ["Levetiracetam", "60 mg/kg IV over 15 min (max 4.5 g) for SE. Maintenance: 500–1500 mg BD", "IV/PO BD", "SE 2nd line, focal epilepsy, generalised epilepsy", "Few drug interactions. Mood/behavioural SE. Safe in renal (dose adj required)"],
    ["Sodium Valproate", "SE: 40 mg/kg IV over 15 min. Oral: 500–2000 mg/day in divided doses", "IV/PO BD–TDS", "Generalised epilepsy, JME, SE (2nd line)", "⚠ Major teratogen – AVOID in women of childbearing potential (VALPROATE PREGNANCY PREVENTION PROGRAMME)"],
    ["Lamotrigine", "Start 25 mg OD x2 wks, titrate slowly to 100–200 mg BD", "PO BD", "Focal epilepsy, Generalised, bipolar disorder", "⚠ Slow titration mandatory (Stevens-Johnson syndrome risk if escalated quickly)"],
    ["Carbamazepine", "100–200 mg BD titrated to 400–1200 mg/day", "PO BD", "Focal epilepsy, trigeminal neuralgia", "⚠ Induces CYP450. Aplastic anaemia (rare). Hyponatraemia. Many interactions"],
    ["Sumatriptan", "50–100 mg PO or 6 mg SC or 10–20 mg nasal", "PO/SC/nasal", "Acute migraine, acute cluster headache (SC)", "Do NOT use within 24h of ergotamine. SC fastest onset for cluster"],
    ["Alteplase (tPA)", "0.9 mg/kg IV (max 90 mg); 10% as bolus, rest over 60 min", "IV infusion", "Ischaemic stroke <4.5h from onset", "⚠ Strict BP control (<185/110 before). Multiple contraindications. Risk of haemorrhagic transformation"],
  ].forEach((row, i) => tableRow(s, row, LX, 3.52 + i * 0.235, i));

  s.addText("⚠ Doses are for average adults with normal renal/hepatic function. Always adjust for patient factors.", {
    x: 0.15, y: 7.3, w: 13, h: 0.18, fontSize: 6.5, fontFace: "Calibri", color: C.redLt, italic: true
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 - ENDOCRINE + GI DRUGS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.offWhite }, line: { color: C.offWhite, width: 0 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.5, fill: { color: C.amber }, line: { color: C.amber, width: 0 } });
  s.addText("ENDOCRINE + GASTROINTESTINAL DRUGS", { x: 0.2, y: 0, w: 10, h: 0.5, fontSize: 15, fontFace: "Calibri", color: C.white, bold: true, valign: "middle" });
  s.addText("Slide 5 of 6", { x: 10.3, y: 0, w: 2.8, h: 0.5, fontSize: 9, fontFace: "Calibri", color: "F5DFA0", align: "right", valign: "middle" });

  const LX = 0.15;
  const cols = ["Drug", "Standard Dose", "Route/Freq", "Indication", "Key Notes"];

  sectionLabel(s, "DIABETES DRUGS", LX, 0.56, 8.55, C.amber);
  tableHeader(s, LX, 0.82, cols);
  [
    ["Metformin", "500 mg OD–BD initially; titrate to 1000 mg BD (max 3g/day)", "PO OD–BD with food", "T2DM first-line (if eGFR ≥30)", "⚠ Hold if eGFR <30, contrast, surgery, illness (sick-day rules). GI SE – take with food. B12 deficiency long-term"],
    ["Empagliflozin (SGLT2i)", "10–25 mg OD", "PO OD (morning)", "T2DM + CVD/HF/CKD, HFrEF (even without DM), HFpEF", "⚠ Hold during illness/surgery (DKA risk). Genital infections. NOT for eGFR <20 for glucose lowering"],
    ["Dapagliflozin (SGLT2i)", "10 mg OD", "PO OD", "T2DM, HFrEF, HFpEF, CKD protection", "Same class as empagliflozin. Euglycaemic DKA risk"],
    ["Semaglutide (GLP-1 RA)", "PO: 3–14 mg OD. SC: 0.25–1 mg weekly (Ozempic). 2.4 mg weekly (Wegovy – obesity)", "PO OD or SC weekly", "T2DM + obesity/CVD, obesity treatment", "GI SE (nausea, vomiting) – start low. Pancreatitis risk. Weight loss benefit"],
    ["Liraglutide (GLP-1 RA)", "0.6 mg SC OD x1 wk → 1.2 mg → 1.8 mg OD", "SC OD", "T2DM + CVD risk, obesity (3 mg Saxenda)", "LEADER trial: reduced CV events. Pancreatitis, gallstones"],
    ["Sitagliptin (DPP-4i)", "100 mg OD (50 mg if eGFR 30–50; 25 mg if eGFR <30)", "PO OD", "T2DM add-on (weight neutral)", "Well tolerated. Nasopharyngitis, URTI. No hypoglycaemia risk alone"],
    ["Gliclazide (SU)", "40–320 mg OD–BD (MR: 30–120 mg OD)", "PO OD–BD", "T2DM (when other agents not suitable)", "⚠ Hypoglycaemia risk. Weight gain. Safer SU than glibenclamide in elderly"],
    ["Insulin Glargine/Detemir", "0.1–0.2 units/kg/day SC initially; titrate to FBG", "SC OD (nocte)", "T1DM basal, T2DM add-on", "Flat peakless profile. Titrate by 2 units every 3 days to FBG target 4–7 mmol/L"],
    ["Insulin Aspart/Lispro", "4–10 units SC with meals (titrate to post-prandial BG)", "SC with meals", "T1DM bolus, T2DM mealtime", "Inject immediately before or with meal. May give after eating in uncertain intake"],
  ].forEach((row, i) => tableRow(s, row, LX, 1.06 + i * 0.235, i));

  sectionLabel(s, "THYROID DRUGS", LX, 3.21, 8.55, "7B4F00");
  tableHeader(s, LX, 3.47, cols);
  [
    ["Levothyroxine (T4)", "Start 25–50 mcg OD (1.6 mcg/kg ideal), titrate to TSH", "PO OD (empty stomach)", "Hypothyroidism", "Start low in elderly/IHD (25 mcg). Check TSH every 6–8 wk until stable, then 6–12 monthly"],
    ["Carbimazole", "20–40 mg OD initially; maintenance 5–15 mg OD", "PO OD", "Hyperthyroidism (Graves', toxic nodule)", "⚠ Agranulocytosis (sore throat = STOP + urgent FBC). LFTs. First-trimester: use PTU"],
    ["Propylthiouracil (PTU)", "200–400 mg/day in divided doses initially", "PO BD–TDS", "Hyperthyroidism (1st trimester pregnancy, thyroid storm)", "⚠ Hepatotoxicity (monitor LFTs). Agranulocytosis risk. Block-replace regimen in thyroid storm"],
  ].forEach((row, i) => tableRow(s, row, LX, 3.71 + i * 0.235, i));

  sectionLabel(s, "GI DRUGS — PPI, ANTIEMETICS, LAXATIVES", LX, 4.41, 8.55, C.green);
  tableHeader(s, LX, 4.67, cols);
  [
    ["Omeprazole (PPI)", "20–40 mg OD. IV: 80 mg bolus + 8 mg/h (UGIB)", "PO OD (before food) / IV", "GORD, PUD, H. pylori eradication, UGIB, aspirin/NSAID gastroprotection", "⚠ Avoid long-term without indication (C. diff risk, hypomagnesaemia, B12 deficiency)"],
    ["Metoclopramide", "10 mg TDS (max 5 days)", "PO/IV/IM TDS", "Nausea/vomiting, gastroparesis, migraine adjunct", "⚠ Extrapyramidal SE (dystonia esp. young females). Max 5 days. Avoid in Parkinson's"],
    ["Ondansetron", "4–8 mg TDS", "PO/IV/IM TDS", "Chemotherapy-induced N&V, post-op N&V, hospital N&V", "⚠ QT prolongation (check ECG + K+). Constipation. 5-HT3 antagonist"],
    ["Cyclizine", "50 mg TDS", "PO/IV/IM TDS", "N&V (including vestibular, post-op, opioid-induced)", "Sedating. Anticholinergic SE. Safe in pregnancy"],
    ["Lactulose", "15–30 mL BD (titrate)", "PO BD", "Constipation, hepatic encephalopathy (lactulose 3–4 soft stools/day)", "May take 48h to work. Flatulence. High dose in HE to trap NH3"],
    ["Senna", "7.5–15 mg OD–BD", "PO nocte", "Constipation (stimulant laxative)", "Works overnight. Avoid in bowel obstruction"],
  ].forEach((row, i) => tableRow(s, row, LX, 4.91 + i * 0.235, i));

  s.addText("⚠ Doses are for average adults with normal renal/hepatic function. Always adjust for patient factors.", {
    x: 0.15, y: 7.3, w: 13, h: 0.18, fontSize: 6.5, fontFace: "Calibri", color: C.redLt, italic: true
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 - ANTIBIOTICS + EMERGENCY DRUGS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.offWhite }, line: { color: C.offWhite, width: 0 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.5, fill: { color: C.red }, line: { color: C.red, width: 0 } });
  s.addText("ANTIBIOTICS + EMERGENCY / RESUSCITATION DRUGS", { x: 0.2, y: 0, w: 10, h: 0.5, fontSize: 14, fontFace: "Calibri", color: C.white, bold: true, valign: "middle" });
  s.addText("Slide 6 of 6", { x: 10.3, y: 0, w: 2.8, h: 0.5, fontSize: 9, fontFace: "Calibri", color: "F5B8B8", align: "right", valign: "middle" });

  const LX = 0.15;
  const cols = ["Drug", "Standard Dose", "Route/Freq", "Indication", "Key Notes"];

  sectionLabel(s, "COMMON ANTIBIOTICS", LX, 0.56, 8.55, C.red);
  tableHeader(s, LX, 0.82, cols);
  [
    ["Amoxicillin", "500 mg TDS. High dose: 1 g TDS. IV: 1 g TDS", "PO/IV TDS", "CAP (mild), UTI, otitis media, sinusitis, strep throat", "Penicillin. Check allergy. Rash if given in EBV (glandular fever)"],
    ["Co-amoxiclav (Augmentin)", "625 mg TDS PO or 1.2 g TDS IV", "PO/IV TDS", "CAP (moderate-severe), UTI, abdominal infections, cellulitis", "Cholestatic hepatitis risk (with/after use). Broad spectrum penicillin + BLI"],
    ["Piperacillin-Tazobactam (Tazocin)", "4.5 g IV every 6–8h (q6h for severe sepsis)", "IV q6–8h", "HAP, severe sepsis, intra-abdominal, Pseudomonas cover", "Broad spectrum. Add vancomycin/teicoplanin for MRSA cover"],
    ["Clarithromycin", "250–500 mg BD PO or IV", "PO/IV BD", "Atypical pneumonia (Mycoplasma, Legionella), CAP (add-on), H. pylori, skin infections (penicillin allergy)", "⚠ QT prolongation. CYP3A4 inhibitor (many interactions – statins, warfarin). GI SE"],
    ["Doxycycline", "100–200 mg OD (loading 200 mg)", "PO OD", "CAP (mild, PCN allergy), Chlamydia, LRTI, Lyme disease, malaria prophylaxis", "Take upright with water (oesophageal ulceration). Photosensitivity. Avoid in pregnancy/children <8y"],
    ["Trimethoprim", "200 mg BD x 7 days", "PO BD", "Uncomplicated lower UTI", "Folate antagonist – caution in pregnancy. Check local resistance patterns"],
    ["Nitrofurantoin", "50 mg QDS x 5–7 days (or 100 mg MR BD)", "PO QDS/BD", "Lower UTI (not upper – does not achieve therapeutic renal tissue levels)", "⚠ Avoid if eGFR <30 (ineffective + toxic). Pulmonary SE with long-term use"],
    ["Ceftriaxone", "1–2 g IV OD (2 g for meningitis/serious infections)", "IV OD", "Meningitis (with amoxicillin for Listeria cover), severe CAP, spontaneous bacterial peritonitis, gonorrhoea", "3rd gen cephalosporin. Biliary sludge with prolonged use. Avoid in hyperbilirubinaemia (neonates)"],
    ["Metronidazole", "400 mg TDS PO or 500 mg TDS IV", "PO/IV TDS", "Anaerobic infections, C. diff (oral, 2nd line), intra-abdominal, pelvic, dental infections", "⚠ Disulfiram reaction with alcohol. Peripheral neuropathy (prolonged use). Metallic taste"],
    ["Vancomycin", "15–20 mg/kg IV BD (AUC-guided dosing preferred)", "IV BD (infuse over ≥60 min)", "MRSA, C. diff (oral PO only for colitis), line infections, endocarditis (staph)", "⚠ Nephrotoxic + ototoxic. Red man syndrome if rapid infusion. Therapeutic drug monitoring required"],
  ].forEach((row, i) => tableRow(s, row, LX, 1.06 + i * 0.235, i));

  sectionLabel(s, "EMERGENCY / RESUSCITATION DRUGS", LX, 3.46, 8.55, "8B0000");
  tableHeader(s, LX, 3.72, cols);
  [
    ["Adrenaline (Epinephrine)", "Cardiac arrest: 1 mg IV every 3–5 min. Anaphylaxis: 0.5 mg (500 mcg) IM (thigh)", "IV / IM", "Cardiac arrest (PEA/asystole/VF), anaphylaxis, severe asthma", "IM adrenaline for anaphylaxis: use anterolateral thigh. Auto-injector: 0.3–0.5 mg. IV for cardiac arrest only"],
    ["Atropine", "0.5–1 mg IV (repeat to max 3 mg). Bradycardia: 0.6–1.2 mg", "IV", "Symptomatic bradycardia, organophosphate poisoning, pre-op antisialagogue", "Cholinergic blockade. Tachycardia, dry mouth, urinary retention, blurred vision"],
    ["GTN (Glyceryl trinitrate)", "0.4 mg sublingual spray PRN. IV: 1–10 mg/h infusion", "SL / IV infusion", "Acute angina, ACS pain relief, acute hypertensive emergency, pulmonary oedema", "⚠ Hypotension – have patient sitting/lying. Do NOT use if systolic BP <90 or if PDE5 inhibitor taken in 24–48h"],
    ["Naloxone", "0.4–2 mg IV/IM/SC; repeat every 2–3 min until respiratory rate improves (max 10 mg)", "IV/IM/SC", "Opioid overdose (respiratory depression)", "Short half-life (<45 min) – may need repeated doses or infusion (opioid lasts longer). Precipitates withdrawal"],
    ["Flumazenil", "200 mcg IV over 15 sec; repeat 100 mcg every 60 sec to max 1 mg", "IV", "Benzodiazepine overdose reversal", "⚠ Short half-life – re-sedation likely. Can precipitate seizures in BZD-dependent patients. NOT routine in OD"],
    ["Hydrocortisone", "100–200 mg IV QDS (acute adrenal crisis). 100 mg IV pre-op (at-risk patients)", "IV QDS", "Addisonian crisis, severe asthma, anaphylaxis (2nd line), hypercalcaemia (lymphoma)", "Give with saline in Addisonian crisis. Switch to oral once stable"],
    ["Dextrose (Glucose)", "50 mL of 50% glucose IV (or 150 mL of 20% glucose)", "IV bolus", "Severe hypoglycaemia (unconscious patient)", "Flush cannula well after 50% glucose (irritant). Repeat BG in 15 min. Follow with snack once conscious"],
    ["Glucagon", "1 mg IM/SC/IV", "IM/SC", "Severe hypoglycaemia (no IV access), beta-blocker overdose", "Effects take 10–15 min. N&V common. Give carbohydrate once conscious. Limited glycogen stores in fasting/alcohol"],
  ].forEach((row, i) => tableRow(s, row, LX, 3.96 + i * 0.235, i));

  s.addText("⚠ Doses are for average adults with normal renal/hepatic function. Always adjust for patient factors.", {
    x: 0.15, y: 7.3, w: 13, h: 0.18, fontSize: 6.5, fontFace: "Calibri", color: C.redLt, italic: true
  });
}

// ──────────────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/drug-cheatsheet/GenMed_Drug_Doses_CheatSheet.pptx" })
  .then(() => console.log("DONE: GenMed_Drug_Doses_CheatSheet.pptx created"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/drug-cheatsheet && node build.js 2>&1

Your cheat sheet is ready:

GenMed Drug Doses CheatSheet

Presentation · PPTX


Here is what is inside (6 slides, widescreen format):
SlideContent
1 - CoverTitle slide with colour-coded category tags
2 - CardiovascularACE inhibitors/ARBs/ARNI, Beta-blockers, Calcium channel blockers, Diuretics
3 - Cardiovascular cont.Antiplatelets (aspirin, clopidogrel, ticagrelor, prasugrel), Anticoagulants (warfarin, DOACs, heparin), Statins, Anti-arrhythmics (amiodarone, digoxin, flecainide, adenosine)
4 - Respiratory + NeurologyBronchodilators (SABA/SAMA/LABA/LAMA/ICS), steroids, magnesium sulphate, montelukast; seizure drugs (lorazepam, levetiracetam, valproate, lamotrigine, carbamazepine), sumatriptan, alteplase
5 - Endocrine + GIDiabetes drugs (metformin, SGLT2i, GLP-1 RA, DPP-4i, sulfonylureas, insulins), thyroid drugs (levothyroxine, carbimazole, PTU), PPIs, antiemetics, laxatives
6 - Antibiotics + EmergencyCommon antibiotics (amoxicillin, co-amoxiclav, Tazocin, clarithromycin, doxycycline, ceftriaxone, vancomycin, etc.); Emergency drugs (adrenaline, atropine, GTN, naloxone, flumazenil, glucose, glucagon)
Each row shows: Drug | Standard Dose | Route/Freq | Indication | Key Notes (warnings/monitoring) - with warning symbols (⚠) on the most important safety points.

Build a drug interaction quick reference (statins + macrolides, ACE + NSAIDs, etc.)

Reading File
Good. Building this now - a colour-coded severity system (Contraindicated / Serious / Monitor / Caution) with mechanism + clinical consequence + management action for each interaction pair.
Writing File

~/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); });
Running Command

cd /home/daytona/workspace/drug-cheatsheet && node interactions.js 2>&1

Your drug interactions cheat sheet is ready:

Drug Interactions QuickRef

Presentation · PPTX


Here's what's inside across 7 slides:

Severity colour coding used throughout

ColourRatingMeaning
Dark RedCONTRAINDICATEDNever combine
RedSERIOUSAvoid; significant harm expected
OrangeMAJORSignificant risk; requires dose change or monitoring
AmberMODERATEManageable with caution/monitoring
GreenMONITORGenerally safe; watch for signs

Slide-by-slide breakdown

SlideTopicKey pairs covered
1Cover + contentsSeverity legend, slide map
2CYP450 interactionsStatins + macrolides/azoles, warfarin + fluconazole/amiodarone/rifampicin/metronidazole, OCP + enzyme inducers
3CardiovascularACE/ARB + NSAIDs ("triple whammy"), ACE/ARB + K+-sparing agents, digoxin + amiodarone/CCBs/diuretics, beta-blocker + verapamil, QT-prolonging drug combinations
4AntibioticsMacrolides (colchicine, carbamazepine, warfarin, QT drugs), fluoroquinolones (theophylline, warfarin, iron chelation), metronidazole + alcohol, rifampicin (inducer - DOACs, OCP, ART, steroids)
5CNS + PsychiatricSerotonin syndrome (SSRIs + MAOIs/tramadol/triptans/lithium), SSRI + tamoxifen (CYP2D6), enzyme-inducing AEDs, lithium interactions, antipsychotics + QT/dopaminergic agents, clozapine + smoking cessation
6Endocrine + RenalMetformin + contrast, sulfonylureas + fluconazole/beta-blockers, insulin + steroids, SGLT2i sick-day rules, ciclosporin/tacrolimus + CYP inhibitors/rifampicin, diuretics + aminoglycosides/digoxin/lithium
7At-a-glance summary24 highest-risk pairs in a two-column rapid-scan format: Drug pair → Consequence → Action
Each row in the tables shows: Drug A | Drug B | Severity | Mechanism | Clinical Effect | Management Action - so you know exactly why an interaction occurs and what to do about it.
This is a shared conversation. Sign in to Orris to start your own chat.